Source Code For Android Apps

The Code Sample Browser in Android Studio helps you find Android code samples based on the currently highlighted symbol in your project. In your code, highlight a variable, type, or method. Right-click to display the context menu. From the context menu, select Find Sample Code. The results of your search appear in a tool window as shown in. This is a Chat App for Android mobile. You can make separate chat with you partner. I'm using Mysql Database and Php code and All APIs are develop on PHP (REST APIs).

Android phones, like this Nexus S, allow installation of apps from the Play Store, F-Droid store or directly via APK files.

A Simple Android Application for Adding Two Number Wrapping It Up. In this very simple and short tutorial, we saw how to get started with Android application development by creating a simple android application for adding two numbers. You can use this as basis for implementing a calculator app in android. Recently I have been following up a couple of good open source Android apps and thought of listing them here so that it could be useful for others. I also would like to recommend reading this detailed post featuring 5 FREE android app source code you must check. 10 Open Source Android Apps which every Android developer must look into. Gives a Free Android flat dashboard app including a cool pie chart widget, sliding menu and tab view. Fully functional and customizable according to. Not to forget we offer 30 day money back guarantee, if the Android App source code doesn’t work as described above. So the actual risk is on me to provide you the fully working Android App source code which you can use to create your own App.

This is an incomplete list of notableapplications (apps) that run on the Android platform which meet guidelines for free software and open-source software.

  • 3Communication

Advertisement blocking[edit]

Application nameDescriptionAvailabilityLicenseAPI[a]Note
Google PlayF-Droid
AdAwayAd blockerNoYes[1]GNU GPLv3L16 / 4.1+
Adblock PlusAd blockerNoNo
GNU GPLv3L7 / 2.1+No longer maintained nor supported by Eyeo GmbH
DNS66Ad blockerNoYes[2]GNU GPLv3L21 / 5.0+
BlokadaAd blockerNoYes[3]GNU GPLv3L21 / 5.0+
  1. ^The API column is used to describe which versions of Android each individual application is compatible with. If API column shows '5.1' then the application is compatible with Android version 5.1 or higher; 'L7' or 'L14' mean specific Android API versions.

Browsers[edit]

Application nameDescriptionAvailabilityLicenseAPI[a]Note
Google PlayF-Droid
BraveA Chromium-based web browser with an emphasis on speed, reforming ad blocking, and preventing tracking.[1]YesNo[2]BSD4.1+Has in-built ad blocker
ChromiumWeb browser using Blink engine.YesYes4.4+Available via the GPLv3 installer app getChromium[3] (which can be found on F-Droid).[4]
Fennec F-DroidWeb browser customizable with add-ons, uses Gecko engine.YesYes[5][4]MPL4.1+Same with Firefox for Android, but some proprietary code removed.
Firefox for AndroidWeb browser customizable with add-ons, uses Gecko engine.Yes
No[6]MPL4.1+Removed from F-Droid
Firefox Focus/KlarPrivacy centered browser, uses Gecko engine (GeckoView).Yes
Yes[7][5]MPL5.0+
GNU IceCatGNU Project version of Firefox browser.YesYes[8][6]MPL 2.04.0.3+IceCat contains features not found in mainline Firefox release and eschews all usage of proprietary components.
Orfox / Tor BrowserMozilla-based browser enhanced for use on Tor anonymity networkYesYes[9]MPL4.0.3+Available in F-Droid by activating the extra Guardian Project repository[10]

Communication[edit]

Application nameDescriptionAvailabilityLicenseAPI[a]Note
Google PlayF-Droid
ConnectBotSSH, telnet, and terminal emulatorYesYes [7]Apache 2.01.5+
CSipSimpleSIP & VoIP clientYes
Yes
GPLv31.6+
JitsiVideoconferencing and instant messengerYesPendingLGPLv2.1?Android version is experimental Alpha release.
K-9 MailAdvanced email clientYes
Yes [8]
Apache 2.02.2+Supports OpenPGP integration with OpenKeychain
LinphoneVideo SIP/VoIP clientYes
Yes [9]GPLv22.2+
SipdroidSIP/VoIP clientYes
Yes [10]GPLv32.0+works on 1.5
WordPressOfficial WordPress clientYesYesGPLv22.3+

Privacy/security focused[edit]

