{"record":{"id":"2a3a830f7a15653f","repo":"MuntashirAkon/AppManager","slug":"unsupported-compression-type-compressiontype","errorCode":null,"errorMessage":"Unsupported compression type: ${compressionType}","messagePattern":"Unsupported compression type: (.+?)","errorType":"exception","errorClass":"BackupException","httpStatus":null,"severity":"error","filePath":"app/src/main/java/io/github/muntashirakon/AppManager/backup/convert/TBConverter.java","lineNumber":395,"sourceCode":"            metadataV2.label = prop.getProperty(\"app_label\");\n            metadataV2.packageName = mPackageName;\n            metadataV2.versionName = prop.getProperty(\"app_version_name\");\n            metadataV2.versionCode = Integer.parseInt(prop.getProperty(\"app_version_code\"));\n            metadataV2.isSystem = \"1\".equals(prop.getProperty(\"app_is_system\"));\n            metadataV2.isSplitApk = false;\n            metadataV2.splitConfigs = ArrayUtils.emptyArray(String.class);\n            metadataV2.hasRules = false;\n            metadataV2.backupTime = mBackupTime;\n            metadataV2.crypto = CryptoUtils.MODE_NO_ENCRYPTION;  // We only support no encryption mode for TB backups\n            metadataV2.apkName = mPackageName + \"-\" + prop.getProperty(\"app_apk_md5\") + \".apk\";\n            metadataV2.userId = UserHandleHidden.myUserId();\n            // Compression type\n            String compressionType = prop.getProperty(\"app_apk_codec\");\n            if (\"GZIP\".equals(compressionType)) {\n                metadataV2.tarType = TAR_GZIP;\n            } else if (\"BZIP2\".equals(compressionType)) {\n                metadataV2.tarType = TAR_BZIP2;\n            } else throw new BackupException(\"Unsupported compression type: \" + compressionType);\n            // Flags\n            metadataV2.flags = new BackupFlags(BackupFlags.BACKUP_MULTIPLE);\n            try {\n                mFilesToBeDeleted.add(getDataFile(Paths.trimPathExtension(mPropFile.getName()), metadataV2.tarType));\n                // No error = data file exists\n                metadataV2.flags.addFlag(BackupFlags.BACKUP_INT_DATA);\n                if (\"1\".equals(prop.getProperty(\"has_external_data\"))) {\n                    metadataV2.flags.addFlag(BackupFlags.BACKUP_EXT_DATA);\n                }\n                metadataV2.flags.addFlag(BackupFlags.BACKUP_CACHE);\n            } catch (FileNotFoundException ignore) {\n            }\n            try {\n                mFilesToBeDeleted.add(getApkFile(metadataV2.apkName, metadataV2.tarType));\n                // No error = APK file exists\n                metadataV2.flags.addFlag(BackupFlags.BACKUP_APK_FILES);\n            } catch (FileNotFoundException ignore) {\n            }","sourceCodeStart":377,"sourceCodeEnd":413,"githubUrl":"https://github.com/MuntashirAkon/AppManager/blob/0152f468fc9463ee02dc2ca83f6fe4989a2c4ca5/app/src/main/java/io/github/muntashirakon/AppManager/backup/convert/TBConverter.java#L377-L413","documentation":"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.","triggerScenarios":"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).","commonSituations":"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.","solutions":["Set app_apk_codec=GZIP or BZIP2 in the prop file to match the actual archive encoding (recompress the tar if needed).","Re-create the backup in OAndBackup using GZIP compression.","Check the prop file was fully copied — a truncated file can drop the codec line.","If the codec is genuinely unsupported, convert the archive externally to gzip/bzip2 first."],"exampleFix":"# before (backup.properties)\napp_apk_codec=ZSTD\n# after\napp_apk_codec=GZIP  # after repacking the .tar with gzip","handlingStrategy":"validation","validationCode":"Properties prop = new Properties();\ntry (InputStream is = new FileInputStream(propFile)) { prop.load(is); }\nString codec = prop.getProperty(\"app_apk_codec\");\nif (!\"GZIP\".equals(codec) && !\"BZIP2\".equals(codec))\n    throw new IllegalStateException(\"Unsupported app_apk_codec: \" + codec);","typeGuard":null,"tryCatchPattern":"try {\n    converter.convert(backupDir);\n} catch (BackupException e) {\n    if (e.getMessage() != null && e.getMessage().startsWith(\"Unsupported compression type\")) {\n        // fix prop file / repack, then retry\n    } else throw e;\n}","preventionTips":["Validate every prop file's app_apk_codec in a pre-flight pass over bulk backup imports.","Ensure prop files are copied fully (verify sizes after MTP/adb pulls).","Standardize source backups on GZIP."],"tags":["android","backup","compression","prop-file"],"backgroundTag":"unsupported-enum-value","analyzedSha":"0152f468fc9463ee02dc2ca83f6fe4989a2c4ca5","analyzedAt":"2026-09-12T14:03:37.243Z","contentChangedAt":"2026-09-12T14:03:37.243Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}