Where can I find source code for Android apps in Android Studio?
What is the best and simple Android app source code for beginners to use for Android apps?
How do I get started with custom Android app development?
The official sample code and tutorials can be found here: http://developer.android.com/resources/index.html
For reading code I can recommend these repositories:
More sample applications for the Android platform: http://code.google.com/p/apps-for-android/
Open Source examples from the books http://commonsware.com/AndTutorials/ and http://commonsware.com/AdvAndroid/ are available at http://github.com/commonsguy/cw-andtutorials and http://github.com/commonsguy/cw-advandroid/ . They helped me a lot by simply reading the code and searching for classes I needed.
You can take a look at the source code of the common Android applications like Contacts, Email, Calendar, etc.
Look at projects under platform/packages/apps here:
https://android.googlesource.com/platform/packages/apps/
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 shellso 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.
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