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,
ResTable resTable) throws AndrolibException {
try {
Directory apk = apkFile.getDirectory();
LOGGER.info("Copying raw manifest...");
apkFile.getDirectory().copyToDir(outDir, APK_MANIFEST_FILENAMES);
} catch (DirectoryException ex) {
throw new AndrolibException(ex);
}
mAndRes.decodeManifest(resTable, apkFile, outDir);
}
public void decodeResourcesRaw(ExtFile apkFile, File outDir)

View File

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

View File

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