# -*- coding: utf-8 -*- import os import zipfile from pathlib import Path APK = Path(__file__).resolve().parent.parent / "apks" / "seabank_ph_base.apk" OUT = Path(__file__).resolve().parent.parent / "extracted" / "native" OUT.mkdir(parents=True, exist_ok=True) with zipfile.ZipFile(str(APK)) as zf: for name in zf.namelist(): if "libshpssdk" in name and name.endswith(".so"): dest = OUT / Path(name).name dest.write_bytes(zf.read(name)) print(dest, dest.stat().st_size)