Introduction

A custom ROM (aka aftermarket firmware) is a modified version of an existing operating system, that is not officially supported by the manufacturer of a device. Some custom ROMs are based on existing mobile OSs, like Android, and some are based on PC operating systems, such as Manjaro or Ubuntu. They’re different from devices that use stock firmware in that they can offer features and enhancements not found in stock versions of Android, do not contain bloatware, and do not depend on the devices manufacturer for software updates.

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.

Warnings

  • 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.
  1. KAHYI5jMmWjWUwQY
    KAHYI5jMmWjWUwQY
    qPOPSWMFSDr12ycl
    CKfbT2kwvb346wEx
    • 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.

    15min-1hour is incorrect for xiaomi phones. for xiaomi phones its 5-7 buisness days

    Filip -

  2. dZljVNRjUgSx2yp5
    dZljVNRjUgSx2yp5
    A6DaFEGyI6mNYl1S
    • 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.

  3. CYfMStLfhU3LGT6b
    • 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.

    I can't enable the OEM on my phone

    Ibsan Furgassa -

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

  5. D2AwKGELHrj6G1Hl
    D2AwKGELHrj6G1Hl
    E6UE3pqOkVRJQUAU
    • Plug your phone into your computer via a USB-C to USB-A Cable.

    • If you have a bad cable you might encounter some problems. Some older devices also dislike USB 3 in fastboot mode.

    • 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.

    Well that takes care of that cuz I don't have a regular PC but I will save these directions since Someone is donating a Chromebook to me, I went back to consumer cellular after they went with ATT instead of TMobile also & ATT installed software and what looks like bootloader and something about binding? Permissions say NO or NA but they were allowed to do this anyway! I'm furious

    deb patterson -

  6. JSs6S3EdtJORw3SK
    JSs6S3EdtJORw3SK
    vk2adCqunMswSINu
    • 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 Allow.

    • I haven’t added the platform-tools-folder to PATH. That’s why I need to open my terminal window in the platform-tools-folder and enter .\ as a prefix to my commands.

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

    PS C:\Users\ADMIN> adb reboot bootloader

    adb : The term 'adb' is not recognized as the name of a cmdlet, function,

    script file, or operable program. Check the spelling of the name, or if a

    path was included, verify that the path is correct and try again.

    At line:1 char:1

    + adb reboot bootloader

    + ~~~

    + CategoryInfo : ObjectNotFound: (adb:String) [], CommandNotF

    oundException

    + FullyQualifiedErrorId : CommandNotFoundException

    help me pls how do I do that

    Lê Minh Khôi -

    Since you probably haven't "installed" the platform tools, you'd have to use the terminal in the folder you downloaded. You could do that by first running the command cd C:\[location of the folder]\platform-tools first and adding a .\ in front of every subsequent command, like I do in the guide images. Alternatively, if you have a current version of Windows 10 or 11, you can actually install the platform tools via the Microsoft Store by running winget install --id=Google.PlatformTools -e

    Sebastian -

    Okay, so how do I get into the terminal mode on my laptop?

    ArlinaEinstein -

    i had gotten the same error as mentioned in above comment. What should I do?

    Riya Dasani -

    I don't have installed platform-tools, What should I do?

    Riya Dasani -

    "draw the rest of the owl" xd

    Jesus Christ -

    i installed sdk platform tools and android studio, but it says "the code execution cannoty proceed becuase AdbWinApi.dll was not found. reinstalling the program may fix this issue"

    Reginald Jackson -

    Have you already tried reinstalling Android Studio? If that doesn't work, you can alternatively use the methods I mentioned in my response to the first comment on this step. You don't necessarily need the full Android Studio suite unless you're developing an app. Using Winget or simply directly downloading the platform tools folder directly is typically a better option.

    Sebastian -

  7. aNayoXwsQqmBED6i
    • 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.

    • If you receive an error message along the lines of FAILED (remote: 'Failed to unlock, decrypt failed!'), your phone has a locked bootloader and needs an unlock code from the manufacturer.

    • If you're stuck at < waiting for any device > and have already confirmed that your connection is stable, you may need to update your phone's USB driver.

    • 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.

    Hw long step take

    Josh Chibs -

    for me it says what can i do? and nothing happens

    C:\Windows\System32>fastboot flashing unlock

    < waiting for any device >

    Murathan Kilic -

    That means that it can't find your device. Have you made sure it's properly connected? Maybe a loose connection? If you are using a USB 3 cable, try using a USB 2 cable instead. USB 3 cables can sometimes cause problems. Sometimes you need to install a USB driver for your device as well, but if ADB worked Fastboot should typically work as well without installing any additional drivers.

    Sebastian -

    I get stuck at the fastboot flashing unlock/ fastboot oem unlock step.

    When i use adb reboot bootloader the phone screen does turn on, but show nothing... is that right?

    Also is it ok that my phone disconnects briefly after the adb line?

    oajk -

    The brief disconnect is normal, since the device is rebooting, but it should show a rudimentary interface instead of just showing a blank screen. Doesfastboot device report a device even though the screen shows nothing? If so, maybe you can continue anyways.

    Sebastian -

    I keep getting: "remote: 'the command you input is restricted on locked hw'" What do I do?

    The RadioDemon -

    Are you trying to unlock an Amazon Fire device? I don't really have much experience with more locked down devices, you might find someone who can help you on the XDA Forum or Reddit.

    Sebastian -

    I need help and the command works fine but my phone turns off to show me the menu problem is that my automatic mode is charging only and not file transfer


    Le pro -

    Que puedo hacer si no detecta las teclas de volumen?

    Como le doy en 'yes'?!

    Para aceptar el desbloqueo

    A VTRX -

    My phone is not detected after the reboot to boot loader is done, when execute fast boot command the device not detected in the bootloader mode.

    Soundararajan Soundarapandian -

    PS C:\Users\sound\Downtoads\ptatform—toots—tatest—windows\pIatform—tooIs> .\adb devices

    List of devices attached


    its blank there after when in boot loader cant detect the device

    Soundararajan Soundarapandian -

    In bootloader you need to run ./fastboot devices

    Sebastian -

    when i write reboot bootloader , the phone goes in fast boot but 1 second later it turns on

    ismaele tortora -

    It’s possible that your phone is locked by the manufacturer, which might be why it doesn't enter bootloader mode. This is common with some brands, like Oppo. You might want to check via a quick Google search, if your phone model allows it or if it's restricted by the manufacturer.

    Sebastian -

    i cant enter the bootload by using adb reboot bootloader for my oppo r11,it just normal boot after I type "adb reboot bootloader"

    One star no tips -

    use another method

    Lê Minh Khôi -

    my phone just says downloading , i think its infinitly loading now :/

    Liam Zriouil -

    whenever i do adb reboot bootloader my phone turns off, then turns back on completely blank exept for the words enterring fastboot mode... and it just stays like that for ages, i can turn it back to normal but i cant really progress or do anything with fastboot mode

    DuskDomed -

    I get this: C:\Windows\System32>fastboot flashing unlock

    < waiting for device > I used the cable from usb-c to usb-c and usb-a to usb-c but the same thing happened and when I entered abd reboot bootloader the device restarts but ends up in the bootloader where I just start reboot If I can select bootloader or power off, what do I have to do?

    Eine deutsche Antwort ist auch möglich lg

    finn -

    Same for me as was mentioned above: the phone just freezes in >Fastboot mode...
    I feel that those Chinese mfs just made it like that or it is blocked by the manufacturer

    El Agua -

  8. tm4Ua1NsqUQVpaPC
    • 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.

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

    • Enter the command fastboot boot [directory]\[filenameOfTheRecovery].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]\[filenameOfTheRecovery].img and fastboot reboot recovery instead.

    Do I do this download on the computer

    Ian -

    • 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

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

    • Enter the command adb sideload [directory]\[filenameOfTheOsImage].zip

    • 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.

    • Download the GApps package you want to install.

    • Repeat step 10 to reenable ADB sideload.

    • Enter the command adb sideload [directory]\[filenameOfTheAppsPackage].zip

    • If the script tells you that the API level does not match even though you are using the correct GApps package for your version, you can typically resolve this by rebooting into recovery.

    • Do not boot into the system before flashing all the extra packages you want to install.

    • 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.

    • 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.

Conclusion

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

Sebastian

Member since: 19/08/18

27348 Reputation

2 comments

The problem is you need the exact customt TWRP recovery AND exact install .zip for the model number. There is no unversal twrp file or universal android, or utbuntu. Each manufacturer, model, useds a 'custom twrp file. and unique identifier for android 'custom' rom even for android itself.

if you install wrong file not for the particular device, it won't work and you need to customized or find the exact model rom known as custom rom. even if the phone is running android. you can only flash the manfucturere rom for that device. or c ustomized it yourself

oem unlocking just means you can FLASH it. most devices now have oem locked and you cannot flash anything on it. improperly flashing wrong rom can brick the device and if there is no custom rom for download, there is nothing you can do. you have make one for yourself which needs the manufacturers drivers etc.

Nexus Nexus -

And you notice there is no technical support about flashing your old tablets or phones from the manufacturere to download and firmware. or download section. Because they don't want people to be flashing and old phone or tablet. You neeed both custom recovery plus 'custom' rom for that operating system to work. and that .zip files is from manufacturer. most people dont have the tech ability to make custom roms or custom android for their device and with so many models and very little demand it's not worth making it.you see droid kits which only works on samsung phones or tablets and they have downloads to reflash it is BRICKED.

Nexus Nexus -