Looking to find the best way to prevent / detect GPS spoofing on Android. Any suggestions on how this is accomplished, and what can be done to stop it? I am guessing the user has to turn on mock locations to spoof GPS, if this is done, then they can spoof GPS?
It seems that the only way to do this is to prevent Location Spoofing preventing MockLocations. The down side is there are some users who use Bluetooth GPS devices to get a better signal, they won't be able to use the app as they are required to use the mock locations.
I extensively experimented with fake/mock locations on different Android devices and distros. Unfortunately .isFromMockProvider() is not 100% reliable. Every once in a while, a fake location will not be labeled as mock. This seems to be due to some erroneous internal fusion logic in the Google Location API.
I wrote a detailed blog post about this, if you want to learn more. To summarize, if you subscribe to location updates from the Location API, then switch on a fake GPS app and print the result of each Location.toString() to the console, you will see something like this:
Basically, it "distrusts" non-mock locations that are within 1km of the last known mock location and also labels them as a mock. It does this until a significant number of non-mock locations have arrived.The LocationAssistant can not only reject mock locations, but also unburdens you from most of the hassle of setting up and subscribing to location updates.
onNewLocationAvailable() will now only be invoked with real location info. There are some more listener methods you need to implement, but in the context of your question (how to prevent GPS spoofing) this is basically it.
If you happened to know the general location of cell towers, you could check to see if the current cell tower matches the location given (within an error margin of something large, like 10 or more miles).
For example, if your app unlocks features only if the user is in a specific location (your store, for example), you could check gps as well as cell towers. Currently, no gps spoofing app also spoofs the cell towers, so you could see if someone across the country is simply trying to spoof their way into your special features (I'm thinking of the Disney Mobile Magic app, for one example).
This is how the Llama app manages location by default, since checking cell tower ids are much less battery intensive than gps. It isn't useful for very specific locations, but if home and work are several miles away, it can distinguish between the two general locations very easily.
Of course, this would require the user to have a cell signal at all. And you would have to know all the cell towers ids in the area --on all network providers-- or you would run the risk of a false negative.
I can't explain airline pricing but I do know some plane tickets can be cheaper depending on where you buy them or, even better, where you appear to buy them from. This is all about leveraging foreign currencies and points-of-sale to your advantage.
For reasons I never quite understood, every time I tried to book a domestic flight in another country, the prices were always exorbitant. But, say, once I was in Bangkok, that same flight that was once $300 would fall to $30 almost inexplicably. This phenomenon is because a ticket's point-of-sale -- the place where a retail transaction is completed -- can affect the price of any flight with an international component.
Most people don't know there is a simple trick for "changing" this to get a cheaper flight on an airline's website; it's how I managed to pay $371 for a flight from New York to Colombia instead of $500+. Though it can be used for normal international flights, it often works best when you're buying domestic flights in another country. (Point in case: A Chilean friend once told me Easter Island flights were much cheaper to buy in Santiago instead of abroad.)
To demonstrate how this scheme works, we ran a one-way search from Cartagena to Bogot -- two cities in Colombia -- for June 17 on Google ITA, Kayak and Skyscanner. To keep things simple, I'll ignore a VivaColombia flight that Skyscanner found because Google ITA and Kayak do not include smaller airlines in their searches. Instead, we'll be comparing two large airlines that fly this route, LAN Airlines and Avianca.
Unsurprisingly, Kayak takes a U.S.-centric approach. Going the path of least resistance, a Kayak search shows that the cheapest flight on LAN is $116 and the cheapest flight on Avianca is $137. If we run this exact search in Google ITA with New York City as the point-of-sale, we see those exact numbers. Skyscanner returns similar results: the cheapest flight on LAN is $114 and on Avianca it is $136.
Though Skyscanner actually has the best prices, let's not stop there. Instead of using an American city as the point-of-sale, let's use Colombia as the point-of-sale, something that can only be searched for in Google ITA. You actually don't have to tweak a thing because the departure city is usually set as the default for this option -- that said, it's possible to change this to any place in the world you want. The main difference is we'll get the price in Colombian pesos and that's *exactly* what we want.
In this new search, the cheapest flight on Avianca is 116,280 COP and the cheapest flight on LAN is 173,820 COP. That of course means a lot of mumbo jumbo to most people, so let's convert that over to U.S. dollars. The same Avianca flight now approximates to $61.59 while the LAN flight is $91.96. In short, you'd be saving $22.04 on the LAN flight and $74.41 on the Avianca flight by simply paying in a different currency. The price difference between the cheapest flight in both the U.S. and Colombia search is $54.41. That's how much you'll end up saving just by comparing the flights in different currencies.
Now the real problem is that we've got to find a place to buy this ticket in pesos since Google ITA won't tell us where to go for that. I head directly to the Avianca website, which brings us to the U.S. price--about $137--for the flight. That's not what I want though. I start again, but this time I click on the upper right-hand corner and select Colombia as my country and English as my language. (Other airlines may not always offer the ability to keep using the site in English. How good is your Spanish?) It's not using the same thing as a VPN, but this mimics the idea that you are buying from a different location other than the U.S.
I search again. Sometimes I'm not always able to get the same exact fare I see in Google ITA, but I almost always manage to get something cheaper than what Kayak calculated for me. In this case, the cheapest flight available is 136,000 COP or $72.14, a bit more than what I was told but still less than Kayak's price. To save the most money, make sure you pay in a credit card that doesn't charge foreign transaction fees. In total, I manage to get a flight about $43.86 cheaper than what any U.S. site quoted me.
Even if you don't have a travel-friendly credit card, it still might be worth it to pay the fees just to pay in pesos. In this case, the standard foreign transaction fee 3% surcharge would only cost you an extra $2.16 to book the flight. The exact percentage will vary depending on the terms of the card issuer, but in short, you still come out ahead.
With a little adjustment, this trick can also be used for purchasing international flights. The most obvious points-of-sales to check for generally include the destination country and the country where the airline is based in. I mean, you can also go ahead and check for every single country out there, but that's real dedication that even I don't have time for.
Though most of the time it works out that I get some sort of discount--which can range from a few dollars to over a hundred dollars--by leveraging foreign currencies against each other, it doesn't always work all the time. Sometimes, in fact, the cheapest airfare is the most straightforward fare you'll find. But hey, just so you know.
I would like my webpages to think that I am almost 500 KMs away from my exact location. I am okay with my IP address being what it was and would also like to not change anything but my latitude and longitude. I am using an Intel laptop(hp bs-145tu) with Ubuntu 20.04 LTS. How do I do this?
##EDIT 1:As asked by @Carl H, What I want to do is, my location currently is lat a, long b. and i would like to change it to lat x, long y. i am okay with other things like IP address remaining same. I am trying to access some websites which work only when I am in the one of the city that this website delivers and I would like to set a location to see the food joints near to me, that that service delivers to.
Note that for the location override to work in Chrome, you have to keep the developer tools open and stay in the same browser window. If you open a new window, it will revert back to your original location.
Hello! Would you please recommend a free location changer (PC based I prefer)? I would like that Find My app is showing fake location of the device. I've found some apps but all they require purchase although declared as free.
Agree! Not something that Apple would ever implement and developers do not have access to change the information provided in the Find My app. Apps could be created to show any location that looks similar to the Find My screen, but would not display that information with others when sharing your location.
If you jailbreak your phone you might be able to get deep enough into iOS to intercept the reported location and change it. The problem with doing that is it opens up the phone to spyware, trojans, and other malware. And any app that you installed most probably not only falsifies your location, but also knows your actual location, and more than likely sends it to criminal organizations, sketchy businesses or, in some countries, law enforcement.
There is no legitimate and rational reason to have a false location in Find My because it is only visible to you anyway. Nobody else should be able to see your location unless you enable sharing. Your best solution is to disable Location completely and simply disappear from Find My.
d3342ee215