Overview
The verification process:- Extracts the APK from your Android device
- Checks out the corresponding source code version
- Builds a fresh APK using the reproducible build process
- Compares the installed APK with the freshly built one
Requirements
- Docker >= 18.09
- ADB (Android Debug Bridge)
- At least 16 GB of RAM allocated to Docker
- At least 60 GB of free disk space
- Muun Wallet installed on an Android device
- USB debugging enabled on your device
Setup
Install ADB
Enable USB Debugging
On your Android device:Verification Process
Extract APK from Device
Pull the installed APK from your Android device:This command:
- Finds the installation path of Muun Wallet (
io.muun.apollo) - Filters for the base APK file
- Pulls it to your local machine as
apollo-play.apk
Checkout Corresponding Commit
Checkout the git commit that corresponds to the app version:The commit hash or tag should match the version you’re verifying.
Run Verification Script
Execute the automated verification script:This process takes 10-20 minutes as it performs a full reproducible build.
How Verification Works
Theverify-apollo.sh script performs the following steps:
1. Build from Source
2. Extract APK Contents
Unzips both the APK to verify and the freshly built APK:3. Remove Signatures
Removes signing-related files since open source builders won’t have Muun’s private keys:4. Detect Architecture
Determines the device architecture from the/lib directory:
arm64-v8a- 64-bit ARMarmeabi-v7a- 32-bit ARMx86- 32-bit x86x86_64- 64-bit x86
5. Compare Files
Performs a recursive diff of all files:Understanding Results
Successful Verification
When verification succeeds:- The installed APK matches the source code exactly
- No files have been modified or injected
- The app is authentic and unmodified
Failed Verification
If verification fails, the script preserves the extracted directories for inspection:baseline/- Contents of the freshly built APKto_verify/- Contents of the installed APK
- Wrong git commit/tag checked out
- APK was modified after signing
- Different build environment (should not happen with Docker)
- App was built with different tools/versions
Architecture-Specific Verification
The script automatically selects the correct baseline APK based on your device architecture:| Device Architecture | Baseline APK |
|---|---|
| arm64-v8a | apolloui-prod-arm64-v8a-release-unsigned.apk |
| armeabi-v7a | apolloui-prod-armeabi-v7a-release-unsigned.apk |
| x86 | apolloui-prod-x86-release-unsigned.apk |
| x86_64 | apolloui-prod-x86_64-release-unsigned.apk |
Verifying Google Play APKs
APKs downloaded from Google Play are signed by Google’s Play App Signing service. The verification process:- Removes the Google Play signature (in
META-INF/) - Compares the unsigned contents
- Ensures the code matches the source
Verifying F-Droid Builds
F-Droid performs their own reproducible builds. To verify F-Droid builds:- Download the APK from F-Droid
- Follow the same verification process
- F-Droid signature will be removed during verification
Troubleshooting
ADB Device Not Found
Ifadb devices shows no devices:
Wrong Commit Checked Out
Verification will fail if you check out the wrong commit:Permission Denied
If ADB permission is denied:Build Failures
If the Docker build fails during verification:- Ensure Docker has at least 16 GB RAM
- Ensure at least 60 GB free disk space
- See Reproducible Builds for troubleshooting
Manual Verification
For a deeper understanding, you can perform verification manually:Next Steps
- Reproducible Builds - Learn about the reproducible build process
- Building Locally - Build the app for development
- Testing - Run the test suite