skylot/jadx · warning · IOException

Encountered unsupported chunk type RES_TABLE_TYPE_OVERLAY_PO

Error message

Encountered unsupported chunk type RES_TABLE_TYPE_OVERLAY_POLICY at offset 0x%x 

What it means

ResTableBinaryParser encounters a RES_TABLE_TYPE_OVERLAY_POLICY chunk (type 0x0205) in an Android resource table. This chunk type is recognized but not yet implemented by jadx, so parsing is aborted with an IOException rather than silently skipping it.

Source

Thrown at jadx-core/src/main/java/jadx/core/xmlgen/ResTableBinaryParser.java:197

			LOG.trace("res package chunk start at {} type {}", chunkStart, type);
			switch (type) {
				case RES_NULL_TYPE:
					LOG.info("Null chunk type encountered at offset {}", chunkStart);
					break;
				case RES_TABLE_TYPE_TYPE: // 0x0201
					parseTypeChunk(chunkStart, pkg);
					break;
				case RES_TABLE_TYPE_SPEC_TYPE: // 0x0202
					parseTypeSpecChunk(chunkStart);
					break;
				case RES_TABLE_TYPE_LIBRARY: // 0x0203
					parseLibraryTypeChunk(chunkStart);
					break;
				case RES_TABLE_TYPE_OVERLAY: // 0x0204
					parseOverlayTypeChunk(chunkStart);
					break;
				case RES_TABLE_TYPE_OVERLAY_POLICY: // 0x0205
					throw new IOException(
							String.format("Encountered unsupported chunk type RES_TABLE_TYPE_OVERLAY_POLICY at offset 0x%x ", chunkStart));
				case RES_TABLE_TYPE_STAGED_ALIAS: // 0x0206
					parseStagedAliasChunk(chunkStart);
					break;
				default:
					LOG.warn("Unknown chunk type {} encountered at offset {}", type, chunkStart);
			}
		}
	}

	@SuppressWarnings("unused")
	private void parseTypeSpecChunk(long chunkStart) throws IOException {
		is.checkInt16(0x0010, "Unexpected type spec header size");
		int chunkSize = is.readInt32();
		long expectedEndPos = chunkStart + chunkSize;

		int id = is.readInt8();
		is.skip(3);

View on GitHub (pinned to e738a26571)

Solutions

  1. Upgrade jadx to the latest version — overlay policy support may have been added
  2. Run jadx --no-res to skip resource decoding and still get decompiled code
  3. Pre-process the APK with aapt2 to strip or rebuild resources.arsc
  4. Report the APK to jadx maintainers so the chunk type can be implemented

Example fix

// CLI workaround to skip resources:
//   jadx --no-res app.apk
// Programmatic:
jadxArgs.setSkipResources(true);
JadxDecompiler dc = new JadxDecompiler(jadxArgs);
dc.load();
Defensive patterns

Strategy: fallback

Validate before calling

// Check jadx version supports overlay policy before parsing
if (Jadx.getVersion().compareTo("1.4.7") < 0) {
    LOG.warn("This jadx version may not support RES_TABLE_TYPE_OVERLAY_POLICY");
}

Try / catch

try {
    resTableParser.decode(stream);
} catch (IOException e) {
    if (e.getMessage().contains("OVERLAY_POLICY")) {
        LOG.info("Overlay policy unsupported, retrying with --no-res");
        jadxArgs.setSkipResources(true);
        // retry decompilation
    }
}

Prevention

When it happens

Trigger: While iterating package sub-chunks, the switch in parsePackageChunk hits case RES_TABLE_TYPE_OVERLAY_POLICY (0x0205). Instead of parsing or skipping, jadx throws immediately. This chunk appears in APKs built with newer Android SDKs that use runtime resource overlays with policy declarations.

Common situations: APKs targeting Android 14+ (API 34+) that include resource overlay policy metadata. System apps or OEM apps using runtime resource overlays (RROs). Testing jadx against modern framework resources.

Related errors


AI-assisted analysis of skylot/jadx@e738a26571 (2026-08-14). Data as JSON: /api/errors/c6654858ae50e5ec. Report an issue: GitHub.