3

I noticed there are apps like Shazam or Tiktok that can find my location/country and offer local content even when I use VPN. my VPN doesn't have any IP/DNS leak.

When I remove the simcard or make it offline in the settings, clear app data and relaunch those apps, then they show content based on the country of my VPN server.

My question is how is it possible that they do this and ask no permission from me? I use latest Android 12, Samsung Galaxy S21 Ultra. this happens on other phones too, for example running Android 9.

Is there a way to prevent this kind of information disclosure without removing/offlining the simcard or rooting the phone?

4
  • Is your VPN always active? If not that may be the leak. Besides that no app has direct access to the SIM card, but information like the mobile network name you are connected to can be used if the app has the appropriate permissions.
    – Robert
    Jul 23, 2022 at 18:04
  • yes it is always active, using Windscribe pro. this isn't a new thing for me though, for the past year or two, using different VPNs, this has always been an issue for me. I even enabled always on VPN in the settings, but the moment I offline or remove the simcard, clear app data and relaunch Tiktok or Shazam, everything works as expected and my location switches to the one from my VPN server.
    – user376694
    Jul 23, 2022 at 18:07
  • 1
    Any app can get the country code if the device is connected to a cellular network. No special permission is needed to call getSimCountryIso or getNetworkCountryIso. You need a framework mod like XPrivacyLua to have such level of control. Jul 23, 2022 at 18:32
  • 1
    @IrfanLatif Thank you, I hope Android changes that in the future versions. for now I'll resort to setting my simcards offline because as you said the alternative would require rooting my phone which is a big no for me for now.
    – user376694
    Jul 23, 2022 at 18:39

1 Answer 1

6

Apps cannot access SIM card directly, neither they can get your exact location without getting permission. But they can get your country code if the device is connected to a cellular network. No special permission is needed to call getSimCountryIso or getNetworkCountryIso. You need a framework mod like XPrivacyLua to have such level of control.

2
  • Can the marked answer in here help? stackoverflow.com/questions/49919745/…
    – user376694
    Jul 25, 2022 at 10:15
  • 1
    A quick look at Android 12 source code indicates that getSimCountryIso should return the value set in gsm.sim.operator.iso-country property. But getNetworkCountryIso still returns the actual country code which is cached within the Telephony service. // Irrespective of that 1) setting property requires root access, and 2) it affects the whole operating system, which means that some apps may behave unexpectedly, or you may see a different locale (language, data, time etc.). Jul 25, 2022 at 11:03

You must log in to answer this question.