Skip to content

Commit 0804f54

Browse files
committed
For APKPure, allow specifying more options e.g. arch= and add usage file.
1 parent 180a418 commit 0804f54

5 files changed

Lines changed: 205 additions & 94 deletions

File tree

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,11 @@ The simplest example is to download a single APK to the current directory:
4747
apkeep -a com.instagram.android .
4848
```
4949

50-
This downloads from the default source, APKPure, which does not require credentials. To
51-
download directly from the google play store, you will first have to [obtain an AAS token](USAGE-google-play.md).
50+
This downloads from the default source, APKPure, which does not require credentials. For more
51+
APKPure usage examples, such as specifying a package architecture, refer to the
52+
[`USAGE-apkpure.md`](USAGE-apkpure.md) document.
53+
54+
To download directly from the google play store, you will first have to [obtain an AAS token](USAGE-google-play.md).
5255
Then,
5356

5457
```shell

USAGE-apkpure.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
APKPure is the default download source. To download from APKPure:
2+
3+
```shell
4+
apkeep -a com.instagram.android .
5+
```
6+
7+
Or, if you wish to explicitly specify the download source:
8+
9+
```shell
10+
apkeep -a com.instagram.android -d apk-pure .
11+
```
12+
13+
More advanced options for this download source can be passed with the `-o` option. For instance, download a specific architecture variant of an app with `arch=`:
14+
15+
```shell
16+
apkeep -a com.instagram.android -o 'arch=x86' .
17+
```
18+
19+
To specify multiple architectures, separate the `arch=` specification with a semicolon. The following shows the default `arch` option:
20+
21+
```shell
22+
apkeep -a com.instagram.android -o 'arch=arm64-v8a;armeabi-v7a;armeabi;x86;x86_64' .
23+
```
24+
25+
You can also list the versions available, either specifying a specific architecture or not:
26+
27+
```shell
28+
apkeep -l -a com.instagram.android -o 'arch=x86'
29+
apkeep -l -a com.instagram.android
30+
```
31+
32+
To specify a preferred language or Android API version, use the `language=` or `os_ver` options. The following shows the defaults:
33+
34+
```shell
35+
apkeep -a com.instagram.android -o 'language=en-US,os_ver=35' .
36+
```

src/consts.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
pub const APKPURE_VERSIONS_URL_FORMAT: &str = "https://api.pureapk.com/m/v3/cms/app_version?hl=en-US&package_name=";
2-
pub const APKPURE_DOWNLOAD_URL_REGEX: &str = r"(X?APKJ)..(https?://(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&//=]*))";
1+
pub const APKPURE_VERSIONS_URL_FORMAT: &str = "https://tapi.pureapk.com/v3/get_app_his_version?hl=en&package_name=";
32
pub const FDROID_REPO: &str = "https://f-droid.org/repo";
43
pub const FDROID_INDEX_FINGERPRINT: &[u8] = &[67, 35, 141, 81, 44, 30, 94, 178, 214, 86, 159, 74, 58, 251, 245, 82, 52, 24, 184, 46, 10, 62, 209, 85, 39, 112, 171, 185, 169, 201, 204, 171];
54
pub const FDROID_SIGNATURE_BLOCK_FILE_REGEX: &str = r"^META-INF/.*\.(DSA|EC|RSA)$";

0 commit comments

Comments
 (0)