Created
June 22, 2024 15:06
-
-
Save tokland/867814e1a4c50e07037b29eca9da0c5d to your computer and use it in GitHub Desktop.
Download APK files from APKPure
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| set -e -u -o pipefail | |
| download_apk() { | |
| local app_id=$1 | |
| # https://github.com/EFForg/apkeep/blob/master/src/apkpure.rs#L18C54-L18C61 | |
| curl -sS "https://api.pureapk.com/m/v3/cms/app_version?hl=en-US&package_name=$app_id" \ | |
| -H 'x-sv: 29' \ | |
| -H 'x-abis: arm64-v8a,armeabi-v7a,armeabi' \ | |
| -H 'x-gp: 1' | | |
| strings | | |
| grep "/APK" | # Download latest version in APK format | |
| head -n1 | | |
| xargs -rt curl -L -D >(grep -i "^content-disposition:") -o "$app_id.apk" | |
| } | |
| download_apk "$@" |
Really interesting approach. I like how the script simplifies the APK download process and makes it more transparent. It’s especially helpful for people who prefer handling installations manually instead of relying entirely on app stores.
I’ve been experimenting with manual APK installs myself for testing purposes, for example, trying apps like Royal Dream from official site and having a clearer understanding of how APK retrieval works makes the process feel much more controlled. Thanks for sharing this, it’s a useful reference.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Downloading APK files from APKPure can be convenient, especially when apps aren’t available on the Play Store. However, it’s always important to double-check file authenticity and stay cautious with third-party sources. For gaming-related APKs, I’ve found the theaethersx2 website to be a helpful resource with guides and safer setup instructions, making the whole process much easier for users.