[android] How to view AndroidManifest.xml from APK file?

Is it possible to view Androidmanifest.xml file?

I just changed the extension of the apk file to zip. This zip file contains the Androidmanifest.xml file. But I am unable view the contents of Androidmanifest.xml. It is fully encrypted.

How can I view the Androidmanifest.xml file?

This question is related to android xml apk android-manifest aapt

The answer is


Aapt2, included in the Android SDK build tools can do this - no third party tools needed.

$(ANDROID_SDK)/build-tools/28.0.3/aapt2 d --file AndroidManifest.xml app-foo-release.apk

Starting with build-tools v29 you have to add the command xmltree:

$(ANDROID_SDK)/build-tools/29.0.3/aapt2 d xmltree --file AndroidManifest.xml app-foo-release.apk

You can use apkanalyzer, the command-line version of the APK Analyzer bundled with the Android SDK. Just execute the following command on the CLI:

/path/to/android-sdk/tools/bin/apkanalyzer manifest print /path/to/app.apk

You only have to replace /path/to/android-sdk with the correct path to your version of the Android SDK, and /path/to/app.apk with the path to your APK file.


Another useful (Python-based) tool for this is Androguard, using its axml sub-command:

androguard axml my.apk -o my.xml

This extracts and decodes the app manifest in one go. Unlike apktool this doesn't unpack anything else.


In this thread, Dianne Hackborn tells us we can get info out of the AndroidManifest using aapt.

I whipped up this quick unix command to grab the version info:

aapt dump badging my.apk | sed -n "s/.*versionName='\([^']*\).*/\1/p"

Google has just released a cross-platform open source tool for inspecting APKs (among many other binary Android formats):

ClassyShark is a standalone binary inspection tool for Android developers. It can reliably browse any Android executable and show important info such as class interfaces and members, dex counts and dependencies. ClassyShark supports multiple formats including libraries (.dex, .aar, .so), executables (.apk, .jar, .class) and all Android binary XMLs: AndroidManifest, resources, layouts etc.

ClassyShark screenshot


There is an online tool that lets you upload an APK It decompiles it and finally lets you to download a zip with all sources, manifest XML file and so on decompiled, all of that without having to install any program on your computer: http://www.javadecompilers.com/apk

Also if you wish just to check on some params you can, by their UI


aapt d xmltree com.package.apk AndroidManifest.xml

will dump the AndroidManifest.xml from the specified APK. It's not in XML form, but you can still read it.

aapt (Android Asset Packaging Tool) is a built in tool that comes with the Android SDK.


The file needs to be decompiled (or deodex'd not sure which one). But here's another way to do it:

-Download free Tickle My Android tool on XDA: https://forum.xda-developers.com/showthread.php?t=1633333https://forum.xda-developers.com/showthread.php?t=1633333
-Unzip
-Copy APK into \_WorkArea1\_in\ folder
-Open "Tickle My Android.exe"
-Theming Menu
-Decompile Files->Any key to continue (ignore warning)
-Decompile Files->1->[Enter]->y[Enter]
-Wait for it to decompile in new window... Done when new window closes
-Decompiled/viewable files will be here: \_WorkArea3\_working\[App]\

This is an old thread, but I thought I would mention, of your phone has root, you can view it directly on your phone using the root explorer app. You don't even have to extract it to see.


Android Studio can now show this. Go to Build > Analyze APK... and select your apk. Then you can see the content of the AndroidManifset file.


You can also use my app, App Detective to view the manifest file of any app you have installed on your device.


The AXMLParser and APKParser.jar can also do the job, you can see the link. AXMLParser


To decode the AndroidManifest.xml file using axmldec:

axmldec -o output.xml AndroidManifest.xml

or

axmldec -o output.xml AndroidApp.apk

You can use this command: save to file AndroidManifest.txt

aapt dump xmltree gmail.apk AndroidManifest.xml > AndroidManifest.txt

Examples related to android

Under what circumstances can I call findViewById with an Options Menu / Action Bar item? How to implement a simple scenario the OO way My eclipse won't open, i download the bundle pack it keeps saying error log getting " (1) no such column: _id10 " error java doesn't run if structure inside of onclick listener Cannot retrieve string(s) from preferences (settings) strange error in my Animation Drawable how to put image in a bundle and pass it to another activity FragmentActivity to Fragment A failure occurred while executing com.android.build.gradle.internal.tasks

Examples related to xml

strange error in my Animation Drawable How do I POST XML data to a webservice with Postman? PHP XML Extension: Not installed How to add a Hint in spinner in XML Generating Request/Response XML from a WSDL Manifest Merger failed with multiple errors in Android Studio How to set menu to Toolbar in Android How to add colored border on cardview? Android: ScrollView vs NestedScrollView WARNING: Exception encountered during context initialization - cancelling refresh attempt

Examples related to apk

Application Installation Failed in Android Studio Difference between signature versions - V1 (Jar Signature) and V2 (Full APK Signature) while generating a signed APK in Android Studio? Session 'app': Error Installing APK Android Error Building Signed APK: keystore.jks not found for signing config 'externalOverride' Build and Install unsigned apk on device without the development server? The APK file does not exist on disk Android Studio: Application Installation Failed How to retrieve Key Alias and Key Password for signed APK in android studio(migrated from Eclipse) ADB Install Fails With INSTALL_FAILED_TEST_ONLY Upload failed You need to use a different version code for your APK because you already have one with version code 2

Examples related to android-manifest

Warnings Your Apk Is Using Permissions That Require A Privacy Policy: (android.permission.READ_PHONE_STATE) Android - Adding at least one Activity with an ACTION-VIEW intent-filter after Updating SDK version 23 Getting net::ERR_UNKNOWN_URL_SCHEME while calling telephone number from HTML page in Android How to change Android version and code version number? Error type 3 Error: Activity class {} does not exist Android open pdf file Adding Permissions in AndroidManifest.xml in Android Studio? Sending and Receiving SMS and MMS in Android (pre Kit Kat Android 4.4) Get Android .apk file VersionName or VersionCode WITHOUT installing apk versionCode vs versionName in Android Manifest

Examples related to aapt

How to install Android SDK Build Tools on the command line? How to view AndroidManifest.xml from APK file?