Application nameDescriptionAvailabilityLicenseAPI[a]Note
Google PlayF-Droid
APGOpenPGP and key managementYes
Yes
Apache 2.01.5+OpenKeychain available as more up-to-date alternative
BriarPeer-to-peer encrypted messaging and forumsYesYes[11][11]GPLv34.0+
ConversationsFederatedencrypted instant messaging and group chatYesYes [12]GPLv34.0+Interoperable with any Jabber/XMPP clients. End-to-end encryption using OMEMO, OpenPGP (and OTR for versions under 2.0 and the legacy version).
I2PAnonymizing network layer?Yes [13]Apache 2.02.3+Alpha release; do not rely upon it for strong anonymity. I2P also maintain their own F-Droid repo.[12]
JamiSoftphone and messenger utilizing DHT and strong cryptographyYes[13]Yes[14]GPLv3?
LanternApache 2.0
OpenKeychainOpenPGP and key managementYes
Yes [14]GPLv3Integrates with K-9 Mail.
OrbotClient and proxy for Tor anonymity networkYes[15]Yes
BSD/GPL1.6+
PsiphonClient for internet censorship circumvention systemYesYesGPLv3?
SignalEncrypted instant messaging, voice and video callingYesNoGPLv32.3+Also available for iOS. The Android client is a merger of the former TextSecure and RedPhone apps.[16] Uses proprietary libraries.[17]
SurespotEncrypted instant messagingYesYes [15]GPLv3+Also available for iOS. F-Droid build is based on forked repo.
TelegramClient for cloud-based messaging platformYesYes [16]GPLv22.2+Also available for iOS. F-Droid build is based on forked repo.[18] Server uses closed source software.
Toxpeer-to-peer instant-messagingYesYes [17]GPLv3+4.0+Alpha release
TutanotaClient for end-to-endencrypted email service?Yes[19][18]GPLv3[20]?
WireEncrypted instant messaging, voice and video callingYesNoGPLv3Also available for iOS, Windows and OS X. Server uses closed source software.

Emulators[edit]

Application nameDescriptionAvailabilityLicenseAPI[a]Note
Google PlayF-Droid
DolphinNintendo GameCube and WiiYes
Yes
GPLv2+5.0+Requires device with support for arm64-v8a ABI and OpenGL ES 3 or above
Mupen64PlusNintendo 64 emulatorYesYesGPLv32.0+Unofficial port as Mupen64 Plus AE.
openMSXMSXYesYesGPLv2+
PPSSPPPlayStation PortableYes
YesGPLv2+2.3+
RetroArchEmulates multiple platformsYesRemovedGPLv3[21]2.3+
ScummVMEmulates multiple gaming enginesYes
Yes
GPLv21.5+
VICECommodore hardwareYes
YesGPLv2

Games[edit]

Application nameDescriptionAvailabilityLicenseAPI[a]Note
Google PlayF-Droid
2048Mathematics sliding block puzzleYes [19]Yes[20]MIT2.2+Port of 2048
AngbandText-based roguelikeYesYesGPLv2?
Battle for WesnothTurn-based strategy game in a fantasy settingPartialNo[21]GPLv22.3+Ported to Android with SDL
BrogueRoguelikeYesYesGPLv3?
Dungeon Crawl Stone SoupRoguelikeYes
No[22]GPLv2+Text-based version also available
Fish Fillets NGUnderwater puzzle game.YesNo[23]GPLv21.6+Port of Fish Fillets NG
FreecivA turn-based strategy game similar to Sid Meier's CivilizationYesNo[24]GPLv22.0+
Frozen BubbleKnock the bubbles down by making clusters of three or more bubbles in the same color.Yes
Yes
[25]
GPLv21.6+Port of Frozen Bubble
GLtronLightcycle racing game.Yes
Yes
GPLv22.2+Port of GLtron
H-Craft ChampionshipSciFi 3D racing game.YesNo
[26]
zlib3.2+Media is proprietary, but free for personal use.
OpenArenaFirst person shooter similar to Quake 3 (see: id Tech 3)YesNo[27]GPLv21.6+Unofficial port by 'pelya' using SDL 1.2[22]
OpenTTDBusiness simulation game similar to Transport Tycoon DeluxeYesNo[28]GPLv21.6+pelya SDL port[22]
OpenTyrianVertical shoot 'em upYesNo[29]GPLv21.6+pelya SDL port[22]
robotfindskittenA 'Zen Simulation'Yes
Yes
GPL1.6+
Simon Tatham's Puzzle CollectionCollection of puzzle gamesYes
Yes
MIT2.1+
Ur-Quan MastersSource-port for 3DO version of Star Control II?No[30]GPLv2+,
CC by 2.0,
CC by-nc-sa 2.5[23]
?Game engine is free, but Star Control art assets are released under a Creative Commons non-commercial license.[24][23] pelya SDL port[22]
WarmuxA turn-based artillery gameYesNo[31]GPLv22.0+


General[edit]

Application nameDescriptionAvailabilityLicenseAPI[a]Note
Google PlayF-Droid
DasherAccessible text-input methodYesYesGPLv3?Also available for iOS
Google IOApp for Google IO conferenceYesYesApache 2.04.0
OpenLPWorship presentation softwareYesYes [32]GPLv3?
ownCloudClient for synchronization serverYesYes [33]GPLv24.0+
NextcloudClient for synchronization serverYesYes [34]GPLv24.0+
The White HouseThe official White House appYesYesMIT2.2+

Multimedia[edit]

Application nameDescriptionAvailabilityLicenseAPI[a]Note
Google PlayF-Droid
AntennaPodPodcatcherYesYes [35]MIT2.3.3+
Kodi (formerly XBMC)Media player and centerYesYes [36]GPLv2+Multi
NewPipeYouTube and SoundCloud ClientYesYes [37]GPLv3+?
Popcorn TimeMedia player utilizing BitTorrent protocolYesYesGPLv3+
(AGPL exception)[25]
?In Nov. of 2015 PopcornTime.io ceased operations after court order from the MPAA issued in Canada.[26]
RingdroidRingtone makerYes
Yes
Apache 2.04.1+
RockboxMedia player??GPLv2+?
TriblerDecentralized video sharingYesYesLGPL v2.1+3.0+
Tux PaintSimple drawing program for childrenNon-freeYesGPLv2?Version on Google Play is published by a 3rd-party & contains proprietary ad libraries in violation of upstream developers' license
VLCMedia playerYes
Yes [38]GPLv2+2.1+
Wikimedia CommonsClient for free media repositoryYesYes [39]Apache 2.02.3+Original no longer maintained.[27] Community developed fork has attempted to revive project[28]

Navigation[edit]

Application nameDescriptionAvailabilityLicenseAPI[a]Note
Google PlayF-Droid
AvareGPS aviation applicationYes
YesApache 2.02.2+
MAPS.MEOffline mapping using OpenStreetMap dataYesYes [40]Apache 2.0
Mozilla StumblerData gathering for Mozilla Location ServiceYesYesMPL22.3.3+
OsmAndOffline mapping using OpenStreetMap dataYesYes [41]GPLv32.3+Only parts of the software are available at no cost, this cause the software to get a few arbitrary limitation as limited portion maps of openstreetmap may be loaded. There is an unlimited paid version.

Reading[edit]

Application nameDescriptionAvailabilityLicenseAPI[a]Note
Google PlayF-Droid
DuckDuckGoWidget for privacy focused search engineYesYesApache 2.02.2+
FBReadere-book readerYes
Yes
GPL1.5+
iFixitOfficial iFixit readerYesYesGPLv32.2+
KiwixOffline Wikipedia readerYesYesGPLv34.0+
MuPDFPDF and XPS viewerYesYesAGPL2.2+
WikipediaAccess to WikipediaYesYes [42]GPLv22.2+
WiktionaryClient for crowd-sourced dictionaryYesYesGPLv22.2+
XOWAOffline Wikipedia readerYesYesAGPLv34.4+

Science and Education[edit]

Application nameDescriptionAvailabilityLicenseAPI[a]Note
Google PlayF-Droid
BOINCParticipate in distributed grid computing initiativesYesNoLGPL/GPLv3+[29]2.3+
EnigmAndroidSimulation of the Enigma cipher machineNoYesGPLv3+3.0+
Galaxy ZooClassify galaxies in crowdsourced astronomy projectYesYesGPLv33.0+
GComprisEducational activity suite for children aged 2–10YesYesGPLv3?Member project of KDE
GNU OctaveScientific programming language syntax with built-in plotting and visualization tools?NoGPLv3?[30][31]
micro:bitInteract with a micro:bit device via BluetoothYes[32]No[33]Apache 2.0[34]?Developed by Samsung.[35] Depends on proprietary Google frameworks.[33]
SageMathClient for mathematical softwareYesYesGPLv32.0+
Sugar environmentOne Laptop per Child learning platformYesYesApache 2.02.3.3+Ported as Sugarizer.

