- The above will build a standard USERDEBUG version of LineageOS, however this will still allow LineageOS Recovery to sideload non-signed files. If you have implemented step 5 above, then this protects your system/vendor/boot/dtbo partitions, but none of the others. Likewise USERDEBUG builds will allow for rolling back to a previous version. To increase security and disallow both of these scenarios you may want to build a USER version of LineageOS to install. However this brings in other issues, such as flashing newer firmware from OnePlus so make sure you understand the implications of both choices. For more details on build types, see https://source.android.com/setup/develop/new-device#build-variants.
Please correct me if I'm wrong, but it seems to me that having the boot loader locked and the device integrity guaranteed just makes sense for using USER builds. Using USERDEBUG builds with adb enabled is kind of pointless if I understand it correctly.
Now, if adb is disabled for USER builds (as per https://source.android.com/setup/develop/new-device#build-variants) how would one apply the update? Step 12 is not going to work:
Step 12: Flashing your LineageOS build
It's time to flash your build to your phone. The following steps assume you have already unlocked your phone and have flashed an official version of LineageOS to it. You don't need to have flashed LineageOS yet, you could use TWRP through "fastboot boot" if you prefer.
- Reboot your phone in to recovery mode
- In LineageOS Recovery select "Apply update"
- From your PC, run:When the sideload is complete, reboot in to LineageOS. Make sure everything looks good with your build.Code:
adb sideload ~/android/lineageos/lineage-17.1-[date]-UNOFFICIAL-fajita-signed.zip
You may also need to format your data partition at this time depending on what you had installed on your phone previously.