Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,740,606 Members 47,192 Now Online
XDA Developers Android and Mobile Development Forum

[Q] [Help] Need help about decompiling apk's

Tip us?
 
cuartas
Old
#1  
Member - OP
Thanks Meter 20
Posts: 74
Join Date: Aug 2010
Default [Q] [Help] Need help about decompiling apk's

Well, I was developing a little game, some days ago I formatted my pc and forgot to make a backup of my projects, fortunately I have .apk file in my dropbox account, so I tried to decompile using APKtoJava and browser decompiler.
I got res files, every XML file it's ok but, the src part is not fine at all.
Most of .java files can't compile, those files have errors, and reading the code I found variable names changed, strange code lines added, etc.
I could fix lines but last time modified files was on august (stopped development due to exams, etc), so I don't remember too much what I have done, in fact, expected to remember what I did reading code, but with those modified lines can't expect to remember fine.

I ask you for help, is there another way to get the code exactly I have made? or at least with no errors?

Thanks.
 
gh0stslayer
Old
#2  
gh0stslayer's Avatar
Senior Member
Thanks Meter 133
Posts: 193
Join Date: Nov 2010
Location: Bangalore
Well this happened to me too once, fortunately it was just a learning project for me, nothing important. But still I can understand how you feel. Try this -


Try decompiling from apk to java without selecting the smali code option. If you select smali code the whole code generally messes up. Also do not select the Convert to Eclipse Project option (although it could work in your case, never worked well for me). This way you will at least get your source files. Then use Virtuous Ten Studio, it will decompile everything perfectly except for source files. And then try to put them back together piece by piece, although it's easier said than done.
Good Luck with it :thumbup:

Sent from my Galaxy Nexus using Tapatalk
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes