Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Col-E/binary-resources

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

45 Commits

Repository files navigation

Binary Resources badge

A fork of the upstream binary-resources tool project.

What's changed?

  • No longer requires/depends-on the Android SDK artifacts
  • Helper utilities for printing binary XML
  • Obfuscation resilience, handling inputs that would otherwise crash the base project, but are valid at install-time

Usage as a library

Here's a code sample of taking the byte[] of an AndroidManifest.xml and transforming it into a formatted String.

// Create resource providers, which translate resource id values/keys into strings used in XML decoding
// - Implementing this interface is your responsibility. 
// - While this is a bit of work, it allows you to update what values are provided even if this project never updates.
// - An example implementation is provided in this projects test module.
AndroidResourceProvider androidResources = ...
AndroidResourceProvider appResources = ...
// Create the binary resource (AndroidManifest.xml) reader and pass it to the XML decoder, 
// yielding a decoded string representation of the file contents.
BinaryResourceFile binaryResource = new BinaryResourceFile(binaryXmlBytes);
String decoded = XmlDecoder.decode(binaryResource, androidResources, appResources);

The example implementation of AndroidResourceProvider can be found here:

You can use the project as a maven artifact via JitPack

AltStyle によって変換されたページ (->オリジナル) /