apktool stuff

This commit is contained in:
Jean-Marie Mineau 2024-11-06 11:32:04 +01:00
parent 211fed06ba
commit ad3128859f

View file

@ -254,6 +254,12 @@ def check_smali():
type=Path,
required=True,
)
parser.add_argument(
"--apktool-jar",
help="Path to the apktool jar file",
type=Path,
required=True,
)
key_parser = parser.add_mutually_exclusive_group(required=False)
key_parser.add_argument(
"--api-key-file",
@ -320,7 +326,17 @@ def check_smali():
data[sha256] = {}
entry = analyze(apk, sha256, json_out=data[sha256])
r = subprocess.run(
["apktool", "-JXmx8G", "d", "app.apk", "-o", "apktool_out"], cwd=d
[
"java",
"-Xmx8G",
"-jar",
args.apktool_jar,
"d",
"app.apk",
"-o",
"apktool_out",
],
cwd=d,
)
data[sha256]["apktool-finished"] = (r.returncode == 0) and (
d / "apktool_out" / "apktool.yml"