How to view AndroidManifest.xml from APK file?
Asked Answered
L

18

379

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?

Lowelllowenstein answered 16/11, 2010 at 6:40 Comment(2)
I have one APK file. I need to view the Androidmanifest.xml file. because i used one framework. That APK file also used same framework. So i need to see how to configure the Androidmanifest file from that APK file.Lowelllowenstein
I wasn't able to do this in chrome, but when I opened it in Firefox and chose to view the source code (otherwise there's just error) then I was able to partially see the content.Virchow
D
250

Yes you can view XML files of an Android APK file. There is a tool for this: android-apktool

It is a tool for reverse engineering 3rd party, closed, binary Android apps

How to install apktool: see instructions on the apktool website

Now copy the APK file also in that directory and run the following command in your command prompt:

apktool d HelloWorld.apk -o ./HelloWorld

This will create a directory "HelloWorld" in your current directory. Inside it you can find the AndroidManifest.xml file in decrypted format, and you can also find other XML files inside the "HelloWorld/res/layout" directory.

Here HelloWorld.apk is your Android APK file.

See the below screen shot for more information: alt text

Domel answered 16/11, 2010 at 6:49 Comment(20)
This is nice, but I'd like to know how to just look at the AndroidManifest.xml without having to download all of this. Is it encrypted or compressed?Nonentity
@JohnnyLambada: Yes you can open and view it in a archiving tool like: WinRar/WinZip/7Zip but it make no sense because it is in encrypted form.Domel
is it possible to decrypt , change it a bit (for example the minSdkVersion) , and then put it back into the apk ?Broad
The apktool is deprecated. Better refer to their project homepage for latest version.Fireproof
I get: Exception in thread "main" brut.androlib.AndrolibException: Multiple resources: at brut.androlib.res.data.ResConfig.addResource(Unknown Source)Akilahakili
@VikasPatidar This is great.. but can you please tell how to do this on the device. I mean with SDK (using XMLPullParse/Sax/DocumentBuilder).Heliopolis
@Kishore: You can not directly read AndroidManifest.xml from your application. However you can access various information like Version name, Version Code, Package Name etc. using the official API's.Domel
is it possible to use the apkTool even within an Android app?Broad
is it possible to Look see Decrepted mean normal words i want to see Manifesto file or .xml Designing files is any way to do ....?? i got all the things by APK to convert in zip and Decampile code by tool Decompiler i can get xml or .manifesto details so how do i can look these file .code in Decreption format .....????Shepard
Command seems different in latest version, need to use "-o" before destination folder. Didn't worked for me, either way.Vidar
@Nonentity You can try this javadecompilers.com or this decompileandroid.com.Moreau
@VikasPatidar, as far as i know the android manifest is not encrypted, it is only in binary form .Sternpost
@Sternpost thanks for the correction, I will update it. it has been so long since I answered it.Domel
Now that Google released the ClassyShark Android binary inspection tool, this answer is obsolete.Impersonal
Now command has changed for the latest version apktool d your_destination youraApk.apkGreasepaint
downvoting because it is an old answer. the easiest approach is to use Android Studio as indicated by @jonasPampa
Also downvoting, no longer works. I get an error ... Exception in thread "main" brut.androlib.AndrolibException: Could not decode arsc fileAnschluss
I've used the @Deqing's comment to download the apk tool from here and then execute the following command in the terminal (Windows 10) >java -jar apktool_2.6.0.jar d com.mihkov.helloworldapp.apk.Sconce
This answer is obsolete. The answer by @jonas-jongejan should be accepted instead.Procurator
@JohnnyLambada, you may consider unzip AndroidManifest.xml only, then zip it to a new apk to be decrypted by apktool.Rematch
H
237

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

Homburg answered 28/10, 2016 at 15:53 Comment(5)
This feature has been added recently and I would also like to suggest this unless you are keen using the command line and you have the platform-tools in your path set up.Dayak
this should be upvoted to become the best answer, other methods are now unnecessarily complicated.Flurried
There is a command-line version of this built-in as well: https://mcmap.net/q/87030/-how-to-view-androidmanifest-xml-from-apk-fileEeg
Nothing happens.Bellina
I can open the APK like that but the Manifest is a binary file full on NULLCarolinecarolingian
I
71

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

Install version 8.2:

wget https://github.com/google/android-classyshark/releases/download/8.2/ClassyShark.jar

Run:

java -jar ClassyShark.jar -open <file.apk>
Impersonal answered 18/11, 2016 at 21:16 Comment(2)
This is 10000 times easier than Apktool!Lundgren
is it editable?Canute
P
67

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.

