Help with Xprivacy settings relating to Google Apps

Hi folks,

I recently restored all my FP apps from backup and played with XPrivacy settings during the process. Now, my WiFi symbol won’t turn blue (as it does when your phone is connected to the Google servers). As a result, I don’t get push messages via Google Cloud messaging any more. I would appreciate if someone using both XPrivacy and GApps would help me to find out which filters in XPrivacy are affecting GCM.

My restore process was as following, on a really factory-reset phone, after unifying the partitions:

  • installing the XPosed framework
  • installing GravityBox and XPrivacy
  • installing Google Apps
  • when prompted, declining a lot of stuff coming with GApps certain privileges, using the “expert” decline option, on a case-to-case basis. (See below for an example.)
  • installing TitaniumBackup, and the TB Pro key, from the Play Store.
  • restoring all apps + data using the batch process via TB Pro
  • using the XPrivacy setup button to provide fake data for every app, see below, and then applying the “default” template to each app.

Regarding the XPrivacy settings, I am no Android expert, but a tinkerer with a techy background - but clearly, something went slightly wrong, since GCM is not working.

I try to be sensible, and of course do not provide fake location data to map apps. Interestingly, especially the Google+ app makes XPrivacy pop up every now an then and asks for a lot of permissions. Since I don’t use G+, I usually decline that stuff. One thing I noticd: I also declined all location access to the Google Play Store, but Google still knows where I am. This did work in the past, as I could see my device in the Devices & activity section of my account as registered in New York. Now, it shows my current location.

Quite interesting is that XPrivacy, I can not see any of the GApps, so I can’t look at the restrictions and remove/change them. Does anyone know whether there is a setting that I can switch on to see them?

Any help is appreciated. :sunny:

Hi, it is something I am looking in myself as well.

I also started a topic on the google forum about this, because I am not sure if it is related to Xposed Framework. I also tested it without. Rather looks like anything getting root access in combination with google services.
But I can’t say this for sure yet.

Though, what I do know it is related to the google services and play store. As soon as you perform an upgrade of an app or download a new app from the play store the problem is over and google services gets connected.
Also it is not Xprivacy because I don’t have this. Only GravityBox and a translation for LBE (which can be deinstalled because I don’t use LBE anymore).

1 Like

btw. also check this topic for more on Xposed Framework: Using Xposed Framework

Nope. I updated quite a lot of apps through the Play Store, and I still got no blue WiFi icon. (BTW, is there another way of checking than staring at this icon? :))

Also, I had XPosed 2.6.1 up and running before the reset, and I did not have this behaviour before. That’s why I suspect I restricted something which breaks the auto-connection to Google services.

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…