• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

[Guide]Installing Lineage

Search This thread

just4sc

Senior Member
Dec 25, 2010
115
12
Ok, I keep trying to install Magisk to no avail. I use the magisk from the OP and rename it to .zip. I then flash it in TWRP. First time set up I follow the directions exactly. Under props, I always choose the 6T Android 10 fingerprint. I make sure hide is turned on and the relevant apps are chosen. I still fail safety net every time. Any idea where to look or even start at? Magisk Ver 22.1 is the version the links point to. I have uninstalled Magisk at this time once again

UPDATE: Magisk is installed. Root has been achieved. It still doesn't pass safety net no matter what I do. All of my pay and bank apps work great.
Believe someone mentioned that the safetynet test in Magisk is faulty and you should download another test app from the Play store and it should pass fine if you have all the settings correctly configured (per instructions in OP).
 
  • Like
Reactions: Okiera29

OhioYJ

Senior Member
Feb 25, 2011
1,521
767
Believe someone mentioned that the safetynet test in Magisk is faulty and you should download another test app from the Play store and it should pass fine if you have all the settings correctly configured (per instructions in OP).

This is correct. Don't worry about what Magisk says at the moment. It has been fixed in Canary builds. However I am still just running the stable builds.
 

OhioYJ

Senior Member
Feb 25, 2011
1,521
767
I updated the guide, and removed the 17.1 stuff since 18.1 is official now. I still need to create some new updated images. I'll also need to test the updated install method using the copy parititons script that LOS is using now too. I've used it on my 8T and didn't have any problems. Just don't like recommending anything I haven't tested first hand.
 

Atul Shyam

Member
Dec 13, 2020
14
7
Kozhikode, India
Installing Lineage

Few quick things.
  • LOS 18.1 is now official so the guide will now just be covering that.
  • I also want to address a common question, you can use Windows for this process. I prefer Linux, and Fastboot just works in Linux without driver issues. If you have Fastboot and ADB working in Windows already feel free to use that if you want.

Using TWRP 3.5.2_9-0
1. Start off Fresh. Install OOS using the Fastboot ROM.

Start off with a fresh install of OOS. You need the latest version of OOS 10. I typically use a the fastboot ROMs for this as it will do both slots for me at once. (Alternatively you can use TWRP and install the ZIPs and do it twice to get it on both slots, or my least favorite, the MSM Tool if you want. Doesn't matter how OOS ends up on both slots, as long as it ends up on both slots.)

I use Linux, and honestly I feel like it's easier and more reliable for fastboot and ADB so that's what I'm including here in these steps. It's easy to boot from a USB.

To create a bootable Linux flash drive you can use Unetbootin, which you can download for free here (Your other option would be to burn the ISO straight to a DVD and skip the unetbootin step):

https://unetbootin.github.io/

For Linux, I'm using Linux Mint Cinnamon, You can download for free here:

https://www.linuxmint.com/download.php

Then run unetbootin (yours will look a little different, I'm running it in Linux):

fatsort1.jpg


Point it to the Linux ISO, and tell it where an empty flash drive is. It will erase everything on the flash drive. Afterwards you can load whatever you want on the flash drive. However be aware when booting Linux from this drive you can't access what is on the drive (at least not by normal methods).

After this has successfully completed, reboot the PC, and boot from the USB drive. Your PC will boot into Linux (turning off the PC and removing the USB drive will make it boot up like normal again).

Next we need to install fastboot and adb. You need to open up the "start menu" and open the "synaptic package manager". You can find this stuff in the menus, however the easiest way to get to these items is to just start typing the name of the item. See below:

fatsort2.jpg


Search fastboot, click the boxes, choose install. Then search for ADB, click the boxes, choose install and then click apply. It's that easy it will download everything that's needed and install.

Now would be a good time to back everything up. The phone will get wiped. You will also need a the appropriate fastboot ROM. Fastboot ROMs available in this thread. Extract the fastboot images to a folder that is easy to find. I would recommend the Desktop. Time to open up a terminal:

fatsort6.jpg


Place the phone in fastboot mode. You can do this using the advanced reboot menu, ADB, or the key combinations (all key combos listed below for reference):

Volume Up + Power while turning on will boot to fastboot.
Volume Down + Power while turn on will boot to recovery.
Holding Volume Up + Power should force the phone to turn off.
Volume Up + Volume Down should put your phone in Download mode for the MSM Tool.

You can flash the images one by one or use a script. My script is available here. Flashing the fastboot ROM should look something like this:

fastboot2.jpg


That image explained:

cd Desktop <-- Switched the directory to the Desktop the default directory when you open up the terminal is the /home directory.
cd flash <-- I put my fastboot images in a folder called flash. This stuff is case sensitive. My folder was all lowercase.
sudo fastboot devices <-- Is just checking to see if my PC can see my phone, and making sure it's in fastboot. Sudo is necessary for this distro, as both fastboot and ADB must be run as root.
sudo sh FlashThese.sh <-- Tells the terminal to run my script, since the script contains fastboot commands it must be run as root.

At the end you should get something like this:

fastboot3.jpg


Then just choose start form Fastboot. Not booting and getting dumped off at the OnePlus recovery screen is nothing to worry about. Choose your language of choice, Wipe data and cache, Erase everything (Music, pics, etc), This can not be undone, continue. After that the phone will boot. Once booted enable developer options, advanced reboot, and reboot to fastboot.

2. Installing TWRP.

First step is to boot the correct TWRP image. Grab the current TWRP from the official site. You need both files, the img file, and the installer. Once again from the terminal:

fastboot4.jpg


The image explained:
cd Desktop <-- Switched the directory to the Desktop the default directory when you open up the terminal is the /home directory.
sudo fastboot devices <-- Is just checking to see if my PC can see my phone, and making sure it's in fastboot. Sudo is necessary for this distro, as both fastboot and ADB must be run as root.
sudo fastboot boot twrp-3.5.2_9-0-fajita.img * <-- Sends that TWRP image to the phone to be booted temporarily. Only boot this, never run the command "flash".

Once in TWRP the phone should show up as a media device so you can copy files to it. Copy the TWRP installer over to it. Choose Install from the TWRP menu and navigate to where you placed the TWRP installer. Press on it, and swipe to confirm flash. When it is done hit the back button until you are back out to the main menu.

twrp1.jpg


From the main menu choose reboot, and choose Recovery:

twrp2.jpg


The first time you try and reboot the official version of TWRP it will ask you if you want to install the TWRP app. Do NOT install the app. In the settings you can disable this prompt. Your other option is just uncheck both boxes at the screen you see below when you get to it, and then click the button that says do not install. Do use the slider. At that point the phone will reboot as to recovery as you selected.

twrp6.jpg


Now that you are back in TWRP that is now installed, time to wipe the phone. From the main menu choose Wipe. Swipe the factory reset slider at the bottom. Then hit back. Next hit Format Data. Type Yes to Continue. Hit back to continue. Keep hitting back till you get to the main menu.

twrp3.jpg


Do NOT wipe cache, do not Wipe system, do NOT Wipe Dalvik / ART, do not add anything else, Just Factory Reset and Format Data. After doing those two Reboot to Recovery one more time. So go back into the reboot menu, choose reboot to recovery again (swipe to allow modifications if it asks). You must do this after formatting data.

3. Install Lineage

Links:
Lineage 18.1 XDA Thread
Official 6T Lineage Downloads

The phone should still be in TWRP at this point. You now need to copy Lineage to the phone. From TWRP's main menu choose install. Then navigate to your ROM .zip location and click on it. Then swipe to confirm flash.

twrp4.jpg


Lineage will replace TWRP, so you need to reflash TWRP as well. Run the TWRP installer again. If it's not on the phone, just copy it over again real quick. On A/B devices ROMs get flashed to the opposite slot. Things like Gapps, Magisk, etc get flashed to the current slot. We need Lineage on both slots, so it must be flash again. Flashing it twice only needs to be done the first time as we need to get rid of OOS. For updates it just gets flashed once. After the TWRP installer has run, back out to the main menu, and choose reboot, then recovery:

twrp2.jpg


Once back in TWRP flash Lineage again. From TWRP's main menu choose install. Then navigate to your ROM .zip location and click on it. Then swipe to confirm flash.

twrp4.jpg


Now run the TWRP installer again. Back out to the main menu, and reboot to recovery.

4.Optional, Gapps

Links:
NikGapps <-- For Lineage 18.1 (Use the R Folders for Android 11. I recommend the "Core" version. I also tested Basic though if you want that level of Gapps. I strongly recommend you grab setup wizard out of the R Addons Folder, I used the regular setup wizard, not the pixel one.)
MindTheGapps <-- It's worth mentioning here Lineage recommends MindTheGapps for 18.1. Take your pick. I personally use NikGapps as I can use a "leaner" Gapps package.

Now that your phone is back in TWRP for the last time before booting up Lineage, it's time to install Gapps if you want them. This step is optional. Same as the other steps here, go to install, choose your OpenGapps package, Then navigate to your .zip location and click on it. Then swipe to confirm flash.

5. Very Optional, Magisk

These steps are very optional. However this is how I, root, pass safety net, and get a various apps to appear in the Play store.

Flash Magisk in TWRP. For Magisk 22, you now have to rename the Magisk.apk to Magisk.zip. Then flash it in TWRP. If you wanted to uninstall it, you rename it to uninstall.zip. If you already had an older version of Magisk installed, make sure you do not have it hidden / nenamed when installing Magisk 22 for the first time. Restore the original package before installing 22.

Magisk <-- Flash this right after Gapps.

These items are add-ons are flashed in Magisk after the first boot (Don't flash these in TWRP anymore):
MagiskHide Props Config
Busybox

To flash modules in Magisk press the puzzle piece icon. Then choose install from storage. Now just choose your addons. After flashing the icons it will have a reboot icon at the bottom. You can reboot or you can press back and flash another. After you are done reboot.

magisk9_1.jpg


You will also need a Terminal Emulator. I personally use:
Terminal Emulator for Android

Once all these are installed the first step is setup Magisk. Under Magisk go to settings:

magisk1_1.jpg


In version 20.4+ Magisk Hide is no longer on by default. So make sure the Magisk Hide, Hide Magisk from various forms of detection switch is flipped. Then press Hide Magisk Manager. This will bring up a box for you to choose a random name for the Magisk Manager, type whatever you want here. You can leave it Manager if you wish, but I typically change this.

magisk2_1.jpg


Now open Magisk again. It will ask you to download it again, click ok, then manually open the app again as it says. Now we need to open Magisk hide. This is now under the shield icon, then click the arrow at the top:

magisk3_1.jpg


These are the apps you don't want to know that you have root. Less is better. You can cause instability problems by just choosing everything. My general rule of thumb is, Google, steaming video, music, and payment apps get selected. In my experience if I come across an app that needs it and I didn't select it, I just clear cache and/or data and re-open the app and it works. There are some big multiplayer apps that ban hardware / people, so do your research (don't ask me, I don't play those games).

magisk4_1.jpg


Next time to change the device fingerprint using MagiskHide Props Config Module. We do this using the terminal emulator. In the terminal emulator, type "su" to gain root privileges. Then type props to run the module:

magisk5.jpg


Now it's just following the menus. Choose option 1 - Edit device finger print. (type 1, hit enter)

magisk6.jpg


After this you will see a menu of devices. It doesn't matter what device you pick really. If you want apps / Google to think you have a OPPO or Samsung pick one of those Fingerprints. However there's a bit more to passing Safety-net than that. Since Google has changed how things work not all those fingerprints that used to work will work now. Also now you may get an error when you turn on the phone because of the security dates. The OP6T Android 10 fingerprint has no issues at this point, so use that if you want:

magisk7.jpg


After choosing the fingerprint you want, it will ask you if you want to reboot. Choose yes. After rebooting, you may need to clear the cache from the play store for some apps to appear in it. You should now pass safety net. Check this in Magisk:

magisk8_1.jpg


6. Very Optional, Ad Blocking with a Host File.

You can block many things with a hosts file, most popular would be ads. I've been use StevenBlack's host file which is a compilation of several hosts files. This is located on Github:

https://github.com/StevenBlack/hosts (Scroll down you'll see the options of what you can block)

Direct link to the hosts file I use. This will block Adware / Malware.

Unfortunately for quite some time now on this device you can no longer just use a root browser to swap the hosts file. The easiest way is to use TWRP.

First we have to make the hosts file. The hosts file must use unix / linux line endings. If you are using linux, don't worry about this, just create the file. If you are using Windows, the easiest thing to do is use Notepad++ (Free).

Notepad++ Downloads

Next one other caveat. The hosts file is quite large. I've never had much luck copy and pasting it from any other browser than Firefox (Windows or Linux), but however you get it into Notepad++ is not a big deal.

Once in you have the hosts file into Notepad++ go to Edit, EOL Conversion, and Choose Unix (LF).

hosts1.jpg


Now save the file as "hosts" no ending. This does mean under file type you will need to change it to All File types *.*. Move this hosts file to your phone. Then reboot to recovery. From the main TWRP menu, choose mount. Then mount system:

hosts2.jpg


Hit the back button and go to the advanced menu. Choose File Manager:

hosts3.jpg


You will find your hosts file under /sdcard, wherever you placed it. In my case I placed it in a folder called ROMs. Once you locate it, press and hold it for a moment, and relase. Then choose copy file:

hosts4.jpg


At this point you need to tell TWRP where you want to paste the hosts file. It belongs in the /etc folder. The only hic-cup here is depending on what you were doing in TWRP this could be (on this device) /system/etc or /system/system/etc (you will see similar folders to the image below if you are in the right place). Once you are there, press "paste?" button in the lower right corner:

hosts5.jpg


After this just swipe to confirm:

hosts6.jpg


You can now reboot the device, and your hosts file should now be in place. Your ad block should now be active for all apps as it's global for all connections.

7. Reboot to system.

Updating Lineage

1. Flash Lineage.

Reboot to recovery. You can use the advanced reboot menu, or Volume Down + Power while turning the phone on. Don't wipe anything. From TWRP's main menu choose install. Then navigate to your ROM .zip location and click on it. Then swipe to confirm flash.

twrp4.jpg


Lineage will replace TWRP, so you need to reflash TWRP as well. Run the TWRP installer again. After the TWRP installer has run, back out to the main menu, and choose reboot, then recovery:

twrp2.jpg


2. Optional, Gapps (if you installed them once you must continue to install them or do a clean install)

Links:
OpenGapps

Now that your phone is back in TWRP for the last time before booting up Lineage, it's time to install Gapps if you want them. This step is optional. Same as the other steps here, go to install, choose your OpenGapps package, Then navigate to your .zip location and click on it. Then swipe to confirm flash.

3. Reboot to system.



Last updated
Since I don't want people to have to wonder if these instructions are current, I am going to periodically test and update this post with my results. Please note I'm testing with a 6T, TMobile 6Ts are different. You can generally assume previous versions of LOS and OOS were also tested, but if you are unsure feel free to ask in this thread.

Last tested with:
OOS 10.3.7 and LOS 17.1 12-31 with TWRP 3.4.0-2
OOS 10.3.8 and LOS 18.1 05-06 with TWRP 3.5.2_9-0

This method has also been tested with:
OOS 10.3.3 and Omnirom 5-24 MicroG and Omnirom 5-24.
After installation, are you using Lineage OS recovery instead of TWRP? I read somewhere that Lineage recommends using LOS recovery instead of TWRP and it helps update LOS automatically while using TWRP requires you to manually install updates.

Apologies if my questions are silly. I'm still on noob-level and learning.
 

OhioYJ

Senior Member
Feb 25, 2011
1,521
767
After installation, are you using Lineage OS recovery instead of TWRP? I read somewhere that Lineage recommends using LOS recovery instead of TWRP and it helps update LOS automatically while using TWRP requires you to manually install updates.

Apologies if my questions are silly. I'm still on noob-level and learning.

There is a section on updating in the guide. It uses TWRP. The LOS updater in the past has had issues. Perhaps it was just users with mods or something, but I've always found TWRP to be a reliable way to update for this device. So I choose to update "manually". Even with it being a A/B device it doesn't take that long to do. One reboot.

From my cliff notes section (on updating):

- Reboot to recovery
- Flash Lineage.
- Flash TWRP Installer
- Reboot to Recovery
- Flash Gapps. (Optional, but if you flashed them once you have to keep flashing them.)
- Flash Magisk. (Optional)
- Reboot to system.
- No loss of data, or anything
 

Atul Shyam

Member
Dec 13, 2020
14
7
Kozhikode, India
There is a section on updating in the guide. It uses TWRP. The LOS updater in the past has had issues. Perhaps it was just users with mods or something, but I've always found TWRP to be a reliable way to update for this device. So I choose to update "manually". Even with it being a A/B device it doesn't take that long to do. One reboot.

From my cliff notes section (on updating):

- Reboot to recovery
- Flash Lineage.
- Flash TWRP Installer
- Reboot to Recovery
- Flash Gapps. (Optional, but if you flashed them once you have to keep flashing them.)
- Flash Magisk. (Optional)
- Reboot to system.
- No loss of data, or anything
Well, that answers my question. Cheers mate! :)
 

OhioYJ

Senior Member
Feb 25, 2011
1,521
767
Helo my dear friend, thanks for the update. Just like to make sure this installation guide requires clean install? As I remember, previously you were on 18.1 unofficial version. Again, your time and effort are highly appreciated.

- Clean install is never a bad idea. I don't think anyone would argue that. I do understand it takes a moment to put things back though.
- However if you were on 18.1 unofficial you should be able to just flash the official version.
- If you were on 17.1 you will have to at least format data. I would go ahead and honestly just do the clean install if you are already formatting data, personally.
 
  • Like
Reactions: thomasnsr

OhioYJ

Senior Member
Feb 25, 2011
1,521
767
is it possible to lock the bootloader? will it break with OTA?

Yes it's possible, DON'T do it with any LOS you just download. Yes it absolute breaks OTA updates from Lineage that is. Locking the bootloader requires that you sign the builds. There have been people who have created their own update servers and got everything working, but you don't do any of this with the official builds.

You should see This amazing guide here, Re-Locking the Bootloader with a self-signed Build of LOS. Thanks to @WhitbyGreg for his hard work on this guide.
 

Atul Shyam

Member
Dec 13, 2020
14
7
Kozhikode, India
Installing Lineage

Few quick things.
  • LOS 18.1 is now official so the guide will now just be covering that.
  • I also want to address a common question, you can use Windows for this process. I prefer Linux, and Fastboot just works in Linux without driver issues. If you have Fastboot and ADB working in Windows already feel free to use that if you want.

Using TWRP 3.5.2_9-0
1. Start off Fresh. Install OOS using the Fastboot ROM.

Start off with a fresh install of OOS. You need the latest version of OOS 10. I typically use a the fastboot ROMs for this as it will do both slots for me at once. (Alternatively you can use TWRP and install the ZIPs and do it twice to get it on both slots, or my least favorite, the MSM Tool if you want. Doesn't matter how OOS ends up on both slots, as long as it ends up on both slots.)

I use Linux, and honestly I feel like it's easier and more reliable for fastboot and ADB so that's what I'm including here in these steps. It's easy to boot from a USB.

To create a bootable Linux flash drive you can use Unetbootin, which you can download for free here (Your other option would be to burn the ISO straight to a DVD and skip the unetbootin step):

https://unetbootin.github.io/

For Linux, I'm using Linux Mint Cinnamon, You can download for free here:

https://www.linuxmint.com/download.php

Then run unetbootin (yours will look a little different, I'm running it in Linux):

fatsort1.jpg


Point it to the Linux ISO, and tell it where an empty flash drive is. It will erase everything on the flash drive. Afterwards you can load whatever you want on the flash drive. However be aware when booting Linux from this drive you can't access what is on the drive (at least not by normal methods).

After this has successfully completed, reboot the PC, and boot from the USB drive. Your PC will boot into Linux (turning off the PC and removing the USB drive will make it boot up like normal again).

Next we need to install fastboot and adb. You need to open up the "start menu" and open the "synaptic package manager". You can find this stuff in the menus, however the easiest way to get to these items is to just start typing the name of the item. See below:

fatsort2.jpg


Search fastboot, click the boxes, choose install. Then search for ADB, click the boxes, choose install and then click apply. It's that easy it will download everything that's needed and install.

Now would be a good time to back everything up. The phone will get wiped. You will also need a the appropriate fastboot ROM. Fastboot ROMs available in this thread. Extract the fastboot images to a folder that is easy to find. I would recommend the Desktop. Time to open up a terminal:

fatsort6.jpg


Place the phone in fastboot mode. You can do this using the advanced reboot menu, ADB, or the key combinations (all key combos listed below for reference):

Volume Up + Power while turning on will boot to fastboot.
Volume Down + Power while turn on will boot to recovery.
Holding Volume Up + Power should force the phone to turn off.
Volume Up + Volume Down should put your phone in Download mode for the MSM Tool.

You can flash the images one by one or use a script. My script is available here. Flashing the fastboot ROM should look something like this:

fastboot2.jpg


That image explained:

cd Desktop <-- Switched the directory to the Desktop the default directory when you open up the terminal is the /home directory.
cd flash <-- I put my fastboot images in a folder called flash. This stuff is case sensitive. My folder was all lowercase.
sudo fastboot devices <-- Is just checking to see if my PC can see my phone, and making sure it's in fastboot. Sudo is necessary for this distro, as both fastboot and ADB must be run as root.
sudo sh FlashThese.sh <-- Tells the terminal to run my script, since the script contains fastboot commands it must be run as root.

At the end you should get something like this:

fastboot3.jpg


Then just choose start form Fastboot. Not booting and getting dumped off at the OnePlus recovery screen is nothing to worry about. Choose your language of choice, Wipe data and cache, Erase everything (Music, pics, etc), This can not be undone, continue. After that the phone will boot. Once booted enable developer options, advanced reboot, and reboot to fastboot.

2. Installing TWRP.

First step is to boot the correct TWRP image. Grab the current TWRP from the official site. You need both files, the img file, and the installer. Once again from the terminal:

fastboot4.jpg


The image explained:
cd Desktop <-- Switched the directory to the Desktop the default directory when you open up the terminal is the /home directory.
sudo fastboot devices <-- Is just checking to see if my PC can see my phone, and making sure it's in fastboot. Sudo is necessary for this distro, as both fastboot and ADB must be run as root.
sudo fastboot boot twrp-3.5.2_9-0-fajita.img * <-- Sends that TWRP image to the phone to be booted temporarily. Only boot this, never run the command "flash".

Once in TWRP the phone should show up as a media device so you can copy files to it. Copy the TWRP installer over to it. Choose Install from the TWRP menu and navigate to where you placed the TWRP installer. Press on it, and swipe to confirm flash. When it is done hit the back button until you are back out to the main menu.

twrp1.jpg


From the main menu choose reboot, and choose Recovery:

twrp2.jpg


The first time you try and reboot the official version of TWRP it will ask you if you want to install the TWRP app. Do NOT install the app. In the settings you can disable this prompt. Your other option is just uncheck both boxes at the screen you see below when you get to it, and then click the button that says do not install. Do use the slider. At that point the phone will reboot as to recovery as you selected.

twrp6.jpg


Now that you are back in TWRP that is now installed, time to wipe the phone. From the main menu choose Wipe. Swipe the factory reset slider at the bottom. Then hit back. Next hit Format Data. Type Yes to Continue. Hit back to continue. Keep hitting back till you get to the main menu.

twrp3.jpg


Do NOT wipe cache, do not Wipe system, do NOT Wipe Dalvik / ART, do not add anything else, Just Factory Reset and Format Data. After doing those two Reboot to Recovery one more time. So go back into the reboot menu, choose reboot to recovery again (swipe to allow modifications if it asks). You must do this after formatting data.

3. Install Lineage

Links:
Lineage 18.1 XDA Thread
Official 6T Lineage Downloads

The phone should still be in TWRP at this point. You now need to copy Lineage to the phone. From TWRP's main menu choose install. Then navigate to your ROM .zip location and click on it. Then swipe to confirm flash.

twrp4.jpg


Lineage will replace TWRP, so you need to reflash TWRP as well. Run the TWRP installer again. If it's not on the phone, just copy it over again real quick. On A/B devices ROMs get flashed to the opposite slot. Things like Gapps, Magisk, etc get flashed to the current slot. We need Lineage on both slots, so it must be flash again. Flashing it twice only needs to be done the first time as we need to get rid of OOS. For updates it just gets flashed once. After the TWRP installer has run, back out to the main menu, and choose reboot, then recovery:

twrp2.jpg


Once back in TWRP flash Lineage again. From TWRP's main menu choose install. Then navigate to your ROM .zip location and click on it. Then swipe to confirm flash.

twrp4.jpg


Now run the TWRP installer again. Back out to the main menu, and reboot to recovery.

4.Optional, Gapps

Links:
NikGapps <-- For Lineage 18.1 (Use the R Folders for Android 11. I recommend the "Core" version. I also tested Basic though if you want that level of Gapps. I strongly recommend you grab setup wizard out of the R Addons Folder, I used the regular setup wizard, not the pixel one.)
MindTheGapps <-- It's worth mentioning here Lineage recommends MindTheGapps for 18.1. Take your pick. I personally use NikGapps as I can use a "leaner" Gapps package.

Now that your phone is back in TWRP for the last time before booting up Lineage, it's time to install Gapps if you want them. This step is optional. Same as the other steps here, go to install, choose your OpenGapps package, Then navigate to your .zip location and click on it. Then swipe to confirm flash.

5. Very Optional, Magisk

These steps are very optional. However this is how I, root, pass safety net, and get a various apps to appear in the Play store.

Flash Magisk in TWRP. For Magisk 22, you now have to rename the Magisk.apk to Magisk.zip. Then flash it in TWRP. If you wanted to uninstall it, you rename it to uninstall.zip. If you already had an older version of Magisk installed, make sure you do not have it hidden / nenamed when installing Magisk 22 for the first time. Restore the original package before installing 22.

Magisk <-- Flash this right after Gapps.

These items are add-ons are flashed in Magisk after the first boot (Don't flash these in TWRP anymore):
MagiskHide Props Config
Busybox

To flash modules in Magisk press the puzzle piece icon. Then choose install from storage. Now just choose your addons. After flashing the icons it will have a reboot icon at the bottom. You can reboot or you can press back and flash another. After you are done reboot.

magisk9_1.jpg


You will also need a Terminal Emulator. I personally use:
Terminal Emulator for Android

Once all these are installed the first step is setup Magisk. Under Magisk go to settings:

magisk1_1.jpg


In version 20.4+ Magisk Hide is no longer on by default. So make sure the Magisk Hide, Hide Magisk from various forms of detection switch is flipped. Then press Hide Magisk Manager. This will bring up a box for you to choose a random name for the Magisk Manager, type whatever you want here. You can leave it Manager if you wish, but I typically change this.

magisk2_1.jpg


Now open Magisk again. It will ask you to download it again, click ok, then manually open the app again as it says. Now we need to open Magisk hide. This is now under the shield icon, then click the arrow at the top:

magisk3_1.jpg


These are the apps you don't want to know that you have root. Less is better. You can cause instability problems by just choosing everything. My general rule of thumb is, Google, steaming video, music, and payment apps get selected. In my experience if I come across an app that needs it and I didn't select it, I just clear cache and/or data and re-open the app and it works. There are some big multiplayer apps that ban hardware / people, so do your research (don't ask me, I don't play those games).

magisk4_1.jpg


Next time to change the device fingerprint using MagiskHide Props Config Module. We do this using the terminal emulator. In the terminal emulator, type "su" to gain root privileges. Then type props to run the module:

magisk5.jpg


Now it's just following the menus. Choose option 1 - Edit device finger print. (type 1, hit enter)

magisk6.jpg


After this you will see a menu of devices. It doesn't matter what device you pick really. If you want apps / Google to think you have a OPPO or Samsung pick one of those Fingerprints. However there's a bit more to passing Safety-net than that. Since Google has changed how things work not all those fingerprints that used to work will work now. Also now you may get an error when you turn on the phone because of the security dates. The OP6T Android 10 fingerprint has no issues at this point, so use that if you want:

magisk7.jpg


After choosing the fingerprint you want, it will ask you if you want to reboot. Choose yes. After rebooting, you may need to clear the cache from the play store for some apps to appear in it. You should now pass safety net. Check this in Magisk:

magisk8_1.jpg


6. Very Optional, Ad Blocking with a Host File.

You can block many things with a hosts file, most popular would be ads. I've been use StevenBlack's host file which is a compilation of several hosts files. This is located on Github:

https://github.com/StevenBlack/hosts (Scroll down you'll see the options of what you can block)

Direct link to the hosts file I use. This will block Adware / Malware.

Unfortunately for quite some time now on this device you can no longer just use a root browser to swap the hosts file. The easiest way is to use TWRP.

First we have to make the hosts file. The hosts file must use unix / linux line endings. If you are using linux, don't worry about this, just create the file. If you are using Windows, the easiest thing to do is use Notepad++ (Free).

Notepad++ Downloads

Next one other caveat. The hosts file is quite large. I've never had much luck copy and pasting it from any other browser than Firefox (Windows or Linux), but however you get it into Notepad++ is not a big deal.

Once in you have the hosts file into Notepad++ go to Edit, EOL Conversion, and Choose Unix (LF).

hosts1.jpg


Now save the file as "hosts" no ending. This does mean under file type you will need to change it to All File types *.*. Move this hosts file to your phone. Then reboot to recovery. From the main TWRP menu, choose mount. Then mount system:

hosts2.jpg


Hit the back button and go to the advanced menu. Choose File Manager:

hosts3.jpg


You will find your hosts file under /sdcard, wherever you placed it. In my case I placed it in a folder called ROMs. Once you locate it, press and hold it for a moment, and relase. Then choose copy file:

hosts4.jpg


At this point you need to tell TWRP where you want to paste the hosts file. It belongs in the /etc folder. The only hic-cup here is depending on what you were doing in TWRP this could be (on this device) /system/etc or /system/system/etc (you will see similar folders to the image below if you are in the right place). Once you are there, press "paste?" button in the lower right corner:

hosts5.jpg


After this just swipe to confirm:

hosts6.jpg


You can now reboot the device, and your hosts file should now be in place. Your ad block should now be active for all apps as it's global for all connections.

7. Reboot to system.

Updating Lineage

1. Flash Lineage.

Reboot to recovery. You can use the advanced reboot menu, or Volume Down + Power while turning the phone on. Don't wipe anything. From TWRP's main menu choose install. Then navigate to your ROM .zip location and click on it. Then swipe to confirm flash.

twrp4.jpg


Lineage will replace TWRP, so you need to reflash TWRP as well. Run the TWRP installer again. After the TWRP installer has run, back out to the main menu, and choose reboot, then recovery:

twrp2.jpg


2. Optional, Gapps (if you installed them once you must continue to install them or do a clean install)

Links:
OpenGapps

Now that your phone is back in TWRP for the last time before booting up Lineage, it's time to install Gapps if you want them. This step is optional. Same as the other steps here, go to install, choose your OpenGapps package, Then navigate to your .zip location and click on it. Then swipe to confirm flash.

3. Reboot to system.



Last updated
Since I don't want people to have to wonder if these instructions are current, I am going to periodically test and update this post with my results. Please note I'm testing with a 6T, TMobile 6Ts are different. You can generally assume previous versions of LOS and OOS were also tested, but if you are unsure feel free to ask in this thread.

Last tested with:
OOS 10.3.7 and LOS 17.1 12-31 with TWRP 3.4.0-2
OOS 10.3.8 and LOS 18.1 05-06 with TWRP 3.5.2_9-0

This method has also been tested with:
OOS 10.3.3 and Omnirom 5-24 MicroG and Omnirom 5-24.
Works flawlessly!
 

Atul Shyam

Member
Dec 13, 2020
14
7
Kozhikode, India
@OhioYJ I followed your OP6T guide on how to install LOS on OP6T with Magisk root to pass safetynet. Earlier today, I updated LOS using the TWRP recovery and flashed Gapps. It worked seamlessly. But after the system booted up and when I opened Magisk, it said that the root was lost/not correctly installed. Is this normal? I mean do I have to go through the process of setting the addons and commands each time I update Lineage or am I missing something?
 

WhitbyGreg

Senior Member
Yes it's possible, DON'T do it with any LOS you just download. Yes it absolute breaks OTA updates from Lineage that is. Locking the bootloader requires that you sign the builds. There have been people who have created their own update servers and got everything working, but you don't do any of this with the official builds.

You should see This amazing guide here, Re-Locking the Bootloader with a self-signed Build of LOS. Thanks to @WhitbyGreg for his hard work on this guide.
Since I was getting a lot of questions about bootloader relocking over on r/lineageos, I worte a post over there that answers a lot of questions as well.

There's also this thread about how to relock with a prebuilt ROM, but read the thread on reddit on why you probably don't really want to do that.

And finally I have created a similar relocking guide for LineageOS 18.1 on the 8T as well.
 
  • Like
Reactions: OhioYJ and niphoet

MightySashiman

Senior Member
Apr 15, 2010
329
62
Lausanne
OnePlus 6T
Hi there, I followed the guide and am using LOS 18.1 with NikGapps core (and the wizard plugin). All work flawlessly except a notorious and serious bug :
when I phone call somebody by clicking on a contact's number, or even dialing numbers, there is no on-call screen display / phone icon in the status bar... Call goes through ok (audio works) but there is no way to actually control the call, hang up, mute...
Any advice is warmly welcome, thanks.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    I went ahead and used OOS 11 as base to dirty flash, but otherwise I did essentially exactly the same things as this guide suggests. I do not use any gapps however.

    So far so good.
  • 34
    Installing Lineage

    Few quick things.
    • LOS 18.1 is now official so the guide will now just be covering that.
    • I also want to address a common question, you can use Windows for this process. I prefer Linux, and Fastboot just works in Linux without driver issues. If you have Fastboot and ADB working in Windows already feel free to use that if you want.
    Frequently asked Questions:

    Using TWRP 3.5.2_9-0
    1. Start off Fresh. Install OOS using the Fastboot ROM.

    Start off with a fresh install of OOS. You need the latest version of OOS 10. I typically use a the fastboot ROMs for this as it will do both slots for me at once. (Alternatively you can use TWRP and install the ZIPs and do it twice to get it on both slots, or my least favorite, the MSM Tool if you want. Doesn't matter how OOS ends up on both slots, as long as it ends up on both slots.)

    I use Linux, and honestly I feel like it's easier and more reliable for fastboot and ADB so that's what I'm including here in these steps. It's easy to boot from a USB.

    To create a bootable Linux flash drive you can use Unetbootin, which you can download for free here (Your other option would be to burn the ISO straight to a DVD and skip the unetbootin step):

    https://unetbootin.github.io/

    For Linux, I'm using Linux Mint Cinnamon, You can download for free here:

    https://www.linuxmint.com/download.php

    Then run unetbootin (yours will look a little different, I'm running it in Linux):

    fatsort1.jpg


    Point it to the Linux ISO, and tell it where an empty flash drive is. It will erase everything on the flash drive. Afterwards you can load whatever you want on the flash drive. However be aware when booting Linux from this drive you can't access what is on the drive (at least not by normal methods).

    After this has successfully completed, reboot the PC, and boot from the USB drive. Your PC will boot into Linux (turning off the PC and removing the USB drive will make it boot up like normal again).

    Next we need to install fastboot and adb. You need to open up the "start menu" and open the "synaptic package manager". You can find this stuff in the menus, however the easiest way to get to these items is to just start typing the name of the item. See below:

    fatsort2.jpg


    Search fastboot, click the boxes, choose install. Then search for ADB, click the boxes, choose install and then click apply. It's that easy it will download everything that's needed and install.

    Time to open up a terminal:

    fatsort6.jpg


    Just to make sure we don't run into any problems we need to update adb and fastboot. In the terminal run these commands to update fastboot and adb (this is downloading them directly from Google).

    wget https://dl.google.com/android/repository/platform-tools-latest-linux.zip
    unzip \platform-tools-latest-linux.zip
    sudo cp platform-tools/adb /usr/bin/adb
    sudo cp platform-tools/fastboot /usr/bin/fastboot

    You will also need the appropriate fastboot ROM. Fastboot ROMs available in this thread. The catch being that thread is no longer updated. So we will need to make our own fastboot rom. To do this we need two things:

    1. The stock rom zip (OP Site).
    2. Payload dumper. I've yet to get the one from the GitHub link to work, so I've been using the one from this Article. Direct Download Link

    You need to extract the payload.bin file from the stock rom zip. Extract the payload_dumper files as well, and place everything in the same folder. Payload_dumper requires python3. Open up Synaptic again, search for python3.6 and install it. Now open a terminal so we can extract the images from the payload.bin.

    Navigate to the location of payload_dumper and your payload.bin file. In my case my commands are:

    cd Desktop <-- switches to the Desktop folder
    cd payload_dumper <-- switches to the payload_dumper folder on the Desktop
    python3 payload_dumper.py payload.bin <-- runs the payload_dumper "program" and extract the images from the payload.bin

    payload1.jpg


    Now would be a good time to back everything up. The phone will get wiped. Extract the fastboot images to a folder that is easy to find. I would recommend the Desktop.

    Now it's time to flash all those images we just extracted using payload dumper. Place the phone in fastboot mode. You can do this using the advanced reboot menu, ADB, or the key combinations (all key combos listed below for reference):

    Volume Up + Power while turning on will boot to fastboot.
    Volume Down + Power while turn on will boot to recovery.
    Holding Volume Up + Power should force the phone to turn off.
    Volume Up + Volume Down should put your phone in Download mode for the MSM Tool.

    You can flash the images one by one or use a script. My script is available here. Flashing the fastboot ROM should look something like this:

    fastboot2.jpg


    That image explained:

    cd Desktop <-- Switched the directory to the Desktop the default directory when you open up the terminal is the /home directory.
    cd flash <-- I put my fastboot images in a folder called flash. This stuff is case sensitive. My folder was all lowercase.
    sudo fastboot devices <-- Is just checking to see if my PC can see my phone, and making sure it's in fastboot. Sudo is necessary for this distro, as both fastboot and ADB must be run as root.
    sudo sh FlashThese.sh <-- Tells the terminal to run my script, since the script contains fastboot commands it must be run as root.

    At the end you should get something like this:

    fastboot3.jpg


    Then just choose start form Fastboot (If you were previously on a custom ROM go straight to recovery and wipe everything). Not booting and getting dumped off at the OnePlus recovery screen is nothing to worry about. Choose your language of choice, Wipe data and cache, Erase everything (Music, pics, etc), This can not be undone, continue. After that the phone will boot. Once booted enable developer options, advanced reboot, and reboot to fastboot.

    2. Installing TWRP.

    First step is to boot the correct TWRP image. Grab the current TWRP from the official site. You need both files, the img file, and the installer. Once again from the terminal:

    fastboot4.jpg


    The image explained:
    cd Desktop <-- Switched the directory to the Desktop the default directory when you open up the terminal is the /home directory.
    sudo fastboot devices <-- Is just checking to see if my PC can see my phone, and making sure it's in fastboot. Sudo is necessary for this distro, as both fastboot and ADB must be run as root.
    sudo fastboot boot twrp-3.5.2_9-0-fajita.img * <-- Sends that TWRP image to the phone to be booted temporarily. Only boot this, never run the command "flash".

    Once in TWRP the phone should show up as a media device so you can copy files to it. Copy the TWRP installer over to it. Choose Install from the TWRP menu and navigate to where you placed the TWRP installer. Press on it, and swipe to confirm flash. When it is done hit the back button until you are back out to the main menu.

    twrp1.jpg


    From the main menu choose reboot, and choose Recovery:

    twrp2.jpg


    The first time you try and reboot the official version of TWRP it will ask you if you want to install the TWRP app. Do NOT install the app. In the settings you can disable this prompt. Your other option is just uncheck both boxes at the screen you see below when you get to it, and then click the button that says do not install. Do use the slider. At that point the phone will reboot as to recovery as you selected.

    twrp6.jpg


    Now that you are back in TWRP that is now installed, time to wipe the phone. From the main menu choose Wipe. Swipe the factory reset slider at the bottom. Then hit back. Next hit Format Data. Type Yes to Continue. Hit back to continue. Keep hitting back till you get to the main menu.

    twrp3.jpg


    Do NOT wipe cache, do not Wipe system, do NOT Wipe Dalvik / ART, do not add anything else, Just Factory Reset and Format Data. After doing those two Reboot to Recovery one more time. So go back into the reboot menu, choose reboot to recovery again (swipe to allow modifications if it asks). You must do this after formatting data.

    3. Install Lineage

    Links:
    Lineage 18.1 XDA Thread
    Official 6T Lineage Downloads

    The phone should still be in TWRP at this point. You now need to copy Lineage to the phone. From TWRP's main menu choose install. Then navigate to your ROM .zip location and click on it. Then swipe to confirm flash.

    twrp4.jpg


    Lineage will replace TWRP, so you need to reflash TWRP as well. Run the TWRP installer again. If it's not on the phone, just copy it over again real quick. On A/B devices ROMs get flashed to the opposite slot. Things like Gapps, Magisk, etc get flashed to the current slot. We need Lineage on both slots, so it must be flash again. Flashing it twice only needs to be done the first time as we need to get rid of OOS. For updates it just gets flashed once. After the TWRP installer has run, back out to the main menu, and choose reboot, then recovery:

    twrp2.jpg


    Once back in TWRP flash Lineage again. From TWRP's main menu choose install. Then navigate to your ROM .zip location and click on it. Then swipe to confirm flash.

    twrp4.jpg


    Now run the TWRP installer again. Back out to the main menu, and reboot to recovery.

    4.Optional, Gapps

    Links:
    NikGapps <-- For Lineage 18.1 (Use the R Folders for Android 11. I recommend the "Core" version. I also tested Basic though if you want that level of Gapps. I strongly recommend you grab setup wizard out of the R Addons Folder, I used the regular setup wizard, not the pixel one.)
    MindTheGapps <-- It's worth mentioning here Lineage recommends MindTheGapps for 18.1. Take your pick. I personally use NikGapps as I can use a "leaner" Gapps package.

    Now that your phone is back in TWRP for the last time before booting up Lineage, it's time to install Gapps if you want them. This step is optional. Same as the other steps here, go to install, choose your OpenGapps package, Then navigate to your .zip location and click on it. Then swipe to confirm flash.

    5. Very Optional, Magisk

    These steps are very optional. However this is how I, root, pass safety net, and get a various apps to appear in the Play store.

    Flash Magisk in TWRP. For Magisk 23, you now have to rename the Magisk.apk to Magisk.zip. Then flash it in TWRP. If you wanted to uninstall it, you rename it to uninstall.zip. If you already had an older version of Magisk installed, make sure you do not have it hidden / nenamed when installing Magisk 23 for the first time. Restore the original package before installing 23.

    Magisk <-- Flash this right after Gapps.

    These items are add-ons are flashed in Magisk after the first boot (Don't flash these in TWRP anymore):
    MagiskHide Props Config
    Busybox

    To flash modules in Magisk press the puzzle piece icon. Then choose install from storage. Now just choose your addons. After flashing the icons it will have a reboot icon at the bottom. You can reboot or you can press back and flash another. After you are done reboot.

    magisk9_1.jpg


    You will also need a Terminal Emulator. I personally use:
    Terminal Emulator for Android

    Once all these are installed the first step is setup Magisk. Under Magisk go to settings:

    magisk1_1.jpg


    In version 20.4+ Magisk Hide is no longer on by default. So make sure the Magisk Hide, Hide Magisk from various forms of detection switch is flipped. Then press Hide Magisk Manager. This will bring up a box for you to choose a random name for the Magisk Manager, type whatever you want here. You can leave it Manager if you wish, but I typically change this.

    magisk2_1.jpg


    Now open Magisk again. It will ask you to download it again, click ok, then manually open the app again as it says. Now we need to open Magisk hide. This is now under the shield icon, then click the arrow at the top:

    magisk3_1.jpg


    These are the apps you don't want to know that you have root. Less is better. You can cause instability problems by just choosing everything. My general rule of thumb is, Google, steaming video, music, and payment apps get selected. In my experience if I come across an app that needs it and I didn't select it, I just clear cache and/or data and re-open the app and it works. There are some big multiplayer apps that ban hardware / people, so do your research (don't ask me, I don't play those games).

    magisk4_1.jpg


    Next time to change the device fingerprint using MagiskHide Props Config Module. We do this using the terminal emulator. In the terminal emulator, type "su" to gain root privileges. Then type props to run the module:

    magisk5.jpg


    Now it's just following the menus. Choose option 1 - Edit device finger print. (type 1, hit enter)

    magisk6.jpg


    After this you will see a menu of devices. It doesn't matter what device you pick really. If you want apps / Google to think you have a OPPO or Samsung pick one of those Fingerprints. However there's a bit more to passing Safety-net than that. Since Google has changed how things work not all those fingerprints that used to work will work now. Also now you may get an error when you turn on the phone because of the security dates. The OP6T Android 10 fingerprint has no issues at this point, so use that if you want:

    magisk7.jpg


    After choosing the fingerprint you want, it will ask you if you want to reboot. Choose yes. After rebooting, you may need to clear the cache from the play store for some apps to appear in it. You should now pass safety net. Check this in Magisk:

    magisk8_1.jpg


    6. Very Optional, Ad Blocking with a Host File.

    You can block many things with a hosts file, most popular would be ads. I've been use StevenBlack's host file which is a compilation of several hosts files. This is located on Github:

    https://github.com/StevenBlack/hosts (Scroll down you'll see the options of what you can block)

    Direct link to the hosts file I use. This will block Adware / Malware.

    Unfortunately for quite some time now on this device you can no longer just use a root browser to swap the hosts file. The easiest way is to use TWRP.

    First we have to make the hosts file. The hosts file must use unix / linux line endings. If you are using linux, don't worry about this, just create the file. If you are using Windows, the easiest thing to do is use Notepad++ (Free).

    Notepad++ Downloads

    Next one other caveat. The hosts file is quite large. I've never had much luck copy and pasting it from any other browser than Firefox (Windows or Linux), but however you get it into Notepad++ is not a big deal.

    Once in you have the hosts file into Notepad++ go to Edit, EOL Conversion, and Choose Unix (LF).

    hosts1.jpg


    Now save the file as "hosts" no ending. This does mean under file type you will need to change it to All File types *.*. Move this hosts file to your phone. Then reboot to recovery. From the main TWRP menu, choose mount. Then mount system:

    hosts2.jpg


    Hit the back button and go to the advanced menu. Choose File Manager:

    hosts3.jpg


    You will find your hosts file under /sdcard, wherever you placed it. In my case I placed it in a folder called ROMs. Once you locate it, press and hold it for a moment, and relase. Then choose copy file:

    hosts4.jpg


    At this point you need to tell TWRP where you want to paste the hosts file. It belongs in the /etc folder. The only hic-cup here is depending on what you were doing in TWRP this could be (on this device) /system/etc or /system/system/etc (you will see similar folders to the image below if you are in the right place). Once you are there, press "paste?" button in the lower right corner:

    hosts5.jpg


    After this just swipe to confirm:

    hosts6.jpg


    You can now reboot the device, and your hosts file should now be in place. Your ad block should now be active for all apps as it's global for all connections.

    7. Reboot to system.

    Updating Lineage

    1. Flash Lineage.

    Reboot to recovery. You can use the advanced reboot menu, or Volume Down + Power while turning the phone on. Don't wipe anything. From TWRP's main menu choose install. Then navigate to your ROM .zip location and click on it. Then swipe to confirm flash.

    twrp4.jpg


    Lineage will replace TWRP, so you need to reflash TWRP as well. Run the TWRP installer again. After the TWRP installer has run, back out to the main menu, and choose reboot, then recovery:

    twrp2.jpg


    2. Optional, Gapps (if you installed them once you must continue to install them or do a clean install)

    Links:
    NikGapps

    Now that your phone is back in TWRP for the last time before booting up Lineage, it's time to install Gapps if you want them. This step is optional. Same as the other steps here, go to install, choose your OpenGapps package, Then navigate to your .zip location and click on it. Then swipe to confirm flash.

    3. Reboot to system.



    Last updated
    Since I don't want people to have to wonder if these instructions are current, I am going to periodically test and update this post with my results. Please note I'm testing with a 6T, TMobile 6Ts are different. You can generally assume previous versions of LOS and OOS were also tested, but if you are unsure feel free to ask in this thread.

    Last tested with:
    OOS 10.3.7 and LOS 17.1 12-31 with TWRP 3.4.0-2
    OOS 10.3.11 and LOS 18.1 05-27 with TWRP 3.5.2_9-0

    This method has also been tested with:
    OOS 10.3.3 and Omnirom 5-24 MicroG and Omnirom 5-24.
    15
    Cliff Notes

    *TWRP 3.5.0_9-0+ Must be used with LOS 18 / 18.1

    - Backup everything to the PC, so you will need to copy all your data over.
    - Sync all your accounts, etc.
    - In TWRP format data. Reboot recovery (This step wipes the device, make sure you backed everything up!)
    - Factory Reset. (This is the slider at the bottom, do not Wipe system, do NOT Wipe Dalvik / ART, do not add anything else)
    - Flash Lineage
    - Flash TWRP Installer
    - Reboot to Recovery
    - Flash Lineage (This is only the first time, to get the AOSP rom on both slots, only do this for the first install)
    - Flash TWRP Installer (This is only the first time, to get the AOSP rom on both slots, only do this for the first install)
    - Reboot to Recovery (This is only the first time, to get the AOSP rom on both slots, only do this for the first install)
    - Flash Gapps (Optional)
    - Flash Magisk (Optional) (Remember for ver 22 the Magisk.apk gets renamed to Magisk.zip, can also be renamed to uninstall.zip for uninstalling)
    - Reboot to System.
    - Then you should be able to setup the device, copy everything back over. Restore your data.

    After this you should be able to update Lineage as normal.

    - Reboot to recovery
    - Flash Lineage.
    - Flash TWRP Installer
    - Reboot to Recovery
    - Flash Gapps. (Optional, but if you flashed them once you have to keep flashing them.)
    - Flash Magisk. (Optional)
    - Reboot to system.
    - No loss of data, or anything.
    4
    Can anyone explained to me what flashing busybox does for you? I never flash it and everything works fine as far as I can tell...

    Thanks!

    Magisk Hide Props used to require it to function. If I remember correctly there was a change at some point it may not require it it anymore. I'm getting ready to do a clean install on a 6T this weekend to test everything this weekend. I want to make sure the guide still functions fine as written particularly as I've gotten some people say it hasn't. I've been updating fine.

    I also want to test the new LOS install method. I'll try without busybox, as less things installed is always better. I still use busybox for other things though.
    3
    Does anyone have a guide on how to go back to OOS after flashing Lineage according to Lineage's instructions?

    Back up your data, use Step 1 of these instructions. That will put OOS back on your phone.

    MSM Tool, always my least favorite option, but always an option.
    MSM Tools for Regular 6T (TMobile uses a different one)
    3
    thanks for this guide.
    i did everything as this guide says but i have a broken sloght a
    i can set sloght b as active and reboot and it reboots into system.
    but if i reboot from sloght a it just reboots into twrp.
    how to fix.
    also when i update if i directly update using the system update options in settings will that work?

    As always backup your device, first, never know. I wouldn't use the built in updater. Did you use TWRP 3.4.0.0? If you did, thats the issue. The latest TWRP requires a different install procedure. I will update the guide this weekend hopefully. (I have everything tested and sorted out on my device, will be testing another 6T shortly.) If this was the case you should be able to go back to TWRP 3.3.1-32 and dirty flash that slot, like you were updating. Thats what I did to fix mine.