MuntashirAkon/AppManager · error · BackupException

Mode ${mBackupInfo.crypto} is currently unavailable.

Error message

Mode ${mBackupInfo.crypto} is currently unavailable.

What it means

After loading backup info, VerifyOp checks CryptoUtils.isAvailable(mBackupInfo.crypto). If the crypto mode recorded in the backup (e.g. PGP, RSA, AES) is not currently usable on this device, cleanup() runs and this BackupException is thrown before any decryption is attempted.

Source

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

    private final BackupMetadataV5.Metadata mBackupMetadata;
    @NonNull
    private final BackupItems.BackupItem mBackupItem;
    @NonNull
    private final BackupItems.Checksum mChecksum;

    VerifyOp(@NonNull BackupItems.BackupItem backupItem) throws BackupException {
        mBackupItem = backupItem;
        try {
            mBackupInfo = mBackupItem.getInfo();
            mBackupFlags = mBackupInfo.flags;
        } catch (IOException e) {
            mBackupItem.cleanup();
            throw new BackupException("Could not read backup info. Possibly due to a malformed json file.", e);
        }
        // Setup crypto
        if (!CryptoUtils.isAvailable(mBackupInfo.crypto)) {
            mBackupItem.cleanup();
            throw new BackupException("Mode " + mBackupInfo.crypto + " is currently unavailable.");
        }
        try {
            mBackupItem.setCrypto(mBackupInfo.getCrypto());
        } catch (CryptoException e) {
            mBackupItem.cleanup();
            throw new BackupException("Could not get crypto " + mBackupInfo.crypto, e);
        }
        try {
            mBackupMetadata = mBackupItem.getMetadata(mBackupInfo).metadata;
        } catch (IOException e) {
            mBackupItem.cleanup();
            throw new BackupException("Could not read backup metadata. Possibly due to a malformed json file.", e);
        }
        // Get checksums
        try {
            mChecksum = mBackupItem.getChecksum();
        } catch (Throwable e) {
            mBackupItem.cleanup();

View on GitHub (pinned to 0152f468fc)

Solutions

  1. Install/enable the missing crypto provider (e.g. OpenPGP app) on the device.
  2. Restore the keystore keys or provide the same key used at backup time.
  3. Create a new unencrypted (MODE_NO_ENCRYPTION) backup and verify/restore that instead.
  4. Update AppManager to a version that supports the crypto mode recorded in backup.json.

Example fix

// before: backup created with PGP on device without OpenPGP
// backup.json: "crypto": "PGP"
// after: either install OpenPGP, or re-backup unencrypted
// backup.json: "crypto": "NONE"
Defensive patterns

Strategy: validation

Validate before calling

// Parse crypto from backup.json and check availability first
JSONObject info = new JSONObject(readFile(new File(backupDir, "backup.json")));
String crypto = info.optString("crypto", "NONE");
if (!CryptoUtils.isAvailable(crypto)) {
    // install provider (OpenPGP) or choose an unencrypted backup
}

Try / catch

try {
    new VerifyOp(backupItem).verify();
} catch (BackupException e) {
    if (e.getMessage().endsWith("is currently unavailable.")) {
        // surface a dialog telling the user to enable the crypto mode
    }
}

Prevention

When it happens

Trigger: Verifying/restoring a backup created with a crypto mode unavailable in the current environment: OpenPGP not installed, RSA/AES keys missing from keystore, or the crypto constant from a newer backup not supported by the installed AppManager version.

Common situations: Moving a backup to a new device without OpenPGP or without the keystore keys, downgraded AppManager that lacks the crypto mode, or a backup.json edited to a crypto name that doesn't resolve.

Related errors


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