MuntashirAkon/AppManager · error · java.lang.UnsupportedOperationException
does not exists!
Error message
${executablePath} does not exists! What it means
getServerRunnerCommand builds the command line to launch the AM server based on the mode of operation; it requires a specific executable file (root su binary, adb executable, or applet) to exist on disk. If the resolved executable's path does not exist, an UnsupportedOperationException naming the missing path is thrown.
Solutions
- Call ServerConfig.init(...) first so binaries are extracted to their expected paths
- Check new File(executable.getPath()).exists() for the mode-specific binary before building the command
- Switch the mode of operation (Ops.setMode) to one whose executable exists, e.g. ADB mode on non-rooted devices
- Verify the su binary exists (which su / LibUtils/BusyBox check) before selecting root mode
Example fix
// before
String[] cmd = ServerConfig.getServerRunnerCommand(...);
// after
if (!new File(ServerConfig.getExecutablePath(mode)).exists()) {
ServerConfig.init(context, false); // extract binaries first
}
String[] cmd = ServerConfig.getServerRunnerCommand(...); Defensive patterns
Strategy: validation
Validate before calling
File exe = new File(executablePath);
if (!exe.exists() || !exe.canExecute()) {
// extract assets via ServerConfig.init or switch mode
} Try / catch
try {
String[] cmd = ServerConfig.getServerRunnerCommand(...);
} catch (UnsupportedOperationException e) {
// e.getMessage() names the missing executable; re-extract or change mode
ServerConfig.init(context, true);
} Prevention
- Always call ServerConfig.init before building server commands
- Match the mode of operation to actual device capabilities (rooted vs not)
- Check executable existence with File.exists() at startup
- Log the absolute path from the exception message when diagnosing
When it happens
Trigger: Requesting a server runner command while the expected executable — e.g. the 'su' binary for root mode, the copied applet jar, or the adb executable — is absent from its resolved absolute path.
Common situations: Running on a non-rooted device while root mode is selected, Magisk/su not installed, the app's binary assets not yet extracted (init not called), or an architecture without a bundled applet.
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
- already exists.
- Cannot find
- Class definition for + node.getFullPath() + is not found.
- Class definition for + src.getFullPath() + is not found.
- Class definition for + src.getFullPath() + is not found.
AI-assisted analysis of MuntashirAkon/AppManager@0152f468fc (2026-09-12).
Data as JSON: /api/errors/0070a3f08ad0702d.
Report an issue: GitHub.
Appendix: source
Thrown at app/src/main/java/io/github/muntashirakon/AppManager/servermanager/ServerConfig.java:109
String token = getLocalToken();
String amJarName = Constants.JAR_NAME;
String mainJarName = Constants.MAIN_JAR_NAME;
String appId = BuildConfig.APPLICATION_ID;
int currentUserId = UserHandleHidden.myUserId();
int debug = BuildConfig.DEBUG ? 1 : 0;
return String.format(Locale.ROOT, "%s %d %s %s %s %s %d %d",
executable.getAbsolutePath(),
port,
token,
amJarName,
mainJarName,
appId,
currentUserId,
debug
);
}
throw new UnsupportedOperationException(executable.getAbsolutePath() + " does not exists!");
}
/**
* Get existing or generate new 16-digit token for client session
*
* @return Existing or new token
*/
@AnyThread
@NonNull
public static String getLocalToken() {
String token = sPreferences.getString(LOCAL_TOKEN, null);
if (TextUtils.isEmpty(token)) {
token = generateToken();
sPreferences.edit().putString(LOCAL_TOKEN, token).apply();
}
return token;
}
View on GitHub (pinned to 0152f468fc)