MuntashirAkon/AppManager · error · ApkFile.ApkFileException
Package name not found.
Error message
Package name not found.
What it means
The bundle's base APK entry was found, but the package name could not be read from it (missing or unparseable manifest/metadata in the split), so ApkFile cannot identify what it is opening and aborts. Faulty input: a split archive whose base APK lacks a resolvable package name.
Solutions
- Use an intact base APK whose AndroidManifest can be parsed; rebuild the bundle if it was modified
- Verify the archive was not edited or re-zipped in a way that dropped manifest entries
- Reject the file at import time with a clear user-facing message
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at app/src/main/java/io/github/muntashirakon/AppManager/apk/ApkFile.java:356 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of MuntashirAkon/AppManager@0152f468fc (2026-09-12).
Data as JSON: /api/errors/8688f77b4cb730bc.
Report an issue: GitHub.
Appendix: source
Thrown at app/src/main/java/io/github/muntashirakon/AppManager/apk/ApkFile.java:356
mIdsigFile = mFileCache.getCachedFile(mZipFile.getInputStream(zipEntry), ".idsig");
} catch (IOException e) {
throw new ApkFileException(e);
}
}
}
if (mBaseEntry == null) throw new ApkFileException("No base apk found.");
// Sort the entries based on type and rank
Collections.sort(mEntries, (o1, o2) -> {
Integer int1 = o1.type;
int int2 = o2.type;
int typeCmp;
if ((typeCmp = int1.compareTo(int2)) != 0) return typeCmp;
int1 = o1.rank;
int2 = o2.rank;
return int1.compareTo(int2);
});
}
if (packageName == null) throw new ApkFileException("Package name not found.");
mPackageName = packageName;
}
private ApkFile(@NonNull ApplicationInfo info, int sparseArrayKey) throws ApkFileException {
mSparseArrayKey = sparseArrayKey;
mPackageName = info.packageName;
mCacheFilePath = new File(info.publicSourceDir);
File sourceDir = mCacheFilePath.getParentFile();
if (sourceDir == null || "/data/app".equals(sourceDir.getAbsolutePath())) {
// Old file structure (storing APK files at /data/app)
mEntries.add(mBaseEntry = new Entry(mCacheFilePath, getManifestFromApk(mCacheFilePath), null));
} else {
File[] apks = sourceDir.listFiles((dir, name) -> name.endsWith(".apk"));
if (apks == null) {
// Directory might be inaccessible
Log.w(TAG, "No apk files found in %s. Using default.", sourceDir);
List<File> allApks = new ArrayList<>();
allApks.add(mCacheFilePath);View on GitHub (pinned to 0152f468fc)