MuntashirAkon/AppManager · error · BackupException
Could not verify data files at index " + i + ".\nFile: " +…
Error message
Could not verify data files at index " + i + ".\nFile: " + file.getName() + "\nFound: " + checksum + "\nRequired: " + mChecksum.get(file.getName())
What it means
A data file belonging to data directory index i fails checksum verification: the computed digest differs from the one recorded in the backup's checksum file. The backed-up app data archives are corrupt or altered, and App Manager refuses to verify/restore them.
Solutions
- Identify the corrupt file from 'File:' in the message and re-copy just that part from the original backup.
- Recreate the backup to regenerate data files plus checksums.
- Confirm the checksum file corresponds to the same backup (mismatched pairing yields false failures).
- Recompute the digest of an intentionally modified archive and update the checksum entry if you accept the change.
Example fix
// before // Could not verify data files at index 0. File: data0.tar.gz Found: ... Required: ... // after: re-copy data0.tar.gz from the intact backup or update its checksum entry // $ sha256sum data0.tar.gz
Defensive patterns
Strategy: validation
Validate before calling
// Digest-check data archives before library verify
for (int i = 0; i < metadata.dataDirs.length; i++) {
for (Path f : backupItem.getDataFiles(i)) {
if (!DigestUtils.getHexDigest(backupInfo.checksumAlgo, f).equals(checksums.get(f.getName()))) {
throw new IllegalStateException("data file corrupt: " + f.getName());
}
}
} Try / catch
try {
verifyOp.verify();
} catch (BackupException e) {
if (e.getMessage().startsWith("Could not verify data files at index")) {
// re-copy the named archive part or recreate the backup
}
} Prevention
- Use checksum-friendly, binary-safe transfer paths; SD card FAT corruption is a common culprit — prefer internal storage.
- Re-verify data archives after each move between devices or cloud round-trips.
- Keep data parts and the checksum file from the same backup run together.
- For very large app data, split verification so a single corrupt part is easy to localize.
When it happens
Trigger: verify() -> verifyData() loop; for any Path file in mBackupItem.getDataFiles(i), DigestUtils.getHexDigest(mBackupInfo.checksumAlgo, file) != mChecksum.get(file.getName()); also fires when the checksum file lacks an entry for that data file.
Common situations: Large split data archives truncated during copy to/from SD card or cloud; user edited/repacked the data archive; checksum file from a different backup run; SD card corruption affecting one archive part.
Understand the failure class
Background: Checksum mismatch errors: "checksum verification failed", "digest mismatch", "expected vs actual checksum" — what they mean and how to fix them — this error's family across 41 libraries.
Related errors
- Could not verify APK files.\nFile: " + file.getName() +…
- Could not verify KeyStore files.\nFile: " + file.getName()…
- Could not verify rules file.\nFile: " + rulesFile.getName()…
- Couldn't verify metadata file.
- Couldn't verify metadata file.\nFile: " + infoFile +…
AI-assisted analysis of MuntashirAkon/AppManager@0152f468fc (2026-09-12).
Data as JSON: /api/errors/50a98a31d425af55.
Report an issue: GitHub.
Appendix: source
Thrown at app/src/main/java/io/github/muntashirakon/AppManager/backup/VerifyOp.java:186
"\nFile: " + file.getName() +
"\nFound: " + checksum +
"\nRequired: " + mChecksum.get(file.getName()));
}
}
}
private void verifyData() throws BackupException {
Path[] dataFiles;
String checksum;
for (int i = 0; i < mBackupMetadata.dataDirs.length; ++i) {
dataFiles = mBackupItem.getDataFiles(i);
if (dataFiles.length == 0) {
throw new BackupException("No data files at index " + i + ".");
}
for (Path file : dataFiles) {
checksum = DigestUtils.getHexDigest(mBackupInfo.checksumAlgo, file);
if (!checksum.equals(mChecksum.get(file.getName()))) {
throw new BackupException("Could not verify data files at index " + i + "." +
"\nFile: " + file.getName() +
"\nFound: " + checksum +
"\nRequired: " + mChecksum.get(file.getName()));
}
}
}
}
private void verifyExtras() throws BackupException {
Path miscFile;
try {
miscFile = mBackupItem.getMiscFile();
} catch (IOException ignore) {
// There are no permissions, just skip
return;
}
String checksum = DigestUtils.getHexDigest(mBackupInfo.checksumAlgo, miscFile);
if (!checksum.equals(mChecksum.get(miscFile.getName()))) {View on GitHub (pinned to 0152f468fc)