skylot/jadx · error · RuntimeException

Entry is encrypted, failed to decompress: {}

Error message

Entry is encrypted, failed to decompress: {}

What it means

Thrown when decompression of a single entry fails AND the entry's general-purpose bit flag has bit 0 set (the standard zip encryption flag). jadx cannot decrypt password-protected or encrypted entries, so rather than silently producing garbage it aborts with a RuntimeException naming the entry and chaining the original DataFormatException/IOException. The encryption check (flags & 1) is done inside entryParseFailed, so this fires only after a real decompression attempt has already failed.

Source

Thrown at jadx-commons/jadx-zip/src/main/java/jadx/zip/parser/JadxZipParser.java:355

		// treat any other compression methods values as UNCOMPRESSED
		return bufferToBytes(getBuffer(), entry.getDataStart(), (int) entry.getUncompressedSize());
	}

	private static void verifyEntry(JadxZipEntry entry) {
		int compressMethod = entry.getCompressMethod();
		if (compressMethod == 0) {
			if (entry.getCompressedSize() != entry.getUncompressedSize()) {
				LOG.warn("Not equal sizes for STORE method: compressed: {}, uncompressed: {}, entry: {}",
						entry.getCompressedSize(), entry.getUncompressedSize(), entry);
			}
		} else if (compressMethod != 8) {
			LOG.warn("Unknown compress method: {} in entry: {}", compressMethod, entry);
		}
	}

	private void entryParseFailed(JadxZipEntry entry, Exception e) {
		if (isEncrypted(entry)) {
			throw new RuntimeException("Entry is encrypted, failed to decompress: " + entry, e);
		}
		if (flags.contains(ZipReaderFlags.DONT_USE_FALLBACK)) {
			throw new RuntimeException("Failed to decompress zip entry: " + entry + ", error: " + e.getMessage(), e);
		}
		LOG.warn("Entry '{}' parse failed, switching to fallback parser", entry, e);
	}

	@SuppressWarnings("resource")
	private IZipEntry useFallbackParser(JadxZipEntry entry) {
		LOG.debug("useFallbackParser used for {}", entry);
		IZipEntry zipEntry = initFallbackParser().searchEntry(entry.getName());
		if (zipEntry == null) {
			throw new RuntimeException("Fallback parser can't find entry: " + entry);
		}
		return zipEntry;
	}

	@SuppressWarnings("resource")

View on GitHub (pinned to e738a26571)

Solutions

  1. Supply an unencrypted copy of the archive; jadx has no facility to decrypt entries.
  2. If you know the password, decrypt the archive externally (e.g., unzip with the password) before feeding it to jadx.
  3. Skip encrypted entries programmatically by reading the entry's flags before decompression.
  4. Verify the archive is not corrupted, since corruption can also cause the underlying decompression failure that reaches this branch.

Example fix

// before
byte[] data = (byte[]) jadxZipEntry.getData();

// after
if ((entryFlags & 1) != 0) {
    LOG.warn("Entry {} is encrypted and will be skipped", entry.getName());
    continue;
}
byte[] data = (byte[]) jadxZipEntry.getData();
Defensive patterns

Strategy: validation

Validate before calling

// Read the entry's general-purpose bit flag; bit 0 = encrypted.
int gpFlags = entry.getGeneralPurposeBitFlag(); // or read from header
if ((gpFlags & 0x1) != 0) {
    LOG.warn("Entry {} is encrypted and cannot be decompressed, skipping", entry.getName());
    return;
}

Try / catch

try {
    data = decompress(entry);
} catch (RuntimeException e) {
    if (e.getMessage() != null && e.getMessage().contains("encrypted")) {
        LOG.warn("Encrypted entry {} skipped", entry.getName());
        continue;
    }
    throw e;
}

Prevention

When it happens

Trigger: Calling the entry-decompression path in JadxZipParser for an entry whose bit-0 encryption flag is set, where Inflater (or the raw copy) then fails. The flag is read from the entry's general purpose bit flag field.

Common situations: Decompiling a password-protected APK/JAR; an APK signed/packed with a tool that sets encryption flags; an AAB or split APK whose vendor applied entry-level encryption; an obfuscator that flips the encryption bit.

Related errors


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