MuntashirAkon/AppManager · error · BackupException
Cannot convert special backup " + mPackageName
Error message
Cannot convert special backup " + mPackageName
What it means
OABConverter refuses to convert OAndBackup entries whose package name is in the SPECIAL_BACKUPS set (App Manager's own metadata/special packages). Converting them would produce invalid App Manager backups, so convert() throws BackupException up front.
Solutions
- Skip packages in SPECIAL_BACKUPS instead of converting them
- Filter the list of OAB backup directories before instantiating OABConverter
- If the package is genuinely needed, create a fresh App Manager backup rather than converting
Example fix
// before
new OABConverter(userId, packageName).convert();
// after
if (!SPECIAL_BACKUPS.contains(packageName)) {
new OABConverter(userId, packageName).convert();
} Defensive patterns
Strategy: validation
Validate before calling
if (SPECIAL_BACKUPS.contains(packageName)) {
Log.i(TAG, "Skipping special backup: " + packageName);
return;
} Try / catch
try {
converter.convert();
} catch (BackupException e) {
if (e.getMessage() != null && e.getMessage().startsWith("Cannot convert special backup")) {
// skip package, continue batch
}
} Prevention
- Filter out special packages before batch conversion
- Maintain awareness of SPECIAL_BACKUPS contents when selecting sources
- Prefer fresh App Manager backups for those packages
When it happens
Trigger: Calling OABConverter.convert() with mPackageName set to a package listed in SPECIAL_BACKUPS (e.g. the converter tool's own special backup entries).
Common situations: Batch-converting an entire OAndBackup directory that includes special/system entries the user never installed manually; scripting conversion over all folders without filtering.
Understand the failure class
Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.
Related errors
- Android System (android) cannot be backed up.
- Could not finalise backup.
- Could not get backup files.
- Empty JSON string.
- Failed to get crypto " + mDestMetadata.info.crypto
AI-assisted analysis of MuntashirAkon/AppManager@0152f468fc (2026-09-12).
Data as JSON: /api/errors/f6a544b8f92e9b66.
Report an issue: GitHub.
Appendix: source
Thrown at app/src/main/java/io/github/muntashirakon/AppManager/backup/convert/OABConverter.java:109
private String mSourceCryptoMode;
private Crypto mSourceCrypto;
private BackupMetadataV5 mDestMetadata;
private BackupItems.BackupItem mBackupItem;
/**
* @param backupLocation E.g. {@code /sdcard/oandbackups/package.name}
*/
public OABConverter(@NonNull Path backupLocation) {
mBackupLocation = backupLocation;
// Last path component is the package name
mPackageName = backupLocation.getName();
mUserId = UserHandleHidden.myUserId();
}
@Override
public void convert() throws BackupException {
if (SPECIAL_BACKUPS.contains(mPackageName)) {
throw new BackupException("Cannot convert special backup " + mPackageName);
}
// Source metadata
mSourceMetadata = readLogFile();
// Simulate a backup creation
try {
mBackupItem = BackupItems.createBackupItemGracefully(mUserId, "OAndBackup", mPackageName);
} catch (IOException e) {
throw new BackupException("Could not get backup files.", e);
}
boolean backupSuccess = false;
try {
try {
// Destination metadata
mDestMetadata = ConvertUtils.getV5Metadata(mSourceMetadata, mBackupItem);
} catch (CryptoException e) {
throw new BackupException("Failed to get crypto " + mDestMetadata.info.crypto, e);
}
try {View on GitHub (pinned to 0152f468fc)