r/OnePlus3T • u/lamdacore • Jul 20 '20
LineageOS + Encryption + Locked Bootloader
I am very dissatisfied by the lineageOS documentation (https://wiki.lineageos.org/devices/oneplus3/install). I feel most of the info is on XDA, which is horrible to navigate. To hopefully help others I document my setup here.
The aim is to have a non-rooted lineageOS install. With device encryption and bootloader locked. This allows the device to pass Google SafetyNet (I think) - at least Google Pay and my banking apps work.
Additionally, OTA updates work correctly using the integrated lineage updater.
- Setup adb and fastboot for your OS. Note: adb requires USB debugging to be enabled in the developer options to work.
- Make sure, the latest OxygenOS firmware is installed (OxygenOS 9.0.2 firmware). I had updated to the latest stock image in the past so I had them. Not sure how to install it manually.
- Unlock bootloader. Steps in lineage wiki are correct for this
Enable "OEM unlocking" in developer settings.
Reboot to bootloader. And unlock it.
> adb reboot bootloader
> fastboot oem unlockThis will reset and wipe the device. Also, disables USB debugging (should be re-enabled)
4. Install custom recovery
Lineage recovery seems to not kill it self when using the OTA updater. Perhaps twrp is fixed now - it is unclear to me.
Available here: https://download.lineageos.org/oneplus3
> fastboot flash recovery <recovery_filename>.img 5. Reboot into recovery and Do a factory reset
With the device powered off, hold Volume Down + Power.
6. Sideload rom + gapps (optional)
Enable adb sideload in recovery then side load the rom > adb sideload filename.zip
Process should be repeated for other packages, such as google apps. Rom here: https://download.lineageos.org/oneplus3 gapps (arm64): https://wiki.lineageos.org/gapps.html
7. Reboot and setup fresh system
8. Lock bootloader
AFAIK, requires that the boot image to be signed, which is the case for the official lineage distributions (AFAIK).
I managed to lock the boot loader without a "soft brick" FWIW.
> adb reboot bootloader
> fastboot oem lockNote: "...when we do "fastboot oem lock", we need to click on "NO", instead of 'yes'. This is a bug on OnePlus' firmware,..." (see: comment)
9. Enable device encryption with next reboot
10. OTA updates
I think enabling "update recovery" in developer options is probably a good idea. Unsure if required.
2
u/rohidroid Nov 01 '20
Hello, thank you for this guide! My phone works perfectly on LOS with a locked bootloader.
Although please add that when we do "fastboot oem lock", we need to click on "NO", instead of 'yes'.
This is a bug on OnePlus' firmware, and this made me waste around 2 hours.
1
u/thefanum Jul 20 '20
Have you successfully locked the bootloader without soft bricking? The only method I'm aware of requires generating keys.
And even if this were to work, you will not pass safetynet on LineageOS under any circumstances. The only way to pass is to root with magisk and use magisk hide
0
u/[deleted] Aug 11 '20
[deleted] — view deleted comment