Is it possible to recover classes from apk or through Android Studio?
Is it possible to recover classes from apk or through Android Studio?
I made an ironically horrible mistake while trying to backup my android project, and managed to almost destroy it with a botched up "move".
I am trying to recover the code from my classes. the project was fairly simple. I tried using dex2jar and then jd-gui on the .apk I have installed on my phone but I don't seem to be getting the same results other people are getting. There's nothing remotely close to my classes on the end product.
Is there a way to recover my code? Either through reverse engineering or maybe Android Studio has some sort of function where it keeps code in a temp file or something?
Wow local history seems great. I moved my project back to its original location and used local history on all the classes to revert to last changes. However after I click revert , all the class files I just reverted seem to disappear. Where do they go? If I can find them and they have successfully reverted then you saved my life dude. @peter
– Unmemed
Jun 23 at 0:32
Recovered code would be very ugly. Comments and variable names within methods can't be recovered, because they were discarded once compiled. It is possible but if you can recover deleted code files from your disk that would be much better.
– Meow Cat 2012
Jun 23 at 4:03
1 Answer
1
Reverse Engineering is overly complicated for recovering code in my opinion. I'm not sure how "move" command works, but you might be able to recover the files with a program dedicated to recovering lost/deleted files. Pori form has a program for that for example, but it's hard recovering if the files got overwritten and not deleted or something.
Maybe you've made some backups yourself somewhere?
The question is how much time and work you are willing to put into getting exactly your code back, because if simple recovery methods don't work you might be faster just rewriting your code, but it really depends on the project size.
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
try search in local history. Similar to stackoverflow.com/questions/30049250/…
– Peter1982
Jun 22 at 23:58