deltalab-org / deltalab-android

🧪 Experimenting with alternative Delta Chat futures
GNU General Public License v3.0
71 stars 2 forks source link

proprietary components were added with the latest release #19

Open IzzySoft opened 1 month ago

IzzySoft commented 1 month ago

With the last release, the APK provided contains:

Offending libs:
---------------
* Firebase Data Transport (/com/google/android/datatransport): NonFreeNet
* Google Mobile Services (/com/google/android/gms): NonFreeComp
* Firebase (/com/google/firebase): NonFreeNet,NonFreeComp
* Firebase Installations (/com/google/firebase/installations): NonFreeNet

4 offenders.

Which basically means the app is no longer fully libre, and I'll now have to add at least the two mentioned anti-features. Was this change intended? Is there a chance to make the app fully F/LOSS again?

adbenitez commented 1 month ago

hi, the change was added to upstream Delta Chat to support Push Notifications (no data is sent just dummy empty push notifications to wake up the app to avoid systems killing the app in background and then not being able to receive notification until you open it)

the library is striped from the analytics component, also the whole feature is not used if you use a de-googled phone, it is only used if you already have push notifications service or microG

it is also possible to disable it in the settings

I was not aware the lib was not free software, for now I am fine with the anti-features, since receiving notifications in time is more important and not worse if you already have a a device with Push Notifications enabled

IzzySoft commented 1 month ago

receiving notifications in time is more important

We're talking about FOSS here, so keeping it FOSS should be one of the priorities. And FCM is not the only way to get those notifications, there's always @UnifiedPush (which btw. also has support for FCM if you need that). UP works fine here with e.g. NTFY.

and not worse if you already have a a device with Push Notifications enabled

I prefer giving people motivation to leave those proprietary walled gardens behind. If even FOSS apps bind themselves to those, that just makes it harder to leave as there's again one more thing that would "stop working" :wink:

I also wonder why Delta is doing that. Are there too many email servers not supporting IMAP IDLE?

adbenitez commented 1 month ago

I also wonder why Delta is doing that. Are there too many email servers not supporting IMAP IDLE?

in fact, IMAP IDLE works fine BUT Android system is aggressive and kills app in background not allowing email clients to keep the lightweight socket connection to the IMAP server

We're talking about FOSS here, so keeping it FOSS should be one of the priorities

it is, but it is also my priority that people AT LEAST use free software apps instead of full private ones, in practice if my app fails to deliver messages in time what happens is that people uninstall it and use WhatsApp et al., my target is not a small bunch of purist nerds, but main stream masses, if you are a true purist you should not even have your store supporting Android at all, you are promoting Google's system, applying your logic: why not make it harder so people go right for Replicant or even better some Linux phone like the pinephone? I think we both are here because this is a better first step towards the final goal.

And FCM is not the only way to get those notifications, there's always @UnifiedPush (which btw. also has support for FCM if you need that).

this is simply impractical, I can not go around telling people to install unified push to then use FCM anyway in the end, there is no point in using Unified Push at all in this case, its use case is for another situations IIRC

IzzySoft commented 1 month ago

I get your points, thanks. We're on the same road here just in slightly different vehicles it seems. If you permit me a last "idea": those differences could be solved via build flavors and offering the corresponding APKs for both variants – so everyone could pick according to their preference.

if you are a true purist

"Lord, let me be pure – but not yet…" :speak_no_evil: Going by that we'd have to drop all and go "back to the roots", yes. Finding the right balance is not easy – and (full ack) also quite a bit subjective. I cannot tell what balance others shall seek, that's not for me to decide. I just can decide that for myself – and make suggestions here and there :wink:

telling people to install unified push to then use FCM anyway in the end

IIRC there was a way to integrate a FOSS variant of FCM with UP, which then would reduce the anti-features to just "NonFreeNet". But implementation is a bit beyond me, as I'm no Android dev…

adbenitez commented 1 month ago

IIRC there was a way to integrate a FOSS variant of FCM with UP

if there were some alternative lib for FCM that would avoid shipping privative blobs and only connect to the google servers similar to what microG does that would be great, then we could use it directly in the app, once again no need to use Unified Push

those differences could be solved via build flavors

at the moment there is a single release of DeltaLab, I may try to go for play store, then it would make sense to have two flavors: one all down the lost path in google play (if you are using google play anyway you are already in the "dark side") and then a more "clean" variant in izzyondroid without push notifications and relaying on a permanent notification then

all this is a bit of an effort for me since I maintain DeltaLab for free on the side without deep knowledge in Android building and shipping to Google Play, while at the same time contributing to official DC and several other projects

thanks for your reply, time and care! :pray:

adbenitez commented 1 month ago

I found the docs about the open source library: https://unifiedpush.org/developers/embedded_fcm/

There are 2 libraries doing it: one using the Google Firebase library and another (beta) entirely FOSS* that doesn’t. ... The Android FOSS Embedded FCM Distributor is a new library. It reimplements the same API that the Google library uses. Since it’s open source, it can be used on FOSS app stores like F-Droid.

sadly it is a beta but that is quite promising! if I got it correctly it will work with unified push if present and only fallback to google's FCM as last resort with at least open source client library code

IzzySoft commented 1 month ago

if there were some alternative lib for FCM that would avoid shipping privative blobs and only connect to the google servers similar to what microG does that would be great

There definitely is. One such implementation is being used by the official Mastodon client (and thus also by its forks), consisting of very few lines of code. Another was mentioned by UP themselves, but I'm not sure about the details of that implementation. While I type this your new comment shows up; I see you've found this one already:

if I got it correctly it will work with unified push if present and only fallback to google's FCM as last resort with at least open source client library code

That was my understanding, yes. And that would be kinda ideal, as it would rid you of the NonFreeNet as well (especially when made optional and opt-in, e.g. with a question during onboarding and a possibility to switch in the settings).

once again no need to use Unified Push

Just leaving the – what did you call them? Ah: "small bunch of purist nerds" out then, but yeah, better than shipping the blobs, that's true.

I may try to go for play store, then it would make sense to have two flavors

Yupp. Good idea to leave that in the todo list for when that time comes, and dig into details then. Who knows what options might have shown up until then – maybe some easy drop-in replacement with identical interfaces, which would make this a breeze… (well, one can dream, right?)

thanks for your reply, time and care! 🙏

Gladly – and same to you as well! :hugs:

adbenitez commented 1 month ago

Just leaving the – what did you call them? Ah: "small bunch of purist nerds" out then, but yeah, better than shipping the blobs, that's true.

I think it is just the wrong approach, you rather are an user without much tech knowledge and with a google phone with push notifications or you are more on the freedom side and would go for a better phone with LineageOS, CalyxOS etc. there you don't need push notifications at all and can let the app work in background since as you said IMAP IDLE exist since ages and there is no need for this push notifications non-sense, I understand that unified push is necessary for other fancy apps that tried to reinvent the wheel and replace email, but that is not the case for good old email protocols in the end...

using UnifiedPush alone is not enough, better to have a de-googled phone