This commit is contained in:
Jean-Marie Mineau 2025-04-18 15:43:31 +02:00
parent 7f46d6c12f
commit a999338cd0
Signed by: histausse
GPG key ID: B66AEEDA9B645AD2
7 changed files with 139 additions and 1115 deletions

View file

@ -1,4 +1,5 @@
import os
import time
import argparse
import subprocess
import tempfile
@ -127,11 +128,20 @@ def main():
else:
keytool = args.keytool
runner_f = None
if args.runner_script is not None and args.runner_script.name.endswith(".py"):
runner_f = lambda: subprocess.run(["python3", str(args.runner_script)])
def runner_f():
time.sleep(1)
subprocess.run(["python3", str(args.runner_script)])
elif args.runner_script is not None and args.runner_script.name.endswith(".sh"):
runner_f = lambda: subprocess.run(["bash", str(args.runner_script)])
def runner_f():
time.sleep(1)
subprocess.run(["bash", str(args.runner_script)])
else:
runner_f = None
if zipalign is None:
print(

View file

@ -21,6 +21,6 @@ pip install "${FOLDER}/dist/theseus_autopatcher-0.1.0-py3-none-any.whl[grodd]"
adb wait-for-device
#theseus-autopatch -a "${FOLDER}/../test_apks/dynloading/build/test_dynloading.apk" -o /tmp/patched_dynloading.apk -k "${FOLDER}/../test_apks/dynloading/ToyKey.keystore"
theseus-autopatch -a "${FOLDER}/../test_apks/dyn_and_ref/build/test_dyn_and_ref.apk" -o /tmp/patched_dynloading.apk -k /tmp/kstore.keystore -kp 'P@ssw0rd!' --runner-script "${FOLDER}/../test_apks/dyn_and_ref/tests/test_apk.py"
theseus-autopatch -a "${FOLDER}/../test_apks/dyn_and_ref/build/test_dyn_and_ref.apk" -o /tmp/patched_dynloading.apk -k /tmp/kstore.keystore -kp 'P@ssw0rd!' --runner-script "${FOLDER}/../test_apks/dyn_and_ref/tests/test_apk.py" --patch "${FOLDER}/../patcher/target/release/patcher"
rm -rf "${TMP}"