Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Signal calls closed-source GMS libs for utility functions #9629

Closed
3 of 4 tasks
tw-hx opened this issue May 16, 2020 · 3 comments
Closed
3 of 4 tasks

Signal calls closed-source GMS libs for utility functions #9629

tw-hx opened this issue May 16, 2020 · 3 comments

Comments

@tw-hx
Copy link
Contributor

tw-hx commented May 16, 2020


Bug description

Searching through Signal's source for GMS references:
https://github.com/signalapp/Signal-Android/search?p=2&q=gms.&unscoped_q=gms.
shows multiple instances where Play Services code is used as intended for push messaging and map features, but also calls to generic GMS utility functions.
This is holding back eventual inclusion of Signal-signed reproducible builds in F-Droid #9044.

Steps to reproduce

  • Click above link to view GMS dependencies in Signal source

Actual result:
Signal calls presumably closed source code for utility functions, relative to "app/src/main/java/org/thoughtcrime/securesms/" they are:

  • stickers/StickerUrl.java calls com.google.android.gms.common.util.Hex
  • stickers/StickerPackPreviewRepository.java calls com.google.android.gms.common.util.Hex
  • profiles/edit/EditProfileFragment.java calls com.google.android.gms.common.util.IOUtils
  • database/RecipientDatabase.java calls com.google.android.gms.common.util.ArrayUtils

Expected result:
These should be replaced by standard Java equivalents, so Signal is as open-source as possible. Ideally the website release should be able to build without any Google libs at all but this is a good first step :). Thanks!

@johanw666
Copy link
Contributor

That is not a bug but a feature request.

I suggest telling F-Droid people to be less fundamentalistic about what libraries are called by software in repositories, but I'm affraid that will probably have about the same chance on success as this request because it results in more battery consumption for people with Play Services on their device.

@greyson-signal
Copy link
Contributor

Hi there, thanks for the suggestions, but we try to only use Github as a bug tracker. But feel free to discuss this on the forums. Thanks!

@tw-hx
Copy link
Contributor Author

tw-hx commented May 19, 2020

An easy fix for another proprietary GMS import (that was newly committed to Signal shortly after this issue was closed above) is in util/concurrent/SignalExecutors.java which now imports com.google.android.gms.common.util.concurrent.NumberedThreadFactory

NumberedThreadFactory is both imported at the top from GMS and declared as a class at the bottom of the file. Removing:

import com.google.android.gms.common.util.concurrent.NumberedThreadFactory;

and compiling Signal 4.60.3 works and the APK runs fine, so that line appears a superfluous import.

Here are links to other usage of GMS code not required for GCM/Maps or similar as of today:

Thanks, Greyson, if you have time to look into replacing these in the future!

tw-hx added a commit to tw-hx/Signal-Android that referenced this issue May 24, 2020
tw-hx added a commit to tw-hx/Signal-Android that referenced this issue May 31, 2020
tw-hx added a commit to tw-hx/Signal-Android that referenced this issue Jun 6, 2020
tw-hx added a commit to tw-hx/Signal-Android that referenced this issue Jun 6, 2020
tw-hx added a commit to tw-hx/Signal-Android that referenced this issue Aug 19, 2020
tw-hx added a commit to tw-hx/Signal-Android that referenced this issue Aug 27, 2020
tw-hx added a commit to tw-hx/Signal-Android that referenced this issue Aug 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants