apktool stuff

This commit is contained in:
Jean-Marie Mineau 2024-11-06 11:24:46 +01:00
parent faf3b80871
commit 211fed06ba

View file

@ -319,7 +319,12 @@ def check_smali():
with zipfile.ZipFile(io.BytesIO(apk_bin)) as apk:
data[sha256] = {}
entry = analyze(apk, sha256, json_out=data[sha256])
subprocess.run(["apktool", "d", "app.apk", "-o", "apktool_out"], cwd=d)
r = subprocess.run(
["apktool", "-JXmx8G", "d", "app.apk", "-o", "apktool_out"], cwd=d
)
data[sha256]["apktool-finished"] = (r.returncode == 0) and (
d / "apktool_out" / "apktool.yml"
).exists()
smalli_dirs = []
for dex in data[sha256]["class_dex"]:
if dex == "classes.dex":