Pancreatin answered 11/2, 2015 at 21:33 Comment(1)
(for aapt2) aapt2.exe d xmltree package.apk --file AndroidManifest.xmlBlim
N
47

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"
Nonentity answered 15/1, 2011 at 1:10 Comment(0)
E
45

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.

Eeg answered 25/2, 2019 at 21:14 Comment(5)
This should be the accepted answer as it does not require to install anything from unverified sources.Nitroparaffin
note that this doesn't seem to work on Windows :( https://mcmap.net/q/88225/-39-apkanalyzer-39-is-not-recognized-as-an-internal-or-external-commandEnforce
I get error: Exception in thread "main" java.lang.IllegalStateException: The tools directory property is not set, please make sure you are executing apkanalyzer, I didn't know how to solve itSanasanabria
This is most likely the path you need if you’re on macOS: ~/Library/Android/sdk/tools/bin/apkanalyzer manifest print <apk>Giorgia
works on windows now. the version I used was downloaded in 2022.Johst
A
22

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

aapt dump xmltree gmail.apk AndroidManifest.xml > AndroidManifest.txt
Ahearn answered 3/7, 2016 at 9:10 Comment(4)
d is an abbreviation for dump, which makes this answer identical to this one, which was posted more than a year earlier.Impersonal
Yes, but this code save in file > AndroidManifest.txt.Ahearn
lol, that's the same answer, dumping the file is not making the differenceHuihuie
It's a better written answer: I skipped the other one because I thought the output would be binary, but here it is clear right away that AndroidManifest.txt will be ASCII readable by humans.Flush
S
18

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
Send answered 31/1, 2019 at 17:3 Comment(2)
This doesn't output the original XML, but it's neat if I just need to look at a value in there without having to extract the APK or write to a temporary file.Citron
This very weirdly required both XML and .apk, I only had the XML, I found out that Archive Manager can "zipped" it to ".apk" and I just provided that as the .apk and then it worked :-)Virchow
C
16

To decode the AndroidManifest.xml file using axmldec:

axmldec -o output.xml AndroidManifest.xml

or

axmldec -o output.xml AndroidApp.apk
Campo answered 5/2, 2019 at 11:51 Comment(3)
This works and can be easily installed via Homebrew: brew tap ytsutano/toolbox brew install axmldecTyson
not recognized under windows...Canute
works on windows, thxMarimaria
T
8

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

Theodoretheodoric answered 6/1, 2014 at 7:30 Comment(1)
That tool hasn't been updated in give years. Google has just released an Android binary inspection tool in Nov 2016.Impersonal
A
8

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

Anaxagoras answered 19/5, 2016 at 8:58 Comment(3)
Worked on an APK in August, didn't work on another one in Nov.Impersonal
apktools did not seem to create a directory for me with the output, and aapt did not show the result in XML format. This website worked like a charm.Fieldpiece
ezpz, DaaS "Decompiler as a Service" that's nice and worked well for me, no need to install anythingEmpower
C
4

All these answers seem a bit over-engineered!

  1. Just grab this chrome extension: https://chrome.google.com/webstore/detail/apk-downloader/fgljidimohbcmjdabiecfeikkmpbjegm

  2. Download the .apk file you want from the playstore using the above extension.

  3. Upload the .apk to this online tool to grab the manifest.xml: https://www.sisik.eu/apk-tool

Changchun answered 8/11, 2021 at 20:36 Comment(1)
I love whats behind door no 3!Cullis
K
3

Another option is to use Jadx: https://github.com/skylot/jadx

Just open your APK and in treeview select "AndroidManifest.xml". It will be readable just like that.

Kelsey answered 4/11, 2021 at 12:51 Comment(2)
and to edit it (that single file) without extracting other files?Canute
@Canute In Jadx you can only view AndroidManifest.xml, other resources and code.Compiler
M
2

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

Melancholia answered 30/10, 2017 at 23:34 Comment(2)
is it editable?Canute
The app sucks (bad UI/UX) and upon opening the AndroidManifest I see a blank screen.Anna
Z
2

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.

Zacatecas answered 19/2, 2021 at 12:54 Comment(0)
G
1

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.

Griffey answered 30/4, 2014 at 19:16 Comment(0)
T
0

Just upload the apk at https://www.sisik.eu/apk-tool and you can view the AndroidManifest.xml

Teeters answered 15/5, 2023 at 13:17 Comment(0)
F
-1

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]\
Feuar answered 5/10, 2018 at 18:33 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.