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

Can't install Signal without Google Play Services #9279

Closed
1 task done
ioogithub opened this issue Dec 16, 2019 · 44 comments
Closed
1 task done

Can't install Signal without Google Play Services #9279

ioogithub opened this issue Dec 16, 2019 · 44 comments
Labels

Comments

@ioogithub
Copy link


Bug description

I cannot run Signal and get past the Enter your phone number screen. Signal throws an error message about updating Google Play Services.

I can confirm that Google Play Services, Google Services Framework, Google Play Store and any other packages that start with “Google” have been removed from the phone using the adb uninstall command.

pm uninstall --user 0 com.google.android.gms
pm uninstall --user 0 com.google.android.gfs
pm uninstall --user 0 com.android.vending
...etc

I have tried this from a fresh factory reset with all Google apps uninstalled as well, same results. Signal will not run without Google Play Services and throws an erroneous error about updating Play services. No other issues with other apps and GMS on the phone, just Signal.

Steps to reproduce

    1. Install Signal
    1. Run Signal
    1. On the "Enter your phone number" to get started screen, enter number and tap Next.

Actual result:
A message appears:

**Play Services Error**
Google Play Services is updating or temporarily unavailable. Please try again.

Expected result:
Signal will proceed to the next screen.

Screenshots

Device info

Device: Samsung Galaxy S9
Android version: 9.0 Official
Signal version: Tested with 4.50.5 and 4.50.6

Link to debug log

Cannot pen Signal to provide a debug log.

@lightlifephotography
Copy link

I have the same exact issue!

My signal was working and updating fine on a phone with no google play services (Removed with ADB).
But when I did a reinstall the app produces this glitch at registration.
Signal worked perfectly fine without google on my first registration and this shouldn't be a problem for a privacy oriented app.

@hhirtz
Copy link

hhirtz commented Jan 20, 2020

I have the same problem. Removing Google Services through adb and pm (like OP did) makes Signal think they are still here, but being updated.

There should be another step to remove Google Services because Signal can be installed on a phone that does not have them in the first place (e.g. Lineage OS without gapps), but that step is unknown to me.

@hhirtz
Copy link

hhirtz commented Jan 30, 2020

It seems the pm uninstall --user 0 commands don't delete Google services' APKs, and that's what causing signal to think they're still installed. Unfortunately, you need root privileges to delete the APKs because the filesystem is read-only.

I suggest renaming this issue to "Add an option to install Signal without Google Play Services even when they're installed"

@lightlifephotography
Copy link

lightlifephotography commented Jan 30, 2020 via email

@hhirtz
Copy link

hhirtz commented Jan 31, 2020

I don't understand what you're asking here: "Is it possible to have the option not to use Google services during Signal installation"

Did you uninstall google services with pm only? (without su nor adb root)
If you did can you check with adb if Gms.apk is still in /system/priv-app/ or /system/app?

The apk is still present on my phone, so I suspect Signal thinks google services are still installed.

@visika
Copy link

visika commented Apr 5, 2020

I'm on LineageOS 17.1 and I can get past registration without Play services. However, when i try to open a new chat window, i.e. click on the name of a contact, I'm presented with a black screen and have to kill the app.

@Genis-Sage
Copy link

hey @visika
having a black screen is a completely different topic, so you should open a new bug for that

@ioogithub
it was discussed quite widely here, that the way with adb does not work correctly
https://community.signalusers.org/t/why-am-i-being-forced-to-use-google-play-services/10410/15

so you either need

  1. root to uninstall them completely
  2. install a custom rom, and never install them

it was also mentioned, that it is enough to deactivate them to force signal to websocket connection

@hhirtz
if you want to have "add an option..." topic, this belongs into the forum, as it is a feature request
Signal Community
but in general, Signal devs follow the rule: The answer is not more options.

@cyberpencake
Copy link

cyberpencake commented Jun 7, 2020

There is a workaround
Disabling google via adb is not sufficient, because it still is linked somewhere in the system You need to remove/disable it this way too:

adb shell pm disable-user --user 0 com.google.android.gms

You can also see the original post here:
https://forum.kuketz-blog.de/viewtopic.php?f=31&t=6410

Another way, if you did not remove google-play-service yet, is to disable them temporarily in your device setting and reenable it after you set your signal working or remove it with adb uninstall.

@hhirtz
Copy link

hhirtz commented Jun 8, 2020 via email

@codethief
Copy link

codethief commented Dec 11, 2021

I'm facing the same issue, on GrapheneOS SQ1A.211205.008.2021120717 . I followed the on-screen instructions to transfer my messages from my old to my new phone. Once the transfer completed, I got asked to enter my phone number. I then hit the "Next" button and a popup opened, saying

Google Play Services is updating or temporarily unavailable. Please try again.

However, I had only installed Google Play Services in the work profile, not in the personal profile that Signal was installed in. Given GrapheneOS's sandboxing for Google Play Services, Signal should not be seeing any trace of them.

EDIT: I was able to fix the issue using the workaround posted by @cyberpencake . So it seems this is rather a GrapheneOS issue in my case.

@ph00lt0
Copy link

ph00lt0 commented Dec 11, 2021

@codethief sandboxing does not prevent Signal from seeing GMS apis availability, what makes you think that?

@codethief
Copy link

codethief commented Dec 11, 2021

@ph00lt0 I silently assumed that GrapheneOS would "hide" the APIs from apps when Google Play Services are not installed, precisely so that apps would not be under the (wrong) impression that they are available. I take it from your comment that this is not the case?

As for sandboxing, given my above assumption I was simply trying to understand why Signal would think that GSF is installed. AFAIU sandboxing means among other things that GSF doesn't run as root, so there should not be any way for information about GSF being installed inside my work profile to leak into my personal profile and thus to Signal. But if my assumption above is not correct in the first place, this sandboxing and profile separation is not of any relevance of course.

@ph00lt0
Copy link

ph00lt0 commented Dec 12, 2021

@codethief because you used to workaround that means that you had it installed?

"Since the Play services apps are simply regular apps on GrapheneOS, you install them within a specific user or work profile and they're only available within that profile. Only apps within the same profile can use it and they need to explicitly choose to use it. It works the same way as any other app and has no special capabilities. As with any other app, it can't access data of other apps and requires explicit user consent to gain access to profile data or the standard permissions. Apps within the same profile can communicate with mutual consent and it's no different for sandboxed Play services." - https://grapheneos.org/usage#sandboxed-play-services

@codethief
Copy link

@ph00lt0

because you used to workaround that means that you had it installed?

Again, I had installed Play Services in my work profile but Signal is running in my personal profile. So I would not have expected the workaround to have any effect, but it surprisingly did.

@ph00lt0
Copy link

ph00lt0 commented Dec 13, 2021

@codethief if you executed this command it must have been installed, user 0 is the main profile in android.

@codethief
Copy link

codethief commented Dec 15, 2021

@ph00lt0 Again, I only ever installed Play Services in the work profile of the main user account.

In any case, I think we need to be careful about the terms "user", "profile" and "account" here. Does user 0 refer to the main/personal profile of the main user account or does it only refer to the main user account (which has a main/personal profile and a work profile)?

@ph00lt0
Copy link

ph00lt0 commented Dec 15, 2021

@codethief that is very interesting, because the command should have failed you then and I see little reason why it would solve the issue for you. Profile and user should be regarded as the same in this context. Afaik the work profile is nothing different from a secondary user profile other than it being integrated.

@Saroumane
Copy link

@ph00lt0 I silently assumed that GrapheneOS would "hide" the APIs from apps when Google Play Services are not installed, precisely so that apps would not be under the (wrong) impression that they are available. I take it from your comment that this is not the case?

As for sandboxing, given my above assumption I was simply trying to understand why Signal would think that GSF is installed. AFAIU sandboxing means among other things that GSF doesn't run as root, so there should not be any way for information about GSF being installed inside my work profile to leak into my personal profile and thus to Signal. But if my assumption above is not correct in the first place, this sandboxing and profile separation is not of any relevance of course.

Very interesting, have you reported the problem to GrapheneOS ?

@codethief
Copy link

@Saroumane Thanks for the reminder! I had a brief look at existing issues in the GrapheneOS bug tracker and linked this discussion here in the (I think) appropriate places.

@thestinger
Copy link

This isn't a GrapheneOS issue. Apps cannot see other apps or communicate with them across different user profiles. Work profiles aren't isolated to the same extent. It's no different than how it behaves on AOSP and the stock OS. Android apps can detect the presence of apps in the nested work profile from the user profile. The work profile manager can also choose to permit communication. It's simply how work profiles work. It's one of the reasons we strongly recommend user profiles. Work profiles exist for BYOD device management. They can be used as isolated workspaces but they are tied to a device policy manager which owns and configures them and aren't as isolated as a separate user profile.

@thestinger
Copy link

Your issue is also partly tied to bugs / limitations in the specific work profile manager you're using. It's not specific to GrapheneOS and will occur elsewhere.

@thestinger
Copy link

thestinger commented Jan 24, 2022

As for sandboxing, given my above assumption I was simply trying to understand why Signal would think that GSF is installed. AFAIU sandboxing means among other things that GSF doesn't run as root, so there should not be any way for information about GSF being installed inside my work profile to leak into my personal profile and thus to Signal. But if my assumption above is not correct in the first place, this sandboxing and profile separation is not of any relevance of course.

It's all explained well at https://grapheneos.org/usage#sandboxed-google-play. There is no special sandbox in GrapheneOS for Google Play. GrapheneOS doesn't include Google Play or the standard integration for it. Therefore, they aren't privileged apps with dozens of whitelisted privileged permissions, custom SELinux MAC/MLS policies and integration into the OS as backends for different services. Our compatibility layer teaches them how to work as regular apps. They do not function any differently than regular apps. It's full standard app sandbox, not something special. The point of the compatibility layer feature is that they're regular apps with no special access or privileges meaning there is nothing special to learn about what they can do or access. It works the same way as every other app. I think you're misunderstanding what's provided by GrapheneOS. It's simply a compatibility layer teaching them how to work as fully sandboxed apps. Without the compatibility layer, they would simply chain crash from not having the deeply invasive OS integration and broad privileges including not being sandboxed as normal apps.

Google Play has no special ability to communicate with other apps or any way to bypass profile limitations on GrapheneOS. It's a regular app. That's already the baseline without us doing anything special. All we do is make it function to the extent possible as a sandboxed app.

@codethief
Copy link

Google Play has no special ability to communicate with other apps or any way to bypass profile limitations on GrapheneOS.

I wasn't claiming anything like that. :) To the contrary, that was exactly my understanding – which is why I was so surprised that Signal still detected Play Services somehow. What I simply didn't know was that

Work profiles aren't isolated to the same extent [as user profiles]. It's no different than how it behaves on AOSP and the stock OS. Android apps can detect the presence of apps in the nested work profile from the user profile. The work profile manager can also choose to permit communication. It's simply how work profiles work.

Thanks for clearing up the confusion!

@thestinger
Copy link

I do think it would make a lot of sense if work profiles could be closer to user profiles but at the moment that's not how it works. Keep in mind the feature exists for BYOD enterprise deployments as a way to have a device policy manager not in charge of the device as a whole (device owner) but rather only a profile (profile owner). Privacy was a factor in the design but it wasn't designed for use with a local device manager as a way to have an isolated workspace for other uses. It also has support for the device manager allowing communication across them to a certain extent for usability reasons.

Imagine if instead you could have a user profile loosely tied to another so that it remains unlocked until that one is locked and you could do something like swiping between them via the status bar. Also, some way to see you have notifications in the other one. I think that's what people really want rather than how work profiles function. Work profiles are honestly quite odd. They're useful but... they aren't the direction we want to go for GrapheneOS.

@codethief
Copy link

Thanks a lot for elaborating and sharing your thoughts, Daniel! I suppose we should continue this discussion in the issue you created. :)

