The privacy shield is not only for privacy concerns. You can also enable non-globally available Google Play Location Reporting & Reporting by XPrivacy.
Previously we’ve talked about how to protect your sensitive data with XPrivacy. Actually, with the help of fake data return, you may enable some limited functions by delivering custom data to certain apps. Let’s take Google Play services as an example. In China, Location Reporting and Location History are not available, other services which apply similar regulation, such as Google Fit (based on location reporting), and Google now, can be enabled by these method too. There’re three ways to achieve this:
- Return fake data to Google Play service to make it believe you are in a country which supports Location Reporting.
- Carrier mocking.
Cloak your carrier with a supported one, such as Verizon in US. Basically the same with XPrivacy. There are two ways to achieve this purpose:
- Run a script upon each boot (init.d support needed).
- Use one-time carrier mocking app, such as Market Enabler.
- Physical GPS mocking. Tamper your GPS in a software approach to make the whole system believe you’re in a different physical location.
Here’s a comparison table for these solutions:
[table “” not found /]
As you learned earlier, you need to have Xposed Module and XPrivacy installed already.
- To begin, open XPrivacy and find Google Play services which is integrated with other Google apps.
- Scroll down and check Phone, then uncheck all other permissions except the following:
(Real names may vary depending on distinct ROMs, but they should look alike)
- Tap Menu, then Settings. Fill in the fake data. The example is on the picture, you may also use your own working ones:
- MCC: 310
- MNC: 004
- Country: US
- Operator: Verizon
- Tap Save.
After a few minutes, Google Play services will detect the change and prompt if you would like to enable Location Reporting and History, if you had enabled it earlier. If no notification is shown, you may enter Google Location Reporting and enable manually.
Carrier Mocking: Market enabler
Market enabler is an old-aged tool initially used for downloading locale-restricted apps. Set your carrier in the one in US and you’re done. It is almost the same with init.d script, but it consumes resources as it doesn’t close after changing your carrier. If init.d can’t run on your device anyway, you may want to try this gear.
I don’t recommend you to take this measure unless you anticipate what will happen: all of your apps that demand a position will be forwarded with the location you designated. You may have to reboot your device before the GPS works normally. Get it here.
Just find a lovely place in US and start the service, soon you’ll be able to unleash location reporting. Note that once the service is offline, you are very likely to be discovered not a loyal US citizen which makes most of Google and probably what you’ve enabled can be automatically disabled. GPS spoofing is a considerable battery drainer. Again, think twice.
Well, goodies talk for themselves. XPrivacy and init.d script are outstanding for its super-low or zero resource consumption, which are also my keen recommendation to you. And in the end, I would like to remind you that, if your SIM card is from US regardless of where you actually are, your location reporting is always on, if you turned it so.
Google, however, for unknown reason, is performing different strategy outside of US. Location reporting were available to all countries before. Hopefully we’ll need this article no more and enjoy the same service despite where we live and what device we use in the future.
Update: In reply of Karen’s question, first I highly recommend the use of XPrivacy if ever possible. I’m assuming you have Xposed Module and Play services installed and running properly, so let’s begin with these steps:
- Is XPrivacy really working?
You may want to check this by restricting a specific permission of an app. For example, when you restrict calling permission of an app and you attempt to make a phone call within it, you’ll get a toast saying it’s been refused.
- Do you really have to enable it?
This article was meant for some areas which Google doesn’t officially provide Location Report and other functions, such as China. If you can enable Location report without having to make any modification to your system, I strongly recommend it. Because the workaround introduced can mask your real carrier and therefore can cause some unpredictable consequences.
- Did you restrict the right permissions of the right apps?
It sounds tricky but the truth is from AOSP Android to drastically modified Android (like MIUI), from official Play services to 3rd party Play services (such as OpenGapps), the permissions can really differ. I’m giving the example on the basis of my phone, in spite of the fact you can customize your own fake carrier info, like Centennial Communications. I restrict (return the fake info actually) the following permissions for Google Play services and Google Partner Setup on Android 6.0.1:
with the info introduced above applied globally on XPrivacy. You may want to do an app data wipe for Play services and wait a few minutes before it detects your device info. Again, the specific configuration may vary based on your device. You may try similar named permissions. And remember allowing some minutes before you check the status again after you have wiped app data.
For now I’d be against GPS Spoofing since it’s ridiculous to tamper GPS in such a careless way. I was also told the mechanism of detecting whether you are eligible for Location Reporting has evolved for the time being. So despite there are other options, XPrivacy method is still the very appropriate choice in this case.