APK parse
reference androguard.
Example:
apkf = APK("myfile.apk")
apkf = APK(read("myfile.apk"), raw=True)
package
Return the name of the package
>>> apkf.package
com.android.vending
>>> apkf.get_package()
com.android.vending
file_md5
Return the file md5 of the apk
>>> apkf.file_md5
40bdd920a3a3d2acf432e3c5b485eb11
cert_md5
Return the cert md5 of the apk
>>> apkf.cert_md5
cde9f6208d672b54b1dacc0b7029f5eb
file_size
Return the apk file size
>>> apkf.file_size
11194863
androidversion
Return the apk version
>>> apkf.androidversion
{'Code': u'80341200', 'Name': u'5.4.12'}
get_androidversion_code()
Return the android version code
>>> apkf.get_androidversion_code()
80341200
get_androidversion_name()
Return the android version name
>>> apkf.get_androidversion_name()
5.4.12
get_min_sdk_version()
Return the android:minSdkVersion attribute
>>> apkf.get_min_sdk_version()
9
get_target_sdk_version()
Return the android:targetSdkVersion attribute
>>> apkf.get_target_sdk_version()
21
get_libraries()
Return the android:name attributes for libraries
>>> apkf.get_libraries()
[]
get_files()
Return the files inside the APK
>>> apkf.get_files()
[u'AndroidManifest.xml', u'assets/keys/dcb-pin-encrypt-v1/1',...]
get_files_types()
Return the files inside the APK with their associated types (by using python-magic)
Please pip install python-magic
>>> apkf.get_files_types()
{u'res/layout/play_card_bundle_item_small.xml': "Android's binary XML",...}
get_main_activity()
Return the name of the main activity
>>> apkf.get_main_activity()
com.android.vending.AssetBrowserActivity
get_activities()
Return the android:name attribute of all activities
>>> apkf.get_activities()
['com.android.vending.AssetBrowserActivity', ...]
get_services()
Return the android:name attribute of all services
>>> apkf.get_services()
['com.android.vending.GCMIntentService', ...]
get_receivers()
Return the android:name attribute of all receivers
>>> apkf.get_receivers()
['com.google.android.gcm.GCMBroadcastReceiver', ...]
get_providers()
Return the android:name attribute of all providers
>>> apkf.get_providers()
['com.google.android.finsky.providers.RecentSuggestionsProvider', ...]
get_permissions()
Return permissions
>>> apkf.get_permissions()
['com.android.vending.permission.C2D_MESSAGE', ...]
show()
Return FILES, PERMISSIONS, MAIN ACTIVITY...
>>> apkf.show()
FILES: ...
parse_icon()
Parse ICON of the apk, storage on icon_path
>>> apkf.parse_icon(icon_path='/tmp')
...
cert_text
>>> apkf.cert_text
Certificate:
Data:Version: 3 (0x2)
...
Release files for apk-parse 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| apk_parse-1.0.0.tar.gz | 50.0 kB | Details |
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| apk_parse-1.0.0-py3.7.egg | Legacy Egg format | - | - | Details |
| apk_parse-1.0.0-py3.6.egg | Legacy Egg format | - | - | Details |
| apk_parse-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 225.3 kB
Release files / apk_parse-1.0.0.tar.gz
| Download URL | apk_parse-1.0.0.tar.gz |
|---|---|
| Size | 50.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
348be49a12c08a623ecee27a967ad24478b038f280898f4e3cc4f1e2a70432a5
|
|
BLAKE2b-256 checksum How to use checksums |
10a34de3596eef8d017850a6b984540ef004fc60d442eff4cc131e864d921506
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1
|
Release files / apk_parse-1.0.0-py3.7.egg
| Download URL | apk_parse-1.0.0-py3.7.egg |
|---|---|
| Size | 62.5 kB |
| Tags | Egg |
|
SHA-256 checksum How to use checksums |
b03fdf14275a5e9ad26058827fcd02f11751dbe22fe1b4b01a4e2febf8b42b21
|
|
BLAKE2b-256 checksum How to use checksums |
169ecaf084013aff123e845293917808417dd1a6102ad90e21585c086e7c544e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1
|
Release files / apk_parse-1.0.0-py3.6.egg
| Download URL | apk_parse-1.0.0-py3.6.egg |
|---|---|
| Size | 62.5 kB |
| Tags | Egg |
|
SHA-256 checksum How to use checksums |
0797e9ce5b3218484085dedd5f71e0aed0845952df93b7303a24f353ab00e6dd
|
|
BLAKE2b-256 checksum How to use checksums |
23a168cb7a5e3a73ac9736d48f61b911dd4cda09dc55d7a313992b235ae2bb7c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1
|
Release files / apk_parse-1.0.0-py3-none-any.whl
| Download URL | apk_parse-1.0.0-py3-none-any.whl |
|---|---|
| Size | 50.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0518c891d8bb903e952a5b70de0d9fe5f478594e37bdb0826561ecc4d86fccfa
|
|
BLAKE2b-256 checksum How to use checksums |
1e6e23b4ed8ff4eb832e1db9a6dc85aaa3c7cd95eff390f8e325b9a0fc5c606d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1
|