public class ArscParser extends Object implements ResConst
byte[] oldArscFile= ... ; // List<Pkg> pkgs = new ArscParser(oldArscFile).parse(); // read the file modify(pkgs); // do what you want here byte[] newArscFile = new ArscWriter(pkgs).toByteArray(); // build a new fileThe format of arsc is described here (gingerbread)
aapt d resources abc.apk is also good for debug
(available in android sdk)
Todos:
Thanks to the the following projects
| Modifier and Type | Field and Description |
|---|---|
static int |
TYPE_STRING |
RES_STRING_POOL_TYPE, RES_TABLE_PACKAGE_TYPE, RES_TABLE_TYPE, RES_TABLE_TYPE_SPEC_TYPE, RES_TABLE_TYPE_TYPE, RES_XML_CDATA_TYPE, RES_XML_END_ELEMENT_TYPE, RES_XML_END_NAMESPACE_TYPE, RES_XML_RESOURCE_MAP_TYPE, RES_XML_START_ELEMENT_TYPE, RES_XML_START_NAMESPACE_TYPE, RES_XML_TYPE| Constructor and Description |
|---|
ArscParser(byte[] b) |
public static final int TYPE_STRING
public List<Pkg> parse() throws IOException
IOExceptionCopyright © 2022 Secure Software Engineering Group - University of Paderborn. All rights reserved.