Does F-Droid allow building architecture specific APKs?

I have already published my flutter app to F-Droid. Currently, it builds using the command flutter build apk. That command gives a fat apk that works on all architectures. To the best of my knowledge, x86 and 32-bit based android devices are close to extinct. So, I was hoping I could build apk just for the ARM64 architecture as the apk size is less than half of the fat apk when built for ARM64. But I searched for the usage of the command flutter build apk --split-per-abi (command to split apk per architecture) throughout the fdroiddata repo and found that no one has used it.

You can build whatever and pickup ONE SINGLE apk via output:

It gets tricky if you want multple arches and autoupdates, as currently for autoupdates F-Droid can only handle one build section, aka one arch.

But, if you only want arm64 then go ahead…no issues.

1 Like

Thanks a lot :slight_smile:

I tried building just for armeabi-v7a. Though my fat apk build gives the version number 11 (which is the version number defined in my pubspec.yml), the armeabi-v7a build has the version number 1011 instead of 11. Is there a pattern to determine the build number of armeabi-v7a?

Relavant logs from fdroid build pipeline

...
2022-01-30 08:10:18,075 DEBUG: Checking build/in.amfoss.raag/build/app/outputs/flutter-apk/app-armeabi-v7a-release.apk
2022-01-30 08:10:18,079 DEBUG: AXML contains a RESOURCE MAP
2022-01-30 08:10:18,079 DEBUG: Start of Namespace mapping: prefix 33: 'android' --> uri 62: 'http://schemas.android.com/apk/res/android'
2022-01-30 08:10:18,085 ERROR: Could not build app in.amfoss.raag: Unexpected version/version code in output; APK: '1.1.1' / '1011', Expected: '1.1.1' / '11'
2022-01-30 08:10:18,085 DEBUG: Error encoutered, stopping by user request.
Uploading artifacts for failed job00:03
Uploading artifacts...
WARNING: repo/: no matching files
...

.yml recipe used pls?

/LE: oh https://gitlab.com/ashwinkey04/fdroiddata/-/blob/15c667333d1b957c4c90d461049bb03dbb06d0e9/metadata/in.amfoss.raag.yml#L123 Will take a look

I simplified it use just the latest version: https://gitlab.com/ashwinkey04/fdroiddata/-/blob/raag-arm64/metadata/in.amfoss.raag.yml#L21

Edit: Here’s a pipeline that passes with my old configuration (that builds a fat APK)

I managed to figure it out with the help of android’s documentation here.

I have explained the changes I made in this StackOverflow answer to the question that I had asked. Thank you for the support @Licaon_Kter :raised_hands:

Probably true enough based on relative numbers, but I feel a “significant” number of 32-bit android devices are still alive and kicking. Thanks partly to @Skewed_Zeppelin 's DivestOS, and LineageOS, and other custom ROMs.

I cannot currently get to LineageOS stats page, but if I could, I believe it would show many 32-bit arm devices running it.

I could get to this Kali nethunter (android overlay) page, and FWIW it shows they are still supporting nexus 5 and 6, which are both 32-bit, armv7, I believe: https://stats.nethunter.com/nethunter-imagestats.html

I agree they are on the way out, but not supporting them will guarantee users like me will not have a chance to run your app(s).

Disclaimer: Currently I plan to transition to “pure” gnu/Linux phones (e.g. PinePhone) before ever buying a 64-bit Android phone, and have no plans to run any Android emulator…

I am waiting until the system and apps are sandboxed by default, SElinux has advanced development, has verified and locked bootloader.

I know maybe I’m asking too much, but until then I think it’s best to stick with Android. :man_shrugging:

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.