MuntashirAkon/AppManager · error · BackupException
Could not get internal data backup.
Error message
Could not get internal data backup.
What it means
backupData() collects the internal data archive (<packageName>.zip, crypto-named) from the backup location when the destination metadata's flags request internal data backup. If findFile() cannot locate it, the FileNotFoundException is wrapped into this BackupException. It means internal-data backup was requested but the source zip is missing.
Source
Thrown at app/src/main/java/io/github/muntashirakon/AppManager/backup/convert/OABConverter.java:304
// Overwrite with the new files
try {
sourceFiles = mBackupItem.encrypt(sourceFiles);
} catch (IOException e) {
throw new BackupException("Failed to encrypt " + Arrays.toString(sourceFiles), e);
}
for (Path file : sourceFiles) {
mChecksum.add(file.getName(), DigestUtils.getHexDigest(mDestMetadata.info.checksumAlgo, file));
}
}
private void backupData() throws BackupException {
List<Path> dataFiles = new ArrayList<>(2);
if (mDestMetadata.info.flags.backupInternalData()) {
try {
dataFiles.add(mBackupLocation.findFile(CryptoUtils.getAppropriateFilename(mPackageName + ".zip",
mSourceCryptoMode)));
} catch (FileNotFoundException e) {
throw new BackupException("Could not get internal data backup.", e);
}
}
if (mDestMetadata.info.flags.backupExternalData()) {
try {
dataFiles.add(mBackupLocation.findFile(EXTERNAL_FILES).findFile(CryptoUtils.getAppropriateFilename(
mPackageName + ".zip", mSourceCryptoMode)));
} catch (FileNotFoundException e) {
throw new BackupException("Could not get external data backup.", e);
}
}
String tarType = mDestMetadata.info.tarType;
int i = 0;
Path[] files;
for (Path dataFile : dataFiles) {
files = new Path[]{dataFile};
// Decrypt APK file if needed
try {
files = ConvertUtils.decryptSourceFiles(files, mSourceCrypto, mSourceCryptoMode, mBackupItem);View on GitHub (pinned to 0152f468fc)
Solutions
- Copy the <packageName>.zip internal-data archive into the backup root (with the correct crypto-transformed name if encrypted).
- Re-create the OAndBackup backup including internal data before converting.
- If the source has no internal data, adjust the converted backup's flags so backupInternalData() is false (e.g. external-data-only conversion).
- Verify mSourceCryptoMode and mPackageName match the on-disk zip name.
Example fix
// before: flags request internal data but backup dir has only the external zip // after: place the internal zip in the backup root // backup/com.example.app.zip <- internal data // backup/external_files/com.example.app.zip // or clear the internal-data flag before conversion
Defensive patterns
Strategy: validation
Validate before calling
String internalZip = CryptoUtils.getAppropriateFilename(packageName + ".zip", sourceCryptoMode);
if (destFlags.backupInternalData() && !backupLocation.hasFile(internalZip)) {
throw new IllegalStateException("Internal data zip missing: " + internalZip);
} Try / catch
try {
converter.convert(...);
} catch (BackupException e) {
if (e.getMessage().contains("internal data backup")) {
Log.e(TAG, "Internal <pkg>.zip not found; adjust flags or restore file", e.getCause());
}
} Prevention
- Only request internal-data backup when the source zip is present.
- Keep package name and crypto mode consistent with the on-disk zip name.
- Don't delete .zip archives from source backups before conversion.
When it happens
Trigger: backupData() (called from convert()) executes mBackupLocation.findFile(CryptoUtils.getAppropriateFilename(mPackageName + ".zip", mSourceCryptoMode)) and throws FileNotFoundException at OABConverter.java:304, while mDestMetadata.info.flags.backupInternalData() is true.
Common situations: Source backup contained only external data (or only the APK), so no internal-data zip exists; the zip was deleted; wrong mSourceCryptoMode yields a wrong expected filename; the package name used for lookup differs from the zip's actual prefix.
Understand the failure class
Background: "File not found" and ENOENT errors: why libraries can't find a file that should exist — this error's family across 50 libraries.
Related errors
- Destination doesn't contain any data files.
- Could not get backup files.
- not found at
- Could not get metadata file.
- Destination doesn't contain any APK files.
AI-assisted analysis of MuntashirAkon/AppManager@0152f468fc (2026-09-12).
Data as JSON: /api/errors/6d3cc080f0dc1ed9.
Report an issue: GitHub.