fix: crashing when jailbroken

i realized azule actually removes the signature (instead of fakesigning) before specific operations, maybe this is the fix?
This commit is contained in:
zx
2024-09-10 07:11:15 -04:00
parent 927df65b55
commit 806db413e2
2 changed files with 7 additions and 2 deletions

View File

@@ -76,7 +76,7 @@ class Executable:
has_entitlements = True
# iirc, injecting doesnt work (sometimes) if the file isn't signed
self.fakesign(False)
self.remove_signature()
if any(t.endswith(".appex") for t in tweaks):
os.makedirs(PLUGINS_DIR, exist_ok=True)
@@ -154,6 +154,9 @@ class Executable:
subprocess.run([self.ldid, f"-S{ENT_PATH}", self.path])
print("[*] restored entitlements")
def remove_signature(self) -> None:
subprocess.run([self.ldid, "-R", self.path], stderr=subprocess.DEVNULL)
def fakesign(self, keep_entitlements: bool = True) -> bool:
cmd = [self.ldid, "-S"]
if keep_entitlements:
@@ -195,7 +198,7 @@ class Executable:
)
def fix_dependencies(self, tweaks: dict[str, str], need: set[str]) -> None:
self.fakesign() # sometimes it doesnt work if we dont do this
self.remove_signature()
for dep in self.get_dependencies():
for cname in (tweaks | self.common):

View File

@@ -1,3 +1,5 @@
# type: ignore
from setuptools import setup
setup(