Python Script to add OpenGapps, Magisk, libhoudini translation library and libndk translation library to waydroid !

Overview

Waydroid Extras Script

Visits Badge

Script to add gapps and other stuff to waydroid !

Installation/Usage

"lzip" is required for this script to work, install it using your distribution's package manager: Arch linux:

sudo pacman -S lzip

Ubuntu/Ubuntu based:

sudo apt install lzip

Then run:

git clone https://github.com/casualsnek/waydroid_script
cd waydroid_script
sudo python3 -m pip install -r requirements.txt
sudo python3 waydroid_extras.py [-i/-g/-n/-h]

Install OpenGapps

Open terminal and switch to directory where "waydroid_extras.py" is located then run:

sudo python3 waydroid_extras.py -g

Then restart waydroid service with command below :

sudo systemctl start waydroid-container.service

Then launch waydroid with:

waydroid show-full-ui

After waydroid has finished booting open terminal and switch to directory where "waydroid_extras.py" is located then run:

sudo python3 waydroid_extras.py -i

Copy the returned numeric ID open "https://google.com/android/uncertified/?pli=1" enter the id and register it, you may need to wait upto 10-20 minutes for device to get registered, then clear Google Play Service's cache and try logging in !

Install Magisk

Open terminal and switch to directory where "waydroid_extras.py" is located then run:

sudo python3 waydroid_extras.py -m

Then restart waydroid service with command below :

sudo systemctl start waydroid-container.service

Magisk will be installed on next boot ! Note That this is bootless installation and modules don't work as of now !

Install libndk arm translation

This may or may not work properly and is only for testing: Open terminal and switch to directory where "waydroid_extras.py" is located then run:

sudo python3 waydroid_extras.py -n

Then restart waydroid service with command below :

sudo systemctl start waydroid-container.service

Install libhoudini arm translation

This may or may not work properly and is only for testing: ( Much stable than libndk ) and works on android 11 images Open terminal and switch to directory where "waydroid_extras.py" is located then run:

sudo python3 waydroid_extras.py -l

Then restart waydroid service with command below :

sudo systemctl start waydroid-container.service

Get Android ID for device registration

You need to register you device with its it before being able to use gapps, this will print out your Android ID which you can use for device registration required for google apps: Open terminal and switch to directory where "waydroid_extras.py" is located then run:

sudo python3 waydroid_extras.py -i

Star this repository if you find this useful, if you encounter problem create a issue on github !

