One of the best ways to learn how to do something well, is to see how others have already done something similar. When it comes to Android apps, it’s ridiculously easy to take a peak under the covers to see how the app was created. Here’s how to do just that.
1) Move or backup the app to your SD card.
There are numerous ways of doing this, but the first thing I tried worked, was simple, and goes as follows: Install the “Astro” app. Run Astro, click “menu”, select “tools”, select “Application / Manager Backup”, select the app(s) you want and click “backup”. Your app(s) are now on the SD card at /backups/apps/
2) Mount your phone, and copy any apps to your computer.
On a Mac it’s a simple as plugging in the USB and opening the mount that appears on the desktop. Got to backups/apps/ and copy the apps you want to your local machine.
3) Use dex2jar
Download dex2jar. It converts .dex files to Java .class files.
Run something like “dex2jar someAndroidApp.apk” and a file called “someAndroidApp.apk.dex2jar.jar” will be generated.
4) Decompile the .jar
I used jd-gui and it worked for me with no problems. Download, run and open the jar to get the decompiled code. You can also save all the decompiled code (it saves as a .zip file).
5) Take a look at the Manifest (and all the resource and assets)
Unzip the original Android app. That’s right, just run something like “unzip someAndroidApp.apk” and you’ll get to all the resources and assets.
To take a look at the AndroidManifest.xml, first get a copy of AXMLPrinter2.jar. Then run something like “java -jar AXMLPrinter2.jar AndroidManifest.xml >> Readable.AndroidManifest.xml”
And that’s the easy way to decompile any Android app.