yashsingh1/xdaforums huggingface dataset:
[OnePlus 3 & 3T Cross Device Development] Eric_Lev:
I tried this repo a few days ago and it didn't work.

repo sync --force-sync --fail-fast -c --no-tags --no-clone-bundle --optimized-fetch --prune -j$(nproc)
source build/envsetup.sh
[B]echo op3: gps: Move XTRA_SERVER entries to overlays
repopick -t 218029[/B]
breakfast oneplus3
croot
brunch oneplus3
find ~/android/lineage_17/out/ -name "lineage-17.1*" -exec mv {} ~/Bureau/ROM/OP3T/ \;
find ~/android/lineage_17/out/ -name "recovery.img" -exec mv {} ~/Bureau/ROM/OP3T/ \;
ccache -C
rm -fr ~/android/lineage_17/out/

But I can rebuild if needed or if I made a repo/code error... ?

Edit : https://xdaforums.com/showpost.php?p=82917947&postcount=846 ... Credit: [MENTION=2911853]BillGoss[/MENTION] ... Thanx !
[OnePlus 3 & 3T Cross Device Development] mrfrantastic:
[fixed]

OT: I also want to thank all of those people who spend their free time on trying to fix things like, lately, GPS.
[OnePlus 3 & 3T Cross Device Development] Eric_Lev:
About twrp-3.4.0-0:

- Nandroid backup & restore work(s) seamlessly

- LOS 17.1 : OTA updater works seamlessly

My config: locked BL / unencrypted / latest offcial LOS 17.1 / nano open gapps / Magisk
[OnePlus 3 & 3T Cross Device Development] :
Nobody seems to read my postings:

I've explained that the fw/b doesn't honor gps configs any longer. So this commit has no effect. No error, but matter of fact in 17 sources.

[MENTION=2911853]BillGoss[/MENTION] and some others have asked for the differences in gps from 16 to 17. I've explained in two previous postings, what I think is needed to revert to 16 gps implementation.

Though my postings may be misunderstood that I've asked [MENTION=2911853]BillGoss[/MENTION] & [MENTION=8423339]Johannes1098[/MENTION] to do a test build, that wasn't intended: it was addressed to all home builders reading here! The main message was: I'm not doing it.
[OnePlus 3 & 3T Cross Device Development] Eric_Lev:
I had tested on June 22nd following the edit of this post: https://xdaforums.com/showpost.php?p=82895993&postcount=1606 ... but I didn't understand how a LOS 15 commit would work with LOS 17.
[OnePlus 3 & 3T Cross Device Development] :
The gps config was in fw/b for 15 and 16. For 13 and 14 it was in gps.conf. Until I found that 17 fw/b doesn't support gps configs at all, I thought tje gps stack needs to be comfigured - either with gps.comf or via overlaying in fw/b. Quite some people were testing gps.conf I thought it's a good idea to test the overlay config as well, until I found that 17 fw/b doesn't support gps configs at all. Since it's just adding some values in the overlay I havn't expected unresolveble conflicts.
[OnePlus 3 & 3T Cross Device Development] punio4:
Is it recommended to upgrade to TWRP 3.4?

https://www.xda-developers.com/twrp...s-support-legacy-devices-upgraded-android-10/
[OnePlus 3 & 3T Cross Device Development] Adam Hui:
Games like shadow fight 3 keeps fc's, will this next changes https://review.lineageos.org/c/LineageOS/android_external_skia/+/278472/ fix it?
[OnePlus 3 & 3T Cross Device Development] :
Impossible to tell if the reason for the fc is not known.
[OnePlus 3 & 3T Cross Device Development] BillGoss:
Oh, I read your posts but I don't understand what you say about fw/b (I assume you meant firmware/blobs) and overlays and stacks.

I naively assume that since Los uses blobs from OOS then Los should behave like OOS.

Isn't it fun when you have ignorant users like me around!
[OnePlus 3 & 3T Cross Device Development] :
framrworks/base

Settings in system parts (frameworks, system apps) have default values; these can be overwritten per device from overlays: https://github.com/LineageOS/android_device_oneplus_oneplus3/tree/lineage-17.1/overlay and https://github.com/LineageOS/android_device_oneplus_oneplus3/tree/lineage-17.1/overlay-lineage for los specific üackages/enhancements.

16.0 ises gps blobs from OOS; 17.1 uses the blobs from daisy (mentioned that more then once on the last pages):

https://github.com/LineageOS/androi.../lineage-16.0/proprietary-files.txt#L530-L579

https://github.com/LineageOS/androi.../lineage-17.1/proprietary-files.txt#L533-L570
[OnePlus 3 & 3T Cross Device Development] Johannes1098:
So [MENTION=9708417]Eric_Lev[/MENTION], are you able to build a los 17,1 build with these los 16 blobs, based on oos?

I would also try it myself, but I just don't have the knowledge to do it - sorry..
[OnePlus 3 & 3T Cross Device Development] highdiver_2000:
I tested this with a slight modification. Changed the NTP to sg instead of no :D

The first GPS lock after clearing the AGPS takes 2-3 minutes. You must be stationary.

Thereafter fast locks around 5 seconds. Even after I moved to another location 5km away. Same fast locks when changing telcos.

Likely will keep this.

Google Pay is strange. Citibank Mastercard works on Android 9 but not on Android 10. Visa works fine. I think I will just live with it.

Edit

Removed tagging of Nitrogen dev, wrong thread
[OnePlus 3 & 3T Cross Device Development] Eric_Lev:
Please, read some previous posts (e.g . #1655, #1660) ... ;)

FYI, https://wiki.lineageos.org/devices/oneplus3/build

roomservice.xml

<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="TheMuppets/proprietary_vendor_oneplus" path="vendor/oneplus" remote="github" revision="lineage-17.1" />
<project name="LineageOS/android_device_oneplus_oneplus3" path="device/oneplus/oneplus3" remote="github" />
<project name="LineageOS/android_device_oppo_common" path="device/oppo/common" remote="github" />
<project name="LineageOS/android_kernel_oneplus_msm8996" path="kernel/oneplus/msm8996" remote="github" />
</manifest>

my bash

repo sync --force-sync --fail-fast -c --no-tags --no-clone-bundle --optimized-fetch --prune -j$(nproc)
source build/envsetup.sh
[B]echo add a commit (number = XXXX)
repopick -t XXXX[/B]
breakfast oneplus3
croot
brunch oneplus3
[OnePlus 3 & 3T Cross Device Development] dianlujitao:
[MENTION=4405529]nvertigo67[/MENTION] [MENTION=2911853]BillGoss[/MENTION] https://review.lineageos.org/c/LineageOS/android_device_oneplus_oneplus3/+/279070 adds back xtra servers, they're relocated since https://github.com/LineageOS/android_frameworks_base/commit/19b214dd7339d75ad889d30bbb25f548d01bef22 , please test if it helps, lemme know if you need a build from me.

btw I'm really unsure if missing xtra server or daisy blobs degrade the performance. If it's the posterior one I'll switch back to stock blobs&hal, but you'll have to install gapps for network location provider because the one of qcom from pie won't work on 10.

----------upd:

A quick way to test w/o rebuild is adding the following to /etc/gps_debug.conf, create if not exist, don't forget to set proper permissions:

XTRA_SERVER_1=https://xtrapath1.izatcloud.net/xtra3grc.bin
XTRA_SERVER_2=https://xtrapath2.izatcloud.net/xtra3grc.bin
XTRA_SERVER_3=https://xtrapath3.izatcloud.net/xtra3grc.bin
[OnePlus 3 & 3T Cross Device Development] dianlujitao:
Yes, I've updated the state in OP. The major advantages are:

fbe warning is gone

bootloop after automated ota upgrade when encrypted and magisk installed should be fixed

auto detect sar and non-sar (need restart after change, non-sar by default, i.e. empty system partition)
[OnePlus 3 & 3T Cross Device Development] :
I do not know the difference between gps_debug.conf and gps.conf but copied my /system_root/system/vendor/gps.conf to /system_root/system/etc/gps_debug.conf.

No difference found in performance of gps (time to lock and/ or accuracy).

Though, my gps.conf was based on xtra3grcej.bin and XTRA_VERSION_CHECK=3.

Then changed the XTRA_SERVER setup to xtra3grc.bin and XTRA_VERSION_CHECK=1 and though I do not know what the technical difference is exactly, the first lock speeded up from about 1 minute to 25 seconds. Have tested this setup a few times in gps_debug.conf as a copy of gps.conf with the open source gpstest app and seems to work better (faster) then my previous setup.

But, for what it is worth as I thought my previous setup was the solution also where BillGoss found out that a setup without gps.conf was giving the same results....;)

Edit:

Ok, just found out myself as [MENTION=4405529]nvertigo67[/MENTION] or [MENTION=5091734]dianlujitao[/MENTION] probably already mentioned before that gps.conf is ignored, though gps_debug.conf can still be used for debugging purposes.

https://piunikaweb.com/2019/03/28/e...loads-a-gps-xtra-data-over-insecure-channels/

The gps_debug.conf I am using is enclosed as attachment and seems to give faster lock and higher accuracy then default setup.

Hope it helps. :good:
[OnePlus 3 & 3T Cross Device Development] dianlujitao:
gps_debug.conf is used by android framework while gps.conf is for the gnss hal. https://github.com/LineageOS/androi...va/com/android/server/location/gps_debug.conf is basically all valid items of gps_debug.conf along with the default values, XTRA_SERVER_{1,2,3} are also valid, but google forgot to document them.

Comparing your given config with the above one, filtering out all unused and default values, I assume the only valid ones are xtra servers, 3 lines in total. Can you remove the rest and try again?
[OnePlus 3 & 3T Cross Device Development] BillGoss:
Following on from [MENTION=5091734]dianlujitao[/MENTION]'s and [MENTION=10511117]Johan2020[/MENTION]'s post I did the tests below.

Notes:

- all done using 200608, with mobile data turned on, and no wifi

- using GPS Test https://play.google.com/store/apps/details?id=com.chartcross.gpstest

- note that the stock gps_debug.conf is essentially empty (only comments).

Results showing time to get fix:

1. Null vendor/etc/gps.conf, clear AGPS: 1:14, 0:50, 1:09

2. Repeat previous but don't clear AGPS: 7s, 9s

3. Same (1)+XTRA in etc/gps_debug.conf: 1:10

4. Repeat previous but don't clear AGPS: 11s

5. Same (1)+Johan2020 gps_debug.conf: 2:59, 2:18, 1:18

6. Repeat previous but don't clear AGPS: 8s, 8s, 16s

Repeat

1. Stock vendor/etc/gps.conf, clear AGPS: 2:37, 1:21

2. Repeat previous but don't clear AGPS: 9s, 8s

3. Same (1)+XTRA in etc/gps_debug.conf: 2:01, 1:35

4. Repeat previous but don't clear AGPS: 21s, 14s

5. Same (1)+Johan2020 gps_debug.conf: 4:39,5:30x (stopped waiting), reboot, 2:55, 2:25

6. Repeat previous but don't clear AGPS: 14s, 10s

Comments:

- adding the XTRA_SERVER lines to gps_debug.conf doesn't improve things

- the results are significantly better (quicker fix, more consistent times, better signal strength) with a null vendor/etc/gps.conf than with the stock version

- Johan2020's gps_debug.conf gave the worst results in both sets of tests - sorry Johan
[OnePlus 3 & 3T Cross Device Development] :
No sorry, glad you tested! Will try with empty GPS.conf and see.
[OnePlus 3 & 3T Cross Device Development] Kurt Krummbein:
Looks like there are good defaults, no need to change.

So, the gps.conf file has worse settings than the default. Perhaps somebody who has a clue about that could read-out that defaults, so they can be put into gps.conf ... that way the values where documented for everybody.

Well, after deleting AGPS data, first fix is slow. Driver seems he doesn't load AGPS data from provider, after first fix, the data is stored in the AGPS data and used for a faster fix ... that's what they are for ;).

Greets

Kurt
[OnePlus 3 & 3T Cross Device Development] :
What is strange is the fact that gps.conf in fact is still doing something as seen in your results. From what I understood after reading some android documents, gps.conf is completely ignored in Q, so you can delete it, replace it with an empty file or whatever; it should not make any difference.

I have replaced my gps.conf with an empty one though, keeping gps_debug.conf default. Will see what it will bring as we have to do about 400km's today.

First lock took some more time then yesterday with my own gps_debug.conf though.... strange.

Just a thought; I am using LineageOS latest build from https://lineageos.wickenberg.nu/oneplus3/ and that without any Google stuff or what else.

Could it be that the differences between [MENTION=2911853]BillGoss[/MENTION] his results and mine are related to Google?

I have read that though high accuracy switched off, scanning switched off etc.... Google is still connecting somewhere on the background when switching on gps.
[OnePlus 3 & 3T Cross Device Development] BillGoss:
I was going to say that I'd be interested in testing a Daisy-less build. But your comment about needing Gapps for network location made me go looking for it.

I installed the latest Gapps, stock version (I normally use the pico version), from https://opengapps.org/. Then I searched for any file named *provider* in /system and took the md5 value for it. Then I compared this to the pure Los system (no Gapps) but there were absolutely no differences.

So, I don't see any network provider in Gapps. Am I missing something or looking in the wrong place?
[OnePlus 3 & 3T Cross Device Development] dianlujitao:
can you evaluate if this build has comparable performance with 16.0, I rolled back to the old gps stack https://androidfilehost.com/?fid=8889791610682878968

my result with this build is as follows, using "gps test" app.

1. get 3d fix right after launch the app

2. clear agps with "clear only" and close it immediately (otherwise it'll reuse the last data), then reopen, no fix this time, maybe it'll eventually fix but I just didn't bother to wait.

3. close it, wait for a while (maybe agps got updated in background?), or update agps from the app

4. reopen it, get 3d fix as fast as 1
[OnePlus 3 & 3T Cross Device Development] :
Some questions so I can may be help testing:

- Is this with or without Gapps installed? I.o.w.; do we need Gapps for this solution or not?

- Do I have to edit or replace gps.conf and/or gps_debug.conf?

Results sounds great though!

Edit:

Lock within seconds; definitely much better!
[OnePlus 3 & 3T Cross Device Development] Eric_Lev:
Results sounds great though, too !

Tested with SatStat and compared in the same conditions with my OP5T ... Almost the same time to fix the GPS (only a few seconds).

Same results after two restarts.

Note: The GPS lock works fine, even after downgrading to the latest official build (0622) ... !?

Thank you, [MENTION=5091734]dianlujitao[/MENTION] !
[OnePlus 3 & 3T Cross Device Development] tim-scrap:
Same here, fast fix (repeating with deleting agps also) with testbuild.

Great work guys. Really nice example how xda should be. Teamwork solves issue. Thanks :good:
[OnePlus 3 & 3T Cross Device Development] dianlujitao:
Did you wipe data when downgrading?
[OnePlus 3 & 3T Cross Device Development] Eric_Lev:
I didn't wipe Data ... Only flash official build via TWRP and restart System.
[OnePlus 3 & 3T Cross Device Development] Eric_Lev:
About GPS fix :

Rollback to stock GPS blobs and disable QC location

https://review.lineageos.org/c/LineageOS/android_device_oneplus_oneplus3/+/279472

https://review.lineageos.org/c/LineageOS/android_device_oneplus_oneplus3/+/279473

https://review.lineageos.org/c/LineageOS/android_device_oneplus_oneplus3/+/279474

https://review.lineageos.org/c/LineageOS/android_device_oneplus_oneplus3/+/279475

https://review.lineageos.org/c/LineageOS/android_device_oneplus_oneplus3/+/279476

https://review.lineageos.org/c/LineageOS/android_device_oneplus_oneplus3/+/279477

https://review.lineageos.org/c/LineageOS/android_device_oneplus_oneplus3/+/279478

Thank you, [MENTION=5091734]dianlujitao[/MENTION] !
[OnePlus 3 & 3T Cross Device Development] Rootax:
Stupid question, but do I need to reflash twrp image after each los update (I upgrade in recovery mode) ? I do it because I've always done it this way (rom, twrp, magisk), but I wonder if I can save time (since magisk re-install itself too...)

Thx :)
[OnePlus 3 & 3T Cross Device Development] BillGoss:
TWRP is installed in the recovery partition which is totally separate from the rom world (/data, /system, /boot). So it's not at all affected by installing a rom.

UNLESS the rom is designed to overwrite the recovery partition, as is the case with OOS. But no custom ROMs do this.

So, no, you never need to reinstall TWRP unless you're changing recovery versions.

Magisk is part of the rom world (affects /data and /boot) and survives dirty updates because it writes a file in /system/addon.d that the rom install process uses to restore Magisk. Gapps does the same.
[OnePlus 3 & 3T Cross Device Development] :
Did some more testing;

Data switched off first lock after clearing agps:

Wickenberg build ~60sec

Testbuild ~80sec (tested twice)

Data switched on first lock after clearing agps:

Wickenberg build ~60sec

Test build ~6-8sec

Second lock is about the same for both.
[OnePlus 3 & 3T Cross Device Development] BillGoss:
TL;DR: GPS apps don't all behave the same and may have issues. TWRP 3.4 has a bug - see https://xdaforums.com/oneplus-3/one...ial-twrp-touch-recovery-t3742894/post82938177

I was hoping to provide a quick reply with my test results on the 200627 GPS Test build but...

I ran into problems with my testing. I started with com.chartcross.gpstest[plus] (GPS Test) [I stopped using GPS Status because it doesn't properly clear data] and did the AGPS clearing runs and than wanted to do ones without clearing AGPS.

Since chartcross doesn't show the time to fix, I use lap times in the stopwatch of Clock. This can be a nuisance for lots of short tests, so I switched to com.android.gpstest (GPSTest) which does a good job of resetting AGPS and shows the time to fix.

But then I started getting erratic results for the quick tests that seemed to depend on how long I took between exiting the app and restarting it.

So I decided to redo the AGPS clearing tests with android.gpstest and I started to get results where each time was longer than the previous one! I'd never seen anything like this previously. Was this a quirk of the test build?

I switched back to my 200608 install (null gps.conf) and ran sequential AGPS clearing runs in android.gpstest and got the same result: each test took longer to get a fix (1:20, 4:42, 6:16).

Then I went back [N]Los 16 to see how that worked. And, I'm glad to say, that everything worked fine with consistently good times for a fix after clearing AGPS in android.gpstest (4s, 0s, 8s, 4s, 0s) and chartcross (10s, 9s, 10s).

So, time to get back to the test build. I restored the backup on TWRP 3.4 and when I rebooted the system, TWRP told me there was no OS!

I eventually managed to get things to boot (but I need to do some more testing of the "no OS" situation to narrow down the problem/solution).

So, that's a long story about apps behaving oddly and encountering issues in TWRP which means I still don't have a reproducible set of results to share.
[OnePlus 3 & 3T Cross Device Development] nucleerz:
Yes, same here.

Just simply flashed over the last nightly "22nd" build, magisk installed from before, and nothing else.

Using the test build, chartcross gpstest,.. acquired 3D lock in less than 3 seconds, seeing 34 satellites, utilizing 17.

On the last nightly "22 build" barely see 14 and no 3D lock at all. This is an amazing change!

Thanks to the Developer and all who participate in this great thread/ROM.
[OnePlus 3 & 3T Cross Device Development] BillGoss:
[MENTION=5091734]dianlujitao[/MENTION], after getting into a mess (https://xdaforums.com/oneplus-3/one...geos-17-0-oneplus-3-3t-t3990061/post82937697) I decided that the only fair way to test the 200627 test build was to do a clean install (no Gapps, Magisk, or user apps other than GPS Test) and only use com.chartcross.gpstest[plus] (GPS Test) for testing.

This turned out to be good decision because I got consistent results:

Clean 200627 GPS build (no Gapps, Magisk, or user apps)

GPS Test

1. Clear AGPS: 1:37, 0:38, 1:11

2. Clear AGPS and reboot

3. Clear AGPS: 1:05, 1:54, 0:58

If the AGPS isn't cleaned then the time to fix is quick (less than 10s)

These results are similar to what I get on 200608 with an empty gps.conf (see https://xdaforums.com/oneplus-3/one...eos-17-0-oneplus-3-3t-t3990061/post82931249).

So, from my perspective the GPS responsiveness is the same for 200608 (empty gps.conf) and 20627 test.

And Los 16 beats both by a long margin (fix under 20s after clearing AGPS).
[OnePlus 3 & 3T Cross Device Development] :
https://play.google.com/store/apps/details?id=com.android.gpstest is the most basic, reliable and transparent (foss) testing tool for gps. One doesn't even need to leave and restart after clearing agps data and no additional stopmwatch is needed. Though it's not as colorfull as other tools it's perfect for testing and measuring. It also shows if almanach data (part of apgs data) is available for each sat.

A special word of warning: https://play.google.com/store/apps/details?id=com.eclipsim.gpsstatus2 implements internally an own agps handling. Deleting and/or injecting agps data is done to this internal implementation - it's not suitable for testing!
[OnePlus 3 & 3T Cross Device Development] :
FYI, my testing is actually done with gptest. A great open source app just doing what it is promising without any issues. Did not know the app till you mentioned it [MENTION=4405529]nvertigo67[/MENTION], but tested a lot of the gps test apps these days and have finally replaced gps status with it.

About the test results;

I think I have done enough testing for now and for my situation test results are clear:

without data after clearing agps, the LOS17 build is as fast as the test build or even a little faster till first lock (~60 vs ~80sec);

with data after clearing agps, the test build is much faster then the normal LOS17 build (~6-8sec vs ~60sec);

second lock with agps data is about the same.

So it seems that:

the LOS17 build is not capable of getting agps data, where the test build is.

the gps stack which is used in LOS17 is as accurate and fast as the LOS16 stack, except it can not get agps data.

So for me the question is; why is LOS17 not capable of getting the data?

It is of course easy to revert patches and go back to the LOS16 stack, but I can not imagine there is no other solution without reverting back.

Though, as I am not a programmer, I have no idea where to look....

.
[OnePlus 3 & 3T Cross Device Development] fhloston:
From a user persepctive this makes a huge improvement.

I regularly use the oneplus3 on my bike. So outside, clear view to sky.

Until I installed [MENTION=5091734]dianlujitao[/MENTION] 's testbuild yesterday GPS user experience was really bad, apps like maps or gps-based games would not work properly.

Since I installed the lineage-17.1-20200627-UNOFFICIAL-oneplus3.zip testbuild yesterday everything is seemingly back to where it was with LOS 16 before.

Didn't we have a similar issue when we transitioned from LOS 15 to LOS 16? I remember there being a similar GPS degradation before.

I have a second oneplus3 and when I compare them side by side the difference is apparent: after "clear assist data" in gpstest on the testbuild device the potentially available satellites in skyview show up almost immediately. On the older LOS 17 build it takes very long for the satellites to show up in sky view - if they show at all.

When I was experiencing the GPS issues on bike tours I observered generally low count of available sattelites. like max. 5/26. Now I have 7/27 even indoors - which did mostly not work at all before.
[OnePlus 3 & 3T Cross Device Development] dianlujitao:
I'm pretty unsure but the margin between 16 and the test build is probably because the test build doesn't ship any network location provider.

I guess the new gnss stack is not fully compatible with our qmi stack, but they're both proprietary software so god knows if this could be the root cause.