mirror of
https://github.com/revanced/smali.git
synced 2025-05-24 18:42:06 +02:00
Fix up the deodex warning
This commit is contained in:
parent
175480d4d0
commit
f66362d073
@ -95,4 +95,8 @@ public class DeodexCommand extends DisassembleCommand {
|
|||||||
@Override protected boolean needsClassPath() {
|
@Override protected boolean needsClassPath() {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override protected boolean showDeodexWarning() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -43,6 +43,8 @@ import org.jf.dexlib2.dexbacked.DexBackedDexFile;
|
|||||||
import org.jf.dexlib2.dexbacked.DexBackedOdexFile;
|
import org.jf.dexlib2.dexbacked.DexBackedOdexFile;
|
||||||
import org.jf.dexlib2.iface.DexFile;
|
import org.jf.dexlib2.iface.DexFile;
|
||||||
import org.jf.dexlib2.util.SyntheticAccessorResolver;
|
import org.jf.dexlib2.util.SyntheticAccessorResolver;
|
||||||
|
import org.jf.util.ConsoleUtil;
|
||||||
|
import org.jf.util.StringWrapper;
|
||||||
import org.jf.util.jcommander.CommaColonParameterSplitter;
|
import org.jf.util.jcommander.CommaColonParameterSplitter;
|
||||||
|
|
||||||
import javax.annotation.Nonnull;
|
import javax.annotation.Nonnull;
|
||||||
@ -181,10 +183,11 @@ public class DisassembleCommand extends DexInputCommand {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dexFile.hasOdexOpcodes()) {
|
if (showDeodexWarning() && dexFile.hasOdexOpcodes()) {
|
||||||
System.err.println("Warning: You are disassembling an odex file without deodexing it. You");
|
System.err.println(StringWrapper.wrapStringOnBreaks(
|
||||||
System.err.println("won't be able to re-assemble the results unless you deodex it with the -x");
|
"Warning: You are disassembling an odex/oat file without deodexing it. " +
|
||||||
System.err.println("option");
|
"You won't be able to re-assemble the results unless you deodex it. See " +
|
||||||
|
"\"baksmali help deodex\"", ConsoleUtil.getConsoleWidth()));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (needsClassPath() && bootClassPath.isEmpty()) {
|
if (needsClassPath() && bootClassPath.isEmpty()) {
|
||||||
@ -217,6 +220,10 @@ public class DisassembleCommand extends DexInputCommand {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected boolean showDeodexWarning() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
protected BaksmaliOptions getOptions(DexFile dexFile) {
|
protected BaksmaliOptions getOptions(DexFile dexFile) {
|
||||||
final BaksmaliOptions options = new BaksmaliOptions();
|
final BaksmaliOptions options = new BaksmaliOptions();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user