Uninstall function, microG installation and some hacks #70

Merged
ayasa520 merged 42 commits from main into main 2023-05-28 02:54:02 -04:00
4 changed files with 19 additions and 9 deletions
Showing only changes of commit 553f48fa27 - Show all commits

No files matched your search

+1 -1
View File
@@ -107,7 +107,7 @@ Open terminal and switch to directory where "main.py" is located then run:
``` ```
sudo python3 main.py install nodataperm sudo python3 main.py install nodataperm
``` ```
**WARNING**: Only tested on `lineage-18.1-20230121-VANILLA-waydroid_x86_64`. This script will replace `/system/framework/service.jar`, which may prevent WayDroid from booting. If so, run `sudo python3 main.py uninstall nodataperm` to remove it. **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 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. 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.
View File
Whitespace-only changes.
+2 -1
View File
@@ -141,7 +141,8 @@ on property:init.svc.zygote=stopped
os.remove(file) os.remove(file)
bootanim_path = os.path.join(self.copy_dir, self.partition, "etc", "init", "bootanim.rc") bootanim_path = os.path.join(self.copy_dir, self.partition, "etc", "init", "bootanim.rc")
if container.use_overlayfs(): if container.use_overlayfs():
os.remove(bootanim_path) if os.path.exists(bootanim_path):
os.remove(bootanim_path)
else: else:
with open(bootanim_path, "w") as initfile: with open(bootanim_path, "w") as initfile:
initfile.write(self.oringinal_bootanim) initfile.write(self.oringinal_bootanim)
+16 -7
View File
@@ -1,21 +1,29 @@
import os import os
import re
import shutil import shutil
from stuffs.general import General from stuffs.general import General
from tools.helper import run from tools.helper import host, run
from tools.logger import Logger from tools.logger import Logger
class Widevine(General): class Widevine(General):
partition = "vendor" partition = "vendor"
dl_link = "https://codeload.github.com/supremegamers/vendor_google_proprietary_widevine-prebuilt/zip/94c9ee172e3d78fecc81863f50a59e3646f7a2bd" dl_links = {
"x86": ["https://github.com/supremegamers/vendor_google_proprietary_widevine-prebuilt/archive/94c9ee172e3d78fecc81863f50a59e3646f7a2bd.zip", "a31f325453c5d239c21ecab8cfdbd878"],
"x86_64": ["https://github.com/supremegamers/vendor_google_proprietary_widevine-prebuilt/archive/94c9ee172e3d78fecc81863f50a59e3646f7a2bd.zip", "a31f325453c5d239c21ecab8cfdbd878"],
"armeabi-v7a": ["https://github.com/supremegamers/vendor_google_proprietary_widevine-prebuilt/archive/a1a19361d36311bee042da8cf4ced798d2c76d98.zip", "fed6898b5cfd2a908cb134df97802554"],
"arm64-v8a": ["https://github.com/supremegamers/vendor_google_proprietary_widevine-prebuilt/archive/a1a19361d36311bee042da8cf4ced798d2c76d98.zip", "fed6898b5cfd2a908cb134df97802554"]
}
machine = host()
dl_link = dl_links[machine[0]][0]
act_md5 = dl_links[machine[0]][1]
dl_file_name = "widevine.zip" dl_file_name = "widevine.zip"
extract_to = "/tmp/widevineunpack" extract_to = "/tmp/widevineunpack"
act_md5 = "a31f325453c5d239c21ecab8cfdbd878"
files = [ files = [
"bin/hw/android.hardware.drm@1.3-service-lazy.widevine", "bin/hw/*widevine",
"bin/move_widevine_data.sh", "bin/move_widevine_data.sh",
"etc/init/android.hardware.drm@1.3-service-lazy.widevine.rc", "etc/init/*widevine.rc",
"etc/vintf/manifest/manifest_android.hardware.drm@1.3-service.widevine.xml", "etc/vintf/manifest/*widevine.xml",
"lib/libwvhidl.so", "lib/libwvhidl.so",
"lib/mediadrm", "lib/mediadrm",
"lib64/mediadrm" "lib64/mediadrm"
@@ -23,6 +31,7 @@ class Widevine(General):
def copy(self): def copy(self):
run(["chmod", "+x", self.extract_to, "-R"]) run(["chmod", "+x", self.extract_to, "-R"])
name = re.findall("([a-zA-Z0-9]+)\.zip", self.dl_link)[0]
Logger.info("Copying widevine library files ...") Logger.info("Copying widevine library files ...")
shutil.copytree(os.path.join(self.extract_to, "vendor_google_proprietary_widevine-prebuilt-94c9ee172e3d78fecc81863f50a59e3646f7a2bd", shutil.copytree(os.path.join(self.extract_to, "vendor_google_proprietary_widevine-prebuilt-"+name,
"prebuilts"), os.path.join(self.copy_dir, self.partition), dirs_exist_ok=True) "prebuilts"), os.path.join(self.copy_dir, self.partition), dirs_exist_ok=True)