Difficulty

Moderate

Steps

14

Time Required

                          15 minutes - 1 hour            

Sections

3

  • How to unlock developer options on an Android Phone
  • 2 steps
  • How to unlock the bootloader of an Android Phone
  • 5 steps
  • How to install a different operating system on an Android Phone
  • 7 steps

Flags

2

Member-Contributed Guide

An awesome member of our community made this guide. It is not managed by iFixit staff.

In Progress

This guide is a work in progress. Reload periodically to see the latest changes!

  • BackAndroid Phone

  • Full Screen

  • Options

  • History

  • Save to Favorites

  • Download PDF

  • Edit

  • Translate

  • Get Shareable Link

  • Embed This Guide

  • Notify Me of Changes

  • Stop Notifications

Introduction

The most popular custom ROMs include LineageOS, LineageOS for microG, Paranoid Android, ProtonAOSP, GrapheneOS and CalyxOS.

Some custom ROMs, like GrapheneOS and ProtonAOSP, offer a WebUSB-based installer that is easier to use for most users, but in this guide, I will be covering the command-line based installation as it is the more traditional and universal approach to installing custom ROMs.

  • Unlocking the bootloader will reset your phone, so make sure you have all your data backed up!This process may void your warranty with some manufacturers.A modified device will trip the Play Integrity API (formerly SafetyNet Attestation API) which can cause some services like GPay to stop working.This will make your device vulnerable against hackers with physical access to your device, so do not unlock the bootloader on a device that you intend to carry state/company secrets on.Flashing a custom ROM can be risky and may cause unexpected issues or even brick your device. It is recommended to only flash a custom ROM if you are experienced with Android.Always use caution and read the instructions carefully when unlocking your device’s bootloader or flashing a custom ROM. Improperly following the steps can cause irreversible damage to your device.Before flashing a custom ROM, make sure it is compatible with your device and check for any known issues or bugs reported by other users.If you encounter any issues during the unlocking or flashing process, do not hesitate to seek help from experienced users on forums or support channels provided by the custom ROM developer.

What you need

Step 1

              Finding the Build Number               
  • First, we need to find the Build Number.
  • Usually you can find it under About Phone > Build Number or System > About Phone > Build Number, but since it varies from device to device using the search function is usually the easiest way.

First, we need to find the Build Number.

Usually you can find it under About Phone > Build Number or System > About Phone > Build Number, but since it varies from device to device using the search function is usually the easiest way.

1024

Step 2

              Unlocking developer options               
  • Now you just need to tap the Build number repeatedly, until you get a confirmation message saying “You are now a developer!”. I already enabled developer options on my device, so I don´t need to do it again.
  • You might be prompted to enter your lock screen password, if you have one set up.

Now you just need to tap the Build number repeatedly, until you get a confirmation message saying “You are now a developer!”. I already enabled developer options on my device, so I don´t need to do it again.

You might be prompted to enter your lock screen password, if you have one set up.

Step 3

              Allowing OEM unlocking               
  • In the developer options, find the OEM unlocking option and enable it.
  • You might be prompted to enter your lock screen password, if you have one set up.

In the developer options, find the OEM unlocking option and enable it.

Step 4

              Enable USB debugging               
  • In the developer options, find the USB debugging option and enable it.

In the developer options, find the USB debugging option and enable it.

Step 5

              Connect your phone to your computer               
  • Plug your phone into your computer via the USB-C to USB-A Cable.
  • Pull down the notification shade and select Charging this device via USB.
  • Select the option File transfer/Android Auto.
  • On some older devices this option might be called MTP instead.

Plug your phone into your computer via the USB-C to USB-A Cable.

Pull down the notification shade and select Charging this device via USB.

Select the option File transfer/Android Auto.

On some older devices this option might be called MTP instead.

Step 6

              Allowing your computer to run ADB commands on your device               
  • Open the terminal application on your computer with the SDK Platform Tools installed and enter adb devices
  • This should trigger a popup on your device. Make sure to have the checkmark ticked and click Accept.
  • I´m using MS PowerShell. That´s why I need to open my terminal window in the platform-tools-folder and enter .\ as a prefix to my commands. In Linux you do not need to do this.
  • You can run the command again to check if it worked. It should now say device instead of unauthorized.

Open the terminal application on your computer with the SDK Platform Tools installed and enter adb devices

This should trigger a popup on your device. Make sure to have the checkmark ticked and click Accept.

I´m using MS PowerShell. That´s why I need to open my terminal window in the platform-tools-folder and enter .\ as a prefix to my commands. In Linux you do not need to do this.

You can run the command again to check if it worked. It should now say device instead of unauthorized.

Step 7

              Unlocking the bootloader               
  • Enter the command adb reboot bootloader
  • Wait a couple seconds until your device rebooted into the bootloader, then enter the command fastboot flashing unlock
  • Some devices might use the command fastboot oem unlock instead.
  • You should now see a prompt similar to the one shown in the picture. Use the volume rocker to choose the Unlock the bootloader-option and confirm by pressing the power button.

Enter the command adb reboot bootloader

Wait a couple seconds until your device rebooted into the bootloader, then enter the command fastboot flashing unlock

Some devices might use the command fastboot oem unlock instead.

You should now see a prompt similar to the one shown in the picture. Use the volume rocker to choose the Unlock the bootloader-option and confirm by pressing the power button.

Step 8

              Boot into the bootloader               
  • If your device rebooted after unlocking the bootloader, boot into the bootloader again by pressing and holding the power- and volume-down-button until the device has rebooted into the bootloader.

If your device rebooted after unlocking the bootloader, boot into the bootloader again by pressing and holding the power- and volume-down-button until the device has rebooted into the bootloader.

Step 9

              Boot into recovery               
  • Download the TWRP Recovery for your device or the recovery that came with your custom ROM.
  • Enter the command fastboot boot [directory][filename].img and wait until your device has rebooted into recovery mode.
  • On some devices you might need to enter the command fastboot flash boot [directory][filename].img and fastboot reboot recovery instead.

Download the TWRP Recovery for your device or the recovery that came with your custom ROM.

Enter the command fastboot boot [directory][filename].img and wait until your device has rebooted into recovery mode.

On some devices you might need to enter the command fastboot flash boot [directory][filename].img and fastboot reboot recovery instead.

Step 10

              Enable the ADB sideload feature               
  • On TWRP press Advanced > ADB sideload
  • With other recoveries, like the LineageOS recovery, the option might be similar to Apply Update > Apply Update from ADB

On TWRP press Advanced > ADB sideload

With other recoveries, like the LineageOS recovery, the option might be similar to Apply Update > Apply Update from ADB

Step 11

              Sideload the OS Image               
  • Download the OS image for the custom rom you want to install.
  • Enter the command adb sideload [directory][filename].zip

Download the OS image for the custom rom you want to install.

Enter the command adb sideload [directory][filename].zip

Step 12

              Sideload GApps               
  • You only need to do this if you want/need to use Google services and your OS image does not already include GApps.
  • This will not work if you already rebooted your device.

You only need to do this if you want/need to use Google services and your OS image does not already include GApps.

This will not work if you already rebooted your device.

Step 13

              Sideload GApps               
  • Download the GApps package you want to install.
  • Repeat step 3 to reenable ADB sideload.
  • Enter the command adb sideload [directory][filename].zip
  • Some recoveries might tell you that verification failed. You can ignore this and continue anyways.
  • For some devices you might run into space problems. You can typically resolve these problems by choosing a smaller GApps package and later installing what you need through the Play Store.

Download the GApps package you want to install.

Repeat step 3 to reenable ADB sideload.

Some recoveries might tell you that verification failed. You can ignore this and continue anyways.

For some devices you might run into space problems. You can typically resolve these problems by choosing a smaller GApps package and later installing what you need through the Play Store.

Step 14

              Reboot               
  • This might take some time, but as long as the phone is not boot looping (repeatedly rebooting), everything should be fine.
  • If it didn’t work, you can just try again, starting from step 8.

This might take some time, but as long as the phone is not boot looping (repeatedly rebooting), everything should be fine.

If it didn’t work, you can just try again, starting from step 8.

To restore your device to its factory condition, follow these instructions with an OS image provided by your device manufacturer.

Cancel: I did not complete this guide.

Author

                    Sebastian Dorr                     

Member since: 08/19/2018

1,060 Reputation

                                      7 Guides authored                  



                       Badges:
                       21







                                                        +18 more badges