[Guide]Installing Lineage

Search This thread

OhioYJ

Senior Member
Feb 25, 2011
1,491
745
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.
 
Last edited:

OhioYJ

Senior Member
Feb 25, 2011
1,491
745
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.
 
Last edited:

karlicoss

New member
Apr 10, 2020
2
1
installed 17.1!

Installing Lineage...​

Massive thanks for your instructions!

- at first, I tried upgrading from LOS 16.0 to LOS 17.1. I followed the instructions on the wiki, but it landed me in the qualcomm crashdump mode.
- after that I ran into your instructions, and tried to follow your update guide, but it didn't help (not very surprising I guess, but I haven't had much to lose at this point :) ).
- after that, I just followed your fresh install guide (i.e. flashing the fastboot room and starting from scratch), followed every step and it worked!

I wonder if it's worth updating lineage OS wiki and pointing to your instructions? There is bunch of people in this thread, who also bricked the phone into crashdump, so perhaps it could help to prevent it for someone else.
 
Last edited:

barguybrady

Member
Dec 9, 2014
45
4
Chicago
Updating to LOS 17.1 ?

Thanks for the guide, able to flash los 17.1 successfully.

Initially I had problems with updating LOS, so I returned to Stock. As more people attempted to install LOS, and this fine Original Poster "Ohio" offered such excellent, and detailed instructions, I have been running LOS 16 since February.
However, I have not updated it, since I have had Zero Issues.

But to clarify, you used this method to update to LOS 17.1 ?
- coming from LOS 16 - without first returning to a fast-boot ROM ?

Did you up-date GApps accordingly during this Flash ?

Thank You, in advance, for any assistance!
:good:
 

karlicoss

New member
Apr 10, 2020
2
1
But to clarify, you used this method to update to LOS 17.1 ?
- coming from LOS 16 - without first returning to a fast-boot ROM ?

Hi, I updated my previous reply to make it a bit more clear!

Yep, I was on LOS 16. Haven't had any issues, but figured why not update if I'll have to do it eventually :)

So I downloaded 17.1 and used the wiki instructions, which messed the phone up :(

Ended up flashing fastboot rom and starting from scratch, flashed gapps and magisk according to OhioYJ's instruction and it worked.
 
  • Like
Reactions: thomasnsr

Dasseem

Senior Member
Sep 14, 2015
86
19
Bengaluru
Flashing method

But to clarify, you used this method to update to LOS 17.1 ?
- coming from LOS 16 - without first returning to a fast-boot ROM ?

Did you up-date GApps accordingly during this Flash ?

Thank You, in advance, for any assistance!
:good:

I was using carbon ROM previously, had to move to OOS latest for flashing the lineage 17.1, believe it needs to be done if you are coming from pie, people know better correct me if I am wrong here.

As Karlicoss mentioned, it's better to follow the method posted by Ohio.
 
Last edited:

badpanda

Senior Member
Dec 29, 2011
1,562
342
NYC/Stamford
Cliff Notes Versions

Installing Lineage
- Install fastboot ROM boot it once. Just to make sure everything is good.
- Reboot to fastboot.
- Boot the image of TWRP.
- Run the TWRP installer, reboot to recovery
- You backed everything up right?
- Factory reset (This is the slider at the bottom in the wipe menu).
- Format data. (This is the button that says Format data in the wipe menu)
- 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. You must do this after formatting data.
- Now transfer Lineage and TWRP to your phone, Windows / Linux should see TWRP fine as a media device when plugged in.
- Install Lineage
- Run the TWRP Installer.
- Reboot to Recovery.
- Install Lineage (You need Lineage on both slots, so yes run it again)
- Run the TWRP Installer (yes again).
- Reboot to Recovery.
- Install Gapps if you want them.
- Install Magisk if you use Magisk. Do not install modules or other add ons at this point. Boot once and go through the setup and everything, then install your add-ons.
- Be aware the phone may restart once, then Lineage will start up and all will be good.

Updating Lineage
- Reboot to recovery
- Flash Lineage.
- Flash TWRP Installer
- Reboot to Recovery
- Flash Gapps. (Assuming you use them, if you installed them once you must continue to install them or do a clean install)
- Flash Magisk. (Optional If you use it)
- Reboot to system.
- No loss of data, or anything.
- No need to flash anything twice etc.
Updating failed for me, as it shows everything encripted once I reboot the second time to recovery on slot B...
 

OhioYJ

Senior Member
Feb 25, 2011
1,491
745
Updating failed for me, as it shows everything encripted once I reboot the second time to recovery on slot B...

Usually this means you didnt format data, or you are using an old version of TWRP. Did you do a clean install?

I just tried it on my phone, was running 4-12 build, using 3.3.1-32 TWRP, updated to the 4-14 build, using 4-14 Gapps (nano), everything went smoothly here.
 
Last edited:

badpanda

Senior Member
Dec 29, 2011
1,562
342
NYC/Stamford
Usually this means you didnt format data, or you are using an old version of TWRP. Did you do a clean install?

I just tried it on my phone, was running 4-12 build, using 3.3.1-32 TWRP, updated to the 4-14 build, using 4-14 Gapps (nano), everything went smoothly here.
No, no clean install. Just wanted to update to today's newest build os.
 

sickpoppy

Member
Jul 5, 2012
11
0
installing android 10 roms

I followed exactly as it was written. Same issues arose for me. After the phone is off then turned on no LTE. It makes phone calls and also text stuff. HOWEVER when you take out and reinsert sim LTE is enable. What is the problom?????????
 

OhioYJ

Senior Member
Feb 25, 2011
1,491
745
I followed exactly as it was written. Same issues arose for me. After the phone is off then turned on no LTE. It makes phone calls and also text stuff. HOWEVER when you take out and reinsert sim LTE is enable. What is the problom?????????

Just cycling airplane mode doesnt work? This isn't a TMobile 6T is it? You are in Sim slot 1? You maybe better asking in the LOS thread, and provide log it not working and then it working when you reinsert it. Im not quite sure whats going on there.
 

badpanda

Senior Member
Dec 29, 2011
1,562
342
NYC/Stamford
Usually this means you didnt format data, or you are using an old version of TWRP. Did you do a clean install?

I just tried it on my phone, was running 4-12 build, using 3.3.1-32 TWRP, updated to the 4-14 build, using 4-14 Gapps (nano), everything went smoothly here.
So this means you do have to always format data for every single update??

---------- Post added at 09:07 PM ---------- Previous post was at 09:05 PM ----------

I followed exactly as it was written. Same issues arose for me. After the phone is off then turned on no LTE. It makes phone calls and also text stuff. HOWEVER when you take out and reinsert sim LTE is enable. What is the problom?????????
Change your sim card to the other slot...

---------- Post added at 09:11 PM ---------- Previous post was at 09:07 PM ----------

@OhioYJ So for an update you boot to recovery flash LOS latest version then flash twrp again and then reboot to recovery second time then format data to possibly decript encrypted system and, transfer files both gapps and magisk to device and then install gapps and magisk, lastly just reboot to system?
 
Last edited:

sickpoppy

Member
Jul 5, 2012
11
0
reply

yes it is a tmobile but it was flashed to global. TWRP is the version you are using. downloaded the lastest ROM. Weird it finds LTE at first then like I said when then phone shuts off LTE doesnt work til I take sim out.
 

OhioYJ

Senior Member
Feb 25, 2011
1,491
745
yes it is a tmobile but it was flashed to global. TWRP is the version you are using. downloaded the lastest ROM. Weird it finds LTE at first then like I said when then phone shuts off LTE doesnt work til I take sim out.

A TMobile "converted" to global does not equal a global 6T. Logs posted in the LOS thread, may help out other TMobile users? The TMobile 6Ts introduce all sorts of quirks, and Im afraid I dont have any experience with them, so hopefully another TMobile user will be able to help.
 
  • Like
Reactions: badpanda

Top Liked Posts

  • There are no posts matching your filters.
  • 3
    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.
    2
    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.
    Try setting the dialer as default
    1
    Its agive lot more
    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!
    Busybox is a set of Linux binaries packed in a single executable which add additional capabilities to terminal. Many Linux functionalities become available in android with busybox. If you are familiar with Linux terminal then its a must have.
    1
    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!

    Official Answer is in this post.

    Change to using Magisk's internal Busybox for the `props` script (the boot scripts are already using it without issues and have for some time). Separately installed Busybox no longer needed.

    So Busybox is not needed for Magisk Hide Props anymore. That's why it works.
  • 32
    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.
    14
    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.
    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
    So I finished installing this on my TMobile OP6T last night. Here are my tips to go along with this guide :

    - If Fastboot Devices doesn't detect your phone, immediately move from Windows to Linux, its not worth your time. (Something like Linux Mint, as recommended, since some are small and lack specific things)

    - TWRP Installer is right underneath the .img, its just really bunched together and easily overlooked.

    - After flashing TWRP and doing the factory reset, your phone will be wiped. So hopefully you have a USB C to 2.0/3.0 adapter because you need to put LineageOS and TWRP Installer on the phone while Windows/Linux detects it but it won't actually allow copying to it. Might not be a problem for everyone, but it was for me.

    - For some reason, it made me 'agree' to using the stupid Google assistant. If I didn't, I was in a loop of the phone setup. It would have me pick a fingerprint, then ask if I wanted to use voice assistant over and over and over until I pressed agree.

    The amount of time I wasted on Windows 10 was not worth it. Just skip Windows 10 and go to Linux. There are problems going 5 years back, with fastboot and Windows 10. It kinda seems like a Oneplus problem, lacking the fastboot driver or making it available for us to install easily in the device manager. But w/e just spend the 30min on a annoying OS, its way better than the hours I wasted onW10
    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.
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone