androscalpel/test.py
Jean-Marie Mineau 026b9ddd41
fix == for ids
2023-11-29 18:15:11 +01:00

19 lines
431 B
Python

import logging
FORMAT = "[%(levelname)s] %(name)s %(filename)s:%(lineno)d: %(message)s"
logging.basicConfig(format=FORMAT)
logging.getLogger().setLevel(logging.INFO)
import androscalpel as asc
import zipfile as z
from androscalpel import *
APK_NAME = "test.apk"
DEX_NAME = "classes.dex"
with z.ZipFile(APK_NAME) as zipf:
with zipf.open(DEX_NAME, "r") as dex:
dex = dex.read()
apk = asc.Apk()
apk.add_dex_file(dex)