install smart dock

This commit is contained in:
Rikka
2023-05-27 16:46:13 +08:00
committed by Rikka
parent 0abfc4ef4b
commit 59ad317684
11 changed files with 96 additions and 62 deletions
+1 -1
View File
@@ -15,4 +15,4 @@ class Android_id:
queryout = run(["sqlite3", "/var/lib/waydroid/data/data/com.google.android.gsf/databases/gservices.db", sqs.strip()])
print(queryout.stdout.decode().replace("android_id|", "").strip())
print(" ^----- Open https://google.com/android/uncertified/?pli=1")
print(" Login with your google id then submit the form with id shown above")
print(" Login with your google id then submit the form with id shown above")
+1 -5
View File
@@ -27,10 +27,6 @@ class Gapps(General):
"setupwizardtablet-x86_64.tar.lz"
]
def download(self):
Logger.info("Downloading OpenGapps now to {} .....".format(self.download_loc))
super().download()
def copy(self):
if not os.path.exists(self.extract_to):
os.makedirs(self.extract_to)
@@ -56,4 +52,4 @@ class Gapps(General):
app_name = os.listdir(os.path.join(self.extract_to, "appunpack"))[0]
common_content_dirs = os.listdir(os.path.join(self.extract_to, "appunpack", app_name, "common"))
for ccdir in common_content_dirs:
shutil.copytree(os.path.join(self.extract_to, "appunpack", app_name, "common", ccdir), os.path.join(self.copy_dir, self.partition, ccdir), dirs_exist_ok=True)
shutil.copytree(os.path.join(self.extract_to, "appunpack", app_name, "common", ccdir), os.path.join(self.copy_dir, self.partition, ccdir), dirs_exist_ok=True)
+14 -2
View File
@@ -9,6 +9,10 @@ from tools.container import DBusContainerService
from tools.logger import Logger
class General:
@property
def skip_extract(self):
return False
@property
def download_loc(self):
return os.path.join(get_download_dir(), self.dl_file_name)
@@ -37,6 +41,7 @@ class General:
return False
def download(self):
Logger.info("Downloading {} now to {} .....".format(self.dl_file_name, self.download_loc))
loc_md5 = ""
if os.path.isfile(self.download_loc):
with open(self.download_loc, "rb") as f:
@@ -113,21 +118,28 @@ class General:
def copy(self):
pass
def extra(self):
pass
def install(self):
if self.use_overlayfs:
self.download()
self.extract()
if not self.skip_extract:
self.extract()
self.copy()
self.extra()
if hasattr(self, "apply_props"):
self.add_props()
self.restart()
else:
self.stop()
self.download()
self.extract()
if not self.skip_extract:
self.extract()
self.resize()
self.mount()
self.copy()
self.extra()
if hasattr(self, "apply_props"):
self.add_props()
self.umount()
-4
View File
@@ -32,10 +32,6 @@ on property:ro.enable.native.bridge.exec=1
"ro.dalvik.vm.isa.arm64": "x86_64"
}
def download(self):
Logger.info("Downloading libhoudini to {}now .....".format(self.download_loc))
super().download()
def copy(self):
run(["chmod", "+x", self.extract_to, "-R"])
Logger.info("Copying libhoudini library files ...")
+1 -1
View File
@@ -86,4 +86,4 @@ on property:init.svc.zygote=stopped
with gzip.open(gz_filename,'wb') as f_gz:
f_gz.write(self.oringinal_bootanim.encode('utf-8'))
with open(bootanim_path, "w") as initfile:
initfile.write(self.oringinal_bootanim+self.bootanim_component)
initfile.write(self.oringinal_bootanim+self.bootanim_component)
+1 -5
View File
@@ -31,10 +31,6 @@ on property:ro.enable.native.bridge.exec=1
copy /system/etc/binfmt_misc/arm64_exe /proc/sys/fs/binfmt_misc/register
copy /system/etc/binfmt_misc/arm64_dyn /proc/sys/fs/binfmt_misc/register
"""
def download(self):
Logger.info("Downloading libndk to {} now .....".format(self.download_loc))
super().download()
def copy(self):
run(["chmod", "+x", self.extract_to, "-R"])
@@ -54,4 +50,4 @@ on property:ro.enable.native.bridge.exec=1
if not path.isfile(init_path):
makedirs(path.dirname(init_path), exist_ok=True)
with open(init_path, "w") as initfile:
initfile.write(self.init_rc_component)
initfile.write(self.init_rc_component)
+21
View File
@@ -0,0 +1,21 @@
import os
import shutil
from stuffs.general import General
class Smartdock(General):
dl_link = "https://github.com/ayasa520/smartdock/releases/download/v1.9.6/smartdock.zip"
partition = "system"
extract_to = "/tmp/smartdockunpack"
dl_file_name = "smartdock.zip"
act_md5 = "ad0cc5e023ac6ee97e7b013b9b0defee"
def copy(self):
if not os.path.exists(os.path.join(self.copy_dir, self.partition, "priv-app", "SmartDock")):
os.makedirs(os.path.join(self.copy_dir, self.partition, "priv-app", "SmartDock"))
shutil.copyfile(os.path.join(self.extract_to, "app-release.apk"),
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"))
def extra(self):
return super().extra()
+1 -5
View File
@@ -12,12 +12,8 @@ class Widevine(General):
extract_to = "/tmp/widevineunpack"
act_md5 = "a31f325453c5d239c21ecab8cfdbd878"
def download(self):
Logger.info("Downloading widevine to {} now .....".format(self.download_loc))
super().download()
def copy(self):
run(["chmod", "+x", self.extract_to, "-R"])
Logger.info("Copying widevine library files ...")
shutil.copytree(os.path.join(self.extract_to, "vendor_google_proprietary_widevine-prebuilt-94c9ee172e3d78fecc81863f50a59e3646f7a2bd",
"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)