[Q] Android won't use geo location of my wifi - Android Q&A, Help & Troubleshooting

Hey,
so I've got this weird problem where Android apparently ignores the location of my wifi. But let me explain:
Whenever I'm at home google now suggests that my current location is not where I currently am but rather 10 to 15 miles away from my home address.
That is kind of annoying because I get wrong weather updates, location based reminders will not work on my home address and my location history is a complete mess.
Android primarily uses these three methods for checking on your location:
- gps
- cell towers
- wifi
am I right?
So I did some tests:
1. Testing gps
In location settings I checked "Device only" (so that it would only use gps for determining my location) and opened maps
-> works flawlessly
2. Testing wifi
In location settings I checked "Battery saving" (only wifi and mobile networks). And activated airplane mode to ensure that it could not use mobile networks for location.
Reboot (any kind of "location cache" should then be wiped, I guess).
-> works flawlessly
3. Testing cell towers (mobile networks)
In location settings I checked "Battery saving" (only wifi and mobile networks) and then disabled wifi. In advanced wifi settings I unchecked "Scanning always available" (so that it could not scan for wifi networks even though I disabled wifi).
Reboot (any kind of "location cache" should then be wiped, I guess).
-> does not work flawlessly. It determines the wrong location (that google now always uses).
I live in a more rural part of the country so it makes perfect sense that mobile networks cannot determine my exact location, but why would Android ignore the wifi location (as we have seen, it knows where my wifi is located, otherwise it could not have shown me my correct location in test 2), when I'm signed in on the wifi network?
I tested this on two different devices (Moto X stock / HTC One S with CM 11).
Is there anything I could do?

