mirror of
https://github.com/NohamR/pyzule-rw.git
synced 2026-10-10 18:39:41 +00:00
inject tvOS-compatible CydiaSubstrate instead of iOS
This commit is contained in:
@@ -24,7 +24,7 @@ class MainExecutable(Executable):
|
||||
else:
|
||||
self.inj_func = self.lief_inject
|
||||
|
||||
def inject(self, tweaks: dict[str, str], tmpdir: str) -> None:
|
||||
def inject(self, tweaks: dict[str, str], tmpdir: str, tvos: bool = False) -> None:
|
||||
ENT_PATH = f"{self.bundle_path}/cyan.entitlements"
|
||||
PLUGINS_DIR = f"{self.bundle_path}/PlugIns"
|
||||
FRAMEWORKS_DIR = f"{self.bundle_path}/Frameworks"
|
||||
@@ -106,10 +106,19 @@ class MainExecutable(Executable):
|
||||
real = self.common[missing]["name"] # e.g. "Orion.framework"
|
||||
ip = f"{FRAMEWORKS_DIR}/{real}"
|
||||
existed = tbhutils.delete_if_exists(ip, real)
|
||||
shutil.copytree(f"{self.install_dir}/extras/{real}", ip)
|
||||
|
||||
if tvos and missing == "substrate.":
|
||||
src = f"{self.install_dir}/extras/CydiaSubstrate_tvos.framework"
|
||||
else:
|
||||
src = f"{self.install_dir}/extras/{real}"
|
||||
|
||||
shutil.copytree(src, ip)
|
||||
|
||||
if not existed:
|
||||
print(f"[*] auto-injected {real}")
|
||||
if not tvos:
|
||||
print(f"[*] auto-injected {real}")
|
||||
else:
|
||||
print(f"[*] auto-injected {real} (tvos)")
|
||||
|
||||
# FINALLY !!
|
||||
if self.inj is not None: # type: ignore
|
||||
|
||||
Reference in New Issue
Block a user