MuntashirAkon/AppManager · warning · ApkFile.ApkFileException
App not installed. It only has data.
Error message
App not installed. It only has data.
What it means
When loading details, the ViewModel fetches PackageInfo with MATCH_UNINSTALLED_PACKAGES so data-only remnants of uninstalled apps can still be seen. But if ApplicationInfoCompat.isInstalled() reports false, the entry is only leftover data (no APK) and detail views that require a real app cannot proceed, so ApkFileException('App not installed. It only has data.') is thrown. The outer catch resets mInstalledPackageInfo to null so the ViewModel falls back to external-APK mode.
Source
Thrown at app/src/main/java/io/github/muntashirakon/AppManager/details/AppDetailsViewModel.java:1118
private void setPackageInfo(boolean reload) {
// Package name cannot be null
if (mPackageName == null) return;
// Wait for component blocker to appear
synchronized (mBlockerLocker) {
waitForBlockerOrExit();
}
if (!reload && mPackageInfo != null) return;
try {
try {
mInstalledPackageInfo = PackageManagerCompat.getPackageInfo(mPackageName, PackageManager.GET_META_DATA
| PackageManager.GET_PERMISSIONS | PackageManager.GET_ACTIVITIES | MATCH_DISABLED_COMPONENTS
| PackageManager.GET_RECEIVERS | PackageManager.GET_PROVIDERS | MATCH_UNINSTALLED_PACKAGES
| PackageManager.GET_SERVICES | PackageManager.GET_CONFIGURATIONS | GET_SIGNING_CERTIFICATES
| PackageManager.GET_SHARED_LIBRARY_FILES | PackageManager.GET_URI_PERMISSION_PATTERNS
| PackageManagerCompat.MATCH_STATIC_SHARED_AND_SDK_LIBRARIES,
mUserId);
if (!ApplicationInfoCompat.isInstalled(mInstalledPackageInfo.applicationInfo)) {
throw new ApkFile.ApkFileException("App not installed. It only has data.");
}
} catch (Throwable e) {
Log.e(TAG, e);
mInstalledPackageInfo = null;
}
if (mExternalApk) {
// Do not get signatures via Android framework as it will simply return NULL without any clarifications.
// All signatures are fetched using PackageUtils where a fallback method is used in case the PackageInfo
// didn't load any signature. So, we should be safe from any harm.
mPackageInfo = mPackageManager.getPackageArchiveInfo(mApkPath, PackageManager.GET_PERMISSIONS
| PackageManager.GET_ACTIVITIES | PackageManager.GET_RECEIVERS | PackageManager.GET_PROVIDERS
| PackageManager.GET_SERVICES | MATCH_DISABLED_COMPONENTS | PackageManager.GET_CONFIGURATIONS
| PackageManager.GET_SHARED_LIBRARY_FILES | PackageManager.GET_URI_PERMISSION_PATTERNS
| PackageManager.GET_META_DATA);
if (mPackageInfo == null) {
throw new PackageManager.NameNotFoundException("Package cannot be parsed");
}
if (mInstalledPackageInfo == null) {View on GitHub (pinned to 0152f468fc)
Solutions
- Reinstall the app; the data will be re-attached and details will load
- If you only want data operations (backup/clear), use a code path that tolerates data-only packages instead of the APK-detail path
- Filter data-only packages out of any list feed that launches AppDetailsViewModel
- Check ApplicationInfoCompat.isInstalled() before constructing the ViewModel
Example fix
// before
viewModel.setPackage(dataOnlyPackageName); // ApkFileException
// after
PackageInfo pi = pm.getPackageInfo(pkg, MATCH_UNINSTALLED_PACKAGES | ...);
if (pi != null && ApplicationInfoCompat.isInstalled(pi.applicationInfo)) {
viewModel.setPackage(pkg);
} else {
showDataOnlyAppNotice();
} Defensive patterns
Strategy: validation
Validate before calling
PackageInfo pi = pm.getPackageInfo(pkg, PackageManager.MATCH_UNINSTALLED_PACKAGES); boolean usableForDetails = pi != null && ApplicationInfoCompat.isInstalled(pi.applicationInfo);
Type guard
boolean isDataOnly(PackageInfo pi) {
return pi != null && !ApplicationInfoCompat.isInstalled(pi.applicationInfo);
} Try / catch
try {
viewModel.setPackage(pkg);
} catch (ApkFile.ApkFileException e) {
showDataOnlyAppScreen(); // offer reinstall / data operations only
} Prevention
- Mark data-only entries in lists and route them to a data-only UI
- Prompt users to reinstall data-only apps instead of opening full details
- Check ApplicationInfoCompat.isInstalled before navigation
When it happens
Trigger: Opening App Details for a package that was uninstalled without deleting its data (or whose data remains) on the queried userId; the package resolves via MATCH_UNINSTALLED_PACKAGES but ApplicationInfo flags indicate it is not installed (e.g. only instant/archived/data remnants).
Common situations: User browses 'data-only' apps in App Manager and taps one expecting app info; a backup restore left data behind after uninstall; hidden/suspended apps misdetected as uninstalled.
Understand the failure class
Background: "Not found" and "does not exist" errors: why "Task not found", "No such folder", and "Can't find" fire when a lookup comes back empty — this error's family across 14 libraries.
Related errors
- Package not installed.
- Package not installed
- Package cannot be parsed.
- Package not found.
- Apparently the install wasn't complete in the previous secti
AI-assisted analysis of MuntashirAkon/AppManager@0152f468fc (2026-09-12).
Data as JSON: /api/errors/bc65c918994f4599.
Report an issue: GitHub.