Git Product home page Git Product logo

waydroid_script's Introduction

Waydroid Extras Script

Script to add GApps and other stuff to Waydroid!

Installation/Usage

Interactive terminal interface

git clone https://github.com/casualsnek/waydroid_script
cd waydroid_script
python3 -m venv venv
venv/bin/pip install -r requirements.txt
sudo venv/bin/python3 main.py

image-20230430013103883

image-20230430013119763

image-20230430013148814

Command Line

git clone https://github.com/casualsnek/waydroid_script
cd waydroid_script
python3 -m venv venv
venv/bin/pip install -r requirements.txt
# install something
sudo venv/bin/python3 main.py install {gapps, magisk, libndk, libhoudini, nodataperm, smartdock, microg, mitm}
# uninstall something
sudo venv/bin/python3 main.py uninstall {gapps, magisk, libndk, libhoudini, nodataperm, smartdock, microg}
# get Android device ID
sudo venv/bin/python3 main.py certified
# some hacks
sudo venv/bin/python3 main.py hack {nodataperm, hidestatusbar}

Dependencies

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

Arch, Manjaro and EndeavourOS based distributions:

sudo pacman -S lzip

Debian and Ubuntu based distributions:

sudo apt install lzip

RHEL, Fedora and Rocky based distributions:

sudo dnf install lzip

openSUSE based distributions:

sudo zypper install lzip

Install OpenGapps

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

sudo venv/bin/python3 main.py install gapps

Then launch waydroid with:

waydroid show-full-ui

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

sudo python3 main.py google

Copy the returned numeric ID, then open "https://google.com/android/uncertified/?pli=1". Enter the ID and register it. Wait 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 "main.py" is located then run:

sudo venv/bin/python3 main.py install magisk

Magisk will be installed on next boot!

Zygisk and modules like LSPosed should work now.

If you want to update Magisk, Please use Direct Install into system partition or run this sript again.

This script only focuses on Magisk installation, if you need more management, please check https://github.com/nitanmarcel/waydroid-magisk

Install libndk arm translation

libndk_translation from guybrush firmware.

libndk seems to have better performance than libhoudini on AMD.

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

sudo venv/bin/python3 main.py install libndk

Install libhoudini arm translation

Intel's libhoudini for intel/AMD x86 CPU, pulled from Microsoft's WSA 11 image

houdini version: 11.0.1b_y.38765.m

houdini64 version: 11.0.1b_z.38765.m

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

sudo venv/bin/python3 main.py install libhoudini

Integrate Widevine DRM (L3)

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

sudo venv/bin/python3 main.py install widevine

Install Smart Dock

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

sudo venv/bin/python3 main.py install smartdock

Install a self-signed CA certificate

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

sudo venv/bin/python3 main.py install mitm --ca-cert mycert.pem

Granting full permission for apps data (HACK)

This is a temporary hack to combat against the apps permission issue on Android 11. Whenever an app is open it will always enable a property (persist.sys.nodataperm) to make it execute a script to grant the data full permissions (777). The correct way is to use sdcardfs or esdfs, both need to recompile the kernel or WayDroid image.

Arknights, PUNISHING: GRAY RAVEN and other games won't freeze on the black screen.

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

sudo venv/bin/python3 main.py hack nodataperm

WARNING: Tested on lineage-18.1-20230128-VANILLA-waydroid_x86_64.img. This script will replace /system/framework/service.jar, which may prevent WayDroid from booting. If so, run sudo venv/bin/python3 main.py uninstall nodataperm to remove it.

Or you can run the following commands directly in sudo waydroid shell. In this way, every time a new game is installed, you need to run it again, but it's much less risky.

chmod 777 -R /sdcard/Android
chmod 777 -R /data/media/0/Android 
chmod 777 -R /sdcard/Android/data
chmod 777 -R /data/media/0/Android/obb 
chmod 777 -R /mnt/*/*/*/*/Android/data
chmod 777 -R /mnt/*/*/*/*/Android/obb

Install microG, Aurora Store and Aurora Droid

sudo python main.py install microg

Hide Status Bar

Before Before

After After

sudo venv/bin/python3 main.py hack hidestatusbar

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 "main.py" is located then run:

sudo venv/bin/python3 main.py certified

Star this repository if you find this useful, if you encounter problem create an issue on GitHub!

Error handling

  • Magisk installed: N/A

Check waydroid-magisk

Credits

waydroid_script's People

Contributors

6yntar05 avatar aleasto avatar axolotlek avatar ayasa520 avatar benjamin-loison avatar brccabral avatar casualsnek avatar claui avatar cobalt2727 avatar dgdev91 avatar frostnovahd avatar jamikettunen avatar laichiaheng avatar linyinfeng avatar mak448a avatar mistrmochov avatar mkg20001 avatar nightfeather avatar quackdoc avatar s1204it avatar softwarerat avatar sufandom avatar tkkcc avatar tutacat avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

waydroid_script's Issues

Upgrade libhoudini

I want to upgrade libhoudini. Should I do something to uninstall the old libhoudini and install the new one, or I can just install the new one and the script will take care of this?

Fail to install Widevine L3 on Fedora

Due to a hash mismatch, the script constantly fails to install the Widevine zip folder.
By checksumming the downloaded file I found out the proper md5sum that should be used is "0c311ea2ebee1acee4cfb092aaef1701".

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

Waydroid breaks after install Magisk

Hi, I use waydroid on gentoo, I tried to install the ARM translation layer and it worked as expected but when I intalled Magisk, waydroid stopped to work. I can't run the container, service or show the gui. I asked on waydroid's telegram and another use told me after using the same script he/she was not able to run waydroid too. And this is why I'm here now maybe its something with the script? and here are some logs and feel free to request more details as needed.

System info: Gentoo (kernel: 5.15.74-gentoo-dist), I use openrc so I run the service manually (https://docs.waydro.id/usage/install-on-desktops#manually-starting-waydroid) and I use weston with export XDG_SESSION_TYPE=wayland to run waydroid. I can confirm waydroid was running fine when installed ARM translation but not after Magisk, so I'm sure waydroid was working.

waydroid logcat: https://pastebin.mozilla.org/4iHdkGTc/raw

waydroid status:

Session:        RUNNING
Container:      RUNNING
Vendor type:    MAINLINE
Session user:   esmailelbob(1000)
Wayland display:        None

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.

Android 10 GApps has permission problems when installing some applications/games with OBBs

Due to a new feature in Android 11, applications must request full file permissions to install apps/games with OBBs. However, Play Store, which installed with the script, is intended for Android 10 and thus, doesn't request these new permissions. This version of Play Store works fine for applications without OBBs but when it tries to install apps that do, the download stops mid-way and reports "Can't download [APPNAME]":

image

Android 11 GApps are required to install these applications. The following image shows that on Android 11, there is separate permission for media and full file access. Google Play Store doesn't have access to the latter.

image

(Alchemy Stars here was installed with a third-party app store that did request full file permissions.)

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 😄

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"]

Installing Magisk v23.0 and Loading Magisk Modules

I have been testing this on Ubuntu Touch (Ubports) and Droidiain with Waydroid. It will now load the modules but still have issues with it locking up Magsik Manager on some. Example Riru-Core and if this happens you will need to go into the
/userdata/user-data/phablet/.local/share/waydroid/data/adb/modules directory and delete the module (this directory path is for UBports). It will install Props Module but in system/xbin/gunzip, gzip and zcat apps missing from their folders and so you need to install the Magisk Module for Busybox. If you install Microg module it will cause Waydroid to say rebooting phone. Magisk will install modules and load them "all" on Waydroid boot. So still some issues to work through.

The hardware that I have been testing on is a Sprint Oneplus 7 Pro 5G. I have installed first on slot_B Ubports and then installed Droidian on slot_A so the user data would not be wiped. So I switch between slots to test. The link to the Discord Cannel.

First install the waydroid_script:

To unmount waydroid system.img:
waydroid session stop
sudo waydroid container stop

sudo apt install python-pip -y
sudo apt install python3-pip -y
sudo apt install git -y

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

Reboot phone and then launch waydroid, download and install Magisk Manager v23.0 next. Then kill Waydroid again:

To unmount waydroid system.img:
waydroid session stop
sudo waydroid container stop

Extract the attached Magisk_23.zip file to your downloads directory. This is all assuming you are using Ubports or Droidian. Should work on other OS that support Waydroid... Just mod the following lines if using a different OS with Waydroid.

sudo mkdir /tmp/waydroidimage

#This section is for copying the extracted files in UBports:

sudo mount -o rw /userdata/system-data/var/lib/waydroid/images/system.img /tmp/waydroidimage
sudo cp -R /home/phablet/Downloads/Magisk-system/. /tmp/waydroidimage
sudo rm -r /userdata/user-data/phablet/.local/share/waydroid/data/adb/magisk
sudo cp -R /home/phablet/Downloads/magisk /userdata/user-data/phablet/.local/share/waydroid/data/adb/magisk
sudo cp /home/phablet/Downloads/init-magisk.sh /tmp/waydroidimage/system/bin/

#This section is for copying the extracted files in Droidian:

sudo mount -o rw /var/lib/waydroid/images/system.img /tmp/waydroidimage
sudo cp -R /home/droidian/Downloads/Magisk-system/. /tmp/waydroidimage
sudo rm -r /home/droidian/.local/share/waydroid/data/adb/magisk
sudo cp -R /home/droidian/Downloads/magisk /home/droidian/.local/share/waydroid/data/adb/magisk
sudo cp /home/droidian/Downloads/init-magisk.sh /tmp/waydroidimage/system/bin/

sudo umount /tmp/waydroidimage

Now launch Waydroid, then kill it and load it again so Magisk v23.0 init sets everything up properly and profit....
I hope ;)

