axmlprinter | Library for parsing and printing compiled Android
kandi X-RAY | axmlprinter Summary
kandi X-RAY | axmlprinter Summary
This is a heavily (almost 100%?) refactor of the Android4ME axmlprinter library/code. Personally I had used the library for years without much issue and it was fast/useful just for printing out Android Manifest files. In the past few years due to people mucking with AXML files and my own boredom, I've refactored most of the code to be tested and more useful in non-command line situations.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Prints AxMLPrinter
- Reads from the specified stream
- Writes the content to an output stream
- Prints the XML file
- Creates a new chunk
- Get the size of the pool
- Serialize the resource IDs
- Serialize the resource pool
- Reads a section
- Read pool
- Serialize the resource section
- Generate indent
- Serialize this resource into an XML string
- Serialize the resource section to XML
- Returns an XML representation of this resource
- Append namespace
- Read the header
- Returns a serialized chunk of data
- Read the header
- Put a string index into the pool
axmlprinter Key Features
axmlprinter Examples and Code Snippets
Community Discussions
Trending Discussions on axmlprinter
QUESTION
Decompile AndroidManifest.xml packaged in apk from binary form into normal xml file, edit it and recompile it back into binary file acceptable for apk. Basically I need a driver for AXML files
Short backgroundI'm working on an APK injection project. My goal is
- Disassemble the dalvik binary
- Read AndroidManifest xml and add modifications to it, like change main activity and add permissions
- rebuild and sign the apk file
I use apktool for assembling and disassembling the apk. However the apk tool works only with --no-res
option, if apk is disassemled with resources it can not be built back. Here's a github issue describing this bug.
Since I disassemle the apktool d --no-res app-debug.apk
with no res flag the Generated android manifest comes in binary form. I can disassemble the manifest using apktool
but I can not assemnle it back.
I need to either:
- Find a way to disassemble the manifest and then assemble it back into binary form
- Find a way to use
apktool
with resources
- Replacing the binary
AndroidManifest.xml
with plain-text version and then build. Theapktool
would build. However the installation of the app to device fails with "Parse error there is a problem while parsing the package". - Using different versions of
apktool
:v2.3.2
,v2.3.1
,v2.3.0
,v2.2.0
,v2.2.1
,v2.2.2
- Compiling axml using following projects: https://github.com/rednaga/axmlprinter ; https://github.com/ZaratustraN/axml-parser ; https://github.com/shazam/axmlparser
Although stackoverflow is a community for knowledge sharing, and not judging what it's used for - I see a lot of people picking on others in similar questions with accusations for illegal activities.
What I'm doing is absolutely legal and will not be used to exploit anyone.
...ANSWER
Answered 2018-Apr-27 at 06:44Installation can give parse error on following condition, see if any met with you -
- Name of the package is changed after signing: Use the exact name as the signed package is (instead, adjust the name in Manifest)
- Package. is compiled against on higher API level: Correct the API level in Manifest file.
- Package is executed from SD-card: Run (install) the apk -file from phones memory OR use adb command to install it.
You can manually sign your apk as given here.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install axmlprinter
You can use axmlprinter like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the axmlprinter component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page