Comments
  • Magisk Script Successful but Magisk not Installed

    Magisk Script Successful but Magisk not Installed

    Using Waydroid on Sailfish OS, according to https://github.com/lal883/tama-sailfish-waydroid-instructios, and I ran Magisk script, and rebooted, and Magisk app installed, but doesn't do anything without installing Magisk, (installation status shows "n/a"). The only method option given to install is to select and patch a file. I don't think patching Sailfish boot img would work, but not sure what other file I would patch ...

    I saw note in README about it being a "bootless" installation, and that modules won't work, but as it is for me, root won't even work, and the app does nothing...

    bug question 
    opened by levone1 15
  • Libhoudini fails to start apps

    Libhoudini fails to start apps

    Whenever I try to start a non-native architechure app, the app crashes almost immediately, with the following printed in logcat:

    11-28 22:31:34.051  5154  5154 E linker  : library "/system/lib64/arm64/nb/libtcb.so" ("/system/lib64/arm64/nb/libtcb.so") needed or dlopened by "/system/lib64/libhoudini.so" is not accessible for the namespace: [name="(default)", ld_library_paths="", default_library_paths="/system/lib64:/system/product/lib64", permitted_paths="/system/lib64/drm:/system/lib64/extractors:/system/lib64/hw:/system/product/lib64:/system/framework:/system/app:/system/priv-app:/vendor/framework:/vendor/app:/vendor/priv-app:/system/vendor/framework:/system/vendor/app:/system/vendor/priv-app:/odm/framework:/odm/app:/odm/priv-app:/oem/app:/system/product/framework:/system/product/app:/system/product/priv-app:/data:/mnt/expand:/apex/com.android.runtime/lib64/bionic:/system/lib64/bootstrap"]
    
    
    bug question 
    opened by CCF100 8
  • Script uses outdated sources and GAPPS installation fails

    Script uses outdated sources and GAPPS installation fails

    The script is using sources for GAPPS which are no longer valid, causing a download error. In addition, even when manually changing the sources, the script still fails to successfully install GAPPS:

        ==> OpenGapps zip not downloaded or hash mismatches, downloading now .....
        100%|███████████████████████████████████████| 121M/121M [01:37<00:00, 1.24MiB/s]
        ==> Extracting opengapps...
        ==> Processing app package : /tmp/ogapps/extract/Core/vending-x86_64.tar.lz
        ==> Processing app package : /tmp/ogapps/extract/Core/vending-common.tar.lz
        Traceback (most recent call last):
          File "/home/cmdr/Downloads/waydroid_script/waydroid_extras.py", line 597, in <module>
            main()
          File "/home/cmdr/Downloads/waydroid_script/waydroid_extras.py", line 585, in main
            install_gapps()
          File "/home/cmdr/Downloads/waydroid_script/waydroid_extras.py", line 171, in install_gapps
            app_priv = os.listdir(os.path.join(extract_to, "appunpack", app_name, "nodpi"))[0]
        FileNotFoundError: [Errno 2] No such file or directory: '/tmp/ogapps/extract/appunpack/vending-common/nodpi'
    

    My source: https://downloads.sourceforge.net/project/opengapps/x86_64/20220120/open_gapps-x86_64-11.0-pico-20220120.zip

    bug 
    opened by KingWaffleIII 7
  • Should downloaded files be placed in /tmp?

    Should downloaded files be placed in /tmp?

    /tmp is cleared across reboots. At least on Arch Linux, it is actually a tmpfs that is on RAM. Every time I re-init waydroid and reinstall libhoudini, the script re-downloads the tarball. Perhaps it would be better if the downloaded files are placed in persistent directories, such as /var/cache and /var/tmp.

    BTW, some common external downloaders, such as wget and aria2, would be more robust and allow continuation.

    opened by SamLukeYes 5
  • getting android id fails

    getting android id fails

    when trying to run udo python3 waydroid_extras.py -i it fails with the following traceback:

    emil@pop-thinkpad:~/waydroid_script/waydroid_script$ sudo python3 waydroid_extras.py -i
    Traceback (most recent call last):
      File "/home/emil/waydroid_script/waydroid_script/waydroid_extras.py", line 566, in <module>
        main()
      File "/home/emil/waydroid_script/waydroid_script/waydroid_extras.py", line 559, in main
        get_android_id()
      File "/home/emil/waydroid_script/waydroid_script/waydroid_extras.py", line 183, in get_android_id
        queryout = subprocess.check_output(["sqlite3", "/var/lib/waydroid/data/data/com.google.android.gsf/databases/gservices.db", sqs.strip()], stderr=subprocess.STDOUT)
      File "/usr/lib/python3.9/subprocess.py", line 424, in check_output
        return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
      File "/usr/lib/python3.9/subprocess.py", line 505, in run
        with Popen(*popenargs, **kwargs) as process:
      File "/usr/lib/python3.9/subprocess.py", line 951, in __init__
        self._execute_child(args, executable, preexec_fn, close_fds,
      File "/usr/lib/python3.9/subprocess.py", line 1821, in _execute_child
        raise child_exception_type(errno_num, err_msg, err_filename)
    FileNotFoundError: [Errno 2] No such file or directory: 'sqlite3'
    
    opened by emhl 5
  • Fixed a bug preventing libhoudini install

    Fixed a bug preventing libhoudini install

    Libhoudini installation is still broken after last commit: FileNotFoundError: [Errno 2] No such file or directory: '/tmp/waydroidimage/system/etc/init/hw/init.rc'

    Setting the default value for os.environ.get("ANDROID_VERSION") back to 10 (it's the same for install_ndk method, wich is working fine)

    opened by DGdev91 4
  • Magisk

    Magisk

    Since WSA and Waydroid function almost very similarly, we can probably use a project called "MagiskOnWSA" and port it to wayland for proper magisk support on waydroid :3 https://github.com/LSPosed/MagiskOnWSA

    opened by xAffan 2
  • Install under Ubuntu Touch (UBports)

    Install under Ubuntu Touch (UBports)

    [1] Install commands for Ubuntu Touch (UBports, Halium-9.0, Xiaomi Mi8 - dipper)

    sudo apt install lzip git
    sudo apt install -y python3-pip
    git clone https://github.com/casualsnek/waydroid_script
    cd waydroid_script
    sudo python3 -m pip install -r requirements.txt
    sudo python3 waydroid_extras.py [-m/-i/-g/-n/-h]
    

    [2] UBports by default makes small (1.4G) /data partition, so, when installing waydroid_script you can face: ==> Installing magisk now ... OSError: [Errno 28] No space left on device

    Check in Terminal or SSH

    sudo df -h
    

    /dev/loop1 1,4G 1,4G 0 100% /var/lib/waydroid/rootfs /dev/loop3 1,4G 1,4G 0 100% /tmp/waydroidimage

    sudo losetup /dev/loop1
    sudo losetup /dev/loop3
    

    [3] CURE: increase Waydroid /data image size (using ADB)

    1) reboot to custom recovery (TWRP, OrangeFox, UBports) by "fastboot reboot recovery" etc.
    2) adb shell ## connect with adb
    3) mount -o rw /dev/block/by-name/userdata /data ##mount /data
    4) cd /data/system-data/var/lib/waydroid/images ## cd /data
    5) dd if=/data/system-data/var/lib/waydroid/images/system.img of=/sdcard/waydroid-system.img status=progress ## just for safety make copy to be able to revert
    6) e2fsck -f system.img ##check image health
    7) resize2fs -p system.img 5G ##resize /data to 5GB (you can choose any other size)
    8) reboot system
    
    opened by osering 2
  • "git clone" no funciona para mi.

    Como señala el la cuestión, al correr

    git clone https://github.com/casualsnek/waydroid_script cd waydroid_script sudo python3 -m pip install -r requirements.txt sudo python3 waydroid_extras.py [-i/-g/-n/-h]

    obtengo como resultado:

    **$ git clone https://github.com/casualsnek/waydroid_script

    No se ha encontrado la orden «git», pero se puede instalar con:

    sudo apt install git

    $ cd waydroid_script bash: cd: waydroid_script: No existe el archivo o el directorio

    $ sudo python3 -m pip install -r requirements.txt /usr/bin/python3: No module named pip

    $ sudo python3 waydroid_extras.py [-i/-g/-n/-h]**

    Qué debo hacer para que resulte como es debido?

    opened by Theo3113 2
  • Running

    Running "...-g" Successfully Causes Waydroid to Not Boot

    I'm ising Waydroid 1.1.1 on SailfishOS, according to https://github.com/lal883/tama-sailfish-waydroid-instructios and functions fine. After successfully running "python3 waydroid_extras.py -g", ("OpenGapps successfully installed" message), Waydroid now will not boot.

    Status shows container running and session running, but never shows "ready" message, which would indicate that "show-full-ui" command will succeed. Also, "puddlejumper service" message never appears.

    Any ideass how to troubleshoot?

    opened by levone1 2
  • error on arch linux

    error on arch linux

    system info:

    ❯ uname -a
    Linux lenovo 5.15.12-arch1-1 #1 SMP PREEMPT Wed, 29 Dec 2021 12:04:56 +0000 x86_64 GNU/Linux
    
    ❯ sudo python3 waydroid_extras.py -g
    ==> Stopping waydroid and unmounting already mounted images...
    ==> Excepted hash: 55db1a79b1d41573d7c2cd5927189779  | File hash: 
    ==> Found system image: /usr/share/waydroid-extra/images/system.img
    ==> Resizing system image....
    ==> Unmounting .. 
    ==> Warning: umount failed.. umount: /tmp/waydroidimage: no mount point specified.
     
    ==> OpenGapps zip not downloaded or hash mismatches, downloading now .....
    100%|█████████████████████████████████████████████████████████████████████| 111M/111M [00:59<00:00, 1.84MiB/s]
    ==> Extracting opengapps...
    ==> Processing app package : /tmp/ogapps/extract/Core/backuprestore-all.tar.lz
    tar (child): lzip: Cannot exec: No such file or directory
    tar (child): Error is not recoverable: exiting now
    tar: Child returned status 2
    tar: Error is not recoverable: exiting now
    Traceback (most recent call last):
      File "/home/xxx/Github/waydroid_script/waydroid_extras.py", line 573, in <module>
        main()
      File "/home/xxx/Github/waydroid_script/waydroid_extras.py", line 561, in main
        install_gapps()
      File "/home/xxx/Github/waydroid_script/waydroid_extras.py", line 153, in install_gapps
        app_name = os.listdir(os.path.join(extract_to, "appunpack"))[0]
    IndexError: list index out of range
    . . .
    opened by Greasy-Monkey 1
  • read-only filesystem error when trying to install Magisk

    read-only filesystem error when trying to install Magisk

    tl;dr is in the title, console output below:

    cobalt@ideapad-flex-5:~/waydroid_script$ sudo python3 waydroid_extras.py -m
    /home/cobalt/.cache/waydroid_script/downloads
    ==> Found system image: /var/lib/waydroid/images/system.img
    ==> Resizing system image....
    ==> Failed to resize image '/var/lib/waydroid/images/system.img' .. !  resize2fs 1.46.5 (30-Dec-2021)
    resize2fs: Read-only file system While checking for on-line resizing support
    Filesystem at /var/lib/waydroid/images/system.img is mounted on /var/lib/waydroid/rootfs; on-line resizing required
    old_desc_blocks = 1, new_desc_blocks = 1
    
    ==> You can exit and retry with sudo or force continue (May fail installation !), Continue ? [y/N]: y
    ==> Unmounting .. 
    ==> Extracting archive...
    ==> Installing magisk now ...
    Traceback (most recent call last):
      File "/home/cobalt/waydroid_script/waydroid_extras.py", line 594, in <module>
        main()
      File "/home/cobalt/waydroid_script/waydroid_extras.py", line 589, in main
        install_magisk()
      File "/home/cobalt/waydroid_script/waydroid_extras.py", line 501, in install_magisk
        with open(os.path.join(sys_image_mount, "system", "bin", "init-magisk.sh"), "w") as imf:
    OSError: [Errno 30] Read-only file system: '/tmp/waydroidimage/system/bin/init-magisk.sh'
    

    This is running on Pop!_OS 22.04

    opened by cobalt2727 6
  • libhoudini install breaks 32 bit waydroid

    libhoudini install breaks 32 bit waydroid

    I'm running Waydroid in Ubuntu 22.10. The CPU doesn't support SSE4.2, so Waydroid installs 32-bit Android. It works. But then if I install libhoudini, it stops working. The only relevant error message I'm able to see is this in waydroid log: lxc-start: waydroid: conf.c: run_buffer: 321 Script exited with status 126

    This seems to be because of the way build props are set, including 64 abi props. I got Waydroid to work again by changing abi props to:

    ro.product.cpu.abi=x86
    ro.product.cpu.abilist=x86,armeabi-v7a,armeabi
    ro.product.cpu.abilist32=x86,armeabi-v7a,armeabi
    

    After that I could install an app with 32 bit arm libraries. But then, trying to run it, I get this in logcat:

    11-15 16:33:10.653 44041 44110 D houdini : [44110] Expected CPU feature >> AES << is not supported.
    11-15 16:33:10.653 44041 44110 D houdini : [44110] Expected CPU feature >> POPCNT << is not supported.
    11-15 16:33:10.653 44041 44110 D houdini : [44110] Expected CPU feature >> SSE4_2 << is not supported.
    11-15 16:33:10.653 44041 44110 D houdini : [44110] Expected CPU feature >> PCLMULQDQ << is not supported.
    11-15 16:33:10.658    45    45 I tombstoned: received crash request for pid 44041
    

    So, at least this build of houdini can't actually run on my CPU. I wonder if houdini can be built without those requirements?

    Edit: Installing libndk runs into the same problems. Again there is a need to edit system/build.prop the same way. Then when I try to run the app, it dies with SIGILL (illegal instruction) in the NDK library.

    Using https://github.com/mirh/opemu-linux, which I needed to alter a bit to run with my kernel, the translators crash a different way instead. Opemu works well enough to make POPCNT work, but I guess there are some problems with other instructions.

    opened by dreamlayers 0
  • Latest libhoudini?

    Latest libhoudini?

    Just wondering if this script use lastest libhoudini, came across this post on reddit Latest Waydroid image now runs "Genshin Impact" on x86 Linux PC quote from OP in comment section:

    You can downlaod lastest Android 11 images from Waydroid's sourceforge. Then follow this video to install custom Waydroid images. Remember to install libhoudini using casualsnek's scripts. Plus here is the newer version of libhoudini extracted from WSA.

    i don't really know how it works, and i don't know if this can be use with this script. just want to share what i found.

    Thank for the script btw, still try to play some game (Nikke goddess victory / Artery Gear) on waydroid) hope it'll run 😄

    opened by gasacchi 6
  • Stuck in a bootloop after installing libhoudini/libndk. How do i remove them and install again properly?

    Stuck in a bootloop after installing libhoudini/libndk. How do i remove them and install again properly?

    Im using arch with linux-zen. I installed the waydroid-image-gapps AUR package and it worked fine, but i wanted to get arm support. Installed waydroid-image, this script and installed libhoudini, and i was stuck in a bootloop. Reinstalled waydroid-image, cuz i thought it will remove libhoudini, and installed libndk this time. Bootloop. Reinstalled waydroid-image, and its now also stuck in a bootloop. Im guessing that libhoudini and libndk are still there, how do i remove them?

    opened by s-liwka 1
