MuntashirAkon/AppManager · error · FileNotFoundException
Class definition for + node.getFullPath() + is not found.
Error message
Class definition for + node.getFullPath() + is not found.
What it means
DexFileSystem.getInputStream reads a class from a mounted DEX file. If the Node's ClassDef object is null — the node does not correspond to a class definition present in the DEX — a FileNotFoundException naming the node's full path is thrown before any class content can be read.
Source
Thrown at app/src/main/java/io/github/muntashirakon/io/fs/DexFileSystem.java:271
boolean canAccess = true;
if ((access & OsConstants.R_OK) != 0) {
canAccess &= true;
}
if ((access & OsConstants.W_OK) != 0) {
canAccess &= false;
}
if ((access & OsConstants.X_OK) != 0) {
canAccess &= false;
}
return canAccess;
}
@NonNull
@Override
protected InputStream getInputStream(@NonNull Node<?> node) throws IOException {
ClassDef classDef = (ClassDef) node.getObject();
if (classDef == null) {
throw new FileNotFoundException("Class definition for " + node.getFullPath() + " is not found.");
}
try {
return new ByteArrayInputStream(getDexClasses().getClassContents(classDef).getBytes(StandardCharsets.UTF_8));
} catch (ClassNotFoundException e) {
throw new IOException(e);
}
}
@Override
protected void cacheFile(@NonNull Node<?> src, @NonNull File sink) throws IOException {
ClassDef classDef = (ClassDef) src.getObject();
if (classDef == null) {
throw new FileNotFoundException("Class definition for " + src.getFullPath() + " is not found.");
}
try (FileOutputStream os = new FileOutputStream(sink)) {
os.write(getDexClasses().getClassContents(classDef).getBytes(StandardCharsets.UTF_8));
} catch (ClassNotFoundException e) {
throw new IOException(e);View on GitHub (pinned to 0152f468fc)
Solutions
- Confirm the class exists in the DEX (list nodes under the DEX mount) and use the exact full path.
- Remount the DEX filesystem so fresh ClassDef objects are built for each node.
- Catch FileNotFoundException and handle 'class not present in this DEX' explicitly.
- Avoid opening streams on non-class nodes of the DEX mount.
Example fix
// before
InputStream in = node.openInputStream();
// after
if (node.getObject() == null) throw new FileNotFoundException("Not a class in this DEX: " + node.getFullPath());
InputStream in = node.openInputStream(); Defensive patterns
Strategy: validation
Validate before calling
if (node.getObject() == null) throw new FileNotFoundException("Not a class in this DEX: " + node.getFullPath()); Type guard
static boolean isClassNode(Node<?> n) { return n.getObject() instanceof ClassDef; } Try / catch
try (InputStream in = vfs.newInputStream(path)) {
// read
} catch (FileNotFoundException e) {
// class absent from this DEX: handle/skip
} Prevention
- Enumerate real class nodes instead of guessing paths.
- Remount after DEX updates so ClassDefs are fresh.
- Handle per-node failures gracefully in bulk class exports.
When it happens
Trigger: Opening an InputStream on a DEX-VFS node whose getObject() (ClassDef) is null: the class name/path is not in the DEX, the DEX was reloaded so the node is stale, or the node is a directory/metadata pseudo-entry.
Common situations: Requesting a class after the DEX was replaced (hot-patch/update) without remounting; probing paths like classes.dex/ tree entries that are not classes; typo in the fully-qualified class path.
Understand the failure class
Background: "File not found" and ENOENT errors: why libraries can't find a file that should exist — this error's family across 50 libraries.
Related errors
- Class definition for + src.getFullPath() + is not found.
- Cannot find
- Class definition for + src.getFullPath() + is not found.
- Error! %s could not be found or copied.\n
- Couldn't find any writable Obb dir
AI-assisted analysis of MuntashirAkon/AppManager@0152f468fc (2026-09-12).
Data as JSON: /api/errors/77003d854418532c.
Report an issue: GitHub.