Is it possible to decompile an android app?
-
Last year I created an Android Application, I submitted and it is still running in my cellphone. Then I lost the java source code when my laptop hard-drive fail, now I want to recover the ".java" files. Is it possible to find the ".class" files in the cellphone and then decompile them to create again the ".java" files? and if it is possible, where can I find the ".class" files in my Android? In other words, can I reverse engineer the binary android software? Thanks Nicolas
-
Answer:
Hi Nicolas!http://www.accessroot.com/arteam/site/download.php?view.322Watch this video tutorial, it got me started and I could easily find my friends get() function that I wanted to change the value of, I easily changed the hex, recompiled and resigned, done :)The only thing that misses practically is variable names ;) They are listed as v1, v2, v3 ..You can do a pretty good job quite easily, by reversing Android apps- since they are easier to debug and closer to original source :)
Christoffer Aasted at Quora Visit the source
Other answers
apktool
Run Shi
You can find your .class files in the apk file of your app (the installation file), since it's nothing more then a jar. There are some decompile tools out there. i.e.: http://code.google.com/p/smali/
Youri D.B.
Install https://play.google.com/store/apps/details?id=net.sylark.apkextractor&hl=en on your Android device Download your target app from https://play.google.com/ Run APK Extractor to send the .apk file to your laptop Download https://developer.android.com/sdk/index.html (Eclipse/ADT) and unzip Download https://code.google.com/p/dex2jar/downloads/list and unzip Download https://code.google.com/p/innlab/downloads/detail?name=jd-gui-0.3.3.windows.zip and unzip In Eclipse/ADT, click File > New > Java Project Name your project, then click Next > Finish Right click on your project, then click Build Path > Configure Build Path On the Libraries tab, Select Add External Jars, browse to your unzipped dex2jar\lib directory, select all the .jar files, and click Open > OK Drag your .apk file into the Eclipse/ADT project (choose Copy Files > OK) Right click on your project, then click Run As > Run Configurations Right click on Java Application, then click New Set Project to the same name you assigned to your project Set Main class to com.googlecode.dex2jar.v3.Main Go to the Arguments tab, and type the name of the .apk file in the Program arguments field Click Run (will create a new .jar file in your project workspace directory) Minimize Eclipse/ADT and go toy our project workspace directory (if not sure, right click Project > Properties > Resource > Location) Run jd-gui.exe In jd-gui, click File > Open, and point to the .jar file created in your Eclipse/ADT workspace directory Boom. Source code. Googling helped!
Satyajeet Sen
You can easily do that using android multitool. It allows you to decompile, sign and recompile apk. If you want to see source code, then you should use dex-to-jar converter and convert your app to jar file. Then use jd-gui to see the java code. NOTE: You can't edit source through jd-gui.
Ankit Ahuja
I might also add, that there is a modern alternative to this APKTool->dex2jar->JD-GUI route, which everybode recommends. Just try open-source APK and DEX decompiler called Jadx: https://sourceforge.net/projects/jadx/files/ It has also online version here: http://www.javadecompilers.com/apk
Andrew Rukin
yes it is, I swear by the old gods and the new. https://code.google.com/p/smali/ have a look at this.
Paresh Chouhan
You can use this beautiful gem http://www.singhajit.com/convert-apk-file-to-java-code/ to do this in seconds :)
Ajit Singh
You may use this tools to get source code. http://www.decompileandroid.com/http://www.javadecompilers.com/apk
Nilesh Patel
Related Q & A:
- How to connect Sql Server Database from android app?Best solution by Stack Overflow
- How much should I charge for an Android app in India?Best solution by Yahoo! Answers
- How to develop native android app?Best solution by Stack Overflow
- How to implement app purchase in Android app?Best solution by Stack Overflow
- How to connect Android app to App engine?Best solution by groups.google.com
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.