MuntashirAkon/AppManager · error · BackupException

Unsupported compression type: ${compressionType}

Error message

Unsupported compression type: ${compressionType}

What it means

readPropFile() parses the app_apk_codec property of an OAndBackup prop file into a tar type; only GZIP and BZIP2 are accepted. Any other value (missing, empty, or an unsupported codec) throws BackupException("Unsupported compression type: ..."). This rejects prop files describing archives App Manager's TB format cannot handle.

Source

Thrown at app/src/main/java/io/github/muntashirakon/AppManager/backup/convert/TBConverter.java:395

            metadataV2.label = prop.getProperty("app_label");
            metadataV2.packageName = mPackageName;
            metadataV2.versionName = prop.getProperty("app_version_name");
            metadataV2.versionCode = Integer.parseInt(prop.getProperty("app_version_code"));
            metadataV2.isSystem = "1".equals(prop.getProperty("app_is_system"));
            metadataV2.isSplitApk = false;
            metadataV2.splitConfigs = ArrayUtils.emptyArray(String.class);
            metadataV2.hasRules = false;
            metadataV2.backupTime = mBackupTime;
            metadataV2.crypto = CryptoUtils.MODE_NO_ENCRYPTION;  // We only support no encryption mode for TB backups
            metadataV2.apkName = mPackageName + "-" + prop.getProperty("app_apk_md5") + ".apk";
            metadataV2.userId = UserHandleHidden.myUserId();
            // Compression type
            String compressionType = prop.getProperty("app_apk_codec");
            if ("GZIP".equals(compressionType)) {
                metadataV2.tarType = TAR_GZIP;
            } else if ("BZIP2".equals(compressionType)) {
                metadataV2.tarType = TAR_BZIP2;
            } else throw new BackupException("Unsupported compression type: " + compressionType);
            // Flags
            metadataV2.flags = new BackupFlags(BackupFlags.BACKUP_MULTIPLE);
            try {
                mFilesToBeDeleted.add(getDataFile(Paths.trimPathExtension(mPropFile.getName()), metadataV2.tarType));
                // No error = data file exists
                metadataV2.flags.addFlag(BackupFlags.BACKUP_INT_DATA);
                if ("1".equals(prop.getProperty("has_external_data"))) {
                    metadataV2.flags.addFlag(BackupFlags.BACKUP_EXT_DATA);
                }
                metadataV2.flags.addFlag(BackupFlags.BACKUP_CACHE);
            } catch (FileNotFoundException ignore) {
            }
            try {
                mFilesToBeDeleted.add(getApkFile(metadataV2.apkName, metadataV2.tarType));
                // No error = APK file exists
                metadataV2.flags.addFlag(BackupFlags.BACKUP_APK_FILES);
            } catch (FileNotFoundException ignore) {
            }

View on GitHub (pinned to 0152f468fc)

Solutions

  1. Set app_apk_codec=GZIP or BZIP2 in the prop file to match the actual archive encoding (recompress the tar if needed).
  2. Re-create the backup in OAndBackup using GZIP compression.
  3. Check the prop file was fully copied — a truncated file can drop the codec line.
  4. If the codec is genuinely unsupported, convert the archive externally to gzip/bzip2 first.

Example fix

# before (backup.properties)
app_apk_codec=ZSTD
# after
app_apk_codec=GZIP  # after repacking the .tar with gzip
Defensive patterns

Strategy: validation

Validate before calling

Properties prop = new Properties();
try (InputStream is = new FileInputStream(propFile)) { prop.load(is); }
String codec = prop.getProperty("app_apk_codec");
if (!"GZIP".equals(codec) && !"BZIP2".equals(codec))
    throw new IllegalStateException("Unsupported app_apk_codec: " + codec);

Try / catch

try {
    converter.convert(backupDir);
} catch (BackupException e) {
    if (e.getMessage() != null && e.getMessage().startsWith("Unsupported compression type")) {
        // fix prop file / repack, then retry
    } else throw e;
}

Prevention

When it happens

Trigger: Converting a backup whose prop file has app_apk_codec set to something other than GZIP or BZIP2 (e.g. NONE, ZSTD, LZ4, or an empty/missing value).

Common situations: OAndBackup configured with a different compression codec; very old or very new OAndBackup versions with additional codecs; hand-edited or truncated prop files losing the codec line.

Related errors


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