@lerokko
Copy link

lerokko commented Mar 18, 2022

So this issue is open for over 2 years? Does that mean that de facto signal requires google play services. I only see people here saying they are having the same issue and some of the finding workarounds by installing google play services. Am I just lost if I wanna run signal without having to installing them or jumping trough a bunch of hoops?

@cody-signal
Copy link
Contributor

cody-signal commented Mar 18, 2022

The app is fully capable of operating without Play Services. I do it all the time during development, I intentionally have an emulator and a physical device running Lineage that do not have play services installed. The issue here isn't with Signal, but with the OS reporting that some flavor of play services is installed and reporting the status about it incorrectly. This is not something we can control or special case.

When the proper "Google Play Services" not installed code is returned by the OS, this dialog is displayed and allows you to continue:

@ph00lt0
Copy link

ph00lt0 commented Mar 18, 2022

@cody-signal many people do experience this problem because you do not allow fallback when the app thinks GMS installed when in fact it is removed from the user profile. This is a bug imo. You should either improve the detection or just allow people to manually enable the fall back option. Why not just make this a toggle in the advanced settings menu? I really don't see why that hasn't been done yet.

@cody-signal
Copy link
Contributor

I recognize and understand your opinion, but I don't fully agree with it.

the app thinks GMS installed

This is because the OS is telling us that it is! And when this is true, and it is updating, it is a completely valid situation to be in. We would then want to encourage them to try again later because the experience/performance is much improved with push notifications.

allow people to manually enable the fall back option

We may look into something like this, but it would likely involve a time component or number of tries, as we wouldn't want most folks to go down that route for the same reliability/perf reasons.

Why not just make this a toggle in the advanced settings menu? I really don't see why that hasn't been done yet.

Everyone. EVERYONE. Wants their one little thing as a toggle in a settings menu. It's just not feasible or good design. Settings can't be an attic to just shove random stuff for each person/subgroup wants. It's just untenable.

@lerokko
Copy link

lerokko commented Mar 18, 2022

I was not aware of the "misreporting" by the operating system. This makes more sense now, but an option to force the use of the fallback system would be nice.

@cody-signal Thank you for clearing this up.

@ph00lt0
Copy link

ph00lt0 commented Mar 18, 2022

I recognize and understand your opinion, but I don't fully agree with it.

the app thinks GMS installed

This is because the OS is telling us that it is! And when this is true, and it is updating, it is a completely valid situation to be in. We would then want to encourage them to try again later because the experience/performance is much improved with push notifications.

allow people to manually enable the fall back option

We may look into something like this, but it would likely involve a time component or number of tries, as we wouldn't want most folks to go down that route for the same reliability/perf reasons.

Why not just make this a toggle in the advanced settings menu? I really don't see why that hasn't been done yet.

Everyone. EVERYONE. Wants their one little thing as a toggle in a settings menu. It's just not feasible or good design. Settings can't be an attic to just shove random stuff for each person/subgroup wants. It's just untenable.

The only reason I am asking is because a lot of people are having this issue. I have moved to a phone now without it being installed at all but people who uninstall GMS from the main user profile will always suffer from this if you don't change it.
The OS does indeed tell you that it is installed but you should check if it is installed for the current user instead, that will give different results...

@cody-signal
Copy link
Contributor

The OS does indeed tell you that it is installed but you should check if it is installed for the current user instead, that will give different results...

Got a code snippet I can try out?

@ph00lt0
Copy link

ph00lt0 commented Mar 18, 2022

Unfortunately no, but when checking for apps in adb you can always filter with --user 0 so I assume similar should be possible in the app code base.

@novocaiin
Copy link

So this issue is open for over 2 years? Does that mean that de facto signal requires google play services. I only see people here saying they are having the same issue and some of the finding workarounds by installing google play services. Am I just lost if I wanna run signal without having to installing them or jumping trough a bunch of hoops?

