casualsnek / waydroid_script

Python Script to add OpenGapps, Magisk, libhoudini translation library and libndk translation library to waydroid !
GNU General Public License v3.0
1.73k stars 161 forks source link

Use WayDroid 1.4 features like dbus and overlayfs #64

Closed ayasa520 closed 1 year ago

ayasa520 commented 1 year ago

Since the overlayfs PR for waydroid has been merged, I think it's time to update this script. This PR makes all installs don't directly modify the image

casualsnek commented 1 year ago

Since the overlayfs PR for waydroid has been merged, I think it's time to update this script. This PR makes all installs don't directly modify the image

Sure, let me set up waydroid and see if things work as expected. If you have been testing and can confirm it works i can merge right away !

JamiKettunen commented 1 year ago

Waydroid 1.4.0 isn't tagged (https://github.com/waydroid/waydroid/tags), can you please try to retain the old functionality behind a version check until that is the case (or just wait with this PR till that happens?)

JamiKettunen commented 1 year ago

Another solution may be to create a 1.3.x branch I guess without these changes, but then you'll have to provide people instructions based on which version they have installed, and there's no proper way to tell if you have "1.4.0" other than grepping the scripts themselves for something the new features added.

For context distributions shipping Waydroid in their repos will typically want to only use released versions instead of random tips of branches or arbitrary git revisions of software.

ayasa520 commented 1 year ago

Another solution may be to create a 1.3.x branch I guess without these changes, but then you'll have to provide people instructions based on which version they have installed, and there's no proper way to tell if you have "1.4.0" other than grepping the scripts themselves for something the new features added.

I think it might be better to create a 1.3.x branch. I've made some fixes to the existing script, we can merge this into the 1.3.x branch first. https://github.com/ayasa520/waydroid_script/tree/1.3

ayasa520 commented 1 year ago

I will add instructions to README and add a necessary check to the script.

casualsnek commented 1 year ago

Waydroid 1.4.0 isn't tagged (https://github.com/waydroid/waydroid/tags), can you please try to retain the old functionality behind a version check until that is the case (or just wait with this PR till that happens?)

I think waiting for 1.4.0 is tagged would be good ! Creating new branch or 1.3.x may create confusion among users that try to use the main branch as usual !

ayasa520 commented 1 year ago

I refactored the script, now it should work for all cases

cobalt2727 commented 1 year ago

This doesn't seem to work properly on Ubuntu 22.04 for some reason:

#libhoudini
INFO: Downloading libhoudini to /home/cobalt/.cache/waydroid-script/downloads/libhoudini.zipnow .....
INFO: Extracting archive...
INFO: Resizing /var/lib/waydroid/images/system.img to 13523M
ERROR: e2fsck 1.46.5 (30-Dec-2021)

ERROR: resize2fs 1.46.5 (30-Dec-2021)

INFO: Mounting /var/lib/waydroid/images/system.img to /tmp/waydroid
INFO: Copying libhoudini library files ...
INFO: Umounting /tmp/waydroid
INFO: Installation finished

#widevine
INFO: Downloading widevine to /home/cobalt/.cache/waydroid-script/downloads/widevine.zip now .....
INFO: Extracting archive...
INFO: Resizing /var/lib/waydroid/images/vendor.img to 11548M
ERROR: e2fsck 1.46.5 (30-Dec-2021)

ERROR: resize2fs 1.46.5 (30-Dec-2021)

INFO: Mounting /var/lib/waydroid/images/vendor.img to /tmp/waydroid/vendor
INFO: Copying widevine library files ...
INFO: Umounting /tmp/waydroid/vendor
INFO: Installation finished

@casualsnek @ayasa520

I'd be glad to help debug this, just not really sure where to start.

JamiKettunen commented 1 year ago

@cobalt2727 Those e2fsck & resize2fs "errors" are perfectly fine because that's just how those dumb programs work, they print their version to stderr (instead of stdout) every time they're used.

I wonder if it's possible to only silence those from being output to stderr without destroying all potential actually useful error output with 2>/dev/null; could route stderr to stdout somehow and filter output with something similar to grep -v but meh.