lun. Nov 18th, 2019

KelvinSecurity

KelvinSecurity – News – Cyber Security News – ETHICAL HACKINg – Pentesting – OSINT

PlaystoreDownloader – A command line tool to download Android applications directly from the Google Play Store.

3 min read

This project is intended for learning purposes only and is not affiliated with Google in any way.

Configuration

Before interacting with the Play Store you have to provide valid credentials and an ANDROID ID associated to your account. Please modify the credentials.json file and insert the required information before trying to use this tool:

  • Enter your Google email and password in the USERNAME and PASSWORD fields of the credentials.json file. This information is needed to authenticate with Google’s servers.
  • Use the above credentials on an Android device (real or emulated) and download at least one application using the official Google Play Store on the device. This step is necessary in order to associate the ANDROID ID of the device to your account, so that you will be able to download applications as if you were directly using your device. Do not remove the account from the device or its ANDROID ID won’t be valid anymore.
  • Get the ANDROID ID of the device and fill the ANDROID_ID field of the credentials.json file. You can obtain the ANDROID ID by installing the Device ID application on your device, then copy the string corresponding to Google Service Framework (GSF) (use this string instead of the Android Device ID presented by the application).
  • In case of errors related to the authentication after the above steps, consider allowing less secure apps to access your account by visiting https://myaccount.google.com/lesssecureapps (visit the link while you are logged in).

Note that you will be able to download only the applications compatible with the device corresponding to the aforementioned ANDROID ID and further limitations may influence the total number of applications available for download.

Usage

Apart from valid Play Store credentials, the only requirement of this project is a working Python 3.6 installation. The first thing to do is to get a local copy of this repository, so open up a terminal in the directory where you want to save the project and clone the repository:

$ git clone https://github.com/ClaudiuGeorgiu/PlaystoreDownloader.git
$ cd PlaystoreDownloader

Make sure to execute the following commands in the previously created PlaystoreDownloader directory:

# If not using virtualenv (https://virtualenv.pypa.io/), skip the next 2 lines
$ virtualenv -p python3 venv
$ source venv/bin/activate

# Install PlaystoreDownloader requirements
$ pip3 install -r requirements.txt

After configuring the Play Store credentials as described in the configuration, simply call the following instruction using the package name of the app you want to download:

$ python3 download.py "com.application.example"

If the download is successful, the resulting .apk file will be saved in the PlaystoreDownloader/Downloads directory. You can change the name and the location of the downloaded .apk file by providing an additional -o "path/to/downloaded.apk" argument to download.py (type $ python3 download.py --help for more information).

Docker is also supported:

# Make sure to have valid credentials inside credentials.json file before building the image
$ docker build -t downloader .

# Download the selected application in the current directory
$ docker run --rm -u $(id -u):$(id -g) -v "$PWD":"/app/Downloads" downloader "com.application.example"

https://github.com/ClaudiuGeorgiu/PlaystoreDownloader

Deja un comentario

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *

veinte − 4 =

Copyright © All rights reserved. | Newsphere by AF themes.