MuntashirAkon/AppManager · error · BackupException

Could not verify extras.\nFile: " + miscFile.getName() + "\n

Error message

Could not verify extras.\nFile: " + miscFile.getName() + "\nFound: " + checksum + "\nRequired: " + mChecksum.get(miscFile.getName())

What it means

verifyExtras() checks the 'misc' file that stores app permissions (and other extras) when mBackupFlags.backupExtras() is set. Its computed digest doesn't match the recorded checksum, meaning the permissions/extras file was modified or corrupted after the backup was made. Missing extras are tolerated (IOException -> return) but an existing file with a wrong checksum is not.

Source

Thrown at app/src/main/java/io/github/muntashirakon/AppManager/backup/VerifyOp.java:205

                            "\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()))) {
            throw new BackupException("Could not verify extras." +
                    "\nFile: " + miscFile.getName() +
                    "\nFound: " + checksum +
                    "\nRequired: " + mChecksum.get(miscFile.getName()));
        }
    }

    private void verifyRules() throws BackupException {
        Path rulesFile;
        try {
            rulesFile = mBackupItem.getRulesFile();
        } catch (IOException e) {
            if (mBackupMetadata.hasRules) {
                throw new BackupException("Rules file is missing.", e);
            } else {
                // There are no rules, just skip
                return;
            }
        }

View on GitHub (pinned to 0152f468fc)

Solutions

  1. Restore the original misc file from the source backup.
  2. If the edit was intentional, recompute its digest with the recorded algo and update the checksum file entry.
  3. Recreate the backup with extras included.
  4. Disable the extras flag on restore if permission data isn't needed, so verifyExtras() is skipped.

Example fix

// before
//   Could not verify extras. File: misc.xml Found: ... Required: ...
// after: recompute and update the checksum entry after intentional edit
// $ sha256sum misc.xml
Defensive patterns

Strategy: validation

Validate before calling

// Check extras file digest before verify (when extras flag set)
if (flags.backupExtras()) {
    Path misc = backupItem.getMiscFile(); // handle IOException as 'no extras'
    if (!DigestUtils.getHexDigest(backupInfo.checksumAlgo, misc).equals(checksums.get(misc.getName()))) {
        throw new IllegalStateException("extras/permissions file modified: " + misc.getName());
    }
}

Try / catch

try {
    verifyOp.verify();
} catch (BackupException e) {
    if (e.getMessage().startsWith("Could not verify extras")) {
        // restore original misc file or update its checksum entry after intentional edit
    }
}

Prevention

When it happens

Trigger: verify() -> verifyExtras() when mBackupFlags.backupExtras() is true and mBackupItem.getMiscFile() succeeds; DigestUtils.getHexDigest(...) != mChecksum.get(miscFile.getName()) — including a missing checksum entry (null required).

Common situations: User hand-edited the misc/permissions file (e.g. to pre-grant or strip permissions) without updating checksums; file corrupted in transfer; checksum file paired with a different backup; checksumAlgo recorded differs from the one used.

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


AI-assisted analysis of MuntashirAkon/AppManager@0152f468fc (2026-09-12). Data as JSON: /api/errors/60cd3d6bcd0e4a54. Report an issue: GitHub.