android build: fix prev: chown fresh_clone base dir before git clone
What changed, and why it matters
This is a build script fix for Electrum's Android build process. It changes how a temporary directory is cleaned up before a fresh git clone. The change adds a `chown` command so the build user can remove files owned by root, preventing build failures. There is no indication this is a security vulnerability fix.
No security action required. Treat as a normal build reliability fix.
Security signals we found
No security-relevant keywords in commit title or message
No CVE, advisory, or security attribution present
Change is in build tooling, not runtime code
No evidence of vulnerability disclosure or exploit scenario
Evidence from the diff
The commit modifies contrib/android/build.sh. Previously, the script removed $FRESH_CLONE_BASE/fresh_clone/electrum and fell back to sudo rm -rf if removal failed. The new version changes the path to $FRESH_CLONE_BASE/electrum and, before the sudo removal, runs sudo chown "$(id -u)" "$FRESH_CLONE_BASE" so the current user owns the base directory. This appears to be a reliability fix for the Android reproducible build process, not a security patch.
Changed components
contrib/android/build.shInspect captured patch +5 / −2
diff --git a/contrib/android/build.sh b/contrib/android/build.sh
index d0357f2..d7ef7a8 100755
--- a/contrib/android/build.sh
+++ b/contrib/android/build.sh
@@ -53,8 +53,11 @@ docker build \
if [ ! -z "$ELECBUILD_COMMIT" ] ; then
info "ELECBUILD_COMMIT=$ELECBUILD_COMMIT. doing fresh clone and git checkout."
FRESH_CLONE_BASE=${FRESH_CLONE_BASE:-"/var/tmp/electrum_build/android"}
- FRESH_CLONE="$FRESH_CLONE_BASE/fresh_clone/electrum"
- rm -rf "$FRESH_CLONE" 2>/dev/null || ( info "we need sudo to rm prev FRESH_CLONE." && sudo rm -rf "$FRESH_CLONE" )
+ FRESH_CLONE="$FRESH_CLONE_BASE/electrum"
+ rm -rf "$FRESH_CLONE" 2>/dev/null || (
+ info "we need sudo to rm prev FRESH_CLONE." &&
+ sudo chown "$(id -u)" "$FRESH_CLONE_BASE" &&
+ sudo rm -rf "$FRESH_CLONE" )
umask 0022
git clone "$PROJECT_ROOT" "$FRESH_CLONE"
cd "$FRESH_CLONE"
Why this scored 11/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.