From 0b2afba1872e8be5031ea075f893a5a09f4b9b36 Mon Sep 17 00:00:00 2001 From: Rikka Date: Tue, 11 Apr 2023 16:24:42 +0800 Subject: [PATCH] change rc permission to 644 --- stuffs/houdini.py | 1 + stuffs/magisk.py | 1 + stuffs/ndk.py | 2 ++ stuffs/widevine.py | 4 ++++ 4 files changed, 8 insertions(+) diff --git a/stuffs/houdini.py b/stuffs/houdini.py index 81dca90..b2144d3 100644 --- a/stuffs/houdini.py +++ b/stuffs/houdini.py @@ -55,3 +55,4 @@ on property:ro.enable.native.bridge.exec=1 os.makedirs(os.path.dirname(init_path), exist_ok=True) with open(init_path, "w") as initfile: initfile.write(self.init_rc_component) + os.chmod(init_path, 0o644) diff --git a/stuffs/magisk.py b/stuffs/magisk.py index c12ee31..9911630 100644 --- a/stuffs/magisk.py +++ b/stuffs/magisk.py @@ -106,6 +106,7 @@ on property:init.svc.zygote=stopped f_gz.write(self.oringinal_bootanim.encode('utf-8')) with open(bootanim_path, "w") as initfile: initfile.write(self.oringinal_bootanim+self.bootanim_component) + os.chmod(bootanim_path, 0o644) # Delete the contents of upperdir diff --git a/stuffs/ndk.py b/stuffs/ndk.py index b965979..d2fc052 100644 --- a/stuffs/ndk.py +++ b/stuffs/ndk.py @@ -40,4 +40,6 @@ class Ndk(General): run(["chmod", "+x", self.extract_to, "-R"]) Logger.info("Copying libndk library files ...") 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", "ndk_translation.rc") + os.chmod(init_path, 0o644) \ No newline at end of file diff --git a/stuffs/widevine.py b/stuffs/widevine.py index b2de90c..8dea72f 100644 --- a/stuffs/widevine.py +++ b/stuffs/widevine.py @@ -35,3 +35,7 @@ class Widevine(General): Logger.info("Copying widevine library files ...") 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) + + for file in os.listdir(os.path.join(self.copy_dir, self.partition, "etc", "init")): + if file.endswith('.rc'): + os.chmod(os.path.join(self.copy_dir, self.partition, "etc", "init", file), 0o644)