{
"$type": "site.standard.document",
"bskyPostRef": {
"cid": "bafyreicytj5pvkfizrcpwi6ety7oznswfwdtnft4l42ekc5etyjhnikx4e",
"uri": "at://did:plc:34cg4tn4iwemk3v5k3n3adwf/app.bsky.feed.post/3mnpbgg34ib42"
},
"path": "/t/troubleshooting-a-failing-build-apk-signature-scheme-v2-signer-1-apk-integrity-check-failed-chunked-sha256-digest-mismatch/34422#post_3",
"publishedAt": "2026-06-07T11:04:05.000Z",
"site": "https://forum.f-droid.org",
"textContent": "I did as instructed, but also noticed that when I had first built the APK from the terminal I forgot to run `zipalign` before signing it, which might have also been causing some problems.\n\nThat said, the build is still failing, but now at the v3 signer. I noticed the following outputs in the log file:\n\n> `Verified using v1 scheme (JAR signing): true`\n>\n> `Verified using v2 scheme (APK Signature Scheme v2): true`\n>\n> `Verified using v3 scheme (APK Signature Scheme v3): true`\n>\n> `Verified using v3.1 scheme (APK Signature Scheme v3.1): false`\n>\n> `Verified using v4 scheme (APK Signature Scheme v4): false`\n>\n> `Verified for SourceStamp: false`\n\nThere are a number of warnings about various `META-INF/*` files not being protected by the signature and then the following error messages:\n\n> `DOES NOT VERIFY`\n>\n> `ERROR: APK Signature Scheme v3 signer #1: APK integrity check failed. CHUNKED_SHA256 digest mismatch. Expected: <1d39e4329acbd85e8f3030434ec87de3fd5ae06fa531afb522794e6f2295ad65>, actual: <7a5f9891f1ba5ecde290acc468e7147a2cf1a5ef3a65b5788d25dc9d09c32590>`\n>\n> `2026-06-07 10:48:20,719 ERROR:`\n>\n> `/tmp/tmpmkqg7yjj/sigcp_com.algol.obliquestrategies_1.apk:`\n>\n> `2026-06-07 10:48:20,719 INFO: ...NOT verified - /tmp/tmpmkqg7yjj/sigcp_com.algol.obliquestrategies_1.apk`\n>\n> `2026-06-07 10:48:21,022 DEBUG: > diff -r /tmp/tmpmkqg7yjj/tmp_binaries_com.algol.obliquestrategies_1.binary /tmp/tmpmkqg7yjj/_tmp_tmpmkqg7yjj_sigcp_com.algol.obliquestrategies_1`\n>\n> `2026-06-07 10:48:21,224 WARNING: Keeping failed build \"tmp/com.algol.obliquestrategies_1.apk\"`\n>\n> `2026-06-07 10:48:21,225 DEBUG: removing tmp/binaries/com.algol.obliquestrategies_1.binary.apk`\n>\n> `2026-06-07 10:48:21,280 ERROR: Could not build app com.algol.obliquestrategies: compared built binary to supplied reference binary but failed`\n>\n> `==== detail begin ====`\n>\n> `verification of APK with copied signature failed`\n>\n> `Comparing reference APK to APK with copied signature...`\n>\n> `Unexpected diff output:`\n>\n> `Binary files /tmp/tmpmkqg7yjj/tmp_binaries_com.algol.obliquestrategies_1.binary/content/assets/dexopt/baseline.prof and /tmp/tmpmkqg7yjj/_tmp_tmpmkqg7yjj_sigcp_com.algol.obliquestrategies_1/content/assets/dexopt/baseline.prof differ`\n>\n> `Binary files /tmp/tmpmkqg7yjj/tmp_binaries_com.algol.obliquestrategies_1.binary/content/classes.dex and /tmp/tmpmkqg7yjj/_tmp_tmpmkqg7yjj_sigcp_com.algol.obliquestrategies_1/content/classes.dex differ`\n>\n> `==== detail end ====`\n\nAny ideas as to what might be happening?\n\nThank you",
"title": "Troubleshooting a failing build (APK Signature Scheme v2 signer #1: APK integrity check failed. CHUNKED_SHA256 digest mismatch)"
}