# -*- coding: utf-8 -*-
import zipfile
from pathlib import Path

APK = Path(__file__).resolve().parent.parent / "apks" / "seabank_ph_base.apk"
libs = [
    b"com/google/gson/Gson",
    b"com/fasterxml/jackson",
    b"com/alibaba/fastjson",
    b"org/json/JSONObject",
    b"okhttp3/RequestBody",
    b"retrofit2/",
]
with zipfile.ZipFile(str(APK)) as zf:
    data = b"".join(zf.read(n) for n in zf.namelist() if n.endswith(".dex"))
    for lib in libs:
        print(lib.decode(), data.count(lib))
