问题
Some time ago i uploaded to google play an app for my family restaurant which was something like showing the menu, timetable, prices..all that stuff. It's still in the google play and i have access to it by google developers but the problem is that i lost all the code.
Is there any way of recovering the data to add some new info and then update my app?
Thank you a lot.
回答1:
You'll need a rooted device for this:
Install the app to your device, and then take the apk off of the device using:
- Plug your “Rooted” Android device into your computer via the included USB cable.
- From your adb command line (usually
C:\android-sdk-windows\tools\
) typeadb shell
and press enter - Switch to root user, type
su
and press enter - type “cd data/app“ and press enter
- List all the installed apk files, type
ls
and press enter (find the one you want to extract) - In another command window, pull one of the files on to your computer by typing:
adb pull /data/app/application.apk name.apk
and press enter
Once you have the apk, rename it to whatever.zip
and extract it as a zip file. You will now see a bunch of folders. Anything in your assets folder can be recovered now right away. For the java code, you must use dex2jar to convert classes.dex
to a .jar
file. After that, you can use JD-GUI to read the code from the .jar file.
To extract AndroidManifest.xml and everything in res folder(layout xml files, images etc.) you must use APKTool Run the following command :
apktool.bat d sampleApp.apk
It also extracts the .smali file of all .class files, but these are difficult to read, and you should use the code from dex2jar instead.
回答2:
If you Obfusticate your code using progaurd while generating the APK file, then its not possible.
If not, you can decompile the classes some extent and making some changes to the decompiled class and you can get it working... There are few tools to decompile the APJK file
Thanks,
来源:https://stackoverflow.com/questions/14286372/recover-files-from-apk-google-play