MuntashirAkon/AppManager · error · BackupException
Could not read the prop file
Error message
Could not read the prop file
What it means
readPropFile() opens the prop file via mPropFile.openInputStream() and reads its properties; any IOException during reading or parsing is rethrown as BackupException("Could not read the prop file", e). It signals the backup's metadata file is unreadable, so conversion cannot discover app name, version, flags, or codec.
Source
Thrown at app/src/main/java/io/github/muntashirakon/AppManager/backup/convert/TBConverter.java:425
}
try {
mFilesToBeDeleted.add(getApkFile(metadataV2.apkName, metadataV2.tarType));
// No error = APK file exists
metadataV2.flags.addFlag(BackupFlags.BACKUP_APK_FILES);
} catch (FileNotFoundException ignore) {
}
metadataV2.dataDirs = ConvertUtils.getDataDirs(mPackageName, mUserId, metadataV2.flags
.backupInternalData(), metadataV2.flags.backupExternalData(), false);
metadataV2.keyStore = false;
metadataV2.installer = Prefs.Installer.getInstallerPackageName();
String base64Icon = prop.getProperty("app_gui_icon");
if (base64Icon != null) {
byte[] decodedBytes = Base64.decode(base64Icon, 0);
mIcon = BitmapFactory.decodeByteArray(decodedBytes, 0, decodedBytes.length);
}
return metadataV2;
} catch (IOException e) {
throw new BackupException("Could not read the prop file", e);
}
}
@NonNull
private Path getDataFile(String filePrefix, @TarUtils.TarType String tarType) throws FileNotFoundException {
String filename = filePrefix + ".tar";
if (TAR_BZIP2.equals(tarType)) filename += ".bz2";
else if (TAR_ZSTD.equals(tarType)) filename += ".zst";
else filename += ".gz";
return mBackupLocation.findFile(filename);
}
@NonNull
private Path getApkFile(String apkName, @TarUtils.TarType String tarType) throws FileNotFoundException {
if (TAR_BZIP2.equals(tarType)) apkName += ".bz2";
else if (TAR_ZSTD.equals(tarType)) apkName += ".zst";
else apkName += ".gz";
return mBackupLocation.findFile(apkName);View on GitHub (pinned to 0152f468fc)
Solutions
- Confirm the .prop file exists next to the tar data file and the path passed to TBConverter points to it.
- Check file permissions and storage state (mounted, readable) for the backup directory.
- Re-copy the backup set completely (prop + tar + icons) from the source device.
- Inspect e.getCause() to distinguish missing-file from mid-read I/O errors.
Example fix
// before
converter.convert(new File("/backup/app"));
// after
File prop = new File("/backup/app", "app.prop");
if (!prop.canRead()) {
throw new IllegalStateException("Prop file missing/unreadable: " + prop);
}
converter.convert(new File("/backup/app")); Defensive patterns
Strategy: validation
Validate before calling
File prop = new File(backupDir, backupDir.getName() + ".prop");
if (!prop.isFile() || !prop.canRead())
throw new IllegalStateException("Prop file missing or unreadable: " + prop); Try / catch
try {
converter.convert(backupDir);
} catch (BackupException e) {
if (e.getMessage() != null && e.getMessage().contains("Could not read the prop file")) {
Log.e(TAG, "Unreadable prop", e.getCause()); // check permissions/media state
} else throw e;
} Prevention
- Check external storage is mounted and readable before batch conversions.
- Copy backups with adb pull or tar rather than MTP to avoid silent metadata loss.
- Fix file ownership/permissions after restoring backups between devices.
When it happens
Trigger: Calling convert() on a backup where the .prop file cannot be opened or read: missing file, permission denied, I/O error on the storage device, or a stream failure mid-read (e.g. after icon Base64 decoding).
Common situations: Pointing the converter at a directory without its prop file; SD card unmounted or corrupted; files copied over MTP losing metadata; restrictive file permissions after restore from another device.
Understand the failure class
Background: "failed to read file", EACCES, ENOENT and "could not read <path>" errors: when a program can't read a file from disk — this error's family across 49 libraries.
Related errors
- Unsupported compression type: ${compressionType}
- Couldn't delete old file <inputFile>
- Could not delete <mBackupPath>
- Could not move <mTempBackupPath> to <mBackupPath>
- Android System (android) cannot be backed up.
AI-assisted analysis of MuntashirAkon/AppManager@0152f468fc (2026-09-12).
Data as JSON: /api/errors/27507097521cddd3.
Report an issue: GitHub.