Skip to content

Commit 8c8bdaf

Browse files
committed
chore: update README
1 parent 673b8ad commit 8c8bdaf

File tree

1 file changed

+26
-20
lines changed

1 file changed

+26
-20
lines changed

README.md

Lines changed: 26 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# apk-info
22

3-
A library for getting all the available information from an APK file.
3+
A full-featuared `apk` parser.
44

55
## Features
66

@@ -9,17 +9,17 @@ A library for getting all the available information from an APK file.
99
- A full AXML (Android Binary XML) implementation;
1010
- A full ARSC (Android Resource) implementation;
1111
- Support for extracting information contained in the `APK Signature Block 42`:
12-
- [APK Signature scheme v1](https://source.android.com/docs/security/features/apksigning);
13-
- [APK Signature scheme v2](https://source.android.com/docs/security/features/apksigning/v2);
14-
- [APK Signature scheme v3](https://source.android.com/docs/security/features/apksigning/v3);
15-
- [APK Signature scheme v3.1](https://source.android.com/docs/security/features/apksigning/v3-1);
16-
- Stamp Block v1;
17-
- Stamp Block v2;
18-
- Apk Channel Block;
19-
- Google Play Frosting (there are plans, but there is critically little information about it);
12+
- [APK Signature scheme v1](https://source.android.com/docs/security/features/apksigning);
13+
- [APK Signature scheme v2](https://source.android.com/docs/security/features/apksigning/v2);
14+
- [APK Signature scheme v3](https://source.android.com/docs/security/features/apksigning/v3);
15+
- [APK Signature scheme v3.1](https://source.android.com/docs/security/features/apksigning/v3-1);
16+
- Stamp Block v1;
17+
- Stamp Block v2;
18+
- Apk Channel Block;
19+
- Google Play Frosting (there are plans, but there is critically little information about it);
2020
- Correct extraction of the MainActivity based on how the Android OS [does it](https://xrefandroid.com/android-16.0.0_r2/xref/frameworks/base/core/java/android/app/ApplicationPackageManager.java#310);
2121
- Bindings for python 3.10+ with typings - no more `# type: ignore`;
22-
- And of course just a fast parser - 🙃
22+
- And of course just a fast parser - 🙃
2323

2424
## Getting started
2525

@@ -109,48 +109,53 @@ for signature in signatures:
109109
## Performance Analysis
110110

111111
Environment:
112+
112113
- OS: macOS Tahoe 26.0.1 (25A362) arm64
113114
- CPU: Apple M3 Pro (12) @ 4.06 GHz
114115

115116
The script:
117+
116118
1. Extract all available signatures from a file;
117119
2. Extract the package name;
118120
3. Extract the minimum sdk version;
119121
4. Get a list of all Main Activities;
120122
5. Get the application name;
121123

122124
apk-info library:
125+
123126
- Release build;
124127
- Python bindings (honest comparison);
125128

126129
---
127130

128131
Test case:
132+
129133
- 152 apk files;
130134
- Total size - 20GB;
131135
- Logging mode - warning;
132136

133-
|#|**apk-info**|**androguard**|
134-
|---|---|---|
135-
|1|1.22s user 4.26s system 81% cpu 6.760 total|57.39s user 4.88s system 97% cpu 1:03.85 total|
136-
|2|1.21s user 4.22s system 81% cpu 6.657 total|57.98s user 5.04s system 97% cpu 1:04.80 total|
137-
|3|1.22s user 4.25s system 81% cpu 6.688 total|55.56s user 4.48s system 97% cpu 1:01.55 total|
137+
| # | **apk-info** | **androguard** |
138+
| --- | ------------------------------------------- | ---------------------------------------------- |
139+
| 1 | 1.22s user 4.26s system 81% cpu 6.760 total | 57.39s user 4.88s system 97% cpu 1:03.85 total |
140+
| 2 | 1.21s user 4.22s system 81% cpu 6.657 total | 57.98s user 5.04s system 97% cpu 1:04.80 total |
141+
| 3 | 1.22s user 4.25s system 81% cpu 6.688 total | 55.56s user 4.48s system 97% cpu 1:01.55 total |
138142

139143
---
140144

141145
Test case:
146+
142147
- 3010 apk files;
143148
- Total size - 22GB;
144149
- Logging mode - warning;
145150

146151
> [!IMPORTANT]
147152
> There are a lot of malicious samples in this set that androguard simply cannot parse.
148153
149-
|#|**apk-info**|**androguard**|
150-
|---|---|---|
151-
|1|3.06s user 4.73s system 80% cpu 9.654 total|128.32s user 6.11s system 98% cpu 2:16.93 total|
152-
|2|3.27s user 5.25s system 84% cpu 10.126 total|131.12s user 6.60s system 98% cpu 2:20.23 total|
153-
|3|3.10s user 4.75s system 81% cpu 9.674 total|130.82s user 6.51s system 98% cpu 2:19.88 total|
154+
| # | **apk-info** | **androguard** |
155+
| --- | -------------------------------------------- | ----------------------------------------------- |
156+
| 1 | 3.06s user 4.73s system 80% cpu 9.654 total | 128.32s user 6.11s system 98% cpu 2:16.93 total |
157+
| 2 | 3.27s user 5.25s system 84% cpu 10.126 total | 131.12s user 6.60s system 98% cpu 2:20.23 total |
158+
| 3 | 3.10s user 4.75s system 81% cpu 9.674 total | 130.82s user 6.51s system 98% cpu 2:19.88 total |
154159

155160
---
156161

@@ -159,6 +164,7 @@ On average, the speed gain is about x10.
159164
The main advantage is that `apk-info` can parse many more malicious files than `androguard`.
160165

161166
For example, a list of hashes:
167+
162168
- a045d8b62bbf4cdcfbd449a994958c1e051d06c0d888e0936838fff4be47aefc
163169
- 3f972448cf4fdf8938b56c0627a2e274e3c9968b0212975eadda8e4de7ab782e
164170
- d5fe92a103f643735d42e6070dc3fcc28f15e2cef488dae42ca235a061bc836a

0 commit comments

Comments
 (0)