Help with Xprivacy settings relating to Google Apps

Have you checked the usage data in XPrivacy? There you can see what funtions get blocked.

Yep. One usage scenario: Threema.

Blocked:

  • Threema permission: phone/Configuration.MNC
  • Threema permission: phone/Configuration.MCC
  • GoogleAccount manager (…etc.): location/getCellLocation
  • GoogleAccount manager (…etc.): phone/getSimOperator
  • GoogleAccount manager (…etc.): phone/getNetworkOperator
  • GoogleAccount manager (…etc.) permission: location/getNeighboringCellInfo
  • Google Account manager (…etc.) permission phone/getNetworkOperator

I don’t see how any of this relates to messaging / GCM. Am I missing something?

If that’s all then I would say no. But keep in mind that it is tricky to block these system components without breaking things.

The Google Play Services at least need access to the local google account and other information like the device id and the GFS id (google services framework id). And internet access of course but that’s obvious. :wink:

To check the status for GCM you can open the dialer and type:

*#*#426#*#* 

(this opens the google play services monitor)

If GCM is working it will say that the device is connected to mtalk.google.com:5228

If it says “disabled” than you do not have the latest google play services installed. Google normally does update these without user notification in the background. The current version is: 7.3.29

The old way to check for GCM was:

*#*#8255#*#*

(The old Gtalk monitor, which got replaced by the google play services monitor since version 7.0.99)

You could try to start the GCM service by hand. Connect to your phone via adb or open a terminal session with Terminal Emulator and type:

su
am startservice -n com.google.android.gsf/.gtalkservice.service.GTalkService

Another important thing (although this has nothing to do with your problem): after re-installing the gapps (i.e. after an upgrade of the fairphone os) the GFS ID may gets replaced by a new one. This results in messages and notifications for applications making use of GCM like TextSecure, Threma, Telegram etc. being routed to the old GFS ID and so will never reach your device. To circumvent this there are two options:

  1. Re-register in TextSecure etc. so theses services get the new GFS ID

  2. Make a backup with TitaniumBackup of GoogleServicesFramework and restore this backup (it is a data only backup) after re-installing gapps.
    (This is my favourite solution since it is much more comfortable than re-registering every service that uses GCM and it works great).

3 Likes

I had a similar problem recently, after the upgrade to the latest beta. However i am not sure it is related.

And like @Sietse described, that was going away after an update of an app through the Play store, thought not any app . I cannot tell you which thought: I installed and updated several apps and nothing changed, but i then it suddenly worked again. I suspect the latest update to Google+ triggered what ever had to be done to repair that. Or it is just coincidence and a problem with Google Servers or some DNS servers in the web?

weird enough, without doing anything the problem got resolved for me today.

Seems like an issue with google services…

2 Likes

Thanks, @ralf_xda, that’s very helpful. I will look into the details later, but I already see a lot of errors in the Status part of Google Play services. Different states and error codes, and failed logins.

Maybe something went wrong when restoring all apps and data from Titanium Backup after the Motherboard was replaced. I tried to restore, e.g., the Android ID, and tried to re-register some messaging apps relying on GCM.

One question for clarification: what does the WiFi icon turning blue signal, anyway? Does it, e.g., signal an open connection to mtalk.google.com:5228, or is it related to some other connection?

Yes, the blue icon signals an open connection to mtalk.google.com:5228.
If one drops this connection via “disconnect” in google play services monitor the blue icon immediately turns grey.

2 Likes

I am right now having a closer look. First of all, I am “not connected” according to the Google Play services monitor.

It gives my my device ID, tells me “Not connected”, runs a countdown for the next reconnect attempt (ReconnectManager), reports the last network state notification as “0/UNKNOWN”, shows an ‘active network type’ as ‘1’ with a timer for the connection status, and reports the network status as “ON”, previous network status dito “ON”.

When I look what’s restricted by XPrivacy since opening the GPlayS monitor, I see that the Google Account Manager (etc.) gets blocked from acessing the following data:

identification/SERIAL
phone/Configuration.MCC
phone/Configuration.MNC
location/getCellLocation
phone/getSimOperator
phone/getNetworkOperator
location/getNeighboringCellInfo

in that order.
When I tap the “Status” button in GPlayS monitor, I see failed logins. Information given there is ev:1 state:3 err:4 net:1 and Login error 401. If this is the regular HTML error code , it means I am not authorised to log in. Which indicates that something is at odds - but for the heck of it, I can’t figure out what.

I restored my android ID after my motherboard was replaced, but this should not be the problem, right?

Unlikely, at least I had never problems after restoring a-id and gfs-id.

Maybe you get more information if you look what logcat says.
Does the play store work? You should keep in mind that the google services are device dependent. With obfuscating device related data via xprivacy google may think there is an abuse of your account under way.

Have a look at:

Your device should be listed there as active.

Maybe you should not block this if GPlayS identifies you with your device ID?
It’s only a supposition because not having GApps I can’t try this :smile:

Since the serial of every early FP1 is the same, this would lead to major havoc, I think. The serial is really not something GPlayS should use to identify one for any service - and I think it doesn’t, actually. :slight_smile:

Yes, the Play Store works.

Interestingly, in the device manager, I see my device has synced with Google servers after it booted this morning - and not since. (I turn it off most nights).

I’ll have a look at the logcat, if I manage. (This is my first android device, and I have no real experience in ix-related systems, sadly.)

Maybe GPlayS identifies you not only by device ID, I remember when I installed Blankstore in order to get apps from PlayStore without GApps, I had to create an ID using a java app and this ID was created using different infos including my Google account and some devices info (don’t remember well but a simply search on XDA could point you at this process :slight_smile: )
Bye!

I also remember that, I think it used the IMEI in the process.

I have given up using BlankStore when I wanted to support TitaniumBackup (and get some other paid apps, like Threema), so this happened a long time ago. Will look on XDA.

Other thoughts on the matter why the GCM is not connecting/pushing are still welcome! :slight_smile:

Could this be actually not related to Xprivacy but the upgrade of FP OS and reinstallation of Google Apps? I had similar problems, which where fixed by uninstalling WhatsApps and reinstalling from the Play Store, which seems to have fixed Google Cloud Messaging.

1 Like

It might. But it is affecting more than one app, and the fact that connections to GCM fail with an apparent authentication problem is off, then.

I am in fact waiting for 1.8.5, which still seems not to roll out, to see if the problem persists after upgrading. I am in 1.6, unified partition.

I seriously hope I can get the titanium backup update.zip to work, then. Would spare me some trouble…

I am on 1.8.5 and have the exact same problem as desribed above. Tried all the mentioned tips. Is there anything else I could try to get the connection to the play-store services back up running?

Hi @Johannes_Kraus,
I take it that you also use XPosed, with XPrivacy? (@All people NOT using XPrivacy, don’t despair, we will find a solution in another thread. :sunny:)

Here’s my current status: :signal_strength: I’m totally blue! I am still under the impression that Xprivacy had something to do with my problem, but I can’t figure it out.I hope relating my story helps.

I did the update form Cherry to Cola Nut now, and I got back connectivity. (Also, everything worked smoothly, so my backup precautions were not needed this time; still, better safe then sorry…)

When I installed the pre-update (updating the updater app), Google apps was defunct, I got a prompt by the FP OS that I should not forget to reinstall it. I did not, but applied the update from 1.6 to 1.8.5. Then I installed GApps via the updater app. I signed in and got the blue WiFi icon. However, I got a prompt by TextSecure that I was not connected to GApps a moment later. It did refuse to even open. (WTF? Without even prompting for my passphrase!?)

I had to go through a number of reboots next, i.e. to re-activate Xposed, and turn off and on push messaging in TextSecure, and maybe some other stuff. (Can’t remember properly, shit. Should have noted everything down, but was working aside. Sorry, @all!)

I did not have to explicitely turn on XPrivacy (and GravityBox) back on after re-initialising XPosed, and their rule sets are still very much in practice.

Sidenote: every reboot let Orbot kick in, which in some cases prevents me to connecting to GCM. (I guess there are some server in the Onion sometimes which might cause problems - I also often have to proof I’m not a bot quite often when coming from TOR network.) I have to turn it off then to get a blue WiFi icon, which I do only on trusted WiFis - not in a hotel, coffeeshop, public transport, and so on.

However, now, I am up and running again since quite a number of apps (and also Google Play Store) updated after opening the Play Store app, and I did NOT open the XPrivacy settings, but swiped the notification away. As I said, the rule sets are still in practice, and I can see in the usage data that e.g. MMC and MCC are blocked when Android itself (i.e., Google Services; UID 10060) want to access that data.

After opening a recently updated app, e.g. Google Play Store, I get asked if this app can access $data, which I then can decide case-by-case, and always first in Expert mode with “once for 60 minutes” enabled to see if it crashes the app, disrupts your connection to GCM, or has any other unintended effects. (Warning: I think the latter is utterly important: always, really always test first when restricting any Google App or other parts which are build in or entwined with the Android system.)

If you are still stuck without GCM, and have been using the XPosed framework with XPrivacy, my current advice would come in two flavours, which I BOTH did not test myself, so there’s a huge disclaimer: don’t blame me if it does not work.

Flavour one (The as-may-options-as-spices-in-a-curry flavour):

  • [Optional: Turn off location access and maybe all other syncing with Google, in the ‘Google Settings’ app.]
  • Go to a trusted WiFi, or use a data connection.
  • Turn of XPosed (Uninstall). Not XPrivacy, but the whole framework. Note that according to the developers GitHub page, Titanium Backup can not make a full backup of the settings, and you would need a pro license to export your settings. I’m not sure about this about this, because I can restore Xprivacy from Titanium Back Pro, but then, we’ve got \root.
  • Reboot, and make sure you are not using TOR afterwards.
  • If not yet connected to GCM (see above how to check), open the app which relies on GCM, e.g. a messenger like WhatsApp, TextSecure, Threema. Try to renew your connection by either turning off push messaging and turning it back on (you may also try if a reboot in between helps) or by using something like a “renew push token” setting.
  • If not connected to GCM yet, open the Google Play Store, go to my apps, and see if you can update any. Otherwise, choose any other app to DL, install it - you can de-install it later.
  • If not connected to GCM yet, try to de-install your messenger app in question (after doing a BACKUP, of course, using a proper backup solution!), reboot, then re-install it. If your messages are lost, try to restore ONLY the apps data from the backup. If that does not work, restore the whole app with it’s data from the backup. (If that does not work, please don’t be mad at me, I’m just trying to help here.)
  • If connected to GCM again, re-install your XPosed Framework, reboot, and see if XPrivacy is a) installed, and b) activated. You can try to restore it from your backup, if not. Again: I did not try this, but I’m just trying to help here.

Flavour two (The here’s-the-grinders-for-pepper-and-salt, spice-up-as-you-go flavour):##

  • Please read XPrivacy’s GitHub page, especially the sections 63 (troubleshooting) and 9 (update ROM).
  • Go to XPrivacy, and in the settings, activate the Expert mode, and flush the cache. I think now you are bound to set all settings again, for each app. If that is not the case, you can try the “clear all xprivacy data” option.

(Please note, while this might seem the easier option, but you will have to set all your restrictions again, which is very annoying if you use many apps.)

Now, I hope this helps. As I said, I’m connected to the GCM servers again, and I don’t know if ANY of this might help you. The two-flavour suggestions are just suggestions. If you try any of this, however, it would be really nice of you to report back what worked, and what did not.

Given my own track record of not remembering th exact steps of doing, it might be a good idea to copy-paste the suggestion followed, and just tick stuff off, and make short notes what happens. :wink:

2 Likes

I moved a post to an existing topic: Phone not connected to Google Play Services after every reboot