Fix CPU architecture detection for Magisk installation
This commit is contained in:
parent
7b70434f50
commit
d27de7d4b5
3 changed files with 19 additions and 6 deletions
12
README.md
12
README.md
|
|
@ -16,7 +16,7 @@ Script to add gapps and other stuff to waydroid !
|
||||||
sudo zypper install lzip sqlite
|
sudo zypper install lzip sqlite
|
||||||
Then run:
|
Then run:
|
||||||
|
|
||||||
git clone https://github.com/LegacyGamerHD/waydroid_script
|
git clone https://github.com/casualsnek/waydroid_script
|
||||||
cd waydroid_script
|
cd waydroid_script
|
||||||
sudo python3 -m pip install -r requirements.txt
|
sudo python3 -m pip install -r requirements.txt
|
||||||
sudo python3 waydroid_extras.py [-i/-g/-n/-h]
|
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.
|
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
|
## 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 :
|
Then restart waydroid service with command below :
|
||||||
|
|
||||||
sudo systemctl start waydroid-container.service
|
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
|
## Get Android ID for device registration
|
||||||
|
|
||||||
|
|
|
||||||
BIN
magisk-delta.apk
BIN
magisk-delta.apk
Binary file not shown.
|
|
@ -383,8 +383,13 @@ def install_magisk():
|
||||||
merge_dir = "/var/lib/waydroid/rootfs"
|
merge_dir = "/var/lib/waydroid/rootfs"
|
||||||
magisk_dir = os.path.join(sys_overlay_dir, "system", "etc", "init", "magisk")
|
magisk_dir = os.path.join(sys_overlay_dir, "system", "etc", "init", "magisk")
|
||||||
sys_overlay_rw = "/var/lib/waydroid/overlay_rw"
|
sys_overlay_rw = "/var/lib/waydroid/overlay_rw"
|
||||||
arch_dir = "x86" if "x86" in platform.machine() else "arm"
|
arch = platform.architecture()[0][0:2]
|
||||||
arch = "_64" if "64" in platform.machine() else ""
|
machine = platform.machine()
|
||||||
|
if "x86" not in machine:
|
||||||
|
if arch == "64":
|
||||||
|
machine = "arm64-v8a"
|
||||||
|
else:
|
||||||
|
machine = "armeabi-v7a"
|
||||||
init_rc_component = """
|
init_rc_component = """
|
||||||
on post-fs-data
|
on post-fs-data
|
||||||
start logd
|
start logd
|
||||||
|
|
@ -418,7 +423,7 @@ on property:init.svc.zygote=restarting
|
||||||
|
|
||||||
on property:init.svc.zygote=stopped
|
on property:init.svc.zygote=stopped
|
||||||
exec - root root -- /sbin/magisk --zygote-restart
|
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():
|
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!")
|
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
|
# Now setup and install magisk binary and app
|
||||||
print("==> Installing magisk now ...")
|
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 parent, dirnames, filenames in os.walk(lib_dir):
|
||||||
for filename in filenames:
|
for filename in filenames:
|
||||||
o_path = os.path.join(lib_dir, filename)
|
o_path = os.path.join(lib_dir, filename)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue