prepping for changes for & and manifest

This commit is contained in:
Connor Tumbleson 2012-07-30 22:04:19 -05:00
parent 749ce67c4b
commit 361fdea59e
3 changed files with 9 additions and 15 deletions

View File

@ -94,13 +94,7 @@ public class Androlib {
public void decodeManifestFull(ExtFile apkFile, File outDir, public void decodeManifestFull(ExtFile apkFile, File outDir,
ResTable resTable) throws AndrolibException { ResTable resTable) throws AndrolibException {
try { mAndRes.decodeManifest(resTable, apkFile, outDir);
Directory apk = apkFile.getDirectory();
LOGGER.info("Copying raw manifest...");
apkFile.getDirectory().copyToDir(outDir, APK_MANIFEST_FILENAMES);
} catch (DirectoryException ex) {
throw new AndrolibException(ex);
}
} }
public void decodeResourcesRaw(ExtFile apkFile, File outDir) public void decodeResourcesRaw(ExtFile apkFile, File outDir)

View File

@ -105,14 +105,13 @@ public class ApkDecoder {
// attribute references // attribute references
if (hasManifest()) { if (hasManifest()) {
switch (mDecodeResources) { switch (mDecodeResources) {
case DECODE_RESOURCES_FULL:
case DECODE_RESOURCES_NONE: case DECODE_RESOURCES_NONE:
mAndrolib.decodeManifestRaw(mApkFile, outDir); mAndrolib.decodeManifestRaw(mApkFile, outDir);
break; break;
// case DECODE_RESOURCES_FULL: case DECODE_RESOURCES_FULL:
// mAndrolib.decodeManifestFull(mApkFile, outDir, mAndrolib.decodeManifestFull(mApkFile, outDir,
// getResTable()); getResTable());
// break; break;
} }
} }
} }

View File

@ -149,9 +149,10 @@ final public class AndrolibResources {
inApk = apkFile.getDirectory(); inApk = apkFile.getDirectory();
out = new FileDirectory(outDir); out = new FileDirectory(outDir);
fileDecoder.decode( LOGGER.info("Decoding AndroidManifest.xml with resources...");
inApk, "AndroidManifest.xml", out, "AndroidManifest.xml",
"xml"); fileDecoder.decodeManifest(
inApk, "AndroidManifest.xml", out, "AndroidManifest.xml");
if (inApk.containsDir("res")) { if (inApk.containsDir("res")) {
in = inApk.getDir("res"); in = inApk.getDir("res");