This repository has been archived by the owner on Mar 22, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from TravisWhitehead/gpapi
Overhaul aabc to use gpapi
- Loading branch information
Showing
11 changed files
with
411 additions
and
843 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,71 +1,44 @@ | ||
# aabc: Android App Bundle Checker | ||
|
||
aabc is a utility that checks whether Android apps on a device were built using Android | ||
App Bundles (AAB) or whether they're monolithic APKs. This script calls ADB to gather | ||
this information and can output lists of apps built with AAB. | ||
|
||
## Requirements | ||
|
||
[Android Debug Bridge (`adb`)](https://developer.android.com/studio/command-line/adb) is required | ||
to run aabc. ADB is a part of [Android SDK Platform-Tools](https://developer.android.com/studio/releases/platform-tools.html). | ||
aabc is a utility that checks whether Android apps are published using Android App Bundles (AAB) or as monolithic APKs. | ||
aabc takes app IDs and queries Google Play APIs to determine AAB usage based on file counts. | ||
|
||
## Usage | ||
If you find that the usage instructions below are unclear or inaccurate, please [open an issue](https://github.com/TravisWhitehead/aabc/issues/new). | ||
This may not be kept very up to date while under rapid development. | ||
|
||
### Connecting Android Device(s) with adb | ||
1) [Enable developer options and USB debugging on your Android device(s).](https://developer.android.com/studio/debug/dev-options#enable) | ||
2) Connect Android device(s) to your computer via USB. | ||
3) Run `adb devices` and note the serial of the target device (the output in the left column). | ||
- A pop-up may appear on your device asking you to allow the connection. Allow it. | ||
|
||
### Running aabc | ||
|
||
|
||
Specify the devices you want to check by passing their serials (from step 3 above) to aabc: | ||
```sh | ||
# Check device with serial "FOBAR1234" | ||
aabc FOOBAR1234 | ||
|
||
# Check multiple devices by passing multiple serials | ||
aabc FOOBAR1234 HELLOWORLD12 | ||
``` | ||
|
||
By default, aabc will list apps that are built using Android App Bundles. This preference can be | ||
specified explicitly by passing `-a` (this does the same as the above example): | ||
```sh | ||
aabc -a FOOBAR1234 | ||
``` | ||
|
||
You can do the opposite and output apps that don't use Android App Bundles (monolithic apps) with `-m`: | ||
```sh | ||
aabc -m FOOBAR1234 | ||
``` | ||
|
||
To filter out system apps that you might not care about checking, pass `-3` to look at third-party | ||
apps only: | ||
```sh | ||
aabc -3 FOOBAR1234 | ||
``` | ||
|
||
See an overview of available options and usage information: | ||
Run `aabc -h` to see an overview of available options and usage information: | ||
```sh | ||
$ aabc -h | ||
|
||
usage: aabc [-h] [-3] [-a | -m] device_serial [device_serial ...] | ||
usage: aabc [-h] [-c CONF_FILE] [-dc DEVICE_CODENAME] [-i INPUT_FILE] | ||
[-r REPORT_FILE] [-v] [-V] | ||
[apps [apps ...]] | ||
|
||
Output list of Android apps installed on devices that use Android App Bundles | ||
(default) or are monolithic. | ||
A tool for checking if apps on the Google Play Store use Android App Bundles | ||
|
||
positional arguments: | ||
device_serial Serial(s) of device(s) to check (from "adb devices" | ||
output) | ||
apps Apps to check if using Android App Bundles | ||
|
||
optional arguments: | ||
-h, --help show this help message and exit | ||
-3, --third-party-apps-only | ||
Only check if third-party apps use Android App Bundles | ||
-a, --output-aab Output list of packages that use Android App Bundles | ||
-m, --output-monolithic | ||
Output list of packages that are monolithic (not using | ||
Android App Bundles) | ||
-c CONF_FILE, --config CONF_FILE | ||
Use a different config file than gplaycli.conf | ||
-dc DEVICE_CODENAME, --device-codename DEVICE_CODENAME | ||
The device codename to fake | ||
-i INPUT_FILE, --input-file INPUT_FILE | ||
File containing a list of app IDs to check if using | ||
Android App Bundles | ||
-r REPORT_FILE, --report-file REPORT_FILE | ||
The file to write the report to | ||
-v, --verbose Be verbose | ||
-V, --version Print version and exit | ||
``` | ||
### Check Apps on Your Device via ADB | ||
The original version of this project used ADB to check for AAB usage with the apps installed on a device connected to your computer. | ||
See release [v0.1.2](https://github.com/TravisWhitehead/aabc/tree/v0.1.2) for this use case. | ||
## Thanks | ||
* to https://github.com/NoMore201/googleplay-api for querying Google Play | ||
* to https://github.com/matlink/gplaycli for some borrowed code & examples of gpapi usage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
[Credentials] | ||
gmail_address= | ||
gmail_password= | ||
|
||
[Device] | ||
device_codename=bacon | ||
|
||
[Locale] | ||
locale=en_US | ||
timezone=UTC |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
from aabc.aabc import main | ||
|
||
if __name__ == '__main__': | ||
main() |
Oops, something went wrong.