Annoyingly, unless you’re at a large AV shop or happen to work a place running one of the stores, maintaining a good repository of Android binaries can sometimes be tricky. Most options folks have are either outrageously priced (Virustotal), extremely limited to the number of downloads (apklab?) or you’re likely just feeding other peoples intel programs (all of them?). So what is a simple reverser meant to do?
Beg, borrow and steal. Many of the aforementioned services do slowly trickle things out - usually limiting downloads or searches to ~10 a day. Some you can gain access to by sharing the right intel with the right people. Though, something I’ve found relatively interesting and useful lately was just simply using APKMirror. Though, using them is obvious, right? Except it isn’t exactly set up for a simplistic download or search. Except, the owners did seem to place in a nice little API call which can be very useful.
Before you burn a download from one of those coveted sources, hit APKMirror’s upload API and see if the md5 is available;
curl 'https://www.apkmirror.com//wp-json/apkm/v1/apk_uploadable/098822a8624f7fd5e9ddb4c82c6f986c' \
Since they’re sitting behind Cloudflare, thus their WAF, you’ll need to keep the bulk of those junk headers to avoid curl getting blocked. Simply drop this isn’t whatever script or language you need. The return, is even better;
A nicely formed json blob which will give you what the file is and where to go look for the binary. Personally, I suggest not really abusing this, even though most of the bandwidth is probably just CF’s getting soaked up do to cached binaries. As a nifty little note, it appears either OpenGAPPS was told about this, or figured it out themselves, as we can see this pull request from their repo, indicating that this was known since at least 2016;
for apk in $newapks; do