Galaxy Note 3 Lollipop Leak, Failed Find 5 Update – XDA TV

Android 5.0 Lollipop for the Samsung Galaxy Note 3 has been leaked! That and … more

Firefox OS Architecture and Collaboration Opportunities w/ Asa Dotzler – XDA:DevCon 2014

We were privileged to host many presentations … more

Unofficial Android 4.4 Lands on Three Mediatek Devices

For the last few years, devices with MTK systems-on-chip haven’t received much … more

MultiImagePicker Library for Multiple Image Selection

App developmentcan be done in more than a handful of ways. You can write every single … more

Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

AXMLPrinter2 - Convert Android binary XML to human-readable XML

OP jashsu

12th May 2009, 05:09 AM   |  #1  
jashsu's Avatar
OP Senior Member
Thanks Meter: 14
 
1,853 posts
Join Date:Joined: Nov 2008
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 05:16 AM.
The Following 3 Users Say Thank You to jashsu For This Useful Post: [ View ]
12th May 2009, 11:18 AM   |  #2  
beagz's Avatar
Senior Member
Flag Greenacres, FL
Thanks Meter: 23
 
1,056 posts
Join Date:Joined: Jan 2009
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, 12:51 PM   |  #3  
Member
Flag Hampshire
Thanks Meter: 1
 
85 posts
Join Date:Joined: Feb 2009
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, 01:17 PM   |  #4  
beagz's Avatar
Senior Member
Flag Greenacres, FL
Thanks Meter: 23
 
1,056 posts
Join Date:Joined: Jan 2009
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 01:25 PM.
12th May 2009, 01:25 PM   |  #5  
jashsu's Avatar
OP Senior Member
Thanks Meter: 14
 
1,853 posts
Join Date:Joined: Nov 2008
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 01:27 PM.
12th May 2009, 02:04 PM   |  #6  
beagz's Avatar
Senior Member
Flag Greenacres, FL
Thanks Meter: 23
 
1,056 posts
Join Date:Joined: Jan 2009
More
So then is there a way to convert back to binary?
28th May 2009, 06:18 AM   |  #7  
Senior Member
Flag Dallas
Thanks Meter: 79
 
1,086 posts
Join Date:Joined: Dec 2008
More
anyone ever find a way to convert them back?
15th August 2009, 03:42 AM   |  #8  
xidominicanoix's Avatar
Senior Member
Flag FL
Thanks Meter: 4
 
1,077 posts
Join Date:Joined: Oct 2006
More
wow .. wrong thread lol
Last edited by xidominicanoix; 15th August 2009 at 03:45 AM.
15th August 2009, 04:01 AM   |  #9  
Senior Member
Flag Vancouver
Thanks Meter: 0
 
615 posts
Join Date:Joined: Aug 2006
More
Quote:
Originally Posted by xile6

anyone ever find a way to convert them back?

good question. anyone?
15th August 2009, 04:09 AM   |  #10  
xidominicanoix's Avatar
Senior Member
Flag FL
Thanks Meter: 4
 
1,077 posts
Join Date:Joined: Oct 2006
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 04:13 AM.

The Following User Says Thank You to xidominicanoix For This Useful Post: [ View ]
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes