FORUMS

OnePlus Addresses Reservation List Cheating

Jake Cooper figured out how to bump his place up on OnePlus’ reservation list and … more

OnePlus 2 Benchmark Scores Show Its Muscle

This video by FoneArena contains all the popular benchmarks being tested on the OnePlus 2, … more

Sony’s Emergence in The Middle: Is The Price Right?

Sony’s Electronics Division is not in its best days, and its smartphone … more

HTC Delivering Ads Straight to Sense Home

HTC’s 2015 has been a year marked by a desperate search for revenue.The HTC One M9 … more

AXMLPrinter2 - Convert Android binary XML to human-readable XML

1,853 posts
Thanks Meter: 15
 
By jashsu, Senior Member on 12th May 2009, 04:09 AM
Post Reply Subscribe to Thread Email Thread
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
Quote:
Originally Posted by Contents of p1220_symbol_sip.txt

<?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 by jashsu; 12th May 2009 at 04:16 AM.
The Following 3 Users Say Thank You to jashsu For This Useful Post: [ View ]
 
 
12th May 2009, 10:18 AM |#2  
beagz's Avatar
Senior Member
Flag Greenacres, FL
Thanks Meter: 23
 
More
Well,

Now I can read the .xml but how can I edit it. I have the hex editor but the strings seem different.
12th May 2009, 11:51 AM |#3  
Member
Flag Hampshire
Thanks Meter: 1
 
More
Quote:
Originally Posted by beagz

Well,

Now I can read the .xml but how can I edit it. I have the hex editor but the strings seem different.

Hex editors are for modifying BINARY files, not plain text xml files. Use notepad, or something. But you'll need to rebuild the xml files after modifying for them to be of any use.
12th May 2009, 12:17 PM |#4  
beagz's Avatar
Senior Member
Flag Greenacres, FL
Thanks Meter: 23
 
More
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 by beagz; 12th May 2009 at 12:25 PM.
12th May 2009, 12:25 PM |#5  
jashsu's Avatar
OP Senior Member
Thanks Meter: 15
 
More
Quote:
Originally Posted by beagz

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 by jashsu; 12th May 2009 at 12:27 PM.
12th May 2009, 01:04 PM |#6  
beagz's Avatar
Senior Member
Flag Greenacres, FL
Thanks Meter: 23
 
More
So then is there a way to convert back to binary?
28th May 2009, 05:18 AM |#7  
Senior Member
Flag Dallas
Thanks Meter: 88
 
More
anyone ever find a way to convert them back?
15th August 2009, 02:42 AM |#8  
xidominicanoix's Avatar
Senior Member
Flag FL
Thanks Meter: 4
 
More
wow .. wrong thread lol
Last edited by xidominicanoix; 15th August 2009 at 02:45 AM.
15th August 2009, 03:01 AM |#9  
Senior Member
Flag Vancouver
Thanks Meter: 0
 
More
Quote:
Originally Posted by xile6

anyone ever find a way to convert them back?

good question. anyone?
15th August 2009, 03:09 AM |#10  
xidominicanoix's Avatar
Senior Member
Flag FL
Thanks Meter: 4
 
More
Quote:
Originally Posted by temporizer

good question. anyone?

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

EDIT: they talk about it here
Last edited by xidominicanoix; 15th August 2009 at 03:13 AM.
The Following User Says Thank You to xidominicanoix For This Useful Post: [ View ]
31st March 2010, 10:57 AM |#11  
Member
Thanks Meter: 0
 
More
Once you get xml element in notepad then how to convert it back to binary XML file

Read More
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes