skylot/jadx · error · IOException

No data, can't skip {} bytes

Error message

No data, can't skip {} bytes

What it means

ParserStream.skip attempts to skip a number of bytes in the underlying stream. If repeated input.skip() calls return 0 (indicating no more bytes can be skipped, typically EOF) before the requested count is reached, an IOException is thrown. This guards against silently advancing past valid data when the stream is exhausted.

Source

Thrown at jadx-core/src/main/java/jadx/core/xmlgen/ParserStream.java:98

		int pos = input.read(arr, 0, count);
		while (pos < count) {
			int read = input.read(arr, pos, count - pos);
			if (read == -1) {
				throw new IOException("No data, can't read " + count + " bytes");
			}
			pos += read;
		}
		return arr;
	}

	@Override
	public long skip(long count) throws IOException {
		readPos += count;
		long pos = input.skip(count);
		while (pos < count) {
			long skipped = input.skip(count - pos);
			if (skipped == 0) {
				throw new IOException("No data, can't skip " + count + " bytes");
			}
			pos += skipped;
		}
		return pos;
	}

	public void checkInt8(int expected, String error) throws IOException {
		int v = readInt8();
		if (v != expected) {
			throwException(error, expected, v);
		}
	}

	public void checkInt16(int expected, String error) throws IOException {
		int v = readInt16();
		if (v != expected) {
			throwException(error, expected, v);
		}

View on GitHub (pinned to e738a26571)

Solutions

  1. Confirm the APK/resource file is not truncated or partially written
  2. Test the same file with a recent jadx release
  3. Report the file to jadx maintainers if it decompiles in Android Asset Packaging Tool but not jadx
  4. Avoid passing custom InputStream wrappers that do not implement skip correctly — pass the raw file stream

Example fix

// Ensure the raw file stream is used, not a wrapper that breaks skip():
try (InputStream raw = Files.newInputStream(apkEntryPath)) {
    parser.decode(raw);
}
Defensive patterns

Strategy: try-catch

Validate before calling

// Verify the stream supports skip before parsing:
if (!inputStream.markSupported()) {
    LOG.warn("Stream may not support skip reliably");
}

Try / catch

try {
    parser.decode(stream);
} catch (IOException e) {
    LOG.warn("Resource skip failed, falling back to no-res mode", e);
    jadxArgs.setSkipResources(true);
}

Prevention

When it happens

Trigger: Invoked by skipToPos and checkInt8-style flows while navigating Android binary chunks. skip(count) is called to align the read position to a declared offset; if the stream reports 0 bytes skipped (usually EOF or unsupported skip on a custom InputStream), the exception is raised.

Common situations: Truncated resources.arsc where offsets point past end of file. A wrapped InputStream whose skip() always returns 0 for some implementations (e.g., certain FilterInputStream subclasses). Malformed chunk sizes from obfuscation or packing tools.

Related errors


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