Owner
Casu Al Snek
Casu Al Snek
Ahmed Hossam 12 Oct 17, 2022
A script to add issues to a project in Github based on label or status.

Add Github Issues to Project (Beta) A python script to move Github issues to a next-gen (beta) Github Project Getting Started These instructions will

Kate Donaldson 3 Jan 16, 2022
Islam - This is a simple python script.In this script I have written all the suras of Al Quran. As a result, by using this script, you can know the number of any sura at the moment.

Introduction: If you want to know sura number of al quran by just typing the name of sura than you can use this script. Usage in termux: $ pkg install

Fazle Rabbi 1 Jan 2, 2022
A clipboard where a user can add and retrieve multiple items to and from (resp) from the clipboard cache.

A clipboard where a user can add and retrieve multiple items to and from (resp) from the clipboard cache.

Gaurav Bhattacharjee 2 Feb 7, 2022
Fused multiply-add (with a single rounding) for Python.

pyfma Fused multiply-add for Python. Fused multiply-add computes (x*y) + z with a single rounding. Useful for dot products, matrix multiplications, po

Nico Schlömer 18 Nov 8, 2022
Yunqi Chen 7 Oct 30, 2022
Add your recently blog and douban states in your GitHub Profile

Add your recently blog and douban states in your GitHub Profile

