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

SPLIT = Path(__file__).resolve().parent.parent / "extracted" / "native" / "split_config.arm64_v8a.apk"
OUT = SPLIT.parent
with zipfile.ZipFile(str(SPLIT)) as zf:
    for name in zf.namelist():
        if "libshpssdk" in name and name.endswith(".so"):
            path = OUT / Path(name).name
            path.write_bytes(zf.read(name))
            print("extracted", path, path.stat().st_size)
