I have a new GrapheneOS install on a Pixel 6 Pro. I've not been able to get location working with any app.

I use OsmAnd for maps, whenever I try and locate myself on the map I get a "Position not yet known" error. I've made sure the app has access to precise location ("Allow only while using the app") and I've turned on Wi-Fi scanning. I'm seeing the same behavior with other apps that use location; Lyft, OneBusAway, Google Maps. Any suggestions appreciated.

Thanks,
Unfocused

    Use gpstest to verify you see satellites. I turn off location permission in play services and reroute location requests through the os in the running Sandboxed Google play services.

    Unfocused2257 As @Galt007 said, you need to ensure you've got direct line of sight to the sky (preferably outdoors) and to use https://play.google.com/store/apps/details?id=com.android.gpstest&hl=en&gl=US (via Aurora if on a non GPS profile or Play if GPS installed).

    The first lock can take between 2-5 minutes while extra data is downloaded:

    HTTPS connections are made to fetch PSDS information to assist with satellite based location. These are static files and are downloaded automatically to improve location resolution speed and accuracy. No query or data is sent to these servers. These contain orbits and statuses of satellites, Earth environmental data and time adjustment information.

    On prior generation Pixels with a Qualcomm baseband (which provides GNSS), almanacs are downloaded from https://path1.xtracloud.net/xtra3grcej.bin https://path2.xtracloud.net/xtra3grcej.bin, https://path3.xtracloud.net/xtra3grcej.bin, https://path1.xtracloud.net/xtra3Mgrbeji.bin, https://path2.xtracloud.net/xtra3Mgrbeji.bin and https://path3.xtracloud.net/xtra3Mgrbeji.bin which currently (as of May 2022) are hosted via Amazon Web Services. We plan to offer the option to download these files from the GrapheneOS servers, but we'll retain the option to use the standard servers to blend in with other devices.

    On 6th generation Pixels with a Broadcom GNSS chip, by default almanacs are downloaded from https://google.psds.grapheneos.org/lto2.dat, https://google.psds.grapheneos.org/rto.dat and https://google.psds.grapheneos.org/rtistatus.dat which are the GrapheneOS proxy servers for the standard servers. Alternatively, the standard servers can be used which are https://agnss.goog/lto2.dat, https://agnss.goog/rto.dat and https://agnss.goog/rtistatus.dat which currently (as of May 2022) are hosted via Google Cloud Platform.

    Let us know if any of this helps and we can move forward troubleshooting.

      You won't have reliable location indoors.
      You'll need to use Play services in order to get reliable location indoors.
      That is you should toggle off the default re-routing of location requests to the OS.
      That will allow the Play services location implementation to work
      which should give you better location indoors,
      should you choose to do so.

      If on the other hand you have this same problem outdoors,
      then I am clueless as OsmAnd works perfectly well for me when I am outside.

        Thanks @Galt007, @MetropleX, @ayaen. I experimented with the two options, direct to GrapheneOS works when I'm outside, but not inside. Google Play location works in both cases. It sounds like this is the expected behavior.

        I'm guessing that it's Google's WiFi Access Point database[1] that is making the difference. @MetropleX has the project considered working with the folks at Wigle.net to package up their database for inclusion in GrapheneOS?

        [1] https://www.howtogeek.com/788837/your-wi-fi-info-is-in-google-and-microsofts-databases-should-you-care/

          Unfocused2257 Yes that is making the difference, the OS does not have a network location provider service integrated into the OS.

          Also in so far as having a configurable network location provider the really big problem and reason they are blocked is because they can ALSO be used to lie to apps, even though your use might be "normal".

          We aren't going to add support for something like UnifiedNLP into the system, which would undermine the security model, bypassing the signature enforcement model, for location providers. It is simply antithetical to the projects aims.

            MetropleX changed the title to Location not working - Solved .

            I honestly don't mind not having proper location when inside.
            I live in a 11 story building and hardly need guidance.
            But of course one may need to navigate within massive buildings but I am yet
            to hit that use case. So I honestly fail to see the use for this beyond some convenience.

              akc3n changed the title to Location not working .
              21 days later

              ayaen and MetropleX

              What might happen if I were to enable both options: "Reroute location requests to the OS", and "Google Location Accuracy"?

              I asked in #grapheneOS, and someone suggested that they cannot work together.

              If so, I'm wondering if in the future, would enabling one gray out the other?

              (I read through https://grapheneos.org/usage#sandboxed-google-play-configuration a couple of times for what it's worth. I was having a hard time parsing it in relation to this question, though.)

                MetropleX I noticed that I was able to enable the redirect, and then later enable the Google Location Accuracy. I pressed back and then went back in to confirm Google Location Accuracy was still enabled.

                However, when I gave it some time and checked back in a few minutes later, it was disabled again.

                So, maybe this means it wasn't truly enabled despite showing that it was?

                Although, I did get an email from Google saying I logged into location services from a new device, and I have never disabled the redirect on Graphene yet. I'm not sure if there is a correlation. When checking my location history, I see nothing listed since I installed this OS last night, despite going out today.

                7 months later
                • [deleted]

                I have also same issue with Google Maps GO but follow this instructions is a workaround:

                It doesn't work for me either with the Google Maps Go app. I have no idea why, but here's another way to get the same thing:

                Open maps.google.com in Vanadium
                Tap upper right hand corner 3 dots
                Install app
                Tap install
                Tap add to home screen
                This installs the same PWA as the PWA in the app Google Maps Go.

                I'm pretty sure this is not an issue with location not found but seems a issue with Vanadium not handling properly the PWA @MetropleX

                  [deleted] if you are using the Google Maps in the browser, without Play Services and reliant on GPS/OS Location API, you may need to get a lock using the GPSTest app first. Can you try that for me? I am presuming when you tried it in Vanadium you had granted Vanadium the Location permission?

                    • [deleted]

                    MetropleX thanks for the quick reply. I'm using Vanadium and sandboxed Google Play Services. I have allowed Vanadium location permission and allowed location permission to Google Mapa Go but not allowed that permission to Google Play Services.
                    When I open the Google Maps Go (the little Google Maps app) it redirects to Vanadium browser and "my location" icon at bottom right has a cross line. If I change location permission in Vanadium app info from "allow while in use" to "ask allways" the browser request for the permission when I click "my location" icon but the cross line do not dissapears and my location is not displayed.
                    If I open "maps.google.com" directly at Vanadium the "my location icon" does has also the cross bar, when I click on it Vanadium request for the location permission and, if I allow it, my location is displayed and the "my location" icon becomes blue (after a while).
                    I have also tried to set Chrome browser as the default browser and it works exactly same as Vanadium.
                    I think maybe is a issue in the comms over the browser (Vanadium or Chrome) and the app.

                    Finally, I have tried same (with Chrome and also with Vanadium) in other phone running other OS than GrapheneOS and, when I allow location permission to the browser and to the Google Maps Go it works fine.

                    Thanks again

                      [deleted] even if using sandboxed Play Services, if you don't disable the OS reroute toggle to the OS Location API (GNSS/GPS) it will always use GPS. When using GPS it can take a little longer to gain a lock. I you wish to improve the speed/capability (indoors) then you must disable the toggle and enable wifi/bluetooth scanning to use Googles network based location service.

                      If when using Go/PWA or Vanadium you get the green dot location indicator you should just need to wait for a lock.
                      Or it could be an issue where a lock is a prerequisite and therefore using GPSTest prior to launching Go/PWA or maps.google.com in Vanadium might resolve it.

                      [UPDATE 1] Just tested Vanadium and maps.google.com with no Play Services it got the lock as you say just going to try Google Maps Go now...

                      [UPDATE 2] Yes Google Maps Go is indeed more of a chore, not got it to work yet and doesn't seem to recognise the default Vanadium permission.

                        • [deleted]

                        MetropleX do you think there's a solution to gmaps go?