I copied my Application Project Folder into another one to try a big change on my app.
The change was not what i wanted, so i deleted the current project folder.
I then wanted to use my TMP folder to recover my old project. I used "mv" to rename TMP into tho old name i used.
But when i came back to eclispe, i had a lot of bugs, and then all my files were deleted and are now empty...
All i have left is my app installed on a virtual device, and all my projects file with the right names but which are empty.
Is there any chance to get my code back using the apk installed on the device or something like that ?
Asked
Active
Viewed 84 times
0

Jonsmoke
- 822
- 9
- 18
-
Right click on the project and select 'Restore from Local History...' to if Eclipse has a backup. – greg-449 Sep 02 '14 at 16:20
-
2Always _always_ use a version control system. Even for your hobby projects. It will save you a lot of hair – bhargavg Sep 02 '14 at 16:21
-
1You could try to deodex (reverse engineering the class files) the apk - see https://code.google.com/p/smali/wiki/DeodexInstructions for instance. I haven't tried these particular instructions, but it's worth a try. Deodexing isn't going to be easy though, if you've encrypted your app with proguard, then you'll end up with a lot of classes and methods called `A` and `b()` and no documentations. But it might be your best bet... ;-) – Darwind Sep 02 '14 at 19:44
-
i guess i haven't encrypted the app, at least by myself. There was no local history to restore from, but i searched a bit and found there was pieces of code and xml in [your android projects folder]/.metadata/.plugin/org.eclipse.core.resources/.history. Also i will try deodex, but do you know if i can have access to the apk stored on my virtual device ? – Jonsmoke Sep 02 '14 at 23:09
1 Answers
0
I used this answer Is there a way to get the source code from an APK file? to decompile my app from the .pkg that was stored onto my virtual device !
I got all my drawables / assets / .xml files from this, but the code was unusable so i used what i found here ([your android projects folder]/.metadata/.plugin/org.eclipse.core.resources/.history) to bring back my java code using "grep -r" in the folder to find the pieces of code i needed !