mirror of
https://github.com/ayasa520/redroid-script.git
synced 2026-11-26 06:35:21 +08:00
fix broken ndk link
This commit is contained in:
1 parent
e80314e694
commit
9be27949c2
5 files changed
+28
-20
No files matched your search
@@ -32,6 +32,8 @@ class Gapps(General):
|
|||||||
super().download()
|
super().download()
|
||||||
|
|
||||||
def copy(self):
|
def copy(self):
|
||||||
|
if os.path.exists(self.copy_dir):
|
||||||
|
shutil.rmtree(self.copy_dir)
|
||||||
if not os.path.exists(self.extract_to):
|
if not os.path.exists(self.extract_to):
|
||||||
os.makedirs(self.extract_to)
|
os.makedirs(self.extract_to)
|
||||||
if not os.path.exists(os.path.join(self.extract_to, "appunpack")):
|
if not os.path.exists(os.path.join(self.extract_to, "appunpack")):
|
||||||
|
|||||||
@@ -49,6 +49,8 @@ on property:ro.enable.native.bridge.exec=1
|
|||||||
super().download()
|
super().download()
|
||||||
|
|
||||||
def copy(self):
|
def copy(self):
|
||||||
|
if os.path.exists(self.copy_dir):
|
||||||
|
shutil.rmtree(self.copy_dir)
|
||||||
run(["chmod", "+x", self.extract_to, "-R"])
|
run(["chmod", "+x", self.extract_to, "-R"])
|
||||||
|
|
||||||
print_color("Copying libhoudini library files ...", bcolors.GREEN)
|
print_color("Copying libhoudini library files ...", bcolors.GREEN)
|
||||||
|
|||||||
@@ -60,6 +60,8 @@ on property:init.svc.zygote=stopped
|
|||||||
download_file(self.dl_link, self.dl_file_name)
|
download_file(self.dl_link, self.dl_file_name)
|
||||||
|
|
||||||
def copy(self):
|
def copy(self):
|
||||||
|
if os.path.exists(self.copy_dir):
|
||||||
|
shutil.rmtree(self.copy_dir)
|
||||||
if not os.path.exists(self.magisk_dir):
|
if not os.path.exists(self.magisk_dir):
|
||||||
os.makedirs(self.magisk_dir, exist_ok=True)
|
os.makedirs(self.magisk_dir, exist_ok=True)
|
||||||
|
|
||||||
|
|||||||
+20
-18
@@ -6,34 +6,36 @@ from tools.helper import bcolors, get_download_dir, print_color, run
|
|||||||
class Ndk(General):
|
class Ndk(General):
|
||||||
download_loc = get_download_dir()
|
download_loc = get_download_dir()
|
||||||
copy_dir = "./ndk"
|
copy_dir = "./ndk"
|
||||||
dl_link = "https://www.dropbox.com/s/eaf4dj3novwiccp/libndk_translation_Module-c6077f3398172c64f55aad7aab0e55fad9110cf3.zip?dl=1"
|
dl_link = "https://github.com/supremegamers/vendor_google_proprietary_ndk_translation-prebuilt/archive/181d9290a69309511185c4417ba3d890b3caaaa8.zip"
|
||||||
dl_file_name = os.path.join(download_loc, "libndktranslation.zip")
|
dl_file_name = os.path.join(download_loc, "libndktranslation.zip")
|
||||||
extract_to = "/tmp/libndkunpack"
|
extract_to = "/tmp/libndkunpack"
|
||||||
act_md5 = "4456fc1002dc78e544e8d9721bb24398"
|
act_md5 = "0beff55f312492f24d539569d84f5bfb"
|
||||||
init_rc_component = """
|
# init_rc_component = """
|
||||||
# Enable native bridge for target executables
|
# # Enable native bridge for target executables
|
||||||
on early-init
|
# on early-init
|
||||||
mount binfmt_misc binfmt_misc /proc/sys/fs/binfmt_misc
|
# mount binfmt_misc binfmt_misc /proc/sys/fs/binfmt_misc
|
||||||
|
|
||||||
on property:ro.enable.native.bridge.exec=1
|
# on property:ro.enable.native.bridge.exec=1
|
||||||
copy /system/etc/binfmt_misc/arm_exe /proc/sys/fs/binfmt_misc/register
|
# copy /system/etc/binfmt_misc/arm_exe /proc/sys/fs/binfmt_misc/register
|
||||||
copy /system/etc/binfmt_misc/arm_dyn /proc/sys/fs/binfmt_misc/register
|
# copy /system/etc/binfmt_misc/arm_dyn /proc/sys/fs/binfmt_misc/register
|
||||||
copy /system/etc/binfmt_misc/arm64_exe /proc/sys/fs/binfmt_misc/register
|
# 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
|
# copy /system/etc/binfmt_misc/arm64_dyn /proc/sys/fs/binfmt_misc/register
|
||||||
"""
|
# """
|
||||||
|
|
||||||
def download(self):
|
def download(self):
|
||||||
print_color("Downloading libndk now .....", bcolors.GREEN)
|
print_color("Downloading libndk now .....", bcolors.GREEN)
|
||||||
super().download()
|
super().download()
|
||||||
|
|
||||||
def copy(self):
|
def copy(self):
|
||||||
|
if os.path.exists(self.copy_dir):
|
||||||
|
shutil.rmtree(self.copy_dir)
|
||||||
run(["chmod", "+x", self.extract_to, "-R"])
|
run(["chmod", "+x", self.extract_to, "-R"])
|
||||||
|
|
||||||
print_color("Copying libndk library files ...", bcolors.GREEN)
|
print_color("Copying libndk library files ...", bcolors.GREEN)
|
||||||
shutil.copytree(os.path.join(self.extract_to, "libndk_translation_Module-c6077f3398172c64f55aad7aab0e55fad9110cf3", "system"), os.path.join(self.copy_dir, "system"), dirs_exist_ok=True)
|
shutil.copytree(os.path.join(self.extract_to, "vendor_google_proprietary_ndk_translation-prebuilt-181d9290a69309511185c4417ba3d890b3caaaa8", "prebuilts"), os.path.join(self.copy_dir, "system"), dirs_exist_ok=True)
|
||||||
|
|
||||||
init_path = os.path.join(self.copy_dir, "system", "etc", "init", "libndk.rc")
|
# init_path = os.path.join(self.copy_dir, "system", "etc", "init", "libndk.rc")
|
||||||
if not os.path.isfile(init_path):
|
# if not os.path.isfile(init_path):
|
||||||
os.makedirs(os.path.dirname(init_path), exist_ok=True)
|
# os.makedirs(os.path.dirname(init_path), exist_ok=True)
|
||||||
with open(init_path, "w") as initfile:
|
# with open(init_path, "w") as initfile:
|
||||||
initfile.write(self.init_rc_component)
|
# initfile.write(self.init_rc_component)
|
||||||
+2
-2
@@ -46,8 +46,8 @@ class Widevine(General):
|
|||||||
super().download()
|
super().download()
|
||||||
|
|
||||||
def copy(self):
|
def copy(self):
|
||||||
if os.path.exists("./widevine"):
|
if os.path.exists(self.copy_dir):
|
||||||
shutil.rmtree("./widevine")
|
shutil.rmtree(self.copy_dir)
|
||||||
run(["chmod", "+x", self.extract_to, "-R"])
|
run(["chmod", "+x", self.extract_to, "-R"])
|
||||||
print_color("Copying widevine library files ...", bcolors.GREEN)
|
print_color("Copying widevine library files ...", bcolors.GREEN)
|
||||||
name = re.findall("([a-zA-Z0-9]+)\.zip", self.dl_link)[0]
|
name = re.findall("([a-zA-Z0-9]+)\.zip", self.dl_link)[0]
|
||||||
|
|||||||
Reference in new issue
Block a user