This tool downloads Android app (.apk) for a target SDK version using either Google Play API or AndroZoo.
-
Google Play API requires Google account.
-
AndroZoo requires API key and csv file containing a list of apps and their information.
Google Play Store does not provide old versions of an app and keeps only a few versions. If a target SDK version is old, a user should be able to download the app using AndroZoo instead in high chance. Thus, if not downloadable by Google Play API, try with AndroZoo. Our tool automatically handles downloading all available apps and checking their SDK versions.
Important - When downloading an app that has separate app versions supporting each ABI type, do not use AndroZoo since it does not provide any information about which ABI an app supports. A user can use Google Play API to download an app supporting specific ABI by providing GSFID of her device. To get the GSFID, the user needs to register her Google account on the device, and the device's ABI should match with the one that she wants to download.
In data/app_rank/ directory, we have an app list dataset (06/16/2021) which size is over 600 MB.
If anyone wants to use the latest version of dataset, please visit here and follow the instruction to download the latest version.
Google Play API - No need to be installed. Already included in our source code.
- Downloads an app from Google Play Store
- Set environmental variables for login credentials (see src/config.py) - Link
- GPAPI_EMAIL: Account email
- GPAPI_PASSWORD: Pass word of the account
- GPAPI_GSFID: Google Services Framework Identifier (GSFID) of your device
- GPAPI_TOKEN: Google Oauth token
AndroZoo - Download from link
- Set environmental variables
- AZ_API_KEY: API key
- AZ_INPUT_FILE: Latest input dataset
Android Asset Packaging Tool (AAPT) - Download from Link
- Requires to depackage downloaded app to check target SDK version
Below is code to use our downloader:
d = Downloader(mode, sdk_version, sdk_version_match)
d.download_all(pkg_list, out_path)
mode - Choose which tool to use for downloading: (1) GPAPI (Google API) or (2) AZ (AndroZoo).
sdk_version - Target SDK version for apps to download.
sdk_version_match - Whether to check if downloaded app's target SDK exactly matches or not. If FALSE, look for apps that our target SDK version is within minimum SDK version and target SDK version of the downloaded apps.
pkg_list - A list of tuples to download, e.g., (package name, app category).
Check and run main.py file how it can be used"
$ python3 main.py