fix broken ndk link

pull/70/head
Rikka 2 years ago committed by Rikka
parent 7c31b838f6
commit 556f277fec
No known key found for this signature in database
GPG Key ID: CD36B07FA9F7D2AA

1
.gitignore vendored

@ -25,6 +25,7 @@ wheels/
.installed.cfg .installed.cfg
*.egg *.egg
MANIFEST MANIFEST
.vscode
# PyInstaller # PyInstaller
# Usually these files are written by a python script from a template # Usually these files are written by a python script from a template

@ -1,4 +1,4 @@
tqdm tqdm
requests requests
aapt2 aapt2
dbus-python dbus-python==1.2.18

@ -2,7 +2,6 @@ import os
import shutil import shutil
from stuffs.general import General from stuffs.general import General
from tools.helper import host, run from tools.helper import host, run
from tools.logger import Logger
class Gapps(General): class Gapps(General):
partition = "system" partition = "system"

@ -9,7 +9,7 @@ from tools import container
class Magisk(General): class Magisk(General):
partition = "system" partition = "system"
dl_link = "https://huskydg.github.io/magisk-files/app-release.apk" dl_link = "https://huskydg.github.io/magisk-files/app-debug.apk"
dl_file_name = "magisk.apk" dl_file_name = "magisk.apk"
extract_to = "/tmp/magisk_unpack" extract_to = "/tmp/magisk_unpack"
magisk_dir = os.path.join(partition, "etc", "init", "magisk") magisk_dir = os.path.join(partition, "etc", "init", "magisk")

@ -7,10 +7,10 @@ from tools.logger import Logger
class Ndk(General): class Ndk(General):
partition = "system" partition = "system"
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 = "libndktranslation.zip" dl_file_name = "libndktranslation.zip"
extract_to = "/tmp/libndkunpack" extract_to = "/tmp/libndkunpack"
act_md5 = "4456fc1002dc78e544e8d9721bb24398" act_md5 = "0beff55f312492f24d539569d84f5bfb"
apply_props = { apply_props = {
"ro.product.cpu.abilist": "x86_64,x86,armeabi-v7a,armeabi,arm64-v8a", "ro.product.cpu.abilist": "x86_64,x86,armeabi-v7a,armeabi,arm64-v8a",
"ro.product.cpu.abilist32": "x86,armeabi-v7a,armeabi", "ro.product.cpu.abilist32": "x86,armeabi-v7a,armeabi",
@ -21,17 +21,6 @@ class Ndk(General):
"ro.dalvik.vm.isa.arm": "x86", "ro.dalvik.vm.isa.arm": "x86",
"ro.dalvik.vm.isa.arm64": "x86_64" "ro.dalvik.vm.isa.arm64": "x86_64"
} }
init_rc_component = """
# Enable native bridge for target executables
on early-init
mount binfmt_misc binfmt_misc /proc/sys/fs/binfmt_misc
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_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_dyn /proc/sys/fs/binfmt_misc/register
"""
files = [ files = [
"bin/arm", "bin/arm",
"bin/arm64", "bin/arm64",
@ -40,7 +29,7 @@ on property:ro.enable.native.bridge.exec=1
"etc/binfmt_misc", "etc/binfmt_misc",
"etc/ld.config.arm.txt", "etc/ld.config.arm.txt",
"etc/ld.config.arm64.txt", "etc/ld.config.arm64.txt",
"etc/init/libndk.rc", "etc/init/ndk_translation.rc",
"lib/arm", "lib/arm",
"lib64/arm64", "lib64/arm64",
"lib/libndk*", "lib/libndk*",
@ -50,11 +39,5 @@ on property:ro.enable.native.bridge.exec=1
def copy(self): def copy(self):
run(["chmod", "+x", self.extract_to, "-R"]) run(["chmod", "+x", self.extract_to, "-R"])
Logger.info("Copying libndk library files ...") Logger.info("Copying libndk library files ...")
shutil.copytree(os.path.join(self.extract_to, "libndk_translation_Module-c6077f3398172c64f55aad7aab0e55fad9110cf3", "system"), os.path.join(self.copy_dir, self.partition), 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, self.partition), dirs_exist_ok=True)
init_path = os.path.join(self.copy_dir, self.partition, "etc", "init", "libndk.rc")
if not os.path.isfile(init_path):
os.makedirs(os.path.dirname(init_path), exist_ok=True)
with open(init_path, "w") as initfile:
initfile.write(self.init_rc_component)
Loading…
Cancel
Save