开发者

Android XML Extracted from APK - Bad Encoding

开发者 https://www.devze.com 2023-01-09 04:18 出处:网络
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 non开发者_运维知识库e of my text editors can read it

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 non开发者_运维知识库e 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?


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.


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


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.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消