Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
48dbfaf34a |
@@ -18,7 +18,6 @@ from stuff.nodataperm import Nodataperm
|
|||||||
from stuff.smartdock import Smartdock
|
from stuff.smartdock import Smartdock
|
||||||
from stuff.widevine import Widevine
|
from stuff.widevine import Widevine
|
||||||
from stuff.fdroidpriv import FDroidPriv
|
from stuff.fdroidpriv import FDroidPriv
|
||||||
from stuff.tflitefix import TfliteFix
|
|
||||||
import tools.helper as helper
|
import tools.helper as helper
|
||||||
from tools import container
|
from tools import container
|
||||||
from tools import images
|
from tools import images
|
||||||
@@ -145,8 +144,6 @@ def remove_app(args):
|
|||||||
remove_list.append(Nodataperm(args.android_version))
|
remove_list.append(Nodataperm(args.android_version))
|
||||||
if "hidestatusbar" in app:
|
if "hidestatusbar" in app:
|
||||||
remove_list.append(HideStatusBar())
|
remove_list.append(HideStatusBar())
|
||||||
if "tflitefix" in app:
|
|
||||||
remove_list.append(TfliteFix())
|
|
||||||
|
|
||||||
if not container.use_overlayfs():
|
if not container.use_overlayfs():
|
||||||
copy_dir = "/tmp/waydroid"
|
copy_dir = "/tmp/waydroid"
|
||||||
@@ -172,8 +169,6 @@ def hack_option(args):
|
|||||||
hack_list.append(Nodataperm())
|
hack_list.append(Nodataperm())
|
||||||
if "hidestatusbar" in options:
|
if "hidestatusbar" in options:
|
||||||
hack_list.append(HideStatusBar())
|
hack_list.append(HideStatusBar())
|
||||||
if "tflitefix" in options:
|
|
||||||
hack_list.append(TfliteFix())
|
|
||||||
|
|
||||||
if not container.use_overlayfs():
|
if not container.use_overlayfs():
|
||||||
copy_dir = "/tmp/waydroid"
|
copy_dir = "/tmp/waydroid"
|
||||||
@@ -209,7 +204,7 @@ def interact():
|
|||||||
args = argparse.Namespace()
|
args = argparse.Namespace()
|
||||||
android_version = inquirer.select(
|
android_version = inquirer.select(
|
||||||
message="Select Android version",
|
message="Select Android version",
|
||||||
instruction="(↑↓ Select Item)",
|
instruction="(\u2191\u2193 Select Item)",
|
||||||
choices=[
|
choices=[
|
||||||
Choice(name="Android 11", value="11"),
|
Choice(name="Android 11", value="11"),
|
||||||
Choice(name="Android 13", value="13"),
|
Choice(name="Android 13", value="13"),
|
||||||
@@ -235,7 +230,7 @@ def interact():
|
|||||||
exit()
|
exit()
|
||||||
|
|
||||||
install_choices = ["gapps", "microg", "libndk", "libhoudini", "magisk", "smartdock", "fdroidpriv", "widevine",]
|
install_choices = ["gapps", "microg", "libndk", "libhoudini", "magisk", "smartdock", "fdroidpriv", "widevine",]
|
||||||
hack_choices = ["tflitefix"]
|
hack_choices = []
|
||||||
if android_version=="11":
|
if android_version=="11":
|
||||||
hack_choices.extend(["nodataperm", "hidestatusbar"])
|
hack_choices.extend(["nodataperm", "hidestatusbar"])
|
||||||
|
|
||||||
@@ -302,7 +297,7 @@ def main():
|
|||||||
|
|
||||||
install_choices = ["gapps", "microg", "libndk", "libhoudini",
|
install_choices = ["gapps", "microg", "libndk", "libhoudini",
|
||||||
"magisk", "mitm", "smartdock", "widevine"]
|
"magisk", "mitm", "smartdock", "widevine"]
|
||||||
hack_choices = ["nodataperm", "hidestatusbar", "tflitefix"]
|
hack_choices = ["nodataperm", "hidestatusbar"]
|
||||||
micrg_variants = ["Standard", "NoGoolag", "UNLP", "Minimal", "MinimalIAP"]
|
micrg_variants = ["Standard", "NoGoolag", "UNLP", "Minimal", "MinimalIAP"]
|
||||||
remove_choices = install_choices
|
remove_choices = install_choices
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -10,7 +10,7 @@ class Houdini(General):
|
|||||||
partition = "system"
|
partition = "system"
|
||||||
dl_links = {
|
dl_links = {
|
||||||
"11": ["https://github.com/supremegamers/vendor_intel_proprietary_houdini/archive/81f2a51ef539a35aead396ab7fce2adf89f46e88.zip", "fbff756612b4144797fbc99eadcb6653"],
|
"11": ["https://github.com/supremegamers/vendor_intel_proprietary_houdini/archive/81f2a51ef539a35aead396ab7fce2adf89f46e88.zip", "fbff756612b4144797fbc99eadcb6653"],
|
||||||
"13": ["https://github.com/supremegamers/vendor_intel_proprietary_houdini/archive/9e77896350caccd228b36b2e1b4a994aa4bd48da.zip", "3807fe029559db3037efe245d9e74270"]
|
"13": ["https://github.com/supremegamers/vendor_intel_proprietary_houdini/archive/2f8f088671182e17e67321e098e8411a3972a628.zip", "37fe0899f1e4da7f9a724cca1c1ab1ea"]
|
||||||
}
|
}
|
||||||
act_md5 = ...
|
act_md5 = ...
|
||||||
dl_link = ...
|
dl_link = ...
|
||||||
|
|||||||
@@ -1,78 +0,0 @@
|
|||||||
import glob
|
|
||||||
import os
|
|
||||||
import shutil
|
|
||||||
from stuff.general import General
|
|
||||||
from tools.logger import Logger
|
|
||||||
|
|
||||||
|
|
||||||
class TfliteFix(General):
|
|
||||||
id = "tflitefix"
|
|
||||||
partition = "system"
|
|
||||||
TARGET_OFFSET = 0x2E9204
|
|
||||||
PATCH_BYTES = b"\xc0\x03\x5f\xd6" # ret in AArch64 little-endian
|
|
||||||
|
|
||||||
def __init__(self, android_version="13") -> None:
|
|
||||||
super().__init__()
|
|
||||||
|
|
||||||
def download(self):
|
|
||||||
pass
|
|
||||||
|
|
||||||
@property
|
|
||||||
def skip_extract(self):
|
|
||||||
return True
|
|
||||||
|
|
||||||
def copy(self):
|
|
||||||
pass
|
|
||||||
|
|
||||||
def extra1(self):
|
|
||||||
"""Applies binary patch to libtensorflowlite.so in installed apps"""
|
|
||||||
search_paths = [
|
|
||||||
os.path.expanduser("~/.local/share/waydroid/data/app/~~*==/*/lib/arm64/libtensorflowlite.so"),
|
|
||||||
"/var/lib/waydroid/data/app/~~*==/*/lib/arm64/libtensorflowlite.so",
|
|
||||||
]
|
|
||||||
found = []
|
|
||||||
for p in search_paths:
|
|
||||||
found.extend(glob.glob(p))
|
|
||||||
|
|
||||||
if not found:
|
|
||||||
Logger.warning("No installed apps with libtensorflowlite.so found in Waydroid data.")
|
|
||||||
return
|
|
||||||
|
|
||||||
for lib_path in found:
|
|
||||||
try:
|
|
||||||
with open(lib_path, "rb") as f:
|
|
||||||
data = bytearray(f.read())
|
|
||||||
|
|
||||||
if len(data) > self.TARGET_OFFSET + 4:
|
|
||||||
if bytes(data[self.TARGET_OFFSET:self.TARGET_OFFSET+4]) == self.PATCH_BYTES:
|
|
||||||
Logger.info(f"Patch already applied to {lib_path}")
|
|
||||||
continue
|
|
||||||
|
|
||||||
backup = lib_path + ".orig"
|
|
||||||
if not os.path.exists(backup):
|
|
||||||
shutil.copy2(lib_path, backup)
|
|
||||||
|
|
||||||
data[self.TARGET_OFFSET:self.TARGET_OFFSET+4] = self.PATCH_BYTES
|
|
||||||
with open(lib_path, "wb") as f:
|
|
||||||
f.write(data)
|
|
||||||
os.chmod(lib_path, 0o755)
|
|
||||||
Logger.info(f"Successfully patched {lib_path}")
|
|
||||||
except Exception as e:
|
|
||||||
Logger.error(f"Failed to patch {lib_path}: {e}")
|
|
||||||
|
|
||||||
def extra2(self):
|
|
||||||
"""Restores original libtensorflowlite.so from backup"""
|
|
||||||
search_paths = [
|
|
||||||
os.path.expanduser("~/.local/share/waydroid/data/app/~~*==/*/lib/arm64/libtensorflowlite.so.orig"),
|
|
||||||
"/var/lib/waydroid/data/app/~~*==/*/lib/arm64/libtensorflowlite.so.orig",
|
|
||||||
]
|
|
||||||
for p in search_paths:
|
|
||||||
for orig in glob.glob(p):
|
|
||||||
target = orig[:-5]
|
|
||||||
try:
|
|
||||||
shutil.copy2(orig, target)
|
|
||||||
os.remove(orig)
|
|
||||||
os.chmod(target, 0o755)
|
|
||||||
Logger.info(f"Restored {target}")
|
|
||||||
except Exception as e:
|
|
||||||
Logger.error(f"Failed to restore {target}: {e}")
|
|
||||||
Reference in New Issue
Block a user