Prevent reading resources when -r / --no-res is used

This commit is contained in:
Connor Tumbleson 2015-08-11 13:47:10 -05:00
parent 099cc0fcb3
commit 2033e305af

View File

@ -89,8 +89,6 @@ public class ApkDecoder {
LOGGER.info("Using Apktool " + Androlib.getVersion() + " on " + mApkFile.getName()); LOGGER.info("Using Apktool " + Androlib.getVersion() + " on " + mApkFile.getName());
if (hasResources()) { if (hasResources()) {
setTargetSdkVersion();
setAnalysisMode(mAnalysisMode, true);
setCompressionMode(); setCompressionMode();
switch (mDecodeResources) { switch (mDecodeResources) {
@ -98,6 +96,9 @@ public class ApkDecoder {
mAndrolib.decodeResourcesRaw(mApkFile, outDir); mAndrolib.decodeResourcesRaw(mApkFile, outDir);
break; break;
case DECODE_RESOURCES_FULL: case DECODE_RESOURCES_FULL:
setTargetSdkVersion();
setAnalysisMode(mAnalysisMode, true);
if (hasManifest()) { if (hasManifest()) {
mAndrolib.decodeManifestWithResources(mApkFile, outDir, getResTable()); mAndrolib.decodeManifestWithResources(mApkFile, outDir, getResTable());
} }