From 0026c7996a7eb3c4c6decf968e108dd1ea6c1ae9 Mon Sep 17 00:00:00 2001 From: rote66 <26439391+rote66@users.noreply.github.com> Date: Tue, 10 Dec 2024 00:55:47 +0800 Subject: [PATCH 1/4] houdini:update rc and use hack file to pass namespace error redroid:enable houdini with args dl link: android11 -> wsa android12 -> wsa12.1 android13 -> wsa13 android14/15 -> chromeos volteer --- redroid.py | 17 +++++++++++++++++ stuff/houdini.py | 23 ++++++++++++++++++----- stuff/houdini_hack.py | 32 ++++++++++++++++++++++++++++++++ 3 files changed, 67 insertions(+), 5 deletions(-) create mode 100644 stuff/houdini_hack.py diff --git a/redroid.py b/redroid.py index 84aad52..0dfd33e 100644 --- a/redroid.py +++ b/redroid.py @@ -6,6 +6,8 @@ from stuff.litegapps import LiteGapps from stuff.magisk import Magisk from stuff.mindthegapps import MindTheGapps from stuff.ndk import Ndk +from stuff.houdini import Houdini +from stuff.houdini_hack import Houdini_Hack from stuff.widevine import Widevine import tools.helper as helper import subprocess @@ -33,6 +35,10 @@ def main(): dest='ndk', help='Install libndk translation files', action='store_true') + parser.add_argument('-i', '--install-houdini', + dest='houdini', + help='Install houdini files', + action='store_true') parser.add_argument('-mtg', '--install-mindthegapps', dest='mindthegapps', help='Install MindTheGapps to ReDroid', @@ -79,6 +85,17 @@ def main(): else: helper.print_color( "WARNING: Libndk seems to work only on redroid:11.0.0 or redroid:12.0.0", helper.bcolors.YELLOW) + if args.houdini: + if args.android in ["11.0.0", "12.0.0", "13.0.0", "14.0.0", "15.0.0"]: + arch = helper.host()[0] + if arch == "x86" or arch == "x86_64": + Houdini(args.android).install() + Houdini_Hack(args.android).install() + dockerfile = dockerfile+"COPY houdini /\n" + tags.append("houdini") + else: + helper.print_color( + "WARNING: Houdini seems to work only above redroid:11.0.0", helper.bcolors.YELLOW) if args.magisk: Magisk().install() dockerfile = dockerfile+"COPY magisk /\n" diff --git a/stuff/houdini.py b/stuff/houdini.py index febe966..0a0e45f 100644 --- a/stuff/houdini.py +++ b/stuff/houdini.py @@ -10,10 +10,18 @@ class Houdini(General): copy_dir = "./houdini" init_rc_component = """ on early-init - mount -t 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 - exec -- /system/bin/sh -c "echo ':arm_exe:M::\\\\x7f\\\\x45\\\\x4c\\\\x46\\\\x01\\\\x01\\\\x01\\\\x00\\\\x00\\\\x00\\\\x00\\\\x00\\\\x00\\\\x00\\\\x00\\\\x00\\\\x02\\\\x00\\\\x28::/system/bin/houdini:P' > /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 + +on property:ro.enable.native.bridge.exec64=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 + +on property:sys.boot_completed=1 + exec -- /system/bin/sh -c "echo ':arm_exe:M::\\\\x7f\\\\x45\\\\x4c\\\\x46\\\\x01\\\\x01\\\\x01\\\\x00\\\\x00\\\\x00\\\\x00\\\\x00\\\\x00\\\\x00\\\\x00\\\\x00\\\\x02\\\\x00\\\\x28::/system/bin/houdini:P' >> /proc/sys/fs/binfmt_misc/register" exec -- /system/bin/sh -c "echo ':arm_dyn:M::\\\\x7f\\\\x45\\\\x4c\\\\x46\\\\x01\\\\x01\\\\x01\\\\x00\\\\x00\\\\x00\\\\x00\\\\x00\\\\x00\\\\x00\\\\x00\\\\x00\\\\x03\\\\x00\\\\x28::/system/bin/houdini:P' >> /proc/sys/fs/binfmt_misc/register" exec -- /system/bin/sh -c "echo ':arm64_exe:M::\\\\x7f\\\\x45\\\\x4c\\\\x46\\\\x02\\\\x01\\\\x01\\\\x00\\\\x00\\\\x00\\\\x00\\\\x00\\\\x00\\\\x00\\\\x00\\\\x00\\\\x02\\\\x00\\\\xb7::/system/bin/houdini64:P' >> /proc/sys/fs/binfmt_misc/register" exec -- /system/bin/sh -c "echo ':arm64_dyn:M::\\\\x7f\\\\x45\\\\x4c\\\\x46\\\\x02\\\\x01\\\\x01\\\\x00\\\\x00\\\\x00\\\\x00\\\\x00\\\\x00\\\\x00\\\\x00\\\\x00\\\\x03\\\\x00\\\\xb7::/system/bin/houdini64:P' >> /proc/sys/fs/binfmt_misc/register" @@ -26,9 +34,14 @@ on property:ro.enable.native.bridge.exec=1 "https://github.com/supremegamers/vendor_intel_proprietary_houdini/archive/0e0164611d5fe5595229854759c30a9b5c1199a5.zip", "9709701b44b6ab7fc311c7dc95945bd0"], "13.0.0": [ - "https://github.com/supremegamers/vendor_intel_proprietary_houdini/archive/978d8cba061a08837b7e520cd03b635af643ba08.zip", - "1e139054c05034648fae58a1810573b4" - ], + "https://github.com/supremegamers/vendor_intel_proprietary_houdini/archive/5460519aa63a23201ba0f3d45cfc382b2e9b30a0.zip", + "08d8d8ed9c4b00eba3fa21ecd527eb87"], + "14.0.0": [ + "https://github.com/supremegamers/vendor_intel_proprietary_houdini/archive/01865e24451008840c4b3a72a2fdd0bfd67f7f93.zip", + "2b6279b93dbd375f80d79bc95a9e7d85"], + "15.0.0": [ + "https://github.com/supremegamers/vendor_intel_proprietary_houdini/archive/01865e24451008840c4b3a72a2fdd0bfd67f7f93.zip", + "2b6279b93dbd375f80d79bc95a9e7d85"] # "9.0.0":[], # "8.1.0":[] } diff --git a/stuff/houdini_hack.py b/stuff/houdini_hack.py new file mode 100644 index 0000000..d5ce179 --- /dev/null +++ b/stuff/houdini_hack.py @@ -0,0 +1,32 @@ +import os +import re +import shutil +from stuff.general import General +from tools.helper import bcolors, get_download_dir, print_color, run + + +class Houdini_Hack(General): + download_loc = get_download_dir() + copy_dir = "./houdini" + dl_file_name = os.path.join(download_loc, "libhoudini_hack.zip") + extract_to = "/tmp/houdinihackunpack" + + def __init__(self, version): + self.version = version + self.dl_link = "https://github.com/rote66/redroid_libhoudini_hack/archive/07712bdd32c1ac487d89bf3d03b2b258d0d47fc0.zip" + self.act_md5 = "873c8b01165506b8def921d9f7b7dc89" + + def download(self): + print_color("Downloading libhoudini_hack now .....", bcolors.GREEN) + super().download() + + def copy(self): + run(["chmod", "+x", self.extract_to, "-R"]) + + print_color("Copying libhoudini hack files ...", bcolors.GREEN) + name = re.findall("([a-zA-Z0-9]+)\.zip", self.dl_link)[0] + shutil.copytree(os.path.join(self.extract_to, "redroid_libhoudini_hack-" + name, + self.version), os.path.join(self.copy_dir, "system"), dirs_exist_ok=True) + + init_path = os.path.join(self.copy_dir, "system", "etc", "init", "hw", "init.rc") + os.chmod(init_path, 0o644) From 9b28357d37194acb21f5bab287325686a6532687 Mon Sep 17 00:00:00 2001 From: rote66 <26439391+rote66@users.noreply.github.com> Date: Wed, 11 Dec 2024 20:15:15 +0800 Subject: [PATCH 2/4] houdini:fix hack patch for android13 --- stuff/houdini_hack.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stuff/houdini_hack.py b/stuff/houdini_hack.py index d5ce179..617e523 100644 --- a/stuff/houdini_hack.py +++ b/stuff/houdini_hack.py @@ -13,8 +13,8 @@ class Houdini_Hack(General): def __init__(self, version): self.version = version - self.dl_link = "https://github.com/rote66/redroid_libhoudini_hack/archive/07712bdd32c1ac487d89bf3d03b2b258d0d47fc0.zip" - self.act_md5 = "873c8b01165506b8def921d9f7b7dc89" + self.dl_link = "https://github.com/rote66/redroid_libhoudini_hack/archive/c48a37c4211ef1fe3d061ef1efeabce57cb15c97.zip" + self.act_md5 = "43f93337ca4db49aa23b3e8afe3c68fb" def download(self): print_color("Downloading libhoudini_hack now .....", bcolors.GREEN) From 0cc2b4cfbcaea79fc6ec13329693a337b23b5b96 Mon Sep 17 00:00:00 2001 From: rote66 <26439391+rote66@users.noreply.github.com> Date: Wed, 11 Dec 2024 20:17:35 +0800 Subject: [PATCH 3/4] houdini:update houdini for Android 13-14 from ChromeOS R130 Houdini have tested in android 14. Houdini from wsa13 not work in A13,change to chromeos version --- stuff/houdini.py | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/stuff/houdini.py b/stuff/houdini.py index 0a0e45f..06fc2f2 100644 --- a/stuff/houdini.py +++ b/stuff/houdini.py @@ -33,15 +33,19 @@ on property:sys.boot_completed=1 "12.0.0": [ "https://github.com/supremegamers/vendor_intel_proprietary_houdini/archive/0e0164611d5fe5595229854759c30a9b5c1199a5.zip", "9709701b44b6ab7fc311c7dc95945bd0"], + # 13.0.0 from wsa-13 not working + # "13.0.0": [ + # "https://github.com/supremegamers/vendor_intel_proprietary_houdini/archive/5460519aa63a23201ba0f3d45cfc382b2e9b30a0.zip", + # "08d8d8ed9c4b00eba3fa21ecd527eb87"], "13.0.0": [ - "https://github.com/supremegamers/vendor_intel_proprietary_houdini/archive/5460519aa63a23201ba0f3d45cfc382b2e9b30a0.zip", - "08d8d8ed9c4b00eba3fa21ecd527eb87"], + "https://github.com/rote66/vendor_intel_proprietary_houdini/archive/740353bf4391969902bc80ee2a9258db18481b45.zip", + "d4824c0c00e8fa9611e1db5124ec61f9"], "14.0.0": [ - "https://github.com/supremegamers/vendor_intel_proprietary_houdini/archive/01865e24451008840c4b3a72a2fdd0bfd67f7f93.zip", - "2b6279b93dbd375f80d79bc95a9e7d85"], - "15.0.0": [ - "https://github.com/supremegamers/vendor_intel_proprietary_houdini/archive/01865e24451008840c4b3a72a2fdd0bfd67f7f93.zip", - "2b6279b93dbd375f80d79bc95a9e7d85"] + "https://github.com/rote66/vendor_intel_proprietary_houdini/archive/740353bf4391969902bc80ee2a9258db18481b45.zip", + "d4824c0c00e8fa9611e1db5124ec61f9"] + # "15.0.0": [ + # "https://github.com/rote66/vendor_intel_proprietary_houdini/archive/740353bf4391969902bc80ee2a9258db18481b45.zip", + # "d4824c0c00e8fa9611e1db5124ec61f9"] # "9.0.0":[], # "8.1.0":[] } From d36b605a3538c57e0840281f938a5a2420957103 Mon Sep 17 00:00:00 2001 From: rote66 <26439391+rote66@users.noreply.github.com> Date: Wed, 18 Dec 2024 23:43:41 +0800 Subject: [PATCH 4/4] houdini:support Android 8 - 9 --- redroid.py | 5 +++-- stuff/houdini.py | 12 ++++++++++-- stuff/houdini_hack.py | 9 +++++---- 3 files changed, 18 insertions(+), 8 deletions(-) diff --git a/redroid.py b/redroid.py index 0dfd33e..d0b601f 100644 --- a/redroid.py +++ b/redroid.py @@ -86,11 +86,12 @@ def main(): helper.print_color( "WARNING: Libndk seems to work only on redroid:11.0.0 or redroid:12.0.0", helper.bcolors.YELLOW) if args.houdini: - if args.android in ["11.0.0", "12.0.0", "13.0.0", "14.0.0", "15.0.0"]: + if args.android in ["8.1.0", "9.0.0", "11.0.0", "12.0.0", "13.0.0", "14.0.0"]: arch = helper.host()[0] if arch == "x86" or arch == "x86_64": Houdini(args.android).install() - Houdini_Hack(args.android).install() + if not args.android == "8.1.0": + Houdini_Hack(args.android).install() dockerfile = dockerfile+"COPY houdini /\n" tags.append("houdini") else: diff --git a/stuff/houdini.py b/stuff/houdini.py index 06fc2f2..86d78e8 100644 --- a/stuff/houdini.py +++ b/stuff/houdini.py @@ -27,6 +27,16 @@ on property:sys.boot_completed=1 exec -- /system/bin/sh -c "echo ':arm64_dyn:M::\\\\x7f\\\\x45\\\\x4c\\\\x46\\\\x02\\\\x01\\\\x01\\\\x00\\\\x00\\\\x00\\\\x00\\\\x00\\\\x00\\\\x00\\\\x00\\\\x00\\\\x03\\\\x00\\\\xb7::/system/bin/houdini64:P' >> /proc/sys/fs/binfmt_misc/register" """ dl_links = { + # 8.1.0 from cros R79 Android N not working + # "8.1.0":[ + # "https://github.com/rote66/vendor_intel_proprietary_houdini/archive/9246014ddf22d5e34f294d726dc48ca446b0e20e.zip", + # "b0a9ddc0d817d290a15b132091a37f36"], + "8.1.0":[ + "https://github.com/rote66/vendor_intel_proprietary_houdini/archive/46682f423b8497db3f96222f2669d770eff764c3.zip", + "cd4dd2891aa18e7699d33dcc3fe3ffd4"], + "9.0.0":[ + "https://github.com/rote66/vendor_intel_proprietary_houdini/archive/46682f423b8497db3f96222f2669d770eff764c3.zip", + "cd4dd2891aa18e7699d33dcc3fe3ffd4"], "11.0.0": [ "https://github.com/supremegamers/vendor_intel_proprietary_houdini/archive/81f2a51ef539a35aead396ab7fce2adf89f46e88.zip", "fbff756612b4144797fbc99eadcb6653"], @@ -46,8 +56,6 @@ on property:sys.boot_completed=1 # "15.0.0": [ # "https://github.com/rote66/vendor_intel_proprietary_houdini/archive/740353bf4391969902bc80ee2a9258db18481b45.zip", # "d4824c0c00e8fa9611e1db5124ec61f9"] - # "9.0.0":[], - # "8.1.0":[] } dl_file_name = os.path.join(download_loc, "libhoudini.zip") extract_to = "/tmp/houdiniunpack" diff --git a/stuff/houdini_hack.py b/stuff/houdini_hack.py index 617e523..93809f6 100644 --- a/stuff/houdini_hack.py +++ b/stuff/houdini_hack.py @@ -13,8 +13,8 @@ class Houdini_Hack(General): def __init__(self, version): self.version = version - self.dl_link = "https://github.com/rote66/redroid_libhoudini_hack/archive/c48a37c4211ef1fe3d061ef1efeabce57cb15c97.zip" - self.act_md5 = "43f93337ca4db49aa23b3e8afe3c68fb" + self.dl_link = "https://github.com/rote66/redroid_libhoudini_hack/archive/a2194c5e294cbbfdfe87e51eb9eddb4c3621d8c3.zip" + self.act_md5 = "8f71a58f3e54eca879a2f7de64dbed58" def download(self): print_color("Downloading libhoudini_hack now .....", bcolors.GREEN) @@ -28,5 +28,6 @@ class Houdini_Hack(General): shutil.copytree(os.path.join(self.extract_to, "redroid_libhoudini_hack-" + name, self.version), os.path.join(self.copy_dir, "system"), dirs_exist_ok=True) - init_path = os.path.join(self.copy_dir, "system", "etc", "init", "hw", "init.rc") - os.chmod(init_path, 0o644) + if not self.version == "9.0.0": + init_path = os.path.join(self.copy_dir, "system", "etc", "init", "hw", "init.rc") + os.chmod(init_path, 0o644)