Skip to content
This repository has been archived by the owner on Sep 6, 2019. It is now read-only.

Fix restricting Play Services network location. #1822

Closed
Cyclu opened this issue Jul 20, 2014 · 8 comments
Closed

Fix restricting Play Services network location. #1822

Cyclu opened this issue Jul 20, 2014 · 8 comments
Labels

Comments

@Cyclu
Copy link

Cyclu commented Jul 20, 2014

I have tested Maps which I know use surely Play Services location: when Play Services is restricted to have a fake location (have to reboot the device after restricting it probably they had the data from the last known location fix before rebooting) Maps has no network location by cons the fake GPS location works.
Elixir2 (No Network location and GPS Location Ok) and Network Info II (No Network Location) have the same behaviour.
If you want any additional info give me a sign ;)

@M66B
Copy link
Owner

M66B commented Jul 20, 2014

Restricting locations for Elixir 2 and Network Info 2 works for me. Google Maps can be restricted by restricting get...Provider functions.

XPrivacy already hooks the public Play services functions, so there is little more I can do. Nothing is broken, there are just limits to what can be done.

This could all be fixed in XPrivacy 3, but I am still not willing to work on a mega new project. There are simple not enough XPrivacy users to justify this.

@M66B
Copy link
Owner

M66B commented Jul 20, 2014

This is the Play services location API documentation:
https://developer.android.com/reference/com/google/android/gms/location/package-summary.html

The classes ActivityRecognitionClient and LocationClient are hooked by XPrivacy.
These classes are deprecated, because they are being replaced by Play services 5.0 classes.

I will restrict the Play services location classes of Play services 5.0 as soon as Google releases the Play services 5.0 SDK, see also #1774

A little bit more detail: this is what happens:

Application process ->uses-> Play services library ->calls-> Play services process ->calls-> Android location service

The Play services process is a separate process with its own uid, different from the uid from the application.

The problem is that the Play services library and Play services process source code is not open source.
This means that XPrivacy can only restrict access to the Play services by restricting the Play services public API. XPrivacy can however restrict the Play services process from getting locations from the Android location services, because it uses the public location manager API (so far).

XPrivacy 3 could with a lot of effort restrict the location service process itself from delivering locations. This would not solve your problem, because there is no way to tell to which application the Play services process will delivery the locations to, so it would still be an all or nothing.

XPrivacy 3 is a lot of effort, because the location service is different with each ROM version and could be modified by custom ROM developers too. There are even obfuscated ROMs, for which XPrivacy 3 would not be able to do anything.

The above applies to other system services, like the account service, too.

@M66B M66B closed this as completed Jul 20, 2014
@M66B
Copy link
Owner

M66B commented Jul 20, 2014

One addition: Play services 5.0 is not being used by any application yet, except maybe for applications provided by Google, since no third party developer has access to the new SDK yet.

@Cyclu
Copy link
Author

Cyclu commented Jul 20, 2014

Yes they works without restricting Play Services precisely com.google.android.location (I can see this with Titanium Backup latest usage data function) (you think about this one but it's standard no? you ROM has it?) which is under shared UID
Restrict Play Services to have a fake location restrict this two functions: getCellLocation and getNeighboringCellInfo reboot the device all apps Elixir2 (GPS Ok), Network Info II, Soundhound, CoPilot (GPS Ok), RATP don't have network but only GPS location it's strange that work perfect for a fake GPS location also for Maps
For Maps or Play Service restricting get...Providers don't provide a fake network or GPS location but Offline status.
Wow XPrivacy 3 It's sound great! I understand you I hope see you working at this project as long as possible. XPrivacy it's already a masterpiece!

@Cyclu
Copy link
Author

Cyclu commented Jul 20, 2014

Thanks for these additional info I understand better now.

@M66B
Copy link
Owner

M66B commented Jul 20, 2014

I will not be working on XPrivacy 3, sorry.
I will however continue to support XPrivacy 2.

@Cyclu
Copy link
Author

Cyclu commented Jul 20, 2014

I think you will still get at least to version 2.99 ;) Good continuation Marcel!

@M66B
Copy link
Owner

M66B commented Jul 20, 2014

If I get funded $1,5M, like Yo, but else I wouldn't hold your horses.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants