Search This Blog

Thursday, August 11, 2011

Downloading APKs from Android Market

Sometimes I need to get hold of an Android application from the Market for analysis. One way to do this is to manually use the Market on an Android device or emulator, install the App, and then copy it off. For various reasons this isn’t always ideal – I sometimes don’t want to install an App if I don’t know what it does, and I may want to get it a lot faster (i.e. automate it).

In this post I share what worked for me in creating a command line script to login to the Market and download the application’s APK. This isn’t anything particularly new as an unofficial Market API already exists for searching the Market and Tim Strazzere posted some Java source to emulate a download request. However, in Tim’s example you have to manually specify the App’s assetID and your authToken which means it isn’t automated. What I wanted was a script which takes a package name as a parameter and downloads it. To achieve this I used the Market API to login, get an authToken, search for the package, get its assetID, and then submit a download request.

I’ve documented this for interest, it isn’t supported software and there isn’t much error checking. If you use this it is assumed you know what you are doing.

READ Complete Blog Here

You can download the sample PHP script Here

No comments:

Post a Comment