{"record":{"id":"a2146053dc27b404","repo":"MuntashirAkon/AppManager","slug":"could-not-get-checksums","errorCode":null,"errorMessage":"Could not get checksums.","messagePattern":"Could not get checksums\\.","errorType":"exception","errorClass":"BackupException","httpStatus":null,"severity":"error","filePath":"app/src/main/java/io/github/muntashirakon/AppManager/backup/VerifyOp.java","lineNumber":63,"sourceCode":"        }\n        try {\n            mBackupItem.setCrypto(mBackupInfo.getCrypto());\n        } catch (CryptoException e) {\n            mBackupItem.cleanup();\n            throw new BackupException(\"Could not get crypto \" + mBackupInfo.crypto, e);\n        }\n        try {\n            mBackupMetadata = mBackupItem.getMetadata(mBackupInfo).metadata;\n        } catch (IOException e) {\n            mBackupItem.cleanup();\n            throw new BackupException(\"Could not read backup metadata. Possibly due to a malformed json file.\", e);\n        }\n        // Get checksums\n        try {\n            mChecksum = mBackupItem.getChecksum();\n        } catch (Throwable e) {\n            mBackupItem.cleanup();\n            throw new BackupException(\"Could not get checksums.\", e);\n        }\n        // Verify metadata\n        try {\n            verifyMetadata();\n        } catch (BackupException e) {\n            mBackupItem.cleanup();\n            throw e;\n        }\n    }\n\n    @Override\n    public void close() {\n        Log.d(TAG, \"Close called\");\n        mChecksum.close();\n        mBackupItem.cleanup();\n    }\n\n    void verify() throws BackupException {","sourceCodeStart":45,"sourceCodeEnd":81,"githubUrl":"https://github.com/MuntashirAkon/AppManager/blob/0152f468fc9463ee02dc2ca83f6fe4989a2c4ca5/app/src/main/java/io/github/muntashirakon/AppManager/backup/VerifyOp.java#L45-L81","documentation":"VerifyOp reads the checksum map via mBackupItem.getChecksum() inside a catch (Throwable). Any failure — IO error, parse failure of the checksum file, or even runtime errors — is converted into this BackupException after cleanup(). It means the list of expected per-file checksums could not be loaded, so integrity verification cannot proceed.","triggerScenarios":"verify() on a backup whose checksum file is missing, empty, unreadable, or whose content doesn't parse into the expected filename→checksum map.","commonSituations":"Backups copied selectively (checksum file skipped), corrupted storage, or backups produced by newer AppManager versions writing a checksum format the current reader cannot parse.","solutions":["Re-copy the entire backup directory, ensuring the checksum file is included.","Recreate the backup so checksums are regenerated alongside the files.","Check the backup is not from an incompatible AppManager version; upgrade the app if needed.","Verify read permissions on all files in the backup directory."],"exampleFix":"// before: partial copy omits checksums\nbackup/  # backup.json, metadata only\n// after: copy everything\nbackup/  # backup.json, metadata, checksums, data files","handlingStrategy":"validation","validationCode":"// Confirm the checksum file exists and parses before verify\nFile c = new File(backupDir, \"checksums.json\"); // name per AppManager layout\nif (!c.isFile() || c.length() == 0) throw new IllegalStateException(\"checksum file missing\");\nnew JSONObject(new String(IOUtils.readFully(new FileInputStream(c))));","typeGuard":null,"tryCatchPattern":"try {\n    new VerifyOp(backupItem).verify();\n} catch (BackupException e) {\n    if (\"Could not get checksums.\".equals(e.getMessage())) {\n        // re-copy full backup directory including checksum data\n    }\n}","preventionTips":["Copy backups as complete directories (zip/tar) rather than selecting files.","Verify file counts after transfer against the source directory.","Recreate old backups whose checksum format may no longer be readable."],"tags":["checksum","backup-verify","missing-file","integrity"],"backgroundTag":"checksum-mismatch","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"}