pxb1988/dex2jar · error · RuntimeException
not support
Error message
not support
What it means
DvmFrame.execute interprets Dalvik opcodes on a virtual frame. When it meets an opcode it has no case for in its switch, it throws RuntimeException('not support ' + op). It means the interpreter model in this analysis API does not implement that Dalvik instruction.
Solutions
- Upgrade dex2jar to a version whose DvmFrame covers the opcode
- Add a case in DvmFrame.execute implementing the missing opcode (often a no-op setTmp for analysis purposes)
- Restrict analysis to methods/DEX with a supported minSdk version
- Catch RuntimeException around execute to skip unsupported instructions
Example fix
// before
default:
throw new RuntimeException("not support " + insn.op);
// after
default:
LOG.warn("unhandled opcode in DvmFrame: " + insn.op);
setTmp(null);
break; Defensive patterns
Strategy: try-catch
Validate before calling
// pre-scan method instructions for opcodes known to be unsupported Set<String> unsupported = scanForOpcodesOutsideDvmFrameSwitch(method);
Try / catch
try {
frame.execute(insn);
} catch (RuntimeException e) {
if (e.getMessage() == null || !e.getMessage().startsWith("not support ")) throw e;
LOG.warn("skipping unsupported opcode " + e.getMessage().substring(12));
} Prevention
- Pin dex2jar to a version supporting the target DEX opcode set (API 26+ opcodes need newer builds)
- Pre-scan the DEX for high opcodes (invoke-custom, invoke-polymorphic) before VM analysis
- Keep the DvmFrame opcode table in sync with DexFileReader's opcode set
When it happens
Trigger: Executing a DexOpcode in DvmFrame.execute whose opcode is not one of the handled cases (e.g. newer/unusual instructions like invoke-custom/range variants, packed opcodes) reaching the default branch.
Common situations: Analyzing DEX built with newer Android toolchains (API level 26+ opcodes) against an older dex2jar version; running VM-level analysis over obfuscated code containing odd opcodes.
Related errors
AI-assisted analysis of pxb1988/dex2jar@b5bda4fb49 (2026-09-08).
Data as JSON: /api/errors/82708d39ea5305bb.
Report an issue: GitHub.
Appendix: source
Thrown at dex-reader-api/src/main/java/com/googlecode/d2j/node/analysis/DvmFrame.java:383
case SHR_INT_LIT8:
case USHR_INT_LIT8:
Stmt2R1NNode stmt2R1NNode = (Stmt2R1NNode) insn;
setReg(stmt2R1NNode.distReg, interpreter.unaryOperation(insn, getReg(stmt2R1NNode.srcReg)));
setTmp(null);
break;
case FILL_ARRAY_DATA:
interpreter.unaryOperation(insn,getReg(((FillArrayDataStmtNode)insn).ra));
setTmp(null);
break;
case GOTO:
case GOTO_16:
case GOTO_32:
case RETURN_VOID:
case BAD_OP:
setTmp(null);
break;
default:
throw new RuntimeException("not support " + insn.op);
}
}
public V getTmp() {
return tmp;
}
public void setTmp(V v) {
this.tmp = v;
}
public V getReg(int b) {
if (b > values.length || b < 0) {
return null;
}
return values[b];
}
View on GitHub (pinned to b5bda4fb49)