bongtrop / apkutils

A library that gets infos from APK

Home Page:https://gitee.com/kin9-0rz/apkutils

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

apkutils PyPI version GitHub license

A library that gets infos from APK.

Install

$ pip install apkutils

Options

$ python3 -m apkutils -h
usage: apkutils [-h] [-m] [-s] [-f] [-c] [-V] p

positional arguments:
  p              path

optional arguments:
  -h, --help     show this help message and exit
  -m             Show manifest
  -s             Show strings
  -f             Show files
  -c             Show certs
  -V, --version  show program's version number and exit

Usage

import binascii

from apkutils import __VERSION__, APK
apk = APK('test.apk')

Get AndroidManifest.json.

if apk.get_manifest():
    print(json.dumps(apk.get_manifest(), indent=1))
elif apk.get_org_manifest():
    print(apk.get_org_manifest())

Get strings defined in APK.

for item in apk.get_strings():
    print(binascii.unhexlify(item).decode(errors='ignore'))

Get files in APK.

for item in apk.get_files():
    print(item)
{'name': 'res/layout/action_bar_item.xml', 'type': 'axml', 'time': '14300101000000', 'crc': '27FA35BC'}
...

Get certificates defined in APK.

for item in apk.get_certs():
    print(item)

Reference

About

A library that gets infos from APK

https://gitee.com/kin9-0rz/apkutils

License:MIT License


Languages

Language:Python 100.0%Language:Makefile 0.0%