Skip to content

πŸ“± Pull APK's from android devices and emulators

Notifications You must be signed in to change notification settings

david-lev/apkpull

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

31 Commits
Β 
Β 
Β 
Β 

Repository files navigation

Alt Text

πŸ“± APKpull

CodeFactor

APKpull provides reliability in downloading apps from Google Play from real Android devices or emulators

How to use?

Run APKpull with one command:

curl -sL bit.ly/apkpull | bash -s -- com.whatsapp
  • APKpull get's PackageName as the first (required) argument.
  • You can also pull the files into spesific path insted of ~/Downloads/apkpull_dl by adding -d /path/to/directory flag
  • Uninstall the app after the pulling is complete by adding --uninstall flag.
  • --help to get instructions.
  • For example:
curl -sL bit.ly/apkpull | bash -s -- com.tranzmate -d ~/Documents/my_apks_dir/ --uninstall

Or, if you want to make changes to the script:

  • Clone APKpull:
git clone https://github.com/david-lev/apkpull.git
  • Go to script directory:
cd apkpull && chmod +x apkpull.sh
  • Make your changes and run the script with package name:
./apkpull.sh com.whatsapp

  • Because each device may have different splits, several devices can be connected at the same time. Only splits that do not already exist locally will be downloaded again.
  • The script's exit codes are: 0 if all success, 1-9 for every faild device, 10 if pkg not provided, 20 if adb not found, 30 for INT signal (Ctrl+C), 40 if app not in play store, and 50 if no devices connected
  • I would recommend following the device screen for the first few times to see how the automation works. Then you can already run it with your eyes closed...
  • APKpull uses ADB to connect to devices, jump into the app page in Google Play, make the necessary clicks based on the existing data on the screen, download the app and finally pull it to local as an APK with Splits and even OBB's (if any).
  • While running the script, many tests are performed: checking updates, locked screen, device compatibility or country restrictions, paid apps, network, sign in check and more.
  • If there is an untreated end case, after several attempts (Can be increased by raising the number of max_rounds) a log will be created that will contain a screenshot and dump ui from the device, which can be attached to a new issue on github.
  • Due to the way Google Play app is built, most of the tests and clicks are based on text, so English and Hebrew are currently supported. If you want to support other languages as well, fork this repo, create a list of buttons_lang at the beginning of the script, fill in the values in the existing format in the other languages and open PR.
  • The files are saved by default to the ~/Downloads/apkpull_dl folder in the next example format:
.
β”œβ”€β”€ com.flambestudios.picplaypost
β”‚Β Β  └── 451
β”‚Β Β      β”œβ”€β”€ com.flambestudios.picplaypost_451
β”‚Β Β      β”‚Β Β  β”œβ”€β”€ config.arm64_v8a.apk
β”‚Β Β      β”‚Β Β  β”œβ”€β”€ config.armeabi_v7a.apk
β”‚Β Β      β”‚Β Β  β”œβ”€β”€ config.en.apk
β”‚Β Β      β”‚Β Β  └── config.xhdpi.apk
β”‚Β Β      └── com.flambestudios.picplaypost-451_base.apk
β”œβ”€β”€ com.microsoft.office.officehubrow
β”‚Β Β  └── 42787678
β”‚Β Β      β”œβ”€β”€ com.microsoft.office.officehubrow-42787678.apk
β”‚Β Β      └── main.42787678.com.microsoft.office.officehubrow.obb
└── tfilon.tfilon
    └── 38
        └── tfilon.tfilon-38.apk