Closed Integral-Tech closed 6 hours ago
That's a good idea. Could you please help me submit this app to F-Droid, or should I do it myself?
I have submitted an issue to request for packaging (https://gitlab.com/fdroid/rfp/-/issues/2780)
Your main git submission email is used for filling AuthorEmail
Thank you for your efforts. :) I have read the doc and it states that a Fastlane config should be created inside this repo. I would like to get more people to contribute, so could you open a PR for that?
Thank you for your efforts. :) I have read the doc and it states that a Fastlane config should be created inside this repo. I would like to get more people to contribute, so could you open a PR for that?
Yes, I have opened a pull request
In the RFP issue, the bot detected non-free dependencies (seems to be GMS-related), which should be removed:
There are also some dependencies / services that could be used to track users, which should be minimized:
It's related to #379, i will solve it later.
trying to build https://github.com/lollipopkit/flutter_server_box/commit/64ce3638cb8942499800875876d3a6fbe657516d
these proprietary libs are still pulled in via https://github.com/Countly/countly-sdk-flutter-bridge/blob/24.4.1/android/build.gradle#L38 and https://github.com/Rexios80/watch_connectivity/blob/watch_connectivity-0.2.0/watch_connectivity/android/build.gradle#L52
trying to build 64ce363
these proprietary libs are still pulled in via https://github.com/Countly/countly-sdk-flutter-bridge/blob/24.4.1/android/build.gradle#L38 and https://github.com/Rexios80/watch_connectivity/blob/watch_connectivity-0.2.0/watch_connectivity/android/build.gradle#L52
Thanks for the tip.
rebuilt from 5059872c3f7343054b702de8b629d53b303a8aad
2024-06-11 15:30:19,612 INFO: Successfully built version 1.0.963 of tech.lolli.toolbox from 5059872c3f7343054b702de8b629d53b303a8aad
2024-06-11 15:30:29,778 DEBUG: Checking build/tech.lolli.toolbox/build/app/outputs/flutter-apk/app-release.apk
2024-06-11 15:30:29,835 INFO: Scanning APK with dexdump for known non-free classes.
2024-06-11 15:30:29,951 DEBUG: > /opt/android-sdk/build-tools/33.0.0/dexdump /tmp/tmp2z8b7fta/classes.dex
2024-06-11 15:30:35,878 DEBUG: Problem: found class 'com/google/android/play/core/splitinstall/SplitInstallSessionState'
2024-06-11 15:30:35,901 DEBUG: Problem: found class 'com/google/android/play/core/splitinstall/SplitInstallStateUpdatedListener'
2024-06-11 15:30:35,927 DEBUG: Problem: found class 'com/google/android/play/core/tasks/OnSuccessListener'
2024-06-11 15:30:35,947 DEBUG: Problem: found class 'com/google/android/play/core/tasks/OnFailureListener'
2024-06-11 15:30:35,952 DEBUG: Problem: found class 'com/google/android/play/core/splitcompat/SplitCompatApplication'
2024-06-11 15:30:36,105 DEBUG: Problem: found class 'com/google/android/play/core/splitinstall/SplitInstallManager'
2024-06-11 15:30:36,118 CRITICAL: Found 6 problems in build/tech.lolli.toolbox/build/app/outputs/flutter-apk/app-release.apk
2024-06-11 15:30:36,120 ERROR: Could not build app tech.lolli.toolbox: Found blocklisted packages in final apk!
2024-06-11 15:30:36,120 DEBUG: Error encountered, stopping by user request.
which looks like a flutter bug https://gitlab.com/fdroid/fdroiddata/-/issues/2949
rebuilt from 5059872
2024-06-11 15:30:19,612 INFO: Successfully built version 1.0.963 of tech.lolli.toolbox from 5059872c3f7343054b702de8b629d53b303a8aad 2024-06-11 15:30:29,778 DEBUG: Checking build/tech.lolli.toolbox/build/app/outputs/flutter-apk/app-release.apk 2024-06-11 15:30:29,835 INFO: Scanning APK with dexdump for known non-free classes. 2024-06-11 15:30:29,951 DEBUG: > /opt/android-sdk/build-tools/33.0.0/dexdump /tmp/tmp2z8b7fta/classes.dex 2024-06-11 15:30:35,878 DEBUG: Problem: found class 'com/google/android/play/core/splitinstall/SplitInstallSessionState' 2024-06-11 15:30:35,901 DEBUG: Problem: found class 'com/google/android/play/core/splitinstall/SplitInstallStateUpdatedListener' 2024-06-11 15:30:35,927 DEBUG: Problem: found class 'com/google/android/play/core/tasks/OnSuccessListener' 2024-06-11 15:30:35,947 DEBUG: Problem: found class 'com/google/android/play/core/tasks/OnFailureListener' 2024-06-11 15:30:35,952 DEBUG: Problem: found class 'com/google/android/play/core/splitcompat/SplitCompatApplication' 2024-06-11 15:30:36,105 DEBUG: Problem: found class 'com/google/android/play/core/splitinstall/SplitInstallManager' 2024-06-11 15:30:36,118 CRITICAL: Found 6 problems in build/tech.lolli.toolbox/build/app/outputs/flutter-apk/app-release.apk 2024-06-11 15:30:36,120 ERROR: Could not build app tech.lolli.toolbox: Found blocklisted packages in final apk! 2024-06-11 15:30:36,120 DEBUG: Error encountered, stopping by user request.
which looks like a flutter bug https://gitlab.com/fdroid/fdroiddata/-/issues/2949
But there are some Flutter apps submitted successfully to F-Droid, such as FluffyChat. How did they solve this problem?
Not sure what's their magic sauce :(
FluffyChat emptied their proguard-rules.pro.
@licaon-kter I have cleaned proguard-rules.pro. Try to rebuild it :)
Builds fine now
@lollipopkit up next, setup Flutter as a submodule (and use it yourself in your CI and build recipes) or at least have the exact version written somewhere
tag and build the APK from the tagged commit so we can test for reproducibility (ref: https://f-droid.org/docs/Inclusion_How-To/#reproducible-builds and https://f-droid.org/2023/09/03/reproducible-builds-signing-keys-and-binary-repos.html)
@lollipopkit up next, setup Flutter as a submodule (and use it yourself in your CI and build recipes) or at least have the exact version written somewhere
Thanks, i have two question:
exact version written somewhere
) to specify the Flutter version. Is it in pubspec.yaml
? If possible, use the latest stable release of Flutter.If possible, use the latest stable release of Flutter.
We need to pin the version. The latest stable release is changing.
If fdroid builds with my sign key, must I write the plain passwd to metadata?
We don't need your key. Do not send your key to anyone. :)
For example, there is the revision of the flutter in https://github.com/lollipopkit/flutter_server_box/blob/main/.metadata. If you keep the file up-to-date we can use the revision specified there.
After read the ref, I can’t figure out where(exact version written somewhere) to specify the Flutter version. Is it in pubspec.yaml?
Where you want, eg. some use the CI, say put it here: https://github.com/lollipopkit/flutter_server_box/blob/main/.github/workflows/release.yml#L52 but not stable
but 3.22.1
We need to pin the version. The latest stable release is changing.
yes, eg. yesterday was 3.22.1
you tagged (example) a version and built it
F-Droid builds today, and today... surprise 3.22.2
is stable. Maybe it's not an issue between .1
and .2
but there are issues between major versions
We don't need your key. Do not send your key to anyone.
exactly, do read those two links :smile:
Thank you. I understand.
I still have questions about how to build with my sign key (if possible)? Or to release with fdroid signature (only in fdroid)?
We only use your signature if we can make the build reproducible. See https://f-droid.org/docs/Reproducible_Builds/.
You already host apks like: https://github.com/lollipopkit/flutter_server_box/releases/tag/v1.0.949
$ apksigner verify --print-certs ServerBox_949_amd64.apk
Signer #1 certificate DN: CN=JunyuanFeng, OU=ToastStudio, O=ToastStudio, L=ChengDu, ST=Sichuan, C=86
so.. you're already setup, build and sign as usual, F-Droid will use your verified reproducible APK :wink:
Sorry... I thought the apk released in fdroid would be built in fdroid ci, so was wondering how to sign it.
@lollipopkit look at the graph https://f-droid.org/docs/Reproducible_Builds/ it's YES and YES and ends up with "publish @lollipopkit's APK" and not "sign something"
It's my problem...
Before you explained it, i thought build reproducible
could only be fdroid ci
Now the flutter version is specified in the .github/workflows/release.yml
is there a reason why the Tag name and the versionName don't match? https://github.com/lollipopkit/flutter_server_box/blob/v1.0.967/pubspec.yaml#L4
The version in pubspec.yaml
is generated by a script before pushing, but the version in the tag is generated by CI after pushing. So there is a discrepancy.
Is this important? Should I fix it?
Yes, it's important because we need a correct tag name to get your apk.
eg: https://github.com/lollipopkit/flutter_server_box/releases/download/v1.0.967/ServerBox_967_amd64.apk
we can use versionCode and versionName as templates for your APK url
say https://github.com/lollipopkit/flutter_server_box/releases/download/v%v/ServerBox_%c_amd64.apk
but... if those do not match your Tag and are +1 we can't
regarding versionCode of the per arch APKs, please move the arch number at the end so instead of the current 1967/2967/4967 it's better to have 9671/9672/9674
it used to be here https://github.com/flutter/flutter/blob/40e3489254b2d0ffedf840bd9233e5e6d06d09dd/packages/flutter_tools/gradle/flutter.gradle#L749 kinda so instead of abiVersionCode * 1000 + variant.versionCode
have it variant.versionCode * 10 + abiVersionCode
not sure where this was moved in 3.22.x
regarding versionCode of the per arch APKs, please move the arch number at the end so instead of the current 1967/2967/4967 it's better to have 9671/9672/9674
it used to be here https://github.com/flutter/flutter/blob/40e3489254b2d0ffedf840bd9233e5e6d06d09dd/packages/flutter_tools/gradle/flutter.gradle#L749 kinda so instead of
abiVersionCode * 1000 + variant.versionCode
have itvariant.versionCode * 10 + abiVersionCode
not sure where this was moved in 3.22.x
@licaon-kter I have fixed this in https://github.com/lollipopkit/flutter_server_box/pull/391
v1.0.971 solved these two.
Ok, builds, some notes:
971
, as they are 9713
9711
etc, or better yet just remove the 971
.ZIP
from filename)@linsui this diff looks familiar?
/LE: recipe updated here: https://gitlab.com/fdroid/rfp/-/issues/2780#note_1946717714
No. @lollipopkit Can you explain how you build your apk?
I built the apks as shown in Actions.
The reason why this diff occurs, may due to (i guess):
Zulu jdk17:https://github.com/lollipopkit/flutter_server_box/blob/108d0a5a5b4a6889ffbc801df4a95142910c49d2/.github/workflows/release.yml#L27 My custom build script: https://github.com/lollipopkit/flutter_server_box/blob/108d0a5a5b4a6889ffbc801df4a95142910c49d2/.github/workflows/release.yml#L34
I want to know what your script does. :) Can we also run
dart run fl_build -p android
to build the apk?
Yes, dart run
runs a pkg(bin) named fl_build
, it can be found at:
https://github.com/lollipopkit/flutter_server_box/blob/108d0a5a5b4a6889ffbc801df4a95142910c49d2/pubspec.yaml#L79
Does it do anything special? How can I build only 1 abi with it?
It updates metadata used by update checker and others. It can't build 1 abi...
I think just use zulu to build, then the diff will decrease much.
Zulu is only used to build the java part but the libapp.so has difference. The BuildData.build
is different. In your apk it's 971 and in our apk it's 970.
Ok, i will update it to support only 1 abi.
But it can't completely repro.
The buildAt
vary every build time.
https://github.com/lollipopkit/flutter_server_box/blob/108d0a5a5b4a6889ffbc801df4a95142910c49d2/lib/data/res/build_data.dart#L7
Why is https://github.com/lollipopkit/flutter_server_box/blob/v1.0.971/lib/data/res/build_data.dart not updated to 971? Does your script update it when building the apk?
Does your script update it when building the apk?
Yes
That's the problem... We need to build the apk from the same code. If it update the code everytime we can't get the same apk.
Can i delete buildAt
but leave build
?
We both use fl_build
, so the build
would be the same.
I thought it should work.
Now the build script will output apk at build/app/outputs/flutter-apk/app-release.apk
How should we build, e.g., an arm64 apk with fl_build?
dart run fl_build -p android -ooa
It would be better if ServerBox is submitted to F-Droid.