Bingjie Yan 4 Dec 12, 2022
TB Set color display - Add-on for Blender to set multiple objects and material Display Color at once.

TB_Set_color_display Add-on for Blender with operations to transfer name between object, data, materials and action names Set groups of object's or ma

null 1 Jun 1, 2022
Enhanced version of blender's bvh add-on with more settings supported. The bvh's rest pose should have the same handedness as the armature while could use a different up/forward definiton.

Enhanced bvh add-on (importer/exporter) for blender Enhanced bvh add-on (importer/exporter) for blender Enhanced bvh importer Enhanced bvh exporter Ho

James Zhao 16 Dec 20, 2022
Add-In for Blender to automatically save files when rendering

Autosave - Render: Automatically save .blend, .png and readme.txt files when rendering with Blender Purpose This Blender Add-On provides an easy way t

Volker 9 Aug 10, 2022
Starscape is a Blender add-on for adding stars to the background of a scene.

Starscape Starscape is a Blender add-on for adding stars to the background of a scene. Features The add-on provides the following features: Procedural

Marco Rossini 5 Jun 24, 2022
Reload all Blender add-on modules

Reload-Addon This add-on creates a list of the modules that the add-on selected in the drop-down menu contains and reloads them with the keyboard shor

null 2 Dec 2, 2021
This an Anki add on that automatically converts Notion notes into Anki flash cards. Currently in development!

