If you’ve been considering giving your phone new life with a custom ROM, LineageOS is one of the most popular ones available today. Here’s everything you need to know about flashing this ROM onto your phone.
Before you get overzealous and start throwing things at a command line, you’ll first need to make sure you have everything you need to get started—including whether your phone is ready to take on a ROM.
So, first things first: is your phone compatible? You’ll need to make sure there’s a build of Lineage designed specifically for your phone. Just head over to the Lineage downloads page, select your phone’s manufacturer and then find your model. If it’s there, you’re in luck: Lineage supports your phone.
It’s worth mentioning that it may take a bit of research if there are multiple variants of your phone—like there are with most Samsung Galaxy models. In that case, you’ll want to make sure the handset codename and processor information matches your phone. You can find that info on the Lineage download page for your phone.
Once you’ve confirmed that Lineage actually has a build for your phone, you’ll need to make sure your computer has everything it needs to get you where you need to go: ADB and Fastboot. We have an excellent guide on getting started with ADB, so that is definitely recommended reading before you get started.
With all that out of the way, there’s one last thing you’ll need to do before you can flash Lineage to your phone: an unlocked bootloader or compatible workaround. This is likely the most difficult part of the entire process (depending on your particular phone model, that is), as it’s very difficult to get around the security measures put in place on many phones.
If your phone supports bootloader unlocking, that will be be the easiest way to do this, and this guide operates under the assumption that your phone supports this feature. If it doesn’t, like most Samsung devices, a bit more research on your particular model will be necessary.
With your preparations done, you’re ready to get flashing.
You’re going to need a few tools, and it’s best to go ahead and collect them all now. Here’s the list:
- TWRP: Custom recovery. This is the most popular choice out there right now, and it’s available for a ton of different phones. You’ll need this to flash everything.
- Lineage OS: The actual operating system.
- GApps (optional): If you want all the Googleyness that comes along with Android, you’ll need to have a GApps (Google Apps) package ready to roll. We’ll talk more about that below.
- SU File (optional): If you want root access, you’ll need to flash this.
It’s helpful to download all these files to the same location—preferably the one with your ADB and Fastboot files if you didn’t take the time to set them up in your system PATH.
Here’s a brief look at what each thing does, why you need it, and how to grab the right one for your phone.
TWRP is a custom recovery that is basically required before you can flash Lineage (or any other custom package).
To grab it, head over to TWRP’s homepage, and then click the “Devices” link.
Type in your phone’s model name. Make sure to pay attention here—there could be devices with similar names, and you want to make sure you get there right one. Case in point: Nexus and Nexus 5x. Two different phones, two different recoveries.
Once you’ve selected your phone, scroll down the page to the “Download Links” section, and then click the link appropriate for your region.
From there, click the link for the newest version.
This opens a new page, where you’ll click the “Download twrp-x.x.x.img” button to start downloading the file.
Since you already scoured the Lineage website for your particular phone, you’ve already done half the work here—just grab the newest download and you’re ready to roll with that.
Note which version of Lineage it is, because you’ll need that info if you plan on flashing Google Apps
If you want to set your phone up with your Google account, have access to the Play Store, and utilize all the other features that make Android what it is and what you’re used to, you’re going to need Google Apps.
Head over to the GApps download page and choose the version of Lineage on which you’ll be installing it—it’ll likely either be 15.1 or 14.1. Click the OpenGApps link for the applicable version.
From there, you’ll be met with a bevy of choices: Platform, Android, and Variant. The most important thing to get right here is the Platform. The version of GApps you flash has to match the processor of your phone! If you’re not sure which version your phone is running, you’ll have to look through its specs. GSMArena is a good place to start.
Once you’ve confirmed the platform version, the other two are easy. The Android version should be pre-selected appropriately, so just confirm that. And for the variant—this is just how much stuff is included in the package. Nano is selected by default, but we recommend going with Micro or larger—go with Full if you want the most stock-like experience.
Once everything is selected, tap the download button and save the file.
Finally, if you want root access after you flash Lineage, you’ll need to grab the appropriate SU file from here. Choose the version that matches your phone architecture (which you probably figured out when downloading GApps) and Lineage version.
Note: There isn’t an SU file for Lineage 15.1 yet.
With all your downloads saved and ready to go, you’ll need to enable Developer Mode and USB Debugging on your phone.
We have a full guide on how to do this, but here’s the quick and dirty: head to your phone’s About section, find the Build Number, and then tap the number seven times. This enables the Developer Mode menu.
Jump into this new menu, and then enabled the “Android Debugging” option. Note that if you’re using a newer Android device, you’ll also have to enable the “OEM Unlocking” feature.
Now that you have everything downloaded, enabled, and otherwise ready to go, it’s time to get down to business.
The first thing you’ll need to do is unlock your phone’s bootloader. We highly recommend backing up your phone before doing this.
When you’re ready, connect your phone to your computer over USB, and then navigate to the folder where your ADB and Fastboot files are stored. You’ll need to open a Command Prompt or PowerShell window to this folder. The easiest way to do that is to Shift-right-click the folder and choose the “Open PowerShell Window here” command.
Once it opens, you should make sure your device is properly connected. Type
adb devices at the prompt and then hit Enter. It should return your device in the list of attached devices.
If you’ve never used ADB before, take a look at your phone. It should have a dialog box asking for permission to grant ADB access. Tick the “Always Allow From This Computer” box, and then tap the “OK” button.
If adb kicked back “unathorized” the first time, try it again now that you’ve authorized access on your phone. It should show “device”—this means it’s connected.
Now, type the following command and hit Enter:
adb reboot bootloader
The phone should reboot into the bootloader. Once it’s finished rebooting, type the following command and hit Enter to unlock the bootloader:
fastboot oem unlock
Note: This will factory reset your phone, so do make sure you’ve backed it up first!
You’ll have to confirm on your phone by using the volume and power buttons. Use the volume up button to select the “Yes” option, and then press the power button to confirm.
With the bootloader unlocked, you’re now ready to flash a custom recovery.
The device should take a few minutes to format. When it’s finished, you’re ready to flash TWRP. With a command prompt or PowerShell window open in the folder where you saved the TWRP, type the following command and hit Enter:
fastboot flash recovery <nameofrecovery.img>
Of course, you’ll change <nameofrecovery.img> to match your file—for example, mine is twrp-3.2.1-1-hammerhead.img. So the full command for me would be
fastboot flash recovery twrp-3.2.1-1-hammerhead.img .
This step should only take a few seconds.
Next, you’ll need to launch the recovery you just flashed. Using the phone’s volume rocker to navigate through the menu, find the “Recovery Mode” option. Press the power button to enter recovery.
It shouldn’t take long for TWRP to launch for the first time. Once it launches, you’ll need to slide to enter the recovery screen. On that screen, tap the “Wipe” button, and then tap the “Advanced Wipe” button.
Tick the System, Data, and Cache options, and then swipe the slider at the bottom to start the wipe.
Give it some time to do its thing,and then reboot the system using the button at the bottom.
After rebooting, and when your phone is back in recovery, you’ll need to head back to your Command Prompt or PowerShell window on your computer. Type the following command and hit Enter:
adb push <nameoflineagebuild.zip> /sdcard
Note that “sdcard” is what Android calls local storage. You don’t need an actual SD card in your phone for this.
This copies your Lineage download to the phone’s local storage for flashing. If you have GApps and SU, you’ll need to move those now too, using the same command, but substitute those files.
adb push <gapps.zip> /sdcard
adb push <su.zip> /sdcard
In total, you should’ve moved three files to your phone’s storage (assuming you’re installing GApps and SU). When you’re done, grab your phone again. First, tap the “Install” button, and then choose your Lineage download. This must be the first thing in the queue!
After that’s selected, tap the “Add more zips” button, and then choose GApps. Repeat the process for SU. When you’ve got them all selected, make sure the top reads “3 of max 10 File queued.”
Note: GApps needs to be installed before the first boot, so if you don’t flash it now, you’ll have to start over.
With all three files selected, swipe to flash them all. This will take a bit, so just monitor it to make sure there are no errors.
After the flash is finished, you’ll need reboot your phone once again.
The first boot may take a while, but when it’s up and running, you’ll set things up like any other Android phone. Congratulations, you’re now running Lineage OS!
- › Using Android without Google: A (Kind of) Guide
- › Are There Any Linux Phones?
- › ExpressVPN Review: An Easy-to-Use and Secure VPN for Most People
- › How Much Upload Speed Do You Really Need?
- › 5 Annoying Features You Can Disable on Samsung Phones
- › Why Unlimited Mobile Data Isn’t Actually Unlimited
- › Here’s How Mozilla Thunderbird Is Making a Comeback in 2022
- › Why Do I See “FBI Surveillance Van” in My Wi-Fi List?