contrib: check for unsigned apk in release.sh
What changed, and why it matters
This is a small build-script fix for Electrum's release process. It changes how the release script handles Android APK files when a non-release-manager runs it. Previously, the script would always rebuild an unsigned APK even if one already existed, which could waste time or cause confusion. Now it checks whether an unsigned APK already exists and, if so, skips the rebuild and just renames it. There is no direct security vulnerability in the changed code itself.
No security action required. Treat as a normal build-script improvement. Reviewers may optionally verify that the rename path does not accidentally overwrite an existing signed APK, though the diff does not introduce that behavior.
Security signals we found
No cryptographic or authentication logic changed
No input validation or parsing changes
No network, wallet, or key-handling code affected
Build/release tooling only
No mention of vulnerability, CVE, security bug, or researcher attribution in commit
Evidence from the diff
The patch modifies contrib/release.sh. In the branch for non-release-manager builds, instead of unconditionally invoking ./contrib/android/build.sh qml $arch release-unsigned, it first tests whether dist/$apk_unsigned already exists. If the file exists, it logs that it was found and skips the build; otherwise it builds as before. In both cases it then renames dist/$apk_unsigned to dist/$apk. This prevents redundant rebuilds when an unsigned APK was produced separately. The change does not alter signing logic, cryptographic checks, or any user-facing runtime behavior.
Changed components
contrib/release.shInspect captured patch +6 / −1
diff --git a/contrib/release.sh b/contrib/release.sh
index 1119f78..6d6bcc2 100755
--- a/contrib/release.sh
+++ b/contrib/release.sh
@@ -164,7 +164,12 @@ do
if [ ! -z "$RELEASEMANAGER" ] ; then
./contrib/android/build.sh qml $arch release $password
else
- ./contrib/android/build.sh qml $arch release-unsigned
+ if test -f "dist/$apk_unsigned"; then
+ # has already been built separately before
+ info "found unsigned: $apk_unsigned"
+ else
+ ./contrib/android/build.sh qml $arch release-unsigned
+ fi
mv "dist/$apk_unsigned" "dist/$apk"
fi
fi
Why this scored 18/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.