There are two useful tools which will generate Java code (rough but good enough) from an unknown APK file.
- Download dex2jar tool from dex2jar.
- Use the tool to convert the APK file to JAR: Windows:
$ d2j-dex2jar.bat demo.apk dex2jar demo.apk -> ./demo-dex2jar.jar
MacOS / Linux:$ d2j-dex2jar.sh -f demo.apk -o demo.jar
- Once the JAR file is generated, use JD-GUI to open the JAR file. You will see the Java files.
The output will be similar to:

Then you can use other tools to retrieve the AndroidManifest.xml and resource files (like images, translations, etc…) from the APK file.
- Apktool
$ java -jar apktool.jar -q decode -f demo.apk -o outputDir
- AXMLParser
$ apkinfo demo.apk
- NinjaDroid
$ ninjadroid demo.apk --all --extract
Related Posts:
- Is there a way to get the source code from an APK file?
- Install an apk file from command prompt?
- Install an apk file from command prompt?
- How to install APK from PC?
- Session ‘app’: Error Installing APK
- Application Installation Failed in Android Studio
- What is INSTALL_PARSE_FAILED_NO_CERTIFICATES error?
- How to decompile an android app from the google play store
- INSTALL_FAILED_NO_MATCHING_ABIS when install apk
- Emulator: ERROR: x86 emulation currently requires hardware acceleration
- Emulator: ERROR: x86 emulation currently requires hardware acceleration
- ‘App not Installed’ Error on Android
- ‘App not Installed’ Error on Android
- Draw a transparent circle onto a filled android canvas
- How to use navigateUp to close the application
- “unable to locate adb” using Android Studio [duplicate]
- “unable to locate adb” using Android Studio [duplicate]
- Can’t start Eclipse – Java was started but returned exit code=13
- Can’t start Eclipse – Java was started but returned exit code=13
- What exactly is “com.google.android.packageinstaller”
- Differences between arm64 and aarch64
- google console error `OR-IEH-01`
- How to decompile an APK or DEX file on Android platform? [closed]
- My users get “net::err_name_not_resolved”
- Error: No toolchains found in the NDK toolchains folder for ABI with prefix: llvm
- Unity remote 5 not working
- Solving “adb server version doesn’t match this client” error [duplicate]
- Error: No toolchains found in the NDK toolchains folder for ABI with prefix: llvm
- How to display Toast in Android?
- How to use adb command to push a file on device without sd card
- Can’t create handler inside thread that has not called Looper.prepare()
- recyclerview No adapter attached; skipping layout
- Exception : AAPT2 error: check logs for details
- This adb server’s $ADB_VENDOR_KEYS is not set
- Can’t create handler inside thread that has not called Looper.prepare()
- This adb server’s $ADB_VENDOR_KEYS is not set
- ‘adb’ is not recognized as an internal or external command, operable program or batch file
- E: unable to locate package pip
- recyclerview No adapter attached; skipping layout
- Exception : AAPT2 error: check logs for details
- Flutter pageview : Find first and last page and swipe directions
- What are the possible reasons for NFC Service to become dead after some time?
- How can I find and run the keytool
- Android ADB devices unauthorized
- adb is not recognized as internal or external command, operable program or batch file
- Enable VT-x in your BIOS security settings (refer to documentation for your computer)
- NetworkType.UNMETERED vs NetworkType.METERED – PeriodicWork
- Getting net::ERR_UNKNOWN_URL_SCHEME while calling telephone number from HTML page in Android
- Simple Android RecyclerView example
- Find all Bluetooth devices (headsets, phones etc) nearby, without forcing the devices in discoverable mode
- You need to use a Theme.AppCompat theme (or descendant) with this activity
- “Default Activity Not Found” on Android Studio upgrade
- You need to use a Theme.AppCompat theme (or descendant) with this activity
- Still getting warning : Configuration ‘compile’ is obsolete and has been replaced with ‘implementation’
- What is ‘Context’ on Android?
- android image button
- What causes signal ‘SIGILL’?
- java.lang.NullPointerException: Attempt to invoke virtual method on a null object reference
- adb server is out of date. killing
- ERROR Android emulator gets killed
- Session ‘app’ error while installing APK
- because an app is obscuring a permissions request, Settings can’t verify your response
- Android: adb pull file on desktop
- Change project name on Android Studio
- ADB No Devices Found
- Android device does not show up in adb list
- adb shell su works but adb root does not
- RecyclerView vs. ListView
- How do I remove the title bar from my app?
- Execution failed for task ‘:app:processDebugResources’ even with latest build tools
- Couldn’t load memtrack module Logcat Error
- Android – Adding at least one Activity with an ACTION-VIEW intent-filter after Updating SDK version 23
- Set adb vendor keys
- What does getActivity() mean?
- how to overcome Android Studio cannot resolve symbol for android classes
- ADB Android Device Unauthorized
- react-native: command not found
- Why fragments, and when to use fragments instead of activities?
- Error “File google-services.json is missing from module root folder. The Google Services Plugin cannot function without it”
- What is the meaning of Log.i()
- How to recompile with -Xlint:deprecation
- How to change the status bar color in Android?
- Execution failed app:processDebugResources Android Studio
- How can I use adb over WiFi?
- adb shell su works but adb root does not
- How to use putExtra() and getExtra() for string data
- Android – setOnClickListener vs OnClickListener vs View.OnClickListener
- MediaStore.Images.Media.insertImage deprecated
- How do I get the dialer to open with phone number displayed?
- RecyclerView vs. ListView
- How to update Notification with RemoteViews?
- SQLiteDatabase.query method
- Is there an equivalent to iOS’s Keychain for user credentials on Android?
- Android ADB device offline, can’t issue commands
- Android SDK location
- Android Studio Run/Debug configuration error: Module not specified
- Android Emulator Error Message: “PANIC: Missing emulator engine program for ‘x86’ CPUS.”
- How to convert int to Integer
- Is it possible to convert apk file to IPA file?
- IllegalArgumentException: Unable to locate adb in Android Studio v2.3