yashsingh1/xdaforums huggingface dataset:
[OnePlus 3 & 3T Cross Device Development] S4turno:
[MENTION=4405529]nvertigo67[/MENTION] [MENTION=4999962]stevenkyk[/MENTION] GPS only works, but it can be a pain in the butt in big cities or streets with tall buildings. In order to have turn by turn instructions, the phone usually needs accurate data.

I don't know if it works when GApps is installed, but works with MicroG: Unified Network Location Provider. After this is installed, we can add pick the location provider we want to use (MozillaNlpBackend, Apple UnifiedNlp Backend, etc).

Mozilla's Location Service is probably the best one for privacy, but apparently they only provide cell tower data for free. Apple's service uses wifi, which is better when we are in a city, but I don't know how private they are.
[OnePlus 3 & 3T Cross Device Development] :
Mozilla+Deja Vu (wifi+cell on local)+Nominatim(address lookup) works great on my phone
[OnePlus 3 & 3T Cross Device Development] :
UPDATE (April Security Patches; kernel 3.18.138; WireGuard 20190406)

Build 20190408

Releasenotes:

NLOS-16.0 relays on OxygenOS firmware. OxygenOS 5.0.8 firmware or later is required:

Oneplus 3T: OxygenOS 5.0.8 firmware

Oneplus 3: OxygenOS 5.0.8 firmware

For a complete list of additional cherry picks see: current.pick.sh.

Changelog (Last repo sync: 8 Apr 2019, 13:46:37 CEST / 8 Apr 2019, 11:46:37 UTC):

current.pick.sh: "Update Chromium Webview to 73.0.3683.90". — Nvertigo

current.pick.sh: "Audio assets: add NFC sounds". — Nvertigo

op3: Enable OEM unlock and bootable image signing — dianlujitao

WG: squash WireGuard-0.0.20190406. — Nvertigo

power: don't ever reboot to verity red — Dan Pasanen

Merge tag 'v3.18.138' of git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable into linux-stable/merge-16.0 — Nvertigo

NLOS-Bootlogo

nlos_bootlogo-v0.1.zip

back_in_black_bootlogo-v1.0.zip(pre ob16 OxygenOS Bootlogo)

[SIZE="+2"]DOWNLOAD[/SIZE]​

Happy flashing!

P.S.: This was fast without connection stalling:

nlos-16.0-20190408_120235-beta-oneplus3t.zip
662929754 100% 44.89kB/s 4:00:23 (xfer#1, to-check=0/1)

sent 42 bytes received 663091715 bytes 45890.29 bytes/sec
total size is 662929754 speedup is 1.00

Anyway: many thanx to my neighbour - without him this wouldn't have happend at all!!!
[OnePlus 3 & 3T Cross Device Development] stevenkyk:
Unfortunately some of my payment apps just refuse to work with microg, as much as I would like to switch over. I actually got hold of a Samsung S9+ running pie, location using cell tower only w/o wifi works.

EDIT: BTW the binary location settings of android pie is just a limitation imposed via the UI, manually changing the settings via tasker or the settings command will still work.
[OnePlus 3 & 3T Cross Device Development] :
For me it's a banking app... :(

For me it feels just wrong, if wifi scans are allowed to apps, though wifi scan is disabled.

I guess "Samsung S9+ running pie" refers to the Samsung closed source stock rom. If you have a patch, I'll look into, but refering to a closed source rom is quite pointless for me regarding to tell the security impacts of a change.

Great that you found something working for you! Be aware that this may stop working at any point, like the wifi state setting in 15.1 (https://xdaforums.com/showpost.php?p=75688083&postcount=3 ) The presence of the setting just means it's still in settings db - it doesn't mean it's honored in frameworks. That it's working now (aka setting is used in frameworks) dosn't mean it's not removed at some point.
[OnePlus 3 & 3T Cross Device Development] stevenkyk:
I'm still a little confused by your replies actually, what you feel is wrong is that when wifi is switched on, but if wifi scan is disabled, apps should not be allowed to perform WiFi scans, right? Instead of being a toggle to control WiFi scans when WiFi is explicitly turned off, the toggle should instead be a switch for all WiFi scans. If that's the case I do agree with you since I also don't want to be mapping wifi environments for g.

I do realised that the Samsung example isn't very appropriate here, but I just want to point out that the fact that network based locations should work without WiFi scanning being enabled or WiFi being turned on. I assume in 15.1 whenever I turn off WiFi and scanning, no WiFi scans are performed and location is determined through cell tower only. I assume the same would have applied to the Samsung phone that is running stock rom. Do correct me otherwise, but this is the ideal scenario right?

If nobody else running gapps on this rom can perform the same test (with WiFi scanning and WiFi both disabled to force a cell tower based location), I will perform a nandroid backup over the weekend and clean flash this rom and perhaps the official lineageos to see if the issue lies with my setup or the rom before looking for any patches.
[OnePlus 3 & 3T Cross Device Development] :
Sorry for beimg not precise enough. Wifi scanning is used in two different meanings: wifi scaning can mean to scan available APs, but it can also mean allowing to scan available APs to transfer this information to g to add/compare these data to/against their database to improve location.

In our conversation I've always uswd the term wifi scanning with the latter meaning. In my point of view, disabling System->Security&location->Location->Advanced->Scanning->Wi-Fi scanning should result in no wifi usage for location service, no matter if wifi is switched on and off.

On 15.1 this behaviour was overwritten by the so called "high accuracy" mode (btw: if you have good gps reception - thanx to [MENTION=4487956]S4turno[/MENTION] for pointing out, that in some regions or inside buildings gps reception can be less then perfect - gps gives the most accurate location), making the wifi scanning setting useless aa as soon as high accuracy was choosen.

Hopefully I was precise enough this time to make my point understandable.

Please read the link from my first post of this conversation. It works like intended by g for aosp. I don't know what s is doing to it's closed source rom, but taking s's closed source proprietary changes as reason for "that network based locations should work without WiFi scanning being enabled or WiFi being turned on" is pointless, because s is known for changing aosp's default behaviour and without knowing the source code changes the example is pointless, anyway.

And once again: using wifi scanning for location, though wfifi scanning for location is disabled, is a security hazard.

Show me the source - everything else is pointless speculating here. Please read the first three paragraphs of this posting: using wifi scanning for location, though wifi scanning for location is disabled is bull****.

I can't see any disadvantage in switching wifi scanning for location to "on", if you want to use wifi scanning for location.
[OnePlus 3 & 3T Cross Device Development] phoberus:
For me the last version that works is "nlos-16.0-20190308_135221". The newer ones are bootlooping and after a while it reboots to recovery. Tested it with stock kernel and also with mcd kernel, both same result: works with 20190308 and with the others not

Is it possible to get logs from a bootloop?
[OnePlus 3 & 3T Cross Device Development] :
https://xdaforums.com/showpost.php?p=78773778&postcount=371

A detailed description of your setup wuold be helpfull, too. Since I'm not expirience bootloops it's most probable your setup.
[OnePlus 3 & 3T Cross Device Development] phoberus:
The folder is in the attechment.

My setup:

Oneplus 3T

5.0.8 firmware

working: nlos-16.0-20190308

not working: all roms after 20190308

pstore folder is with stock kernel and newest rom (0408)

Magisk 19

using systemless substratum
[OnePlus 3 & 3T Cross Device Development] :
Make a first time install following exactly OP. Do not install/restore any mods (also: no Magisk mods) or apps other then gapps (pico or nano) or MicroG and check if bootloop is gone.
[OnePlus 3 & 3T Cross Device Development] cukierkas:
Agree. Try to boot without magisk. And FW, rom, gapps must be flashed on one go. No restores first. Guessing something missing in boot or /data sequence.
[OnePlus 3 & 3T Cross Device Development] stevenkyk:
Not too sure where I gave the impression of wanting wifi scanning to work without WiFi being turned on at all. All I have wanted to achieved is having a coarse location indoors, no WiFi involved.

Just to bring a bit of closure and for the benefit of those searching in future, 16.0 and gapps won't provide location without WiFi scanning. Not sure how it worked in 15.1, but all I know is that all stock android pie (tested on several AOSP based roms) behaviour forbids it from working. At least now I know my WiFi really isn't being activated in the background.

I'm not an android developer so do pardon me failing to understand how the android developer documentation on location permission translated to this behaviour. Maybe someone with insights into how Google location exactly works can shed some light on this.
[OnePlus 3 & 3T Cross Device Development] cukierkas:
I do care about location when it's needed and working. For rest of the time - it switched off, well, at least I think it is..
[OnePlus 3 & 3T Cross Device Development] :
Please reread my responses. I've allready explained, that the 15.1 so called "high accuracy mode" uses wifi scanning. As soon as "high accuracy mode" is used, wifi scanning is used, no matter of the setting of "wifi scanning".
[OnePlus 3 & 3T Cross Device Development] stevenkyk:
I'm always on battery saving mode on 15.1. BTW I'm not trying to complain about anything here actually, just wanted to know if the behaviour I observed is intended or a bug, most of the time I used location is through my browser to check for the arrival time of my bus. So now my work around is to bookmark my bus stops and not rely on location for convenience.
[OnePlus 3 & 3T Cross Device Development] :
I've answered that more then once: yes, it's intended. If you want the same behavior like on 15.1 switch "wifi scanning" to "on". On 15.1 wifi scanning is used as soon as "high accuracy mode" is used - no matter of the "wifi scanning" setting is set.

That's my critics on 15.1 behaviour: people think they don't use wifi scanning because it's off, but with "high accuracy mode" switched on, wifi scanning is actually used.

BTW: I'm still waiting for an answer on my question, why you don't want to switch "wifi scanning" to on (which is the same like using "high accuracy mode" on 15.1).
[OnePlus 3 & 3T Cross Device Development] stevenkyk:
Yep I get your point, in fact I can reassure you that I've read your replies multiple times even before you requested that I reread.

Since location is a binary setting now, turning it on is equivalent to "high accuracy mode", but since the "uninformed behaviour" (for the lack of a better description) has been rectified, to get the same behaviour I will indeed need to turn on wifi scanning. I understood this part.

So logically speaking for 15.1 when in battery saving mode with WiFi scanning off, no WiFi scanning is actually used right?

I guess I'm a little too used to battery saving mode and just don't like the idea of letting random apps be scanning for WiFi networks without my knowledge. Maybe the next best option is to use tasker to turn it on when I'm on certain apps and turn it off afterwards. Oh and I almost never turned on high accuracy mode except when I'm really lost somewhere and need proper direction.

The reason I started posting is because I'm annoyed by the fact that I am not getting a correct geolocation while indoors, so whenever I check for directions before leaving my location is stuck elsewhere.
[OnePlus 3 & 3T Cross Device Development] :
No. As soon as you relay on the gms part of location services (on gapps this is "high accuracy mode" as well as "battery saving mode") wifi scanning is used on 15.1 (if the device is able to background scan). Since we have no "battery saving mode" anymore in oreo, I've always refered to "highmaccuracy mode", because this is location "on" and wifi/bt scan "on".

I've also given a reason, why I think "battery saving mode" has been removed by google: newer gps (hardware) modules doesn't need much power nowadays.

I clearly stated in my very first reply, that all this is the intended behaviour (including a link to google developers documentation with more details). That makes me wonder if you've read my responses, when asking if this is intended.
[OnePlus 3 & 3T Cross Device Development] stevenkyk:
This wasn't a question oops, was just afraid that my intentions was lost along the way as we seemed to become rather fixated on the wifi scanning issue.

It also makes me wonder why gms can't just rely on cell tower information to get a coarse location, since it is coarse anyway and it is safe to assume that the mobile antenna is always turned on anyway. So now wifi scanning option sort of works as the toggle between "device only" and "high accuracy mode" while on cellular data.
[OnePlus 3 & 3T Cross Device Development] 64ashg:
I would like to add that the wifi_sleep_policy and wifi_scan_always_enabled can be changed on pie too.

Use the app, settings database editor, from play store and use the nlos built in terminal with su permissions and run the command in the app description.

You will find the values in the global table in the bottom.

Wifi scan is the feature that scans wifi to see if you are nearby any saved networks, or so does google says. It stays enabled no matter what settings you use in wifi settings gui.

The battery life is better when you set 1 (or even 0) and 0 respectively.
[OnePlus 3 & 3T Cross Device Development] phoberus:
clean flash fixed it, thanks:highfive:
[OnePlus 3 & 3T Cross Device Development] :
Themes, mods and magisk mods may interfere with dirty flashing. If something goeas wrong with dirty flashing, but clean flashing works, the probability is high, that there's some issue with the reassembling of either the root fs (part of the boot partition) or the system magisk overlay.

When suffering from bootloops after dirty flashing I'd try these:

flash the magisk uninstaller and the substratum emergency zip (and - if you use other mods - uninstall other mods) and reboot to system

if that doesn't work, restore the old (working) setup from before the dirty flash, uninstall all themes, mods magisk mods and magisk itself and update via dirty flash

if the bootloop persists: clean flash
[OnePlus 3 & 3T Cross Device Development] Eric_Lev:
A new version: TWRP 3.3.0-1 ...

==> https://twrp.me/oneplus/oneplusthree.html

Changelog:

dianlujitao

2019-04-16T09:49:38Z

op3: Advertise EDL mode Change-Id: I701407ead4b09d48b6245a506c0b8eed0da4f5c0

dianlujitao

2019-04-16T03:06:32Z

op3: Update prebuilt kernel * Based on LA.UM.7.5.r1-04300-8x96.0 * HEAD: LineageOS/android_kernel_oneplus_msm8996@4a6738221330474fb9c 14d2f69daec4661f5e95f Change-Id: Ib39dd4bb04155dd9a317e99693a391635a9eb99e

dianlujitao

2019-03-29T03:06:52Z

op3: Update QSEE stack from OOS 9.0 Change-Id: Icf36729919bc7e579053d8d7748126cfc4e00e76

dianlujitao

2019-03-28T06:06:19Z

op3: Sign image with AOSP verity key * This allows booting TWRP with bootloader locked * OnePlus happens to use the same key to sign their own images and bootloader, so as a bonus there's even no 5s warning on boot. Change-Id: Icffbd4122af86a52a42a91f04998ec506f44661f

dianlujitao

2019-03-23T08:17:36Z

op3: Fix HW FDE when building with Pie tree * ro.board.platform is no longer part of recovery ramdisk on Pie, thus hw_get_module_by_class would fail to find the keystore module and HW FDE is broken. * To address the issue, use a property to specify the HAL class to make the HAL picked by libhardware. Change-Id: I2b09a06be34ca66a400e98fce8714226ae5f3d10
[OnePlus 3 & 3T Cross Device Development] :
After expiriencing the last 3 years of twrp development for op3/t, I'd like to wait since formatting, backup/restore and relocking the bootloader is really well tested and confirmed to work before changing the recommendation.
[OnePlus 3 & 3T Cross Device Development] Sytis:
Speaking of relocking the bootloader: Is it save to relock it after installing your ROM? I've heard mixed opinions on relocking with a custom ROM installed. Other than that there's absolutely nothing to complain about, really great work.
[OnePlus 3 & 3T Cross Device Development] :
Really???

What should I answer, other then exactly what you've quoted?

Testing needed...
[OnePlus 3 & 3T Cross Device Development] cukierkas:
I see no point locking bootloader again if custom twrp, rom, kernel and magisk is used :)

All sequences are accepted while unlocking bootloader at first :D

Imo.
[OnePlus 3 & 3T Cross Device Development] Dirk:
Like setting fire to every object in your house and then locking the door on the way out!
[OnePlus 3 & 3T Cross Device Development] :
...and kernel verity patches applied...

The oversea genius sends you fireplanes - since the watter masses will break the complete house, you won't have any problems with fire, nor with locks anymore... SCNR
[OnePlus 3 & 3T Cross Device Development] Sytis:
Well the quoted text referred to 2.3.3 as opposed to 2.3.2 which is further tested. Considered the fact that the device is encrypted, TWRP needs a password to get the data so that point is invalid. Further i ungoogled the phone and put some effort into securing the overall system and only keep a minimal set of apps which i trust. It just felt like relocking is the only thing i haven't done. But instead of these weird comparisons of a burning house, a simple "No" would have been enough. I'll try finding a thorough and neutral explanation on the pros and cons of relocking somewhere else then.
[OnePlus 3 & 3T Cross Device Development] :
Dude, I just don't know if relocking the bootloader is safe. As I clearly stated: before recommending the use of 3.2.0-1, I'd like to wait some 10 days or so, because backup/restore, formating and relocking needs some testing. I can't say yes or no - no matter how often you ask.

I'VE NEVER EVER RECOMMENDED ANY 2.x.x-x TWRP VERSION FOR NLOS 16.0!!! NEVER!!!
[OnePlus 3 & 3T Cross Device Development] cukierkas:
If that example doesn't cleared your clouds - please consider to invest into tin foil cap.

https://en.m.wikipedia.org/wiki/Tin_foil_hat
[OnePlus 3 & 3T Cross Device Development] meiser:
I use signed LOS 15.1 and TWRP 3.2.3 since months, and it works fine. But you must keep in mind that some fastboot commands don't work with locked bootloader, e.g. "fastboot boot boot.img".

If you really make a mistake, you could use the 4.0.1 OOS FW with the vulnerable bootloader to unlock the bootloader without loosing data and switch back to current FW.
[OnePlus 3 & 3T Cross Device Development] simthadim:
After a long time away (NLOS was stable at least for me) I dirty flashed to the latest build (April 8th). Noticed that it installed newpipe as a system app. Checked this tread but couldn't find a reference to newpipe, so I am in doubt. Anyone know if and when this was introduced?

My system has MicroG (works flawlessly still after update still) & Magisk, both installed trough TWRP as system app (not updated after flash). Usually use skytube (similar to newpipe), though not as a system app.
[OnePlus 3 & 3T Cross Device Development] :
???

ingo@adler /usr/local/src/los16 $ find out/ -iname \*newpipe\*
ingo@adler /usr/local/src/los16 $

NLOS builds (above example is for latest build) does NOT ship with newpipe.

Attach all files from /system/addon.d/, please. Check all Magisk modules, too.
[OnePlus 3 & 3T Cross Device Development] simthadim:
I was really confused too, it makes no sense to attribute it to NLOS (can't think of a reason why you would ship with newpipe). Yet after a dirty flash I suddenly noticed newpipe being there (and being a system app too). Was not sure where to check .

Checked the addon.d folder, appears the MicroG package I used ( from Shadow53) is the source. In Nougat MicroG had to be flashed (because it needs to be a system app), hence I used his zip compiler. Not sure if this system app requirement holds for Pie and MicroG. The zip did not install newpipe at first, it was not there, yet when a rom is loaded the 00-1-microg.sh forces newpipe to be installed along with microG.

Thank you for pointing me in the right direction. Newest build runs super smooth (with microG), will fix the microG .zip to eliminate newpipe.
[OnePlus 3 & 3T Cross Device Development] :
UPDATE (kernel: 3.18.139-rc2; maintainance)

Build 20190426

Releasenotes:

NLOS-16.0 relays on OxygenOS firmware. OxygenOS 5.0.8 firmware or later is required:

Oneplus 3T: OxygenOS 5.0.8 firmware

Oneplus 3: OxygenOS 5.0.8 firmware

For a complete list of additional cherry picks see: current.pick.sh.

Changelog (Last repo sync: 26 Apr 2019, 09:47:25 CEST / 26 Apr 2019, 07:47:25 UTC):

Revert "current.pick.sh: pie-lockscreen-shortcuts." — Nvertigo

Revert "current.pick.sh: "Audio assets: add NFC sounds"." — Nvertigo

current.pick.sh: p-display-shrink. — Nvertigo (swipe on-screen-navbar to activate - currently no other trigger available)

op3: Fix keypad fw update denial — dianlujitao

op3: s/ro.vendor.product/ro.product.vendor/g — Arne Coucheron

Merge remote-tracking branch 'los/lineage-16.0' into linux-stable/merge-16.0 — Nvertigo (mainly qcalcd-2.0 updates)

Merge '3.18.139-rc2' of https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc into linux-stable/nlos-16.0 — Nvertigo

NLOS-Bootlogo

nlos_bootlogo-v0.1.zip

back_in_black_bootlogo-v1.0.zip(pre ob16 OxygenOS Bootlogo)

[SIZE="+2"]DOWNLOAD[/SIZE]​

Happy flashing!
[OnePlus 3 & 3T Cross Device Development] undrwater:
Outstanding ROM so far, thank you.

Request: Would it be possible to add KCAL support in the kernel for night light?

https://xdaforums.com/android/software-hacking/dev-kcal-advanced-color-control-t3032080/page1

Thanks again.
[OnePlus 3 & 3T Cross Device Development] :
I'll look into, but I'm afraid

the patches you are referring to are really old and will interfere with the upstreamed nlos kernel.

the patches you are reffering to do not support msm8996/pro (op3/t).

kcal and livedisplay arn't compatible and don't know of each other. Additional logic is needed to ensure one is disabled when the other is used.

Have you tried livedisplay's "Display mode" setting? I'm happy with the automatic setting, while using a nightly color temperature of 2800k.
[OnePlus 3 & 3T Cross Device Development] undrwater:
I hadn't seen this. I'll try, thanks!
[OnePlus 3 & 3T Cross Device Development] BillGoss:
I'm posting this question here because this thread has an audience that seems to be more technically inclined.

I've noticed that there's been a change in how the "ls" command (/system/bin/ls) behaves in Los when file names contain spaces. It now escapes the space characters. For example:

$ ls I*

Ilaria\ Ramelli\ -\ CDA\ Review.pdf

This means you don't need quotes when referencing the file, for example:

$ ls Ilaria\ Ram*

Ilaria\ Ramelli\ -\ CDA\ Review.pdf

But it causes issues in scripts that use quotes to handle file names with spaces, because the following command fails:

$ ls "Ilaria\ Ramelli\ -\ CDA\ Review.pdf"

ls: Ilaria\ Ramelli\ -\ CDA\ Review.pdf: No such file or directory

It also causes grief when using ADB to pull files because neither

adb pull Ilaria\ Ramelli\ -\ CDA\ Review.pdf

nor

adb pull "Ilaria\ Ramelli\ -\ CDA\ Review.pdf"

work. ADB only works if you use quotes and no escape character, namely:

adb pull "Ilaria Ramelli - CDA Review.pdf"

Is there a way to disable the escaping of spaces in file names in the ls command?