from androguard.core.apk import APK
import sys, json
for path in sys.argv[1:]:
    print('===', path)
    apk = APK(path)
    print('package', apk.get_package())
    try:
        locales = apk.get_locales()
    except Exception as e:
        locales = ['ERR:'+str(e)]
    print('locales', locales)
    try:
        for loc in locales[:5]:
            if isinstance(loc, str):
                s = apk.get_strings_resources().get(loc)
                if s:
                    items=list(s.items())[:20]
                    print('strings', loc, items)
    except Exception as e:
        print('strings_err', e)