Download: Magisk_23.zip

Unmount system image fail.

When I run sudo python3 waydroid_extras.py -n, it shows

==> Stopping waydroid and unmounting already mounted images...
==> Found system image: /var/lib/waydroid/images/system.img
==> Resizing system image....
==> Unmounting .. 
==> Warning: umount failed.. umount: /tmp/waydroidimage: not mounted.
 
==> Failed to mount system image... !  mount: /tmp/waydroidimage: /dev/loop18 already mounted or mount point busy.

system: ubuntu focal

Can't use proxy

command used
waydroid-extras -l
output

==> Found system image: /usr/share/waydroid-extra/images/system.img
==> Resizing system image....
==> Failed to resize image '/usr/share/waydroid-extra/images/system.img' .. !  e2fsck 1.46.5 (30-Dec-2021)
/usr/share/waydroid-extra/images/system.img is mounted.
e2fsck: Cannot continue, aborting.



==> You can exit and retry with sudo or force continue (May fail installation !), Continue ? [y/N]: y
==> Unmounting .. 
==> libhoudini zip not downloaded or hash mismatches, downloading now .....
Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/urllib3/connectionpool.py", line 700, in urlopen
    self._prepare_proxy(conn)
  File "/usr/lib/python3.10/site-packages/urllib3/connectionpool.py", line 994, in _prepare_proxy
    conn.connect()
  File "/usr/lib/python3.10/site-packages/urllib3/connection.py", line 364, in connect
    conn = self._connect_tls_proxy(hostname, conn)
  File "/usr/lib/python3.10/site-packages/urllib3/connection.py", line 501, in _connect_tls_proxy
    socket = ssl_wrap_socket(
  File "/usr/lib/python3.10/site-packages/urllib3/util/ssl_.py", line 453, in ssl_wrap_socket
    ssl_sock = _ssl_wrap_socket_impl(sock, context, tls_in_tls)
  File "/usr/lib/python3.10/site-packages/urllib3/util/ssl_.py", line 495, in _ssl_wrap_socket_impl
    return ssl_context.wrap_socket(sock)
  File "/usr/lib/python3.10/ssl.py", line 512, in wrap_socket
    return self.sslsocket_class._create(
  File "/usr/lib/python3.10/ssl.py", line 1070, in _create
    self.do_handshake()
  File "/usr/lib/python3.10/ssl.py", line 1341, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:997)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/requests/adapters.py", line 439, in send
    resp = conn.urlopen(
  File "/usr/lib/python3.10/site-packages/urllib3/connectionpool.py", line 785, in urlopen
    retries = retries.increment(
  File "/usr/lib/python3.10/site-packages/urllib3/util/retry.py", line 592, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='raw.githubusercontent.com', port=443): Max retries exceeded with url: /casualsnek/miscpackages/main/libhoudini_a11.zip (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:997)')))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/waydroid-extras", line 597, in <module>
    main()
  File "/usr/bin/waydroid-extras", line 594, in main
    install_houdini()
  File "/usr/bin/waydroid-extras", line 365, in install_houdini
    loc_md5 = download_file(houdini_zip_url, dl_file_name)
  File "/usr/bin/waydroid-extras", line 37, in download_file
    response = requests.get(url,stream=True)
  File "/usr/lib/python3.10/site-packages/requests/api.py", line 75, in get
    return request('get', url, params=params, **kwargs)
  File "/usr/lib/python3.10/site-packages/requests/api.py", line 61, in request
    return session.request(method=method, url=url, **kwargs)
  File "/usr/lib/python3.10/site-packages/requests/sessions.py", line 542, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/lib/python3.10/site-packages/requests/sessions.py", line 655, in send
    r = adapter.send(request, **kwargs)
  File "/usr/lib/python3.10/site-packages/requests/adapters.py", line 514, in send
    raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='raw.githubusercontent.com', port=443): Max retries exceeded with url: /casualsnek/miscpackages/main/libhoudini_a11.zip (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:997)')))

proxy

export http_proxy=http://127.0.0.1:8889
export https_proxy=https://127.0.0.1:8889

system:archlinux

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
. . .

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...

magisk: ERROR: e2fsck 1.46.6 (1-Feb-2023) ERROR: resize2fs 1.46.6 (1-Feb-2023)

INFO: Downloading latest Magisk-Delta to /home/gmanka/.cache/waydroid-script/downloads/magisk.apk now ...
100%|████████████████████████████████████████████████████████████████████████████| 11.5M/11.5M [00:01<00:00, 5.73MiB/s]
INFO: Extracting archive...
INFO: Resizing /var/lib/waydroid/images/system.img to 2657M
ERROR: e2fsck 1.46.6 (1-Feb-2023)

ERROR: resize2fs 1.46.6 (1-Feb-2023)

INFO: Mounting /var/lib/waydroid/images/system.img to /tmp/waydroid
WARN: /tmp/waydroid is not a mount point
INFO: Copying magisk libs now ...
INFO: Umounting /tmp/waydroid
INFO: Installation finished

image
image

Can't install Gapps

OSError: [Errno 28] No space left on device: '/tmp/waydroidimage/system/priv-app/GoogleFeedback'
Can you tell me what it could be?

Get Android ID for device registration fails

adam@mobian:~/Downloads/waydroid_script$ sudo python3 waydroid_extras.py -i
Traceback (most recent call last):
  File "/home/adam/Downloads/waydroid_script/waydroid_extras.py", line 573, in <module>
    main()
  File "/home/adam/Downloads/waydroid_script/waydroid_extras.py", line 566, in main
    get_android_id()
  File "/home/adam/Downloads/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'

After installing sqlite3 script ran fine. User README needs updated to add sqlite3 as a requirement.

Fail to install it.

usage: waydroid_extras.py [-h] [-g] [-n] [-i] [-m]
waydroid_extras.py: error: unrecognized arguments: [-i/-g/-n/-h]

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?

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

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'

"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?

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

Problem with Magisk installation

After installing Magisk, the Magisk manager will give a prompt about additional setup. Confirming it will make Waydroid unable to open unless I restart it from commands.

lxc-start: waydroid: start.c: lxc_end: 988 Failed to run lxc.hook.post-stop for container "waydroid"
(008481) [04:45:39] Failed to get service waydroidplatform, trying again...
(008481) [04:45:40] Failed to get service waydroidplatform, trying again...

Magisk install fails

Traceback (most recent call last):
File "/home/arun/waydroid_script/waydroid_extras.py", line 566, in
main()
File "/home/arun/waydroid_script/waydroid_extras.py", line 561, in main
install_magisk()
File "/home/arun/waydroid_script/waydroid_extras.py", line 478, in install_magisk
shutil.copyfile(os.path.join(extract_to, arch_dir, "magiskinit{arch}".format(arch=arch)),
File "/usr/lib/python3.9/shutil.py", line 265, in copyfile
with open(src, 'rb') as fsrc, open(dst, 'wb') as fdst:
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/waydroidimage/sbin/magiskinit'

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?

Magisk app run as a system app (warning)

Magisk app (which can be upgraded to newest v.23.0 unlike Magisk manager which does no update from v.20.4 using Direct install) on start gives warning:

Abnormal state
Running this app as a system app is not supported. Please revert the app to a user app.

OK

Should I let it be like this or try using some app to revert it?

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.

Readme corrections

Thanks for this nice script! I only used it for Magisk because I use microG and not OpenGapps (though I would need to carefully check their differences, pros and cons), but found two slight issues in the readme:

python3 -m pip -r requirements.txt

should read

python3 -m pip install -r requirements.txt

Also, since the script will later need to be run as root, I believe the requirements.txt should be installed with sudo too. Installing them with the above command (without sudo) was not enough to install Magisk because tqdm (installed as user) could not be found when executing the waydroid_extras.py as root.

Fail to install libhoudini on Fedora.

[laichiaheng@julian-pc ~]$ waydroid show-full-ui 
[20:50:23] Failed to get service waydroidplatform, trying again...
[20:50:24] Failed to get service waydroidplatform, trying again...
[20:50:25] Failed to get service waydroidplatform, trying again...
^CTraceback (most recent call last):
  File "/usr/bin/waydroid", line 9, in <module>
    sys.exit(tools.main())
  File "/usr/lib/waydroid/tools/__init__.py", line 111, in main
    actions.app_manager.showFullUI(args)
  File "/usr/lib/waydroid/tools/actions/app_manager.py", line 118, in showFullUI
    maybeLaunchLater(args, showFullUI, justShow)
  File "/usr/lib/waydroid/tools/actions/app_manager.py", line 53, in maybeLaunchLater
    launchNow()
  File "/usr/lib/waydroid/tools/actions/app_manager.py", line 108, in justShow
    platformService = IPlatform.get_service(args)
  File "/usr/lib/waydroid/tools/interfaces/IPlatform.py", line 309, in get_service
    time.sleep(1)
KeyboardInterrupt

arknights

arknights still crashes even tho i have arm support

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.