Most people put a lot of effort on the Android Apps. There is a lot of business logic and intellectual property hidden within your application. Yet most application developers spend no time in making sure that their application code is properly obfuscated.

The process of Android code de-compilation starts at obtaining the .apk file. The .apk file is hosted either on the Android Market or hosted on individual webserver.

Obtaining .apk file from Android Market.

1. Root your device using z4root or any other software.
2. Download the application from the android market.
3. Attach your device to the your computer via usb and run the below instruction on the command line

adb pull 

Obtaining from hosted web server
1. Download directly from the URL. This would work if the web-server is not doing any re-directs based on the browser user agent.
2. If the web-server redirects based on the browser user agent
a) You can choose to modify your browser user agent (put a link)
b) Or simply choose to download the file on your android device and transfer the file over.

Decompiling the .apk file
1. Download dex2jar from here
2. Convert your .apk file to .jar file.

dex2jar.sh <apk-filename> 

This will create a apk-filename.dex2jar.jar file.
3. Download jd-gui from here
4. Open the apk-filename.dex2jar.jar file in jd-gui.

To check how to obfuscate android source code (i.e prevent others from seeing your source code using proguard read this blog unless you are hacker or don’t really care about your source code(open source it please in that case))

Advertisements