MuntashirAkon/AppManager · error · BackupException
APK files backup is requested but no APK files have been bac
Error message
APK files backup is requested but no APK files have been backed up.
What it means
backupApkFile() archives the (decrypted) base APK into the new App Manager backup using TarUtils.create() with a regex filter accepting only *.apk files. If the tar creation throws for any reason (no matching files, I/O error, filter mismatch), it is wrapped into this BackupException: the APK backup was requested (flag set earlier) but no APK entries made it into the backup archive.
Source
Thrown at app/src/main/java/io/github/muntashirakon/AppManager/backup/convert/OABConverter.java:284
}
Path baseApkFile = baseApkFiles[0];
// Get certificate checksums
try {
String[] checksums = ConvertUtils.getChecksumsFromApk(baseApkFile, mDestMetadata.info.checksumAlgo);
for (int i = 0; i < checksums.length; ++i) {
mChecksum.add(CERT_PREFIX + i, checksums[i]);
}
} catch (Exception ignore) {
}
// Backup APK file
String sourceBackupFilePrefix = BackupUtils.getSourceFilePrefix(getExt(mDestMetadata.info.tarType));
Path[] sourceFiles;
try {
sourceFiles = TarUtils.create(mDestMetadata.info.tarType, baseApkFile, mBackupItem.getUnencryptedBackupPath(), sourceBackupFilePrefix,
/* language=regexp */ new String[]{".*\\.apk"}, null, null, false)
.toArray(new Path[0]);
} catch (Throwable th) {
throw new BackupException("APK files backup is requested but no APK files have been backed up.", th);
}
// 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)));View on GitHub (pinned to 0152f468fc)
Solutions
- Verify baseApkFile is a valid, readable APK (it should be openable as a zip containing classes.dex).
- Check the destination backup path exists and is writable, and that storage isn't full.
- Confirm the tarType set in mDestMetadata.info.tarType is supported on this device.
- Retry the conversion after freeing space or fixing permissions; inspect the wrapped Throwable (getCause()) for the root I/O error.
Example fix
// before: baseApkFile is a corrupted download that isn't a zip
// after: validate before converting
// if (!ApkUtils.isApk(baseApkFile)) throw new IOException("not a valid APK");
// then run convert(...) Defensive patterns
Strategy: try-catch
Validate before calling
// Pre-check destination writability and free space
if (!Files.isWritable(unencryptedBackupDir)
|| unencryptedBackupDir.getUsableSpace() < apkSize * 2) {
throw new IOException("Backup destination not writable or too small");
} Try / catch
try {
converter.convert(...);
} catch (BackupException e) {
if (e.getMessage().contains("no APK files have been backed up")) {
Log.e(TAG, "Tar creation failed; cause:", e.getCause());
}
} Prevention
- Validate the decrypted file is a real APK (zip) before archiving.
- Ensure the destination backup path exists, is writable, and has enough free space.
- Use a supported tarType in the destination metadata.
When it happens
Trigger: In backupApkFile(), TarUtils.create(tarType, baseApkFile, unencryptedBackupPath, sourceBackupFilePrefix, new String[]{".*\\.apk"}, null, null, false) throws Throwable at OABConverter.java:284 — commonly because the decrypted source contained no files matching .*\.apk or the tar stream failed.
Common situations: The decrypted "APK" is actually not a valid APK/zip so no entries match the .apk filter; the destination backup path is unwritable or full; tarType unsupported; baseApkFile path points at a file deleted mid-run.
Understand the failure class
Background: "failed to write file", "Could not save figure", "Error saving remote file" — file write failed: causes and fixes across languages and libraries — this error's family across 38 libraries.
Related errors
- APK files backup is requested but no source directory has be
- not found at
- Failed to encrypt
- Failed to backup data directory at
- APK restore is requested but backup doesn't contain any sour
AI-assisted analysis of MuntashirAkon/AppManager@0152f468fc (2026-09-12).
Data as JSON: /api/errors/03e1b8f5a449b573.
Report an issue: GitHub.