From 9788d77b74e1978592c376bcded2b30a52f32133 Mon Sep 17 00:00:00 2001 From: Jean-Marie 'Histausse' Mineau Date: Thu, 31 Aug 2023 18:05:13 +0200 Subject: [PATCH] crappy test script --- .gitignore | 1 + test.py | 12 ++++++++++++ 2 files changed, 13 insertions(+) create mode 100644 test.py diff --git a/.gitignore b/.gitignore index 2db1f15..3e1d15e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /target /venv_maturin +/test.apk diff --git a/test.py b/test.py new file mode 100644 index 0000000..56b3f99 --- /dev/null +++ b/test.py @@ -0,0 +1,12 @@ +import androscalpel as asc +import zipfile as z + +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)