*bumping
No one knows?
Could someone (who preferably lives on countryside, lol) try to reproduce this or tell me if this is how android is supposed to work (this wouldn't make any sense to me, though).
// This is the right board for this kind of question, isn't it? If not, feel free to move this thread :>

*bump

I still have no idea why this is happening.
If this is the wrong board please tell me or move the thread.

Have you ever had a GPS lock while being connected to the WLAN network? I would assume Google learns the MAC addresses and WLAN SSIDs and correlates them to your location ...

145
GarryKG said:
Have you ever had a GPS lock while being connected to the WLAN network? I would assume Google learns the MAC addresses and WLAN SSIDs and correlates them to your location ...
Click to expand...
Click to collapse
Yes. I'm using maps quite frequently (with gps enabled ofc).
But I am pretty sure google already knows the correct location of my wfi, since when I activate airplane mode and check "Battery saving" (only wifi and mobile networks are being used for location) in location settings, my correct location is determined. Since the airplane mode is activated it means that my phone can only use wifi for determining my location.
But as soon as I disable airplane mode my location is wrong again.
So I would conclude that, although google knows the correct location of my wifi, it just prioritizes mobile networks for some reason. Which is driving me insane.

*bümp

*bump
This is still bugging me. I mean I can't be the only one.

*bamp
The problem is still existent and is bugging me.
The forums look different now.

*bomp
I wish someone knew what causes this behavior.

*bemp
Even after all this time the problem still exists.

bömp
No answers

bämp.
So I guess there is no solution?
Anyway, I will keep bumping this thread but less frequent.

*bumping every once in a while.

Related

Current location issue

Hi all.
To get to the point, my Hero picks up the wrong current location for all applications, including the weather, homescreen clock (when set to current location) and even Hoccer when set to use my mobile network. When it is set to use WiFi, there is no issue, but when it is set to use the Mobile Network, then it seems to believe that it is in Dubai. I am in South Africa at the moment, and more specifically, Cape Town. Obviously using WiFi, I get the location right down to my suburb.
This leads me to believe that obviously the local tower that my phone uses in the area is a reference to another location on the location servers. Now, I have two questions:
1) Does anybody perhaps know a way to solve this?
2) If there is no direct solution, is there a way to either A) manipulating the phone into reassigning the correct location number if it is getting signal from the tower that puts it in Dubai. In other words, IF tower ID is 452(Tower that gives out Dubai), then SET tower ID to 123(Another tower in the area). B) Is there perhaps a way to loge a fault for whoever controls the location servers to perhaps fix this issue?
Thank you for your help!
Padie
What rom are you using?
Just set your location maybe? Instead of using the auto detect
Same problem
Hmmm, it seems I was hit by same problem using MrBang ROM (http://forum.xda-developers.com/showpost.php?p=5767289&postcount=347)
I have discovered that it is actually ROM independent. I have tried Modaco, CKDroid, KaguDroid, and MrBang. All the ROM's have given me the same issue.
I do set my location for weather etc, but I cannot set my location for programs that use the phone's current location, such as Hoccer. If I use my GPS, then it will chew battery, and take too long to acquire the location.
it might be that your network is not programmed to give out a location
Edit: have you actually turned the location enabler thing on in the settings?
I have the "Use wireless networks" feature on to detect my location, but I have kept the "Enable GPS sattelites" option off for now, because it wastes battery and takes too long to aquire locations.
MrPadie said:
but I have kept the "Enable GPS sattelites" option off for now, because it wastes battery and takes too long to aquire locations.
Click to expand...
Click to collapse
Are you sure? I have mine on all the time. It is only actually used when a programme asks for it. Battery usage is OK with me, considering it is a feature full smartphone (so it is never going to be as good as a dumb phone).
And mine locks onto locations very quickly - ussually a few seconds. MUCH quicker than my old WM Touch Diamond

[REQ] Disable mobile network when wifi connected

I am looking for an app that automatically switches off the cellular radio when wifi is connected and switches it back on when wifi loses connection. I'm not talking about the APN data connection which already does that, I'm talking about the regular cell phone connection.
According to my lack of results searching through the forums, Market, and Google, such an app does not exist yet. Currently the best app I've found to do anything remotely like this is the Airplane Mode Wi-Fi app, which is a manual switch and a slightly cumbersome one at that, not nearly good enough for how often I go in and out of wifi.
The reason I ask for this is because I use Google Voice with SIP and a prepaid plan. I want to use SIP as much as possible to save my prepaid minutes for when I really need them. When wifi and cell are both connected with Sipdroid running and I receive a call, they both ring at the same time. To be sure I don't accidentally use prepaid, I usually reject the call and call back over SIP, which is slightly annoying for both me and the caller.
Might someone be willing to create this app? Or better yet, does it already exist and I just wasn't doing the right searches?
You can turn the phone radio off with code but you need to use non-public apis and probably extra permissions. For anyone interested, have a look at RadioInfo.java (Phone Info when selecting an activity with AnyCut).
I'll add the option to the Airplane Mode Wi-fi Tool.
It was simple, I'm testing it right now, then I'll update it in the market as soon as it works properly.
UPDATE: Done, go download "Airplane Mode Wi-Fi Tool" (free) from the market if you'd like to stay updated from there, otherwise install it from the attachment here.
It only enables airplane mode if it successfully connects to a Wi-fi network, if it disconnects, connection gets dropped, or wi-fi gets disabled from the settings or widget, the phone goes back to regular radio mode.
Make sure to check the Preferences and enable/disable it according to your preferences. It's disabled as default.
Enjoy!
Perfect! Airplane Mode Wi-Fi Tool has become one of my top favorite apps with this feature. Thanks!
cant' find it on the market
sorry: I needed to search for the translated name
zorxd said:
is this app still available on market? Can't find it.
Click to expand...
Click to collapse
It is, Market link -- Airplane Mode Wi-fi Tool
Also, you might be interested in this one, Market link - AutoAP
I found the application on the market, however it doesn't behave as expected. I have to manually switch to airplane mode, and then enable wifi.
What I would like is a single switch to enable wifi AND disable the cellular radio.
And then a single switch to switch back to cell radio with wifi off.
I will try autoAP, thanks
How hard is it on the battery if I always leave wi-fi on even when not used?
autoap seems just fine, I just have to disable wifi to automatically enable cell radio
thanks
However I think, from a marketing point of view, you should consider a better name. Auto AP sounds like Automatic Access Point to me.
Yeah, works fine on tablets without internal 3G. This provides a battery saver.

[Q] Connects to mobile network even when wifi is available

Hi all
Not a power user's dilemma I'm afraid but I hope someone can help me out...
What's bugging me is that my wife's LG-P500 incurs a small charge every day because, despite all the settings telling me it should NOT connect to the internet via the mobile network at any time, it somehow still connects - even when wifi is available like at home.
This wouldn't be a big deal normally but because she's on a pre-pay txt only plan her credit gets used up quickly.
My HTC Wildfire uses NO mobile connection at all when I have wifi available. Any ideas why this should be happening with our LG-P500?
Great forums by the way and I'm slightly embarrassed to be raising this probably noob topic here but I can't find an answer anywhere else...
Thanks in advance!
I haven't seen that problem on my P500, with the void echo ROM (the stock firmware didn't stay on the phone long enough for me to try that).
The option to disable it is in:
Settings -> Wireless and network settings -> Mobile networks -> Data enabled (should be unchecked)
Or in the drop-down menu of the notification bar.
I'm not sure about the stock ROM, but on void, an additional icon appears on the notification bar whenever the mobile network is active.
You could also try disabling the option:
Settings -> Accounts & sync settings -> Background data (should be unchecked)
Thanks. I already did all the obvious stuff you mention, having seen it work fine on my Wildfire... Any other ideas out there?
Might this be related to Location Services using Cell tower information ?
Could try turning that off anyway.
If you don't want to use the mobile network for internet access, than go to Settings > Wireless & network settings > Mobile networks > Uncheck Data enabled .
If the network allows you, you can also select Network mode > GSM only, this will also save you some battery. For example, I only use wifi to connect to Internet on my phone, and I also checked the option "Use only 2G networks" (also saves battery), I'm connecting to my operator only for phone calls
What is your Wi-Fi sleep policy settings? Try setting it to Never.
When the phone goes into sleep mode, wifi is turned off to save on battery. May be that's the reason mobile network is getting connected in sleep mode. If u enable wifi policy to never sleep that will drain the battery. You can disable the mobile network from th3 notification bar that should help.
Many thanks for the help guys!
Wifi sleep: good idea, I'll look at that!
Location services: good idea, I'll look at that!
Data enabled: unchecked already.
The problem still strikes me as odd because although I have ALL the same apps (and quite a few more...), I don't have this problem with my little HTC Wildfire...
Update: the only way I could find to resove the issue was to invent and use a nonsense APN...
Wifi sleep was already ticked as "never" by the way.
Thanks again everyone who gave advice.
Yeah, I've also had reason to use an APN named "fake" with a proxy named 'fake", although i use "Z" now to save typing, LOL.
This is one of many things i would do when changing SIMs. I have had one SIM and phone that always set a new APN and this ended up costing me a few bucks in data fees before I re-changed the APN info.
I would also disable the data services, make sure WiFi was on (to provide priority data access) AND enable airplane mode.
Anyway, your experience has inspired me to check more deeply about my data usage. I don't like the idea of my phone doing data without my knowledge while it's in standy.
I prefer to manually choose which connection I would like to use, so if I'm using my data plan such as when I'm out, I go to notification and enable data. I only get 200mb a month so its easier for me than to always keep networks on even when I'm not using them. It also saves on the battery as well.
EDIT: you can check your data usage using 3g watchdog app, find it in android market
It easy to solve. Just install APNdroid
https://market.android.com/details?id=com.google.code.apndroid
It also has a widget. Works very well.

Clarification on Location with WiFi

Howdy, understand that since v6, Android requires "location" to be enabled for any WiFi scanning.
This apparent requirement renders any "WiFi Analyzer" app unusable, which means having to break out the laptop just to see how strong an SSID's signal strength might be (and have said laptop on hand, powered up, etc., when I already have a perfectly good - albeit useless, with location turned off - scanner sitting in my hand).
Have also heard that this "location" access is "network based", and not truly "location" in the sense that it isn't using GPS to identify exactly where the phone is, i.e. its physical coordinates in the world.
Could someone clarify if:
It is true that allowing "location" on a WiFi scanning app does not actually enable GPS location of the device, and if so, how I would be able to verify that GPS location is still disabled.
Assuming the above is true, whether there are more fine-grained settings which could ensure actual GPS location services remain disabled for the device in general.
Assuming the above is not true, why the good people of G would be so boneheaded as to tie WiFi scanning in with "location" when it is really something different? (IMHO this just confuses things and makes me not trust the app.)
Please advise. Thanks!

I haven't found the "one" best mock location fake gps app - but I found a few good ones (I use Lexa the most but others are better but they have ads)

I haven't found the "one" best mock location fake gps app - but I found a few good ones that have ads.
But if I had to pick just one as the "best", I'd pick Lexa simply because it works without ads.
*Fake GPS Location* by Lexa​Free, no ads, requires gsf, rated 4.6, 456K reviews, 10M+ Downloads​<https://play.google.com/store/apps/details?id=com.lexa.fakegps>​​
Note that these mock location apps are set inside the operating system, such that EVERY app gets their information from them, and that these mock location apps can randomly move along roadways by a given distance per a given time period, and they can start at the last location, and they can randomize the amount of movement per second, and they can spoof the altitude, and some can set a specific exact location by the keyboard instead of only graphically, etc. They can even send the location to another phone or get the location from another phone if you want that.
Click to expand...
Click to collapse
But others (with ads) do a better job of random location following roadways with random movement time periods.
Others (with ads) can also shift the GPS location from one phone to another (either way) - but what use is that for you?
Also others (with ads) can spoof both the wi-fi provider & the GPS provider - but what use is that for you?
Which fake GPS mock location app do you feel is best and why?
GPS position falsification is currently not very effective when RIL is enabled on the phone. Apps can easily orient the phone in space based on the signal strength to the network operator's mast.
ze7zez said:
GPS position falsification is currently not very effective when RIL is enabled on the phone. Apps can easily orient the phone in space based on the signal strength to the network operator's mast.
Click to expand...
Click to collapse
For privacy reasons... I have every setting for location accuracy turned off, and I also have every unused radio on the phone turned off (e.g., NFC, bluetooth, gps, wi-fi, etc.) and my phone's wi-fi does NOT reconnect (auto-connect is turned off) as my home AP SSID is hidden (for privacy, not for security!) and it has a "_nomap" appended to keep out of the well-behaved databases such as Google/Mozilla, but not Wigle/Netstumbler/Kismet,etc, which aren't well behaved, and I randomize the phone's Wi-Fi MAC upon every connection - which is a new feature of Android 12 in Developer options, etc., ....
... But I had to look up what RIL stands for, so I thank you for bringing up that unknown-to-me Radio Interface Layer detail...
RIL references:
https://wladimir-tm4pda.github.io/porting/telephony.html
https://source.android.com/devices/tech/connect/ril
Specifically
Radio Interface Layer: It is the bridge between Android phone framework services and the hardware. In other words, it is the protocol stack for Telephone. The RIL consist of two primary components.​
RIL Daemon
Vendor RIL
RIL Daemon​​RILD will be initialized during the Android system start up. It will read the system property to find which library has to be used for Vendor RIL, provide the appropriate input for vendor RIL and finally calls RIL_Init function of Vendor RIL to map all the Vendor RIL functions to the upper layer. Each vendor RIL has RIL_Init function.​Vendor RIL​​It is a library specific to each modem. In other words, we can call it as a driver to function the modem. The RIL daemon will call the RIL_Init function with the device location (eg: /dev/ttyS0). It will initiate the modem and returns theRIL_RadioFunctions structure contains the handles of radio functions​
After skimming that RIL information, I'm not sure exactly what you're trying to tell me, but I guess you're saying that we can be geolocated when we make phone calls and even when we don't, in that the cell towers can be triangulated if the phone is in calling mode... which I understand full well.
But, in terms of privacy, how many apps that need to be fooled by their GPS location have access to that cell tower radio location information?
You understood correctly. A phone in call mode, as you wrote, can be easily located while moving.
The google map tricked out by "Fake GPS Location", does quite well while driving a car, as I recently verified in the field.
I don't analyze the app for route tracking.
ze7zez said:
You understood correctly. A phone in call mode, as you wrote, can be easily located while moving.
Click to expand...
Click to collapse
I agree with you that any phone, if it's going to be used for two (or three) things, will be easily tracked by those with the resources to do so
Make/receive phone calls
Send/receive sms/mms texts (mms requiring data)
Wi-Fi connections (aka "the Internet")
However, in all cases above, the geolocation isn't as accurate as with GPS (if you are judicious about your location settings), and, more to the point, the applications themselves don't have access to the cell tower information (although they do have access to your IP address, which can be roughly geolocated).
We have to assess our threat level where I'm not using fake location apps to hide from a well-funded TLA adversary; I'm using the fake location to simply hide from the likes of Google and other nefarious outfits that put the tracking APIs inside the code (which is why almost none of my apps require GSF).
ze7zez said:
The google map tricked out by "Fake GPS Location", does quite well while driving a car, as I recently verified in the field.
Click to expand...
Click to collapse
If what you're saying is that the mock location apps "fool" the likes of Google Maps, I fully agree with you. If... If... if...
If you don't allow Google Maps to run a more detailed analysis that is.
As an example, I recently ran a test inside of a local town where I had the fake location set to miles away, and Google Maps was telling me I was where the fake location said I was... but...
But... then Google Maps asked me to snap a photo so that it could better figure out where I was, and BINGO! It figured out where I was based on the video that I allowed (for test purposes) to show the storefronts.
When I tested it again without allowing the video to see anything of value (e.g., I panned to the mountains above), Google Maps could NOT geolocate me.
Likewise when you don't let Google Maps geolocate by WI-Fi address (although for all I know the camera mechanism sneakily allowed that as I'm well aware there are TWO APIs for turning on your GPS radio, one of which (from Google) is downright nefarious)...
ACTION: "android.lintent.action.MAIN"
PACKAGE: "com.google.android.gms"
CLASS: "com.google.android.gms.location.settings.LocationAccuracyActivity"
Click to expand...
Click to collapse
vs
Notice it's similar but different from the Android setting for accuracy.
ACTION: "android.intent.action.MAIN"
PACKAGE: "com.android.settings"
CLASS: "com.android.settings.Settings$ScanningSettingsActivity"
Click to expand...
Click to collapse
Notice that, for this very reason, you NEVER want to turn on your GPS radio from ANY Google app prompt!
ze7zez said:
I don't analyze the app for route tracking.
Click to expand...
Click to collapse
If you need to navigate and if you don't want to be tracked by Google, I found a little trick that works kind of nicely with the simple interfaces of the offline mapping programs.
Set your position as your destination in the mock location app
Use any offline map to set your current position as a waypoint
Then use the offline map app to route to your destination
Another "trick" that keeps you out of Google maps' databases is that you can easily get traffic using a web shortcut of the area you are currently traveling in - where you don't need to know your exact location in order to check out the traffic in front of you.
Yet another trick for traffic is that PLENTY of web sites provide Google traffic updates without logging into Google web servers (afaik), such as sigalert apps, 511 apps, and many local DOT apps such as caltrans (for California).
Overall, in summary, the mock location apps work to prevent apps that use your GPS location from tracking you - but as @ze7zez warned, it will only work for GPS and not for cell tower tracking.
GalaxyA325G said:
(...) the applications themselves don't have access to the cell tower information (...)
Click to expand...
Click to collapse
This is not true.
Go into your phone's service mode and see for yourself what the phone knows about the mast connection.
Here's a cheesy Cell Diagnostic app that I wrote myself:
Note that the only permissions that it uses is android.permission.READ_PHONE_STATE and android.permission.ACCESS_COARSE_LOCATION
It refuses to give you this information if you have "Location" turned off.
ze7zez said:
This is not true.
Go into your phone's service mode and see for yourself what the phone knows about the mast connection.
Click to expand...
Click to collapse
As always, you're correct... but.... you're being too narrow I think... in that debugging apps which we use when we need to are different from the run-of-the-mill apps we use all day every day...
There are only "some" apps, which I'm well aware of, that have your telephony information, such as this one which requires you to provide that permission first...
Once you manually provide that permission, yes, of course, the app has you dead in its sights... but most apps (that don't need it) don't ask for THAT much permission... (nor would you let them if they did).
Renate said:
Here's a cheesy Cell Diagnostic app that I wrote myself:
Note that the only permissions that it uses is android.permission.READ_PHONE_STATE and android.permission.ACCESS_COARSE_LOCATION
It refuses to give you this information if you have "Location" turned off.
Click to expand...
Click to collapse
You bring up a good point that a few Android releases ago Google cheated like hell by forcing apps to request "Location" being turned on in order for the app to display unrelated things such as "Wi-Fi signal strength"...
Which is ANOTHER good reason for being able to set the mock location... because the Wi-Fi Signal Strength of all nearby access points has nothing (per se) to do with your current GPS location.
EDIT: BTW, as a related aside, I post a billion screenshots to the Internet, where some of them contain GPS location - which - if spoofed - means I don't need to redact it in those screenshots. For other information though, such as the cell tower information, I never know how much to redact (for privacy) where you didn't redact anything on your screenshot.
Can you let me know which are the cellular tower information pointers that we should redact for privacy when posting screenshots?
https://forum.xda-developers.com/attachments/cell1-png.5676683/
The CDMA system has a place for actual Lat/Long. But, these cells are set up by various people and the amount of information in them is variable.
I've rarely seen lat/long on a CDMA signal
The LTE stuff only references cell number. You need a database to reference it to location.
I have a few cell numbers hard-coded to named location.
I can't even find my current tower on https://www.opencellid.org/
Renate said:
The CDMA system has a place for actual Lat/Long. But, these cells are set up by various people and the amount of information in them is variable.
Click to expand...
Click to collapse
I'm aware there are open signal public OSM cell-tower-location databases (which essentially suck - but which are good enough to track your general location) and then there are the "real" databases (which the carriers and the FCC kind of sort of keep to themselves.
Renate said:
I've rarely seen lat/long on a CDMA signal
The LTE stuff only references cell number. You need a database to reference it to location.
Click to expand...
Click to collapse
The reason open signal public OSM databases only "essentially" suck is because they're averages from lots of people, so, for example, a tower might be on the wrong side of the railroad tracks or in the middle of a river on those open signal public OSM maps when it's not really the case - but they're still good enough to geolocate you to a general area were I to publish the unique number in the screenshots.
Renate said:
I have a few cell numbers hard-coded to named location.
I can't even find my current tower on https://www.opencellid.org/
Click to expand...
Click to collapse
My tower is almost always my own femtocell or my cellular repeater (both of which I have but usually the femtocell wins out), which is unique to me (which is why I'm worried about privacy).
Unless you're in my driveway, only I would be using that femtocell (I don't know how far out they go, but it's not more than a few hundred feet at the most, isn't it?).
Hi, I'm a new member of the forum and this is my first post.
I've read this thread and it's an interesting discussion about layers in global positioning. But I have a simpler question out of curiosity;
is there perhaps a way to work around this plugin (https://github.com/wongpiwat/trust-location) without root / only with developer option, since I haven't found any fake gps app that could fool/bypass this part.
Or do I have to use a custom ROM to accomplish it?

Categories

Resources