java - How do you embed binary data in XML? - Stack Overflow
Converting binary xml files.
python - Convert XML with binary content into readable text and back - Software Recommendations Stack Exchange
Store XML File into Binary Data, Read from Binary convert into Text not identical | OutSystems
The file is not just "binary data" of the xml. There is a "format" to the android xml.
You can look at AXMLPrinter2 - it takes the binary xml and converts it to human readable. I Linked directly to a class that looks like it does the bulk of the work.
What information do you need from the manifest file? The aapt.exe in the android SDK can also pull all the info out of the android manifest file. You would just have to run that command (with the needed switches) and parse the console output stream.
The file looks like it is encoded in a custom format, I don't think there is a .NET library available for decoding it, so you'll have to rewrite a perl script like axml2xml.pl to do it for you. Unfortunately there isn't a quick-and-easy solution, but looking at it, rewriting it shouldn't be too hard.
You could encode the binary data using base64 and put it into a Base64 element; the below article is a pretty good one on the subject.
Handling Binary Data in XML Documents
XML is so versatile...
<DATA>
<BINARY>
<BIT index="0">0</BIT>
<BIT index="1">0</BIT>
<BIT index="2">1</BIT>
...
<BIT index="n">1</BIT>
</BINARY>
</DATA>
XML is like violence - If it doesn't solve your problem, you're not using enough of it.
EDIT:
BTW: Base64 + CDATA is probably the best solution
(EDIT2:
Whoever upmods me, please also upmod the real answer. We don't want any poor soul to come here and actually implement my method because it was the highest ranked on SO, right?)
- FI can help you, and you can check this video (you can convert binary XML to XML, edit XML, and you can convert XML to Binary XML),
- it is not free, but you can check Stylus,
- maybe Jujuedit can help you
What are you expecting to be able to edit?....If you open the file and you get squares for the characters, then it is likely that the bytes do not correspond to a character in the default charset of the editor you are using, so it is unlikely that you could view or make meaningful edits to the file anyway