getapk
is a small CLI program that allows you to download raw APK files from
the Google Play store by using an actual Android device in debugging mode.
The Android device does not need to be rooted.
The version of the APK is automatically checked and included in the generated APK filename.
Clone this repo (or copy get-apk.sh
) and add a function to your shell
(e.g. ~/.bash_profile
or ~/.zshrc
):
function getapk() {
all_args=( "$@" )
/path/to/get-apk.sh "${all_args[@]}"
}
You must have:
abd
installed- USB/wifi debugging enabled on the Android device
- the Android device connected via USB/wifi (whichever you enabled in step 2)
getapk com.some.app.id
You will need to update the get-apk.sh
script to set correct values for the
following variables:
readonly INSTALL_BUTTON_X_COORD="550" # Determined manually for Pixel 3a
readonly INSTALL_BUTTON_Y_COORD="800" # Determined manually for Pixel 3a
If the APK is not yet installed on the phone:
$> getapk com.authy.authy
Getting APK from the Play Store with id: com.authy.authy...
Installing APK on the phone...
Opening APK's Play Store entry on the phone...done.
Tapping the Install button on the phone...done.
Waiting for APK to install on the phone..............done.
Downloading APK file(s) from the phone...
APK (1/1) downloaded to:
[email protected]/apk/[email protected]
If the APK is already installed on the phone:
$> getapk com.authy.authy
Getting APK from the Play Store with id: com.authy.authy...
APK is already installed on the phone.
Downloading APK file(s) from the phone...
APK (1/1) downloaded to:
[email protected]/apk/[email protected]
If the APK is multi-part:
$> getapk com.twofasapp
Getting APK from the Play Store with id: com.twofasapp...
APK is already installed on the phone.
Downloading APK file(s) from the phone...
APK (1/5) downloaded to:
[email protected]/apk/[email protected]
APK (2/5) downloaded to:
[email protected]/apk/[email protected]
APK (3/5) downloaded to:
[email protected]/apk/[email protected]
APK (4/5) downloaded to:
[email protected]/apk/[email protected]
APK (5/5) downloaded to:
[email protected]/apk/[email protected]
- The automated clicking of the
Install
button does not work 100% of the time.- Observed situations where it fails: app is not free, app has some interstitial warning about content rating, etc