Get source code of my installed Android app

4.5k views Asked by At

I made an app and installed it on my phone and it's working on my phone, can I get that source code back? Formatted my hard drive and didn't backup the project. It's not a big project but it'd be nice if I could get it back easily.

2

There are 2 answers

1
Jackie Degl'Innocenti On BEST ANSWER

You have to access your android device via terminal to get the APK from it. Moreover you'll need to root the device if the app has been installed from the app store. Once you got the APK you can decompile it in java code.

Root your device: http://www.digitaltrends.com/mobile/how-to-root-android/

Get the APK from the phone:

  • Connect the phone to your computer and open a terminal.
  • Run adb shell so you get into your phone.
  • Run find /data/app -name '*.apk' to list the apks installed and copy the name of the one in your interest.
  • Run adb pull /data/app/appname.apk

Now that you have the APK on your computer you have to decompile the APK.

1
UkFLSUI On

Yes, it is possible by android reverse engineering. Though it can not get you back all the lost codes always, even it is helpful for the developers. You will have to go through some processes to achieve this. All the method to do this step by step is given here:

Reverse engineering from an APK file to a project