pxb1988/dex2jar · error · RuntimeException
not support .class value yet!
Error message
not support .class value yet!
What it means
The string-decryption scanner evaluates constant-producing instructions to recover encrypted-string arguments. LDC pushing a Type constant (.class literal) is not a supported constant value, so it throws this RuntimeException.
Solutions
- Exclude methods with .class LDC instructions from the -m config and target the core decryptor directly
- Patch DecryptStringCmd to return the Type constant (e.g. return ldc.cst or a placeholder) instead of throwing
- Use a newer dex2jar build if available; this limitation has been addressed in some forks
Example fix
// before
if (ldc.cst instanceof Type) { throw new RuntimeException("not support .class value yet!"); }
// after
if (ldc.cst instanceof Type) { return ((Type) ldc.cst).getClassName(); } Defensive patterns
Strategy: try-catch
Validate before calling
// Pre-scan target methods for Type LDC instructions
boolean hasClassLdc = method.instructions.stream()
.anyMatch(insn -> insn instanceof LdcInsnNode && ((LdcInsnNode) insn).cst instanceof Type); Try / catch
try { runDecryptScan(config); } catch (RuntimeException e) { if ("not support .class value yet!".equals(e.getMessage())) { skipMethodAndLog(); } else throw e; } Prevention
- Target the core string-decryptor method directly, avoiding helpers with .class literals
- Filter candidate methods for Type LDCs before scanning
- Fork/patch the scanner to treat Type constants as opaque values
When it happens
Trigger: The candidate decryptor method chain contains an LDC instruction loading a Class constant (e.g. `Foo.class`) inside the scanned method, hitting the `ldc.cst instanceof Type` check.
Common situations: Analyzing obfuscated code where the decryptor helper references .class literals for lookups, or modern bytecode patterns the tool predates.
Understand the failure class
Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.
Related errors
- not support yet
- while accept code in method
- zero-width instruction op=0x%02x
- jump out of insns -> %04x
- bad payload for
AI-assisted analysis of pxb1988/dex2jar@b5bda4fb49 (2026-09-08).
Data as JSON: /api/errors/869c96422bc9be18.
Report an issue: GitHub.
Appendix: source
Thrown at dex-tools/src/main/java/com/googlecode/dex2jar/tools/DecryptStringCmd.java:951
Method m = findAnyMethodMatch(itf, name, classes);
if (m != null) {
return m;
}
}
}
return null;
}
Object readCst(AbstractInsnNode q) {
switch (q.getOpcode()) {
case Opcodes.LDC:
// LDC: String, integer, long and double cases (Opcodes.LDC comprehends LDC_W and LDC2_W)
// push 32bit or 64bit int/float
// push string/type
LdcInsnNode ldc = (LdcInsnNode) q;
if (ldc.cst instanceof Type) {
throw new RuntimeException("not support .class value yet!");
}
return ldc.cst;
case Opcodes.BIPUSH:
case Opcodes.SIPUSH:
// INT_INSN ("instruction with a single int operand")
// push 8bit or 16bit int
IntInsnNode in = (IntInsnNode) q;
return in.operand;
case Opcodes.ICONST_M1:
case Opcodes.ICONST_0:
case Opcodes.ICONST_1:
case Opcodes.ICONST_2:
case Opcodes.ICONST_3:
case Opcodes.ICONST_4:
case Opcodes.ICONST_5:
// ICONST_*: push a tiny int, -1 <= value <= 5View on GitHub (pinned to b5bda4fb49)