Personally I've no idea what those people are talking about.
I regularly use Signal in the owner profile and don't have and have never had Play apps on it.
Never had to do any workarounds or look anything up, just installed the apk from Signal's website.
The only issue is battery drain, but that's expected with absence of Firebase.

@Saroumane
Copy link

So this issue is open for over 2 years? Does that mean that de facto signal requires google play services. I only see people here saying they are having the same issue and some of the finding workarounds by installing google play services. Am I just lost if I wanna run signal without having to installing them or jumping trough a bunch of hoops?

Personally I've no idea what those people are talking about. I regularly use Signal in the owner profile and don't have and have never had Play apps on it. Never had to do any workarounds or look anything up, just installed the apk from Signal's website. The only issue is battery drain, but that's expected with absence of Firebase.

Regarding this specific battery drain (Signal without Google play services) : I barely notice it when I can use wifi for the whole day. (instead of using 4G for data)

@ph00lt0
Copy link

ph00lt0 commented Mar 20, 2022

Never had to do any workarounds or look anything up, just installed the apk from Signal's website.

If you read the comments it explains very well. This isn't about custom roms that never had GMS installed. The problem lies where users manually remove GMS from the user profile via ADB as debloat strategy. In that case you cannot use Signal as it still thinks it is installed (which technically is sort of true, but it won't run anymore).

@novocaiin
Copy link

Never had to do any workarounds or look anything up, just installed the apk from Signal's website.

If you read the comments it explains very well. This isn't about custom roms that never had GMS installed. The problem lies where users manually remove GMS from the user profile via ADB as debloat strategy. In that case you cannot use Signal as it still thinks it is installed (which technically is sort of true, but it won't run anymore).

OMG so sorry I was browsing the GrapheneOS issue tracker and somehow ended up here but still thought I was in the GOS repo.

@lerokko
Copy link

lerokko commented Mar 21, 2022

If you read the comments it explains very well. This isn't about custom roms that never had GMS installed. The problem lies where users manually remove GMS from the user profile via ADB as debloat strategy. In that case you cannot use Signal as it still thinks it is installed (which technically is sort of true, but it won't run anymore).

FYI, in my case I did not remove GMS. I had this issue with just the plain install of LineageOS (alioth), which to my knowledge comes without Google Play Services (I even got the popup in Signal telling me its missing). I then used microG's image packaged with microgG and now it works.
I would not have come here if it wasn't for that popup telling me "You can still use Signal,... "

@haffenloher
Copy link
Contributor

The problem lies where users manually remove GMS from the user profile via ADB as debloat strategy.

Does that mean that you're doing

adb shell pm uninstall --user 0 com.google.android.gms

? If so, users have had more success doing

adb shell pm disable-user --user 0 com.google.android.gms

instead.

@ph00lt0
Copy link

ph00lt0 commented Mar 22, 2022

@haffenloher disabling GMS doesn't work in many phones and on other devices other system apps will automatically re-enable it. By running uninstall with many models you can 'brick' this behavior.

Edit: It is also my understanding and experience that if you disable GMS Signal still won't work. At least the signup and notifications after do not. When you disable it after install and don't care about notifications it is less of an issue.

@haffenloher
Copy link
Contributor

@ph00lt0 During registration, Signal explicitly checks if com.google.android.gms is disabled and, if that's the case, falls back to its own push notification mechanism. If that doesn't work for you, please consider opening an issue with detailed repro steps and a debug log.

Apparently you can even use pm disable-user after doing pm uninstall (?)

@ph00lt0
Copy link

ph00lt0 commented Mar 27, 2022

@haffenloher the main problem has nothing to do with disabling GMS. Once again the problem appears when uninstalling the app from the user profile, which is a work around for people who cannot disable GMS in their OS. This "disable-user" command on GMS doesn't work in many different flavors of Android. I do agree it's hacky but for many people this is a step they make to get rid of google. I really don't understand why you wouldn't support a more flexible fallback.

@stale
Copy link

stale bot commented May 26, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label May 26, 2022
@stale
Copy link

stale bot commented Jun 3, 2022

This issue has been closed due to inactivity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

15 participants