Security[edit]

Application nameDescriptionAvailabilityLicenseAPI[a]Note
Google PlayF-Droid
BitwardenPassword managerYes
Yes
GPLv34.4+
HavenMonitoring system to protect against evil maid attacksYesYes[36]GPLv34.1+Developed by Edward Snowden under the auspices of The Guardian Project, and Freedom of the Press Foundation[37]
KeePassDroidPassword managerYesYes [43]GPLv31.5+Port of KeePass
PasswdSafePassword managerYes
Yes
Artistic License 2.01.6+
PreyAnti-theft and monitoringYesYesGPLv34.0+

Utilities[edit]

Application nameDescriptionAvailabilityLicenseAPI[a]Note
APKGoogle PlayF-Droid
Barcode ScannerBarcode and QR Code readerYesYes [44]Apache 2.04.0.3+
Impress RemotePresentation remote control for LibreOffice?Yes [45]YesMPL2[38]2.3+

Notes[edit]

  1. ^ abcdefghijklThe API column is used to describe which versions of Android each individual application is compatible with. If API column shows '5.1' then the application is compatible with Android version 5.1 or higher; 'L7' or 'L14' mean specific Android API versions.

See also[edit]

  • F-Droid, client and app store for open-source applications

References[edit]

  1. ^'Learn About Brave and Our Team - Brave Browser'. brave.com.
  2. ^'Add Brave to F-Droid'. GitHub.
  3. ^'andDevW/getChromium'. GitHub.
  4. ^'getChromium - F-Droid - Free and Open Source Android App Repository'. f-droid.org.
  5. ^'Fennec F-Droid'. F-Droid. Retrieved 4 April 2018.
  6. ^'Firefox'. f-droid.org. F-Droid. Retrieved 7 November 2016.
  7. ^'Firefox Klar'. f-droid.org. F-Droid. Retrieved 27 July 2017.
  8. ^'Firefox Klar'. f-droid.org. F-Droid. Retrieved 26 May 2018.
  9. ^'Guardian Project Fdroid repo'. guardianproject.info. Guardian Project. Retrieved 18 July 2018.
  10. ^'F-Droid wiki page on known repositories'. f-droid.org. F-Droid. Retrieved 18 July 2018.
  11. ^'Briar on F-droid'. https://briarproject.org/fdroid.html.External link in website= (help)
  12. ^'Index of /repo/'. f-droid.i2p.io.
  13. ^'Ring - Apps on Google Play'. play.google.com.
  14. ^'Ring - F-Droid - Free and Open Source Android App Repository'. f-droid.org.
  15. ^'Guardian Project Fdroid repo'. guardianproject.info. Guardian Project. Retrieved 18 July 2018.
  16. ^Greenberg, Andy (2 November 2015). 'Signal, the Snowden-Approved Crypto App, Comes to Android'. Wired. Condé Nast. Retrieved 27 March 2016.
  17. ^'FOSS gradle build flavor · Issue #6568 · WhisperSystems/Signal-Android'. GitHub. Retrieved 2017-10-12.
  18. ^'Telegram-FOSS-Team/Telegram-FOSS'. GitHub.
  19. ^https://f-droid.org/en/packages/de.tutao.tutanota/
  20. ^mpfau (12 August 2014). 'tutanota/LICENSE.txt'. github.com/tutao/tutanota. Tutao GmbH. Retrieved 13 October 2018.
  21. ^RetroArch / COPYING. github.com. Retrieved 19 August 2015.
  22. ^ abcd'pelya/commandergenius'. GitHub.
  23. ^ ab'COPYING'. sourceforge.net/p/sc2/. The Ur-Quan Masters Git Repository. Retrieved 13 October 2018.
  24. ^The Ur-Quan Masters licensing
  25. ^Popcorn Time Foundation. android / LICENSE.md. git.popcorntime.io. Retrieved 19 August 2015. Archived September 7, 2015, at the Wayback Machine
  26. ^Gardner, Eriq (3 November 2015). 'MPAA Touts Big Legal Success Against Popcorn Time'. The Hollywood Reporter. Retrieved 23 November 2015.
  27. ^Hartman, Derk-Jan WikimediaMobile Pulling the Commons app lists.wikimedia.org. Retrieved 27 November 2014.
  28. ^'Commons mobile app'. commons.wikimedia.org. Archived from the original on 16 September 2015. Retrieved 23 November 2015.
  29. ^Anderson, David Pope (8 August 2008). 'boinc / COPYING'. github.com. Retrieved 25 November 2015.
    Rom Walton (7 November 2015). 'boinc / README.md'. github.com/BOINC/boinc. Retrieved 25 November 2015.
  30. ^Corbin Champion. 'corbinlc/octave4android'. github.com. Retrieved 5 February 2019.
  31. ^Thomas Treichl (21 October 2013). 'Octave on Android'. Octave Maintainers mailinglist. Retrieved 5 February 2019.
  32. ^'micro:bit application page on Google Play'.
  33. ^ ab'Request for adding the official BBC micro:bit application'. 2018-07-26. Retrieved 2018-07-28.
  34. ^'License text in source code repository'. Retrieved 2018-07-27.
  35. ^'Samsung Launches the Official BBC micro:bit App'. 2016-02-17. Retrieved 2018-07-29.
  36. ^'Guardian Project Official App Repository'. guardianproject.info.
  37. ^https://freedom.press/news/introducing-haven-open-source-security-system-your-pocket/
  38. ^F-Droid - Impress Remote. f-droid.org. Retrieved 3 September 2015.

External links[edit]

There are a number of third-party maintained lists of open-source Android applications, including:

  • Android Open Source resources and software database
  • F-Droid Repository of free and open-source Android software
  • PRISM Break – curated list of security focused open-source alternatives to mitigate some threats of PRISM, XKeyscore and Tempora.
  • Droid-Break – curated list of general purpose open-source alternatives. Inspired by PRISM-break.

Download Source Code For Android Apps

  • Free Software Directory – community-maintained directory of Free and Open-source software
Retrieved from 'https://en.wikipedia.org/w/index.php?title=List_of_free_and_open-source_Android_applications&oldid=916104809'
Active3 months ago

The hard drive on my laptop just crashed and I lost all the source code for an app that I have been working on for the past two months.All I have is the APK file that is stored in my email from when I sent it to a friend.

Is there any way to extract my source code from this APK file?

Jeroen Vannevel
36.2k18 gold badges86 silver badges144 bronze badges
Frank BozzoFrank Bozzo
6,0936 gold badges21 silver badges29 bronze badges

21 Answers

Simple way: use online tool http://www.javadecompilers.com/apk, upload apk and get source code.

Transformers 2007 game voice. Transformers The Game Free Download FULL PC GameTransformers The Game Free Download Full Version RG Mechanics Repack PC Game In Direct Download Links.

Procedure for decoding .apk files, step-by-step method:

Step 1:

Java
  1. Make a new folder and copy over the .apk file that you want to decode.

  2. Now rename the extension of this .apk file to .zip (e.g. rename from filename.apk to filename.zip) and save it. Now you can access the classes.dex files, etc. At this stage you are able to see drawables but not xml and java files, so continue.

Step 2:

  1. Now extract this .zip file in the same folder (or NEW FOLDER).

  2. Download dex2jar and extract it to the same folder (or NEW FOLDER).

  3. Move the classes.dex file into the dex2jar folder.

  4. Now open command prompt and change directory to that folder (or NEW FOLDER). Then write d2j-dex2jar classes.dex (for mac terminal or ubuntu write ./d2j-dex2jar.sh classes.dex) and press enter. You now have the classes.dex.dex2jar file in the same folder.

  5. Download java decompiler, double click on jd-gui, click on open file, and open classes.dex.dex2jar file from that folder: now you get class files.

  6. Save all of these class files (In jd-gui, click File -> Save All Sources) by src name. At this stage you get the java source but the .xml files are still unreadable, so continue.

Step 3:

