decode sources after resources

This commit is contained in:
Connor Tumbleson 2013-06-21 07:54:11 -05:00
parent 570eaa7023
commit af32d4da3e

View File

@ -81,20 +81,6 @@ public class ApkDecoder {
} }
outDir.mkdirs(); outDir.mkdirs();
if (hasSources()) {
switch (mDecodeSources) {
case DECODE_SOURCES_NONE:
mAndrolib.decodeSourcesRaw(mApkFile, outDir, mDebug);
break;
case DECODE_SOURCES_SMALI:
mAndrolib.decodeSourcesSmali(mApkFile, outDir, mDebug, mDebugLinePrefix, mBakDeb);
break;
case DECODE_SOURCES_JAVA:
mAndrolib.decodeSourcesJava(mApkFile, outDir, mDebug);
break;
}
}
if (hasResources()) { if (hasResources()) {
setAnalysisMode(mAnalysisMode, true); setAnalysisMode(mAnalysisMode, true);
// read the resources.arsc checking for STORED vs DEFLATE // read the resources.arsc checking for STORED vs DEFLATE
@ -133,6 +119,20 @@ public class ApkDecoder {
} }
} }
if (hasSources()) {
switch (mDecodeSources) {
case DECODE_SOURCES_NONE:
mAndrolib.decodeSourcesRaw(mApkFile, outDir, mDebug);
break;
case DECODE_SOURCES_SMALI:
mAndrolib.decodeSourcesSmali(mApkFile, outDir, mDebug, mDebugLinePrefix, mBakDeb);
break;
case DECODE_SOURCES_JAVA:
mAndrolib.decodeSourcesJava(mApkFile, outDir, mDebug);
break;
}
}
mAndrolib.decodeRawFiles(mApkFile, outDir); mAndrolib.decodeRawFiles(mApkFile, outDir);
mAndrolib.decodeUnknownFiles(mApkFile, outDir, mResTable); mAndrolib.decodeUnknownFiles(mApkFile, outDir, mResTable);
mAndrolib.writeOriginalFiles(mApkFile, outDir); mAndrolib.writeOriginalFiles(mApkFile, outDir);