diff --git a/main.py b/main.py index 58fd7ab..307eab3 100755 --- a/main.py +++ b/main.py @@ -218,9 +218,13 @@ def interact(): ).execute() if not action: exit() - install_choices = ["gapps", "microg", "libndk", - "libhoudini", "magisk", "smartdock", "widevine"] - hack_choices = ["nodataperm", "hidestatusbar"] + + install_choices = ["gapps", "microg", "libndk", "magisk", "smartdock",] + hack_choices = [] + if android_version=="11": + install_choices.extend(["libhoudini", "widevine"]) + hack_choices.extend(["nodataperm", "hidestatusbar"]) + if action == "Install": apps = inquirer.checkbox( message="Select apps", diff --git a/stuff/general.py b/stuff/general.py index f377e0b..777fbb7 100644 --- a/stuff/general.py +++ b/stuff/general.py @@ -121,6 +121,7 @@ class General: mode = os.stat(path).st_mode + print(path, mode) if os.path.isdir(path): mode |= perms[2] else: diff --git a/stuff/houdini.py b/stuff/houdini.py index a01fb78..ade972e 100644 --- a/stuff/houdini.py +++ b/stuff/houdini.py @@ -10,7 +10,7 @@ class Houdini(General): partition = "system" dl_links = { "11": ["https://github.com/supremegamers/vendor_intel_proprietary_houdini/archive/81f2a51ef539a35aead396ab7fce2adf89f46e88.zip", "fbff756612b4144797fbc99eadcb6653"], - "13": ["https://github.com/supremegamers/vendor_intel_proprietary_houdini/archive/978d8cba061a08837b7e520cd03b635af643ba08.zip", "1e139054c05034648fae58a1810573b4"] + # "13": ["https://github.com/supremegamers/vendor_intel_proprietary_houdini/archive/978d8cba061a08837b7e520cd03b635af643ba08.zip", "1e139054c05034648fae58a1810573b4"] } act_md5 = ... dl_link = ... diff --git a/stuff/smartdock.py b/stuff/smartdock.py index b9d8b3a..2741e07 100644 --- a/stuff/smartdock.py +++ b/stuff/smartdock.py @@ -4,12 +4,35 @@ from stuff.general import General class Smartdock(General): id = "smartdock" - dl_link = "https://github.com/ayasa520/smartdock/releases/download/v1.9.7/smartdock.zip" + dl_link = "https://f-droid.org/repo/cu.axel.smartdock_198.apk" partition = "system" - extract_to = "/tmp/smartdockunpack" - dl_file_name = "smartdock.zip" - act_md5 = "912e00189c562505114cce62c7aa9478" + dl_file_name = "smartdock.apk" + act_md5 = "a8ce0bca5e1772796404602e0fa250a4" apply_props = { "qemu.hw.mainkeys" : "1" } + skip_extract = True + permissions = """ + + + + + + + + + + + + + + + + + + + + + + """ files = [ "etc/permissions/permissions_cu.axel.smartdock.xml", "priv-app/SmartDock", @@ -30,10 +53,11 @@ service set_home_activity /system/bin/sh -c "cmd package set-home-activity cu.ax os.makedirs(os.path.join(self.copy_dir, self.partition, "priv-app", "SmartDock")) if not os.path.exists(os.path.join(self.copy_dir, self.partition, "etc", "permissions")): os.makedirs(os.path.join(self.copy_dir, self.partition, "etc", "permissions")) - shutil.copyfile(os.path.join(self.extract_to, "app-release.apk"), + shutil.copyfile(os.path.join(self.download_loc), os.path.join(self.copy_dir, self.partition, "priv-app/SmartDock/smartdock.apk")) - shutil.copyfile(os.path.join(self.extract_to, "permissions_cu.axel.smartdock.xml"), - os.path.join(self.copy_dir, self.partition, "etc", "permissions", "permissions_cu.axel.smartdock.xml")) + + with open(os.path.join(self.copy_dir, self.partition, "etc", "permissions", "permissions_cu.axel.smartdock.xml"), "w") as f: + f.write(self.permissions) rc_dir = os.path.join(self.copy_dir, self.partition, "etc/init/smartdock.rc") if not os.path.exists(os.path.dirname(rc_dir)):