Repository navigation
F-Droid can't build #1274
Description
Activity
Issue triage
Feasibility:needs-clarification | Risk:medium
coderabbitai commented
on Aug 13, 2026 coderabbitaiboton Aug 13, 2026 – with coderabbitaiContributorMore actions🔗 Related PRs
#1139 - fix: fdroid build [merged]
#1140 - fix: strip android native build ids for fdroid [merged]
#1197 - Fix CI configuration and add error handling to make.dart [merged]
📝 Issue Planner
Check the box below or use the
@coderabbitai plancommand to generate an implementation plan and prompts that you can use with your favorite coding assistant.- Create Plan
🧪 Issue enrichment is currently in open beta.
You can configure auto-planning by selecting labels in the issue_enrichment configuration.
To disable automatic issue enrichment, add the following to your
.coderabbit.yaml:issue_enrichment: auto_enrich: enabled: false
💬 Have feedback or questions? Drop into our discord!
- addedbugSomething isn't workingSomething isn't workingquestionFurther information is requestedFurther information is requested
on Aug 13, 2026 GitHub release builds create all ABI splits in one Flutter invocation, while F-Droid builds each ABI separately. The per-output version code is therefore not stable in the shared classes.dex: the release x86_64 APK contained 148002, while F-Droid's standalone x86_64 build contained 148001.
Should be fixed in #1278.
ping when a release is ready
This issue is not fixed. It seems you do build different abis one by one in https://github.com/lollipopkit/flutter_server_box/blob/main/scripts/release/build-fdroid.sh but the diff shows that your apks are built together. https://gitlab.com/fdroid/fdroiddata/-/jobs/16230273630 And there is a lib not reproducible.
Thanks!
Seems that I accidentally close this issue. I'll leave it open until next release is built successfully
@licaon-kter @linsui v1.0.1617 is ready. The failure in job 16230273630 was v1.0.1553, which predates #1394; since then each ABI is built separately in the release (the amd64 APK's
NativeAssetsManifest.jsoncontains onlyandroid_x64), andlibsbm_ffi.sois path-remapped and checked by two independent builds before publication.The recipe changed: it now runs
scripts/release/prepare-fdroid.sh/build-fdroid.sh. The template is infdroid/README.md; for this release<build>=1617,<commit>=f8e9656fe7e9154d214f7d457ea64bd362feea46. !45348 carries the old recipe at 1.0.1553 and can be closed.It seems your script is designed for a offline build environment. https://github.com/lollipopkit/flutter_server_box/blob/main/scripts/release/prepare-fdroid.sh Does it build the apk twice?
Yes, it builds twice.
prepare-fdroid.shruns one full release build only to seed the Gradle cache, thenflutter clean, so thatFDROID_OFFLINE=true build-fdroid.shcan rebuild with networking blocked.To build once, skip
prepare-fdroid.shand runscripts/release/build-fdroid.sh <abi>(withoutFDROID_OFFLINE) inbuild; it fetches Pub, Cargo and Gradle dependencies itself.sudowould also needrustup gcc libc-dev.Does fdroiddata need the build phase to be offline? If not, I'll change the template in
fdroid/README.mdto the single build.No we don't need to be offline. But we need to scan the pub cache.
Thanks. For v1.0.1617 the scripts already honour an external
PUB_CACHE, so the recipe can fetch into the source tree inprebuildand build once:sudo: - apt-get update - apt-get install -y zip unzip make rustup gcc libc-dev prebuild: - flutterVersion=$(sed -n -E 's/^[[:space:]]*flutter-version:[[:space:]]*([^[:space:]]+).*/\1/p' .github/actions/setup-flutter/action.yml) - '[[ $flutterVersion ]]' - git -C $$flutter$$ checkout -f $flutterVersion - export PATH=$$flutter$$/bin:$PATH - export PUB_CACHE=$(pwd)/.pub-cache - flutter config --no-analytics - flutter pub get --enforce-lockfile scandelete: - .pub-cache - packages/xterm/example/assets/specs_v1.json.gz - third_party/ish-arm64/benchmark/assets build: - export PATH=$$flutter$$/bin:$PATH - export PUB_CACHE=$(pwd)/.pub-cache - scripts/release/build-fdroid.sh amd64
(
arm/arm64likewise.) Compared with the recipe in !45348, the move to/home/runner/...and thebuild.gradle/ jnisededits are no longer needed: native paths are remapped,build-fdroid.shsetsallowUnsignedReleaseand patches jni itself. It also prunes dev-only plugins, which the plainflutter buildin !45348 doesn't, and is likely whyAndroidManifest.xmldiffered.scripts/build-proot-android.sh This should be put in the build script.
Agreed. Complete metadata for v1.0.1617:
tech.lolli.toolbox.yml: v1.0.1617
- versionName: 1.0.1617 versionCode: 161701 commit: f8e9656fe7e9154d214f7d457ea64bd362feea46 submodules: true sudo: - apt-get update - apt-get install -y zip unzip make rustup gcc libc-dev output: build/app/outputs/apk/release/app-x86_64-release-unsigned.apk binary: https://github.com/lollipopkit/flutter_server_box/releases/download/v%v/ServerBox_v%v_amd64.apk srclibs: - flutter@stable rm: - ios - linux - macos - test - windows prebuild: - flutterVersion=$(sed -n -E 's/^[[:space:]]*flutter-version:[[:space:]]*([^[:space:]]+).*/\1/p' .github/actions/setup-flutter/action.yml) - '[[ $flutterVersion ]]' - git -C $$flutter$$ checkout -f $flutterVersion - export PATH=$$flutter$$/bin:$PATH - export PUB_CACHE=$(pwd)/.pub-cache - flutter config --no-analytics - flutter pub get --enforce-lockfile scandelete: - .pub-cache - packages/xterm/example/assets/specs_v1.json.gz - third_party/ish-arm64/benchmark/assets build: - export PATH=$$flutter$$/bin:$PATH - export PUB_CACHE=$(pwd)/.pub-cache - scripts/release/build-fdroid.sh amd64 target: android-36 ndk: r28c - versionName: 1.0.1617 versionCode: 161702 commit: f8e9656fe7e9154d214f7d457ea64bd362feea46 submodules: true sudo: - apt-get update - apt-get install -y zip unzip make rustup gcc libc-dev output: build/app/outputs/apk/release/app-armeabi-v7a-release-unsigned.apk binary: https://github.com/lollipopkit/flutter_server_box/releases/download/v%v/ServerBox_v%v_arm.apk srclibs: - flutter@stable rm: - ios - linux - macos - test - windows prebuild: - flutterVersion=$(sed -n -E 's/^[[:space:]]*flutter-version:[[:space:]]*([^[:space:]]+).*/\1/p' .github/actions/setup-flutter/action.yml) - '[[ $flutterVersion ]]' - git -C $$flutter$$ checkout -f $flutterVersion - export PATH=$$flutter$$/bin:$PATH - export PUB_CACHE=$(pwd)/.pub-cache - flutter config --no-analytics - flutter pub get --enforce-lockfile scandelete: - .pub-cache - packages/xterm/example/assets/specs_v1.json.gz - third_party/ish-arm64/benchmark/assets build: - export PATH=$$flutter$$/bin:$PATH - export PUB_CACHE=$(pwd)/.pub-cache - scripts/release/build-fdroid.sh arm target: android-36 ndk: r28c - versionName: 1.0.1617 versionCode: 161703 commit: f8e9656fe7e9154d214f7d457ea64bd362feea46 submodules: true sudo: - apt-get update - apt-get install -y zip unzip make rustup gcc libc-dev output: build/app/outputs/apk/release/app-arm64-v8a-release-unsigned.apk binary: https://github.com/lollipopkit/flutter_server_box/releases/download/v%v/ServerBox_v%v_arm64.apk srclibs: - flutter@stable rm: - ios - linux - macos - test - windows prebuild: - flutterVersion=$(sed -n -E 's/^[[:space:]]*flutter-version:[[:space:]]*([^[:space:]]+).*/\1/p' .github/actions/setup-flutter/action.yml) - '[[ $flutterVersion ]]' - git -C $$flutter$$ checkout -f $flutterVersion - export PATH=$$flutter$$/bin:$PATH - export PUB_CACHE=$(pwd)/.pub-cache - flutter config --no-analytics - flutter pub get --enforce-lockfile scandelete: - .pub-cache - packages/xterm/example/assets/specs_v1.json.gz - third_party/ish-arm64/benchmark/assets build: - export PATH=$$flutter$$/bin:$PATH - export PUB_CACHE=$(pwd)/.pub-cache - scripts/release/build-fdroid.sh arm64 target: android-36 ndk: r28c CurrentVersion: 1.0.1617 CurrentVersionCode: 161703
So the prepare script is not needed?
Right, not for F-Droid. It's only used by our CI to check that the build fetches nothing when offline.
https://gitlab.com/fdroid/fdroiddata/-/jobs/17018231308 Could you please build the apks one by one? Or maybe the NativeAssetsManifest file can be excluded from the apk?
Thanks for the log. We reproduced that job locally; there are two things in the recipe and one on our side.
buildrunsscripts/release/build-fdroid.shwithout an ABI, so it builds every ABI in one Flutter invocation. That is whereNativeAssetsManifest.json(all three ABIs listed) andAndroidManifest.xml(source line numbers shifted by one) differ. Passingamd64/arm/arm64, one per build entry, makes both match.libapp.soembeds the Flutter channel (a dependency readsFlutterVersion.channel). Aftergit -C $$flutter$$ checkout -f $flutterVersionFlutter is on a detached HEAD, so the channel is[user-branch]rather thanstable, and--dart-definecannot override it. Wouldgit -C $$flutter$$ checkout -B stable $flutterVersionbe acceptable in the recipe? And is the flutter srclib a fresh checkout for each build? Flutter caches the channel inbin/cache/flutter.version.json, so one left over from an earlier build would keep[user-branch].- On our side, the release APKs were built with a different command from
build-fdroid.sh, solibapp.socould not have matched anyway. fix(ci): build the release APKs with build-fdroid.sh, then sign them #1677 builds the release with that script and signs it afterwards; with that change and the two points above, our rebuild matched the CI-built APK in everything except the signature.
So excluding
NativeAssetsManifest.jsonwon't be needed.- added a commit that references this issue
on Oct 9, 2026 That's a known issue. You can disable that info if you want. I thought it's logged by a lib or something. I can also fix that on our side with git reset. :)
Thanks! It comes from the
sentrypackage (it readsFlutterVersion.channelfor the runtime context), so we can't turn it off without patching sentry. A fix on your side would be great.Note the pinned version moved:
FLUTTER_VERSIONis no longer inbuild.yml, it is nowflutter-versionin.github/actions/setup-flutter/action.yml(CI uses it withchannel: stable;build-fdroid.shfails if the active Flutter differs). So something like:flutterVersion=$(sed -n -E 's/^\s+flutter-version:\s*(\S+)\s*$/\1/p' .github/actions/setup-flutter/action.yml) git -C $$flutter$$ checkout -B stable $flutterVersionThe recipe should also pass the ABI to
build-fdroid.sh(amd64/arm/arm64). #1677 is merged, so the release APKs from the next version should match.Thanks! Please ping me when there is a new version.
ref: https://gitlab.com/fdroid/checkupdates-bot-fdroiddata/-/jobs/15801299955