NotionFlash This is an Anki add on in development that will allow automatically convert your Notion study notes into Anki flash cards. The Anki deck c

Neeraj Patel 10 Oct 7, 2022
Blender Add-on That Provides Quick Access to Render Controls

Blender Render Buttons Blender Add-on That Provides Quick Access to Render Controls A Blender 3.0 compatablity update of Blender2.8x-RenderButton v0.0

Don Schnitzius 3 Oct 18, 2022
A Kodi add-on for watching content hosted on PeerTube.

A Kodi add-on for watching content hosted on PeerTube. This add-on is under development so only basic features work, and you're welcome to improve it.

null 1 Dec 18, 2021
A simple calculator that can add, subtract, multiply or divide depending upon the input from the user

Calculator A simple calculator that can add, subtract, multiply or divide depending upon the input from the user. In this example, we should have the

Jayesh Mali 1 Dec 27, 2021
The repository for AnyMacro: a Fusion360 Add-In

AnyMacro AnyMacro is an Autodesk® Fusion 360™ add-in for chaining multiple commands in a row to form Macros. Macros are created from a set of commands

null 1 Jan 7, 2022
This repo contains scripts that add functionality to xbar.

xbar-custom-plugins This repo contains scripts that add functionality to xbar. Usage You have to add scripts to xbar plugin folder. If you don't find

osman uygar 1 Jan 10, 2022
Python script to commit to your github for a perfect commit streak. This is purely for education purposes, please don't use this script to do bad stuff.

Daily-Git-Commit Commit to repo every day for the perfect commit streak Requirments pip install -r requirements.txt Setup Download this repository. Cr

JareBear 34 Dec 14, 2022