How to download .apk from Play Store

Alexey Alter-Pesotskiy
testableapple
Published in
2 min readMar 8, 2019

--

This Note originally published on my Personal Blog here. Read original note so that you won’t miss any content.

There are three ways to download Android apps from Google Play Store for your attention:

  1. Via third party websites (easiest, but not the most secure way)
  2. Via Chrome extension (intermediate way)
  3. Via device on Android (the most secure and exact way)
  4. Via google-play-cli (automation friendly way)

To download APKs via these methods you need to know app bundle identifier.

Via third party websites

As I said, this is not secure method and can be illegal, so use it at your own risk.

Via Chrome extension

Tbh, there is no difference with the previous method (:

Via device on Android

  1. At first you need to install app from Play Store to your phone
  2. Secondly you should enable “Unknown sources” in your phone’s security settings (Settings > Security > Unknown sources)
  3. Then connect your phone to your PC using a USB cable/WiFi (adb needs to see it)
  4. Make sure you have installed adb
  5. And download an apk:
$ bundleId="<your_bundle>"
$ apk=`adb shell pm path $bundleId`
$ apk=`echo $apk | awk '{print $NF}' FS=':' | tr -d '\r\n'`
$ adb pull $apk app.apk

Via Google-Play-CLI

The best way to make this process automated.

1. Install tool:

$ brew install node
$ npm i google-play-cli -g

2. Set environment variables in your bash.profile:

  • GOOGLE_LOGIN - email address used on a mobile phone.
  • GOOGLE_PASSWORD - The password used to access the Play service.
  • ANDROID_ID - the device GSF ID for Google. You can get the gsf id e.g., using the device id app.
$ touch .bash_profile
$ open .bash_profile
$ export GOOGLE_LOGIN=sample@gmail.com
$ export GOOGLE_PASSWORD=password
$ export ANDROID_ID=a3n3d3r3o3i3d3i3d
$ source .bash_profile

3. And download an apk:

$ gp-download "<your_bundle>" > app.apk

Conclusion

Downloading apps from Google Play Store can be pretty easy process as manually as automated.

Also you might to find an answer how to download IPA from App Store here.

--

--