{"record":{"id":"216cd6c9ae9a880e","repo":"skylot/jadx","slug":"expected-0x-08x-got-0x-08x","errorCode":null,"errorMessage":"Expected: 0x%08x, got: 0x%08x","messagePattern":"Expected: 0x%08x, got: 0x%08x","errorType":"exception","errorClass":"IOException","httpStatus":null,"severity":"error","filePath":"jadx-core/src/main/java/jadx/core/utils/android/ExtDataInput.java","lineNumber":51,"sourceCode":"\t\tsuper(delegate);\n\t}\n\n\tpublic int[] readIntArray(int length) throws IOException {\n\t\tint[] array = new int[length];\n\t\tfor (int i = 0; i < length; i++) {\n\t\t\tarray[i] = readInt();\n\t\t}\n\t\treturn array;\n\t}\n\n\tpublic void skipInt() throws IOException {\n\t\tskipBytes(4);\n\t}\n\n\tpublic void skipCheckInt(int expected) throws IOException {\n\t\tint got = readInt();\n\t\tif (got != expected) {\n\t\t\tthrow new IOException(String.format(\"Expected: 0x%08x, got: 0x%08x\", expected, got));\n\t\t}\n\t}\n\n\tpublic void skipCheckShort(short expected) throws IOException {\n\t\tshort got = readShort();\n\t\tif (got != expected) {\n\t\t\tthrow new IOException(String.format(\"Expected: 0x%08x, got: 0x%08x\", expected, got));\n\t\t}\n\t}\n\n\tpublic void skipCheckByte(byte expected) throws IOException {\n\t\tbyte got = readByte();\n\t\tif (got != expected) {\n\t\t\tthrow new IOException(String.format(\"Expected: 0x%08x, got: 0x%08x\", expected, got));\n\t\t}\n\t}\n\n\tpublic void skipCheckChunkTypeInt(int expected, int possible) throws IOException {","sourceCodeStart":33,"sourceCodeEnd":69,"githubUrl":"https://github.com/skylot/jadx/blob/e738a26571d02919f01df40de93bc9a44dee4e18/jadx-core/src/main/java/jadx/core/utils/android/ExtDataInput.java#L33-L69","documentation":"ExtDataInput.skipCheckInt(expected) reads a 4-byte int and throws IOException if it differs from the expected constant. ExtDataInput is the little/big-endian reader used to parse Android binary resources (AXML and resources.arsc). These checks validate chunk type/header magic words; a mismatch means the binary stream did not contain the expected structure at the current offset - i.e. the binary XML/resource table is malformed, truncated, or produced by a non-standard packager/obfuscator.","triggerScenarios":"skipCheckInt(EXPECTED_TYPE) where the next 4 bytes do not equal EXPECTED_TYPE during AXML/resources.arsc chunk traversal.","commonSituations":"Decoding a binary AndroidManifest.xml or resources.arsc from an obfuscated/packed APK that reshuffles chunk headers; truncated resource blob; endianness mismatch; APK produced by an exotic packager.","solutions":["Upgrade jadx (binary-XML chunk handling is revised often).","Re-obtain the APK from a trusted source if it may be corrupt/truncated.","Skip the offending resource and continue decompiling code.","Inspect the expected vs got hex in the message to identify which chunk type was expected."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n    di.skipCheckInt(EXPECTED_TYPE);\n} catch (IOException e) {\n    LOG.warn(\"Binary XML chunk mismatch (expected 0x%08x): {}\", EXPECTED_TYPE, e.getMessage());\n    // skip this resource/chunk and continue\n}","preventionTips":["Upgrade jadx frequently; binary-XML parsing is under active development.","Treat chunk-type mismatches as corrupt/non-standard input, not user error.","Skip the offending resource and continue decompiling code.","Log expected vs got hex to file actionable upstream bug reports."],"tags":["jadx","android","binary-xml","resources","parsing"],"backgroundTag":null,"analyzedSha":"e738a26571d02919f01df40de93bc9a44dee4e18","analyzedAt":"2026-08-14T00:10:24.238Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}