Now open another new folder

  1. Put in the .apk file which you want to decode

  2. Download the latest version of apktool AND apktool install window (both can be downloaded from the same link) and place them in the same folder

  3. Open a command window

  4. Now run command like apktool if framework-res.apk (if you don't have it get it here)and next

  5. apktool d myApp.apk (where myApp.apk denotes the filename that you want to decode)

now you get a file folder in that folder and can easily read the apk's xml files.

Step 4:

It's not any step, just copy contents of both folders(in this case, both new folders) to the single one

View Source Code For Android Apps

and enjoy the source code..

Source Code For Simple Android Apps


This is an alternative description - just in case someone got stuck with the description above. Follow the steps:

  1. download apktool.bat (or apktool for Linux) and apktool_<version>.jar from http://ibotpeaches.github.io/Apktool/install/
  2. rename the jar file from above to apktool.jar and put both files in the same folder
  3. open a dos box (cmd.exe) and change into that folder; verify that a Java Environment is installed (for Linux check the notes regarding required libraries as well)
  4. Start: apktool decode [apk file]

    Intermediate result: resource files, AndroidManifest.xml

  5. unzip APK file with an unpacker of your choice

    Intermediate result: classes.dex

  6. download and extract dex2jar-0.0.9.15.zip from http://code.google.com/p/dex2jar/downloads/detail?name=dex2jar-0.0.9.15.zip&can=2&q=
  7. drag and drop classes.dex onto dex2jar.bat (or enter <path_to>dex2jar.bat classes.dex in a DOS box; for Linux use dex2jar.sh)

    Intermediate result: classes_dex2jar.jar

  8. unpack classes_dex2jar.jar (might be optional depending on used decompiler)
  9. decompile your class files (e.g. with JD-GUI or DJ Decompiler)

    Result: source code

Note: it is not allowed to decompile third party packages; this guide is intended to recover personal source code from an APK file only; finally, the resulting code will most likely be obfuscated

Braiam
3,6569 gold badges36 silver badges66 bronze badges
TrinimonTrinimon
12.6k9 gold badges35 silver badges57 bronze badges

While you may be able to decompile your APK file, you will likely hit one big issue:

it's not going to return the code you wrote. It is instead going to return whatever the compiler inlined, with variables given random names, as well as functions given random names. It could take significantly more time to try to decompile and restore it into the code you had, than it will be to start over.

Sadly, things like this have killed many projects.
For the future, I highly recommend learning a Version Control System, like CVS, SVN and git etc.

and how to back it up.

Source Code For Android Apps In Eclipse

user6408711
Ryan GoolerRyan Gooler
1,7961 gold badge10 silver badges14 bronze badges

There is also a new application on the Play Store with which it is possible to decompile an apk (system applications too) and view the source code right on your smartphone. It saves the files to your SD card so you can view it on your computer too. It does not require root or something else.

Just install and have fun. I think this is the easiest way to decompile an app.

Eagle software free download

CilencoCilenco
2,77512 gold badges53 silver badges110 bronze badges

apktool is the best thing you can try. I have saved some xml with it, but honestly I don't know how it will work with the .java code.

I would recommend you to have a code repository even if your are the only coder. I've been using Project Locker for my own projects. It gives you free svn and git repos.

Nikunj Paradva
3,9312 gold badges22 silver badges40 bronze badges
MacarseMacarse
63.5k40 gold badges161 silver badges225 bronze badges

These two articles describe how to combine the use of apktool and dex2jar to take an APK file and create an Eclipse project that can build and run it.

Basically you:

  1. Use apktool to get the resource files out of the apk
  2. Use dex2jar to get a jar file that contains the classes in a format that Eclipse will like.
  3. Create an Eclipse project point it at the resource files and the new jar file
  4. Open the jar file with a zip utility and delete the existing resources
  5. Open the jar file with JDGui to view the source code
  6. Take whatever source code you need from JDGui, stick it in a class inside Eclipse and modify it
  7. Delete that class from the jar file (so you don't have the same class defined multiple times)
  8. Run it.
user6408711
Tom Hennen

Open Source Apps For Android

Tom Hennen
2,2626 gold badges28 silver badges39 bronze badges

apktool will work. You don't even need to know the keystore to extract the source code (which is a bit scary). The main downside is that the source is presented in Smali format instead of Java. Other files such as the icon and main.xml come through perfectly fine though and it may be worth your time to at least recover those. Ultimately, you will most likely need to re-write your Java code from scratch.

You can find apktool here. Simply just download apktool and the appropriate helper (for Windows, Linux, or Mac OS). I recommend using a tool such as 7-zip to unpack them.

Ryan BergerRyan Berger
8,0036 gold badges39 silver badges54 bronze badges

There are a few ways to do this:

  1. Use the 'Profile or Debug APK' feature in Android Studio 3.0.

    It allows you to open and explore APKs in Android Studio. Classes are decompiled into smali. Resources are not extracted and things like 'Go to Definition', 'Find All References' and debugging don't work without the source code (android studio 3.0 canary 9). Some additional smali features might work with smalidea.

  2. Use jadx.

    Jadx decompiles the code in a given APK to java source files.

  3. Use apktool.

    Apktool is a command line tool which extracts resources and decompiles code into smali for a given apk. You can recompile using apktool also. Here's an example of it in action:

0xcaff0xcaff
7,7323 gold badges34 silver badges45 bronze badges

May be the easy one to see the source:

In Android studio 2.3, Build -> Analyze APK -> Select the apk that you want to decompile.
You will see it's source code.

Link for reference:
https://medium.com/google-developers/making-the-most-of-the-apk-analyzer-c066cb871ea2

SKKSKK
9533 gold badges22 silver badges46 bronze badges

I'll show you other way to decompile the .apk files.

You can follow the first 2 steps from 'prankul garg'. So you have another opportunities:

Step 3':

Download the 'JD-GUI', thats easy to found this one.Open your .jar file in 'jd-gui.exe'. (File > Open file > 'found your .jar file'). After this procedure, you can save all resources in a .zip file.

So,

1st - You have to rename the .apk file to .zip

2nd - You have to decode .dex file (if you want, decode the .apk file to dex2jar, that's possible)

3rd - You have to decode .jar file with JD-GUI

Franklin HirataFranklin Hirata

Below ONLINE tool:

it do ALL by one click: decompiled .java files + resources + xml (in one .zip file) with very good decompiler (jadx return java code in places/functions where other compiles return comments inside function like 'unable to decompile' or some android assembler/machine code)

Vadim Kotov
5,5457 gold badges36 silver badges49 bronze badges
Kamil KiełczewskiKamil Kiełczewski
21.4k10 gold badges99 silver badges116 bronze badges

This site https://www.apkdecompilers.com/ did it automatically.

I tried the site mentioned in the accepted answer first but that didn't work for me.

M. Usman KhanM. Usman Khan
4,6941 gold badge41 silver badges50 bronze badges

I personally recommend Show Java Android App to get the source code. You can download it from play store or from here

CodeloverCodelover

Apktool for reverse engineering 3rd party, closed, binary Android apps.

It can decode resources to nearly original form and rebuild them after making some modifications.

It makes possible to debug smali code step by step. Also it makes working with an app easier because of project-like file structure and automation of some repetitive tasks like building apk, etc.

Biswajit KarmakarBiswajit Karmakar
7,6623 gold badges29 silver badges36 bronze badges

apktool is THE way to go.Online apktool service exists as well: http://www.javadecompilers.com/apktool

Some limitations, obviously, exist due to the service ‘online nature’: you may extract and research assets and the manifest file, but it is impossible to recompile the application at the moment.

Still, this is a no-hassle way to 'open' the android application.

Andrew RukinAndrew Rukin

You can try DexPatcher. It even integrates with Android Studio. It uses Apktool and Dex2Jar internally.
You can use those tools independently as well.Apktool decompiles apk, and extracts .dex files, which can further be converted to jar using Dex2Jar. Jar can be decompiled by using JD-GUI. You can see the Java code with the help of that tool. Although the similarity of decompiled code to the actual code cannot be guaranteed. There are some advanced code obfuscation tools available in the market, which mess up the code to make it difficult to decompile / understand. eg. Proguard

Lakshmikant DeshpandeLakshmikant Deshpande
5391 gold badge6 silver badges23 bronze badges

Android studio offers you to analyse any apk file.

1 - From build menu choose analyse apk option and select apk file.2 - This will result in you the classes.dex file and other files.3 - Click on classes.dex which will give you the list of folders, packages, libraries and files.4 - From and android studio settings install a plugin called 'Dex to Jar' 5 - click on any activity file of your extracted project and choose dex to jar from the build menu.

This will result in you the actual code of your java file.

Cheers.

Rohit PatilRohit Patil

The simplest way is using Apk OneClick Decompiler. That is a tool package to decompile & disassemble APKs (android packages).

FEATURES

  • All features are integrated into the right-click menu of Windows.
  • Decompile APK classes to Java source codes.
  • Disassemble APK to smali code and decode its resources.
  • Install APK to phone by right-click.
  • Recompile APK after editing smali code and/or resources.During recompile:
  • Optimize png images
  • Sign apks
  • Zipalign

REQUIREMENTS

Java Runtime Environment (JRE) must be installed.

You can download it from this link Apk OneClick Decompiler

Enjoy that.

Masoud MokhtariMasoud Mokhtari
1,1231 gold badge7 silver badges31 bronze badges

I found the following as the simplest method:

  1. Rename your app.apk to app.zip (Change extension from apk to zip)
  2. Extract the zip file into a folder
  3. Use JADX tool to read the source code, present in classes.dex file.
Masood AnwarMasood Anwar

There's an app for that and generally takes just a few clicks and you are done.https://github.com/Nuvolect/DeepDive-Android

  1. Select Apps, under 'Installed Apps' select your app. If it is notthere you can load the APK.
  2. Select 'Extract APK'
  3. Select 'Unpack APK'
  4. Select 'Decompile with Jadx'. This can take a few seconds or a few minutes depending on the speed of your device

After that you can browse the source code, download it to another computer with elFinder or search through it using Lucene.

In addition to Jadx it has CFR and Fernflower decompilers.

MobileMateoMobileMateo

based on your condition, if your android apk:

Choice1: using online service

such as:

using www.javadecompilers.com

goto:

  • http://www.javadecompilers.com/apk
    • Note: internally using Jadx

to auto decode from apk to java sourcecode

steps:

upload apk file + click Run + wait some time + click Download to get zip + unzip ->

sources/com/{yourCompanyName}/{yourProjectName}

is your expected java source code

Choice2: decompile/crack by yourself

use related tool to decompile/crack by yourself:

use jadx/jadx-gui convert apk to java sourcecode

download jadx-0.9.0.zip then unzip to got bin/jadx, then:

  • command line mode:
    • in terminal run: jadx-0.9.0/bin/jadx -o output_folder /path_to_your_apk/your_apk_file.apk
    • output_folder will show decoded sources and resources
      • sources/com/{yourCompanyName}/{yourProjectName} is your expected java sourcecode
  • GUI mode
    • double click to run jadx-0.9.0/bin/jadx-gui (Linux's jadx-gui.sh / Windows's jadx-gui.bat)
    • open apk file
    • it will auto decoding -> see your expected java sourcecode
    • save all or save as Gradle project

eg:

the main method of 3 steps:

  1. apk/app to dex
  2. dex to jar
  3. jar to java src

detailed explanation:

Step1: apk/app to dex

Books

use tool (FDex2/DumpDex) dump/hook out (one or multiple) dex file from running app

steps:

prepare environment

  • a rooted android
    • real phone
    • or emulator
      • here using ChineseNox App Player夜神安卓模拟器
  • install your android apk
    • to the phone or emulator
  • installed Xposed Installer
  • install FDex2/DumpDex into XPosed and enable it
    • Note: need restart Xposed to make FDex2 work
    • FDex2 download address, Chinese:
      • 链接: https://pan.baidu.com/s/1lTF8CN96bxWpFwv7J174lg 提取码: 3e3t
  • install your android apk to phone/emulator

dump out dex from running app

  • run FDex2 then click your apk name to enable later to capture/hook out dex

  • (in phone/emulator) run your app
  • find and copy out the dump out whole apk resources in /data/data/com/yourCompanyName/yourProjectName
    • in its root folder normally will find several dex file

Step2: dex to jar

use tool (dex2jar) convert (the specific, containing app logic) dex file to jar file

download dex2jar got dex-tools-2.1-SNAPSHOT.zip, unzip got dex-tools-2.1-SNAPSHOT/d2j-dex2jar.sh, then

sh dex-tools-2.1-SNAPSHOT/d2j-dex2jar.sh -f your_dex_name.dex

eg:

Step3: jar to java src

use one of tools:

  • Procyon
    • GUI tool based on procyon:
  • some others:

convert jar to java src

for from jar to java src converting effect:

Jadx >Procyon >CRF >>JD-GUI

so recommend use: Jadx/jadx-gui

steps:

  • double click to run jadx-gui
  • open dex file
  • File ->save all

eg:

exported java src:

More detailed explanation can see my online ebook Chinese tutorial:

  • 安卓应用的安全和破解
    • tutorial's source code on github: crifan/android_app_security_crack: 安卓应用的安全和破解
crifancrifan
5,1291 gold badge20 silver badges16 bronze badges

protected by CommunityJun 2 '11 at 5:18

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged androidandroid-resourcesdecompilingapk or ask your own question.