AXMLPrinter2 - Convert Android binary XML to human-readable XML

Search This thread

jashsu

Senior Member
Nov 15, 2008
1,849
20
I've been poking around HTC's key.apk and HTC_CIME.apk in the hopes of somehow finding a way to activate the XT9 functionality (aka "Compact qwerty" and "20-key"). Still working on that. In the process, I found a neat little java app called AXMLPrinter2 which as the title suggests, converts Android's binary XML files back to human-readable XML. Take a look:

Code:
c:\and_test\java -jar AXMLPrinter2.jar p1220_symbol_sip.xml > p1220_symbol_sip.txt
Contents of p1220_symbol_sip.txt said:
<?xml version="1.0" encoding="utf-8"?>
<keyboard
width="53.0px"
hgap="0.0px"
vgap="0.0px"
height="55.0px"
keyTextSize="24.0px"
popupTextSize="32.0px"
accentPage="4"
keyboardBackground="@7F020074"
keyboardPadding="0,2,0,4"
functionKeyBackground="@7F020032"
commonKeyBackground="@7F020031"
pageKeyBackground="@7F02008A"
>
<row
>
<key
codes="0x0028,0x0040,0x005E,-14"
label="("
hgap="1.0px"
leftEdge="true"
popupCharacters="@7F08006B"
popupDelay="0"
accentType="3"
alignIndex="0"
>
</key>

...

Edit: there's supposed to be tabbing but xda forum code stripped em.
 
Last edited:

beagz

Senior Member
Jan 11, 2009
1,187
23
Greenacres, FL
No I meant I can find the corresponding code in notepad using the .txt output and then I can change it in the hex editor. But I am trying to figure out what values to change.
.txt
text color="@7F050000"
.xml (hex)
00 00 05 7F

I can find the value but what part should be changed? in hex I know from stericson that values = BGR but which 6 of 8 should be changed?

OK, I found the problem. The ones that control color all have #FFFFFFFF as the format not @FFFFFFFF
thanks.
 
Last edited:

jashsu

Senior Member
Nov 15, 2008
1,849
20
No I meant I can find the corresponding code in notepad using the .txt output and then I can change it in the hex editor. But I am trying to figure out what values to change.
.txt
text color="@7F050000"
.xml (hex)
00 00 05 7F

I can find the value but what part should be changed? in hex I know from stericson that values = BGR but which 6 of 8 should be changed?
Looks like its just different endianness.

This app isn't particularly useful if you just want to alter color values in a hex editor. It's more for a situation where you want to completely alter ui elements in an app without source code.
 
Last edited:

Papa Smurf151

Senior Member
Feb 24, 2010
5,643
6,741
Atlanta
im kinda out of place here but have been theming for a little while...but wanted to post this. its the axmlprinter2 and also amlprinter. the second file is an app that opens the xml inside of windows with out having to type in anything in cmd

from what i know you cant change anything in the file this way but at least it cuts a step or two out. enjoy

i prob wont see this thread again so pm me if u have questions
 

Attachments

  • AXMLPrinter.zip
    28.4 KB · Views: 1,074

Daneshm90

Retired Recognized Developer
Jun 1, 2009
3,332
662
Why dont you guys just use apktool ? it allows you to read the xml, edit it and compile it back.
 

newshook

Senior Member
Jul 9, 2010
68
1
Hi, I just tried to use AXMLPrinter2 to decode the status_bar.xml extracted from a 2.2 distribution. I get java.lang.ArrayIndexOutOfBoundsException.

If possible, can you confirm if this utility works with 2.2?

Thanks!
 

ZduneX25

Recognized Themer
Nov 4, 2010
4,123
5,004
miuipolska.pl
Xiaomi Redmi 2
Xiaomi Mi 5
What is wrong there:
cmdv.png
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 3
    I've been poking around HTC's key.apk and HTC_CIME.apk in the hopes of somehow finding a way to activate the XT9 functionality (aka "Compact qwerty" and "20-key"). Still working on that. In the process, I found a neat little java app called AXMLPrinter2 which as the title suggests, converts Android's binary XML files back to human-readable XML. Take a look:

    Code:
    c:\and_test\java -jar AXMLPrinter2.jar p1220_symbol_sip.xml > p1220_symbol_sip.txt
    Contents of p1220_symbol_sip.txt said:
    <?xml version="1.0" encoding="utf-8"?>
    <keyboard
    width="53.0px"
    hgap="0.0px"
    vgap="0.0px"
    height="55.0px"
    keyTextSize="24.0px"
    popupTextSize="32.0px"
    accentPage="4"
    keyboardBackground="@7F020074"
    keyboardPadding="0,2,0,4"
    functionKeyBackground="@7F020032"
    commonKeyBackground="@7F020031"
    pageKeyBackground="@7F02008A"
    >
    <row
    >
    <key
    codes="0x0028,0x0040,0x005E,-14"
    label="("
    hgap="1.0px"
    leftEdge="true"
    popupCharacters="@7F08006B"
    popupDelay="0"
    accentType="3"
    alignIndex="0"
    >
    </key>

    ...

    Edit: there's supposed to be tabbing but xda forum code stripped em.
    1
    good question. anyone?

    yea i answered this in another thread .. lemme go look for my answer ;)

    EDIT: they talk about it here