5

Using DDMS I took a downloaded APK off my phone and unzipped it.

The PNGs look great, but when I try to read the XMLs their encoding is such that none of my text editors can read it (Word, Notepad, Visual Studio etc)

Is there something done to the XMLs in a APK that prevents us from reading them?

Ian Vink
  • 66,960
  • 104
  • 341
  • 555

4 Answers4

6

You can decode them using a Java program - AXMLPrinter2.jar.

http://forum.xda-developers.com/showthread.php?t=514412

http://code.google.com/p/android4me/downloads/detail?name=AXMLPrinter2.jar&can=2&q=

I'm sure there are better details out there, but that should set you on the right path.

mbafford
  • 2,266
  • 1
  • 20
  • 25
1

Take a look at android-apktool, as detailed here.

Community
  • 1
  • 1
Chris Lacy
  • 4,222
  • 3
  • 35
  • 33
0

You can see some implementation through aapt tool.

Navigate to "platform-tools" in your sdk folder.

copy and paste the apk to this folder.

Execute the command: " aapt l -a apk_name.apk "

Where the "apk_name.apk" is your apk's name.

jcwenger
  • 11,383
  • 1
  • 53
  • 65
Franklin Hirata
  • 290
  • 2
  • 12
0

The XML files are stored in a compiled format. From android docs:

When you compile your application, each XML layout file is compiled into a View resource.

I'm not aware of a decompiler, its probably possible though.

Cheryl Simon
  • 46,552
  • 15
  • 93
  • 82