fixing debug mode finally fixes #14

This commit is contained in:
Connor Tumbleson 2012-09-02 12:54:35 -05:00
parent 962dc63442
commit 5a056e3f9c

View File

@ -21,6 +21,7 @@ import java.io.File;
import java.io.IOException; import java.io.IOException;
import org.jf.baksmali.baksmali; import org.jf.baksmali.baksmali;
import org.jf.baksmali.main; import org.jf.baksmali.main;
import org.jf.dexlib.Code.Analysis.ClassPath;
import org.jf.dexlib.DexFile; import org.jf.dexlib.DexFile;
/** /**
@ -40,11 +41,14 @@ public class SmaliDecoder {
} }
private void decode() throws AndrolibException { private void decode() throws AndrolibException {
if (mDebug) {
ClassPath.dontLoadClassPath = true;
}
try { try {
baksmali.disassembleDexFile(mApkFile.getAbsolutePath(), baksmali.disassembleDexFile(mApkFile.getAbsolutePath(),
new DexFile(mApkFile), false, mOutDir.getAbsolutePath(), null, new DexFile(mApkFile), false, mOutDir.getAbsolutePath(), null,
null, null, false, true, true, true, false, false, null, null, false, true, true, true, false, false,
mDebug ? main.FULLMERGE : 0, false, mDebug ? true : false, null); mDebug ? main.DIFFPRE: 0, false, false, null);
} catch (IOException ex) { } catch (IOException ex) {
throw new AndrolibException(ex); throw new AndrolibException(ex);
} }