Android: How to Enable Location Reporting & History

ShareShare on RedditShare on StumbleUponShare on FacebookShare on Google+Tweet about this on TwitterShare on LinkedInEmail this to someone

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:

  1. Return fake data to Google Play service to make it believe you are in a country which supports Location Reporting.
  2. 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:

    1. Run a script upon each boot (init.d support needed).
    2. Use one-time carrier mocking app, such as Market Enabler.
  3. 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:

Items Xprivacy Carrier mocking GPS spoofing
Script Market enabler
Convenience Good Good Good Bad (have to find a working physical location beforehand)
Set-up difficulty Easy Easy Easy Moderate
Stability Good Good Bad (have to keep the app on) Bad (Have to keep the app on)
Compatibility Good Bad Bad Worst (tampering the GPS will lead to usability problems to all apps)
Performance influence Little None (one-time set up) Moderate (have to keep the service running) Moderate (have to keep the app running)

XPrivacy

As you learned earlier, you need to have Xposed Module and XPrivacy installed already.

XPrivacy main UIXPrivacy Google Play services detailXPrivacy Google Play fake data

  1. To begin, open XPrivacy and find Google Play services which is integrated with other Google apps.
  2. Scroll down and check Phone, then uncheck all other permissions except the following:
  • Srv_getIccSerialNumber
  • Srv_getSubscriberId
  • getSimCountryIso
  • getSimOperator

(Real names may vary depending on distinct ROMs, but they should look alike)

  1. 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
  1. 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: Script

Get the script first. Put it into your init.d folder so it executes on every boot. If your ROM doesn’t support init.d, try your luck here. As you can see, the script sets sim parameters to the one provided in XPrivacy, but the change is effective globally. All apps will be mocked with the info.

Carrier Mocking: Market enabler

Market enablerMarket 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.

GPS spoofing

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.

Summary

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:

  1. 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.
  2. 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.
  3. 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:
  • Configuration.MCC
  • Configuration.MNC
  • getSimCountryIso
  • getSimOperator
  • getSimOperatorName

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.

[Total: 7    Average: 3.1/5]
ShareShare on RedditShare on StumbleUponShare on FacebookShare on Google+Tweet about this on TwitterShare on LinkedInEmail this to someone