skylot/jadx · error · JadxRuntimeException

Unexpected input file:

Error message

Unexpected input file: 

What it means

Thrown by ClsSet.getClspClassSource when an input class's source file identifier maps to ClspClassSource.APP, meaning the class's input file name does not match any known framework JAR (android.jar, android.car.jar, org.apache.http.legacy.jar). This check ensures only framework/system classes are included when building the classpath (.jcst) export, not application classes.

Source

Thrown at jadx-core/src/main/java/jadx/core/clsp/ClsSet.java:127

		k = 0;
		for (ClassNode cls : list) {
			ClspClass nClass = getCls(cls, names);
			if (nClass == null) {
				throw new JadxRuntimeException("Missing class: " + cls);
			}
			nClass.setParents(makeParentsArray(cls));
			classes[k] = nClass;
			k++;
		}
	}

	private static ClspClassSource getClspClassSource(ClassNode cls) {
		String inputFileName = cls.getClsData().getInputFileName();
		int idx = inputFileName.indexOf(':');
		String sourceFile = inputFileName.substring(0, idx);
		ClspClassSource source = ClspClassSource.getClspClassSource(sourceFile);
		if (source == ClspClassSource.APP) {
			throw new JadxRuntimeException("Unexpected input file: " + inputFileName);
		}
		return source;
	}

	private List<ClspMethod> getMethodsDetails(ClassNode cls) {
		List<MethodNode> methodsList = cls.getMethods();
		List<ClspMethod> methods = new ArrayList<>(methodsList.size());
		for (MethodNode mth : methodsList) {
			processMethodDetails(mth, methods);
		}
		return methods;
	}

	private void processMethodDetails(MethodNode mth, List<ClspMethod> methods) {
		AccessInfo accessFlags = mth.getAccessFlags();
		if (accessFlags.isPrivate() || accessFlags.isSynthetic() || accessFlags.isBridge()) {
			return;
		}

View on GitHub (pinned to e738a26571)

Solutions

  1. Ensure ClsSet.loadFrom is only called with framework/system classes from recognized JAR sources, not application classes.
  2. If building a custom classpath from a new Android system JAR, add its name to the ClspClassSource enum and rebuild jadx-core.
  3. Verify the input file naming convention: the class data's getInputFileName() must be 'jarName:offset' where jarName matches a ClspClassSource entry.
  4. Filter the root's class list to only framework-sourced classes before calling loadFrom.
Defensive patterns

Strategy: validation

Validate before calling

// Filter the root's class list to only framework-sourced classes
List<ClassNode> allClasses = root.getClasses(true);
Set<String> knownJars = Set.of("android.jar", "android.car.jar", "org.apache.http.legacy.jar");
List<ClassNode> frameworkOnly = allClasses.stream()
    .filter(cls -> {
        String inputFile = cls.getClsData().getInputFileName();
        String sourceFile = inputFile.substring(0, inputFile.indexOf(':'));
        return knownJars.contains(sourceFile);
    })
    .collect(Collectors.toList());

Type guard

static boolean isFrameworkSourced(ClassNode cls) {
    String inputFile = cls.getClsData().getInputFileName();
    int idx = inputFile.indexOf(':');
    if (idx < 0) return false;
    String sourceFile = inputFile.substring(0, idx);
    return sourceFile.equals("android.jar")
        || sourceFile.equals("android.car.jar")
        || sourceFile.equals("org.apache.http.legacy.jar");
}

Prevention

When it happens

Trigger: Calling ClsSet.loadFrom(root) (which calls getClspClassSource for each class) where a class's input file name lacks a ':' delimiter or the prefix before ':' does not match a recognized framework jar name. The method splits the input file name at the first ':' and passes the source portion to ClspClassSource.getClspClassSource, which returns APP for anything unrecognized.

Common situations: Attempting to build a classpath export from an APK that contains application classes (which should not be in the framework classpath). Using a custom input format where the input file name convention (source:offset) is not followed. Mismatched JAR name for a framework library that jadx does not recognize (e.g., a newer Android system library not yet in the enum).

Related errors


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