Fix CPU architecture detection for Magisk installation

pull/63/head
Rikka 3 years ago
parent 7b70434f50
commit d27de7d4b5
No known key found for this signature in database
GPG Key ID: 27646650E3A52AAF

@ -16,7 +16,7 @@ Script to add gapps and other stuff to waydroid !
sudo zypper install lzip sqlite
Then run:
git clone https://github.com/LegacyGamerHD/waydroid_script
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]
@ -49,7 +49,7 @@ Magisk will be installed on next boot !
Zygisk and modules like LSPosed should work now.
~~Please use Direct Install into system partition to update Magisk in Magisk manager.~~ (Temporarily does not work when using the overlay file system)
Please use `Direct Install into system partition` to update Magisk in Magisk manager.
## Install libndk arm translation
@ -70,6 +70,14 @@ Open terminal and switch to directory where "waydroid_extras.py" is located then
Then restart waydroid service with command below :
sudo systemctl start waydroid-container.service
## Integrate Widevine DRM (L3)
sudo python3 waydroid_extras.py -w
Then restart waydroid service with command below :
sudo systemctl start waydroid-container.service
## Get Android ID for device registration

Binary file not shown.

@ -383,8 +383,13 @@ def install_magisk():
merge_dir = "/var/lib/waydroid/rootfs"
magisk_dir = os.path.join(sys_overlay_dir, "system", "etc", "init", "magisk")
sys_overlay_rw = "/var/lib/waydroid/overlay_rw"
arch_dir = "x86" if "x86" in platform.machine() else "arm"
arch = "_64" if "64" in platform.machine() else ""
arch = platform.architecture()[0][0:2]
machine = platform.machine()
if "x86" not in machine:
if arch == "64":
machine = "arm64-v8a"
else:
machine = "armeabi-v7a"
init_rc_component = """
on post-fs-data
start logd
@ -418,7 +423,7 @@ on property:init.svc.zygote=restarting
on property:init.svc.zygote=stopped
exec - root root -- /sbin/magisk --zygote-restart
""".format(arch=32 if arch=="" else 64)
""".format(arch=arch)
if "RUNNING" not in subprocess.check_output ("waydroid status | grep Container | awk -F'[:\t]' '{print $3}'", shell=True).decode():
print("Please make sure waydroid container is running!")
@ -460,7 +465,7 @@ on property:init.svc.zygote=stopped
# Now setup and install magisk binary and app
print("==> Installing magisk now ...")
lib_dir = os.path.join(extract_to, "lib", "{arch_dir}{arch}".format(arch_dir=arch_dir, arch=arch))
lib_dir = os.path.join(extract_to, "lib", machine)
for parent, dirnames, filenames in os.walk(lib_dir):
for filename in filenames:
o_path = os.path.join(lib_dir, filename)

Loading…
Cancel
Save