How to Flash Custom ROMs on Android With TWRP

Install the LineageOS ROM on your rooted device

Flash LineageOS on Android

One of the greatest benefits of having a rooted Android device is the ability to install a custom ROM. Android ROMs are simply alternate versions of Android, with some containing different apps by default, while others contain modified kernels.

Almost all ROMs include functions not available from your device manufacturer, and also provide a blank slate to build your system around, completely free from needless bloatware and apps you can’t install. Here's how to flash an Android device to really customize your software.

Before you begin, you’ll need a rooted device with an unlocked bootloader. You won’t get far without both, and you risk damaging your device.

How to Flash Android With Custom ROMs Using TWRP

Before you begin, back up everything. This process will delete your text messages, contacts, settings, and just about everything else. The files on your device should remain, but it's a good idea to back those up, too.

  1. Android ROMs are flashed through a system recovery utility. The most popular recovery utility is currently TWRP, an excellent option with a simple interface and touchscreen support. Before you go any further, install TWRP on your device.

  2. Now that you have TWRP installed, it’s time to look for a ROM. If you don’t know which to choose, LineageOS is a fantastic place to start. Head to the LineageOS download page in either your desktop or Android device’s browser.

    LineageOS Download Page

    If you choose to download from your desktop, you’ll need to transfer this file and the others to your phone.

  3. Locate your device manufacturer.

    • On Desktop: On the menu to the left of the window.
    • On Mobile: Tap the three lines at the top of the window to reveal the side pane.
    Select Your Device On The LineageOS Download Page
  4. The menu will expand to show you the available device models. Locate and select your device.

  5. After you select a model, you'll be presented with a list of the available builds for that device. Select the latest one, and download it.

    Don't unpack the ZIP file. TWRP installs the zipped archive.

  6. You’re going to need the Google Apps (GApps), which doesn't come with LineageOS or any ROM and needs to be installed separately. First, go to Open GApps project, which provides everything you need in a convenient ZIP file you can install with TWRP.

    Open GApps Website
  7. Select the platform that your device is based on. If you’re using an Android device made within the last five years or so, select ARM64, as it's probably the right choice.

    To be sure you're choosing the right platform, go to the LineageOS Wiki and search for your device. The Architecture will be listed under the picture of your device.

  8. Select the Android version you plan to install. The table below will show you the versions of Android as they correspond to LineageOS.

    Android Versions
    Android Version LineageOS Version Android Codename
    9.0 16 Pie
    8.1 15.1 Oreo
    8.0 15 Oreo
    7.1 14.1 Nougat
    6.0 13 Marshmallow
  9. Select the size of the package you want to download. If you’re not familiar with this, select Stock to get the default Android experience. If want the bare minimum to get access to the Google Play store, select Pico.

  10. When you have everything in order, select the red download icon to begin your download.

  11. If you plan on rooting your device again, you can use Magisk to manage the root permissions. If you aren’t familiar, Magisk is a powerful tool to root your device and manage which apps get root access. Go to the Magisk Github page and download the latest ZIP file release.

    This is entirely optional.

  12. If you downloaded everything on your desktop, transfer it all to your device now. You can do this over USB, Wi-Fi, or however you’re most comfortable. Place all of your files somewhere you won’t have trouble finding them.

    If you did everything from your Android device, you can skip this step.

  13. You’re going to need to reboot your device into recovery. Search for your device in the LineageOS Wiki and look under the Special boot modes header to find the button combination you need to reboot into recovery.

  14. Power your device down completely, then hold the key combination while booting to enter recovery.

  15. Your device will boot into a screen showing the Android mascot laying down. Use the volume controls to cycle through the list of boot options and until your reach Recovery mode. Press the power key to boot into TWRP.

  16. Your device will take a few seconds before arriving in the TWRP home screen. You’ll see a list of available options in two columns. Tap Wipe.

    TWRP Home and Wipe screens
  17. At the bottom, swipe the slider to the right to perform a factory reset.

  18. After the reset, press Back to return to the Wipe screen, then press the back arrow to return home.

  19. Now, Tap Install on the TWRP home page.

  20. In the Install screen, you’ll hopefully see your ZIP files listed. Otherwise, use the file navigator in the top section of the screen to locate them. Either way, tap the LineageOS ROM first.

    Flash your ZIP files with TWRP
  21. TWRP will take you to a screen letting you know you’ve added your ROM to the queue to flash. Tap Add more Zips.

  22. Back on the Install screen, tap your Open GApps zip next. You’ll arrive at the same type of screen as when you added the ROM.

    If you chose to include Magisk, tap Add more Zips again, and select it. If not, move ahead and swipe to confirm the flash.

  23. TWRP will spring into action, flashing your ZIP files in order. Depending on your device, this might take some time, so be patient.

  24. When it’s finished, tap Reboot System.

    TWRP flashing a custom ROM

    Before the device reboots, TWRP will ask you to install the associated app. Swipe to install that, too.

  25. It will take a bit longer for your device to fully reboot this time because it’s setting up everything from scratch. Once it does, you’ll need to go through the entire new device setup process again, including signing in to your Google account.

  26. Congratulations! Your device should now be running a custom Android ROM.