Want to flash a custom ROM, but scared of bricking your phone?

I get it. Doing it safely is the most important part.

I've flashed ROMs many times. Sometimes I did brick my phone, but I was always able to recover it.

In short: you don't need root. You need an unlocked bootloader and an official ROM build for your exact phone model.

When I first wrote this in 2016, flashing meant TWRP, a wipe and a zip file. Phones have changed a lot since then, so I've rewritten the whole thing for this update.

Also Read: 7 Best Android Custom ROMs That Are Still Updated in 2026

TL;DR

  • You don't need root. You need an unlocked bootloader and an official ROM build for your exact model.
  • Unlocking the bootloader erases your phone, and a new ROM needs formatted data. Back up first.
  • The basic flow is: unlock, flash the ROM's recovery, format data, sideload the ROM, then sideload GApps before the first boot if you want Google apps.
  • Banking apps may stop working, and a wrong file or a skipped step can brick your phone. Follow your device's official install guide.

Custom ROM Flashing at a Glance

StepWhat it doesWatch out for
Unlock the bootloaderLets your phone start software that isn't the maker'sErases everything on the phone
Flash the ROM's recoveryInstalls the recovery that installs the ROMIf you don't see the ROM's logo, you're in the wrong recovery
Format dataDeletes everything, including the encryption a new ROM needsBack up first
Sideload the ROMInstalls the ROM's zip file from your computer"Signature verification failed" on the ROM means the file is broken or not official
Sideload GApps (optional)Adds the Play Store and Google servicesInstall them before the first boot

What Is a ROM?

You probably learned in school that ROM means read-only memory. On Android, "ROM" means the software your phone runs: the operating system, from the boot logo to the home screen.

Stock ROM vs Custom ROM

Stock ROM is the software your phone came with, made by its maker, like Samsung or Xiaomi.

Custom ROM is a version of Android made by a community project, like LineageOS or crDroid.

Why flash one?

  • Your phone stopped getting updates, but a ROM still supports it.
  • You want clean Android without the maker's extra apps.
  • You want more ways to customize it.
Three Android phones running a custom ROM

Do You Need Root to Flash a Custom ROM?

No, you don't, although a lot of people still think so. What you need is an unlocked bootloader.

What Is the Bootloader?

The bootloader is the first thing that runs when you turn on your phone. It checks the software and then starts Android.

Phone makers lock it so it only starts their own software. That protects you from malware that tries to replace the system, and it's why you can't flash a ROM on a locked phone.

A phone in fastboot mode showing its bootloader lock state
A phone's bootloader screen, showing its lock state.

Can Your Phone's Bootloader Be Unlocked?

This is the first thing to check, before you even pick a ROM.

BrandBootloader unlocking today
Google PixelEasy, except on Verizon models
NothingEasy
OnePlusEasy in most places; harder on T-Mobile models and in mainland China
Sony, Motorola, FairphonePossible with an unlock code from the maker; some carrier Motorolas can't be unlocked
XiaomiYou have to apply in the Xiaomi Community app and wait
SamsungRemoved with One UI 8
Huawei, Honor, VivoNot possible on current models

Rules change often and can depend on your country and carrier, so check your exact model before you buy a phone for flashing.

What Is a Custom Recovery?

Recovery is a small separate system on your phone. The stock one can only do basic things, like a factory reset.

A custom recovery can install a ROM.

In my 2016 guide, I used TWRP. Today, many ROMs ship their own recovery, and LineageOS warns that other recoveries may not work for installing or updating it.

On many newer phones, recovery doesn't even have its own partition anymore. It lives inside the boot or vendor_boot partition, and you flash it from a computer with fastboot.

Custom recovery screens layered on top of each other

Risks and Limitations Before You Flash

Read this part first. It can save you a lot of pain.

  • Unlocking the bootloader wipes your phone. Everything on it is erased.
  • Your warranty may suffer. Some makers refuse repairs on unlocked phones. On Samsung phones, flashing unofficial software trips Knox for good.
  • You can brick your phone. Usually that happens with the wrong file for your model, or a skipped step.
  • Banking and payment apps may stop working. On Android 13 and newer, Google's Play Integrity "device integrity" check needs a locked bootloader and the maker's certified software. A custom ROM can't pass it.
  • Some phones need specific firmware first. For example, LineageOS 24 on the Pixel 8 needs the phone to be on Android 17 stock firmware before you start.

Requirements

  • A phone with an official build of the ROM for your exact model. "Nearly identical" models don't count.
  • A computer with adb and fastboot. Get them from Google's Android SDK Platform-Tools page.
  • A good USB cable.
  • The ROM and its recovery, downloaded from the ROM's official website.
  • Google apps (GApps), if you want the Play Store.
  • A full backup of your data.

Also Read: Download OnePlus Official Stock ROM, USB Drivers & Recovery

How to Back Up Your Phone Before Flashing

In 2016, I told you to make a TWRP backup and restore your apps afterwards. Not anymore.

Modern phones encrypt your data, and you'll be formatting it, so an old-style backup usually can't be restored on a new ROM. Do this instead:

  1. Copy your photos, videos and files to your computer or a cloud service.
  2. Turn on Google backup for your contacts, calendar and app list.
  3. Back up your chats inside each messaging app.
  4. Move your two-factor authentication app to another device, or save its backup codes. People forget this one, and it hurts.

One more thing. LineageOS warns that backups made with Samsung's or Motorola's own backup apps may not be readable once you switch.

How to Flash a Custom ROM on Android

I'll use LineageOS as the example, because its guides are the most detailed.

The steps below are the general shape. The exact commands and files are different for every phone, so follow your device's own official install guide word for word.

Step 1: Find Your Device's Install Guide

Open the LineageOS device list, pick your phone, and open its "Installation" page.

Read it all the way through once before you start. Check which stock firmware version it needs.

Step 2: Turn On Developer Options

  1. Go to "Settings" → "About phone" and tap "Build number" seven times. On some phones, it's inside "Software information".
  2. Open "Developer options" and turn on "USB debugging".
  3. Turn on "OEM unlocking", if your phone has it.
  4. Remove your Google account from the phone, so factory reset protection doesn't lock you out later.

Step 3: Unlock the Bootloader

Connect your phone to the computer and reboot it into fastboot mode. Your guide tells you the button combination.

Then run the unlock command for your brand. On a Pixel, it's fastboot flashing unlock.

Sony and Motorola need a code from their websites, and Xiaomi has its own unlock tool.

Your phone will be wiped. After it restarts, turn "USB debugging" back on.

Step 4: Flash the ROM's Recovery

Download the recovery image from your device's official download page and flash it with fastboot, exactly as the guide says.

Some phones need extra partitions flashed first. For example, the Pixel 8 needs three extra images before its recovery works.

Then reboot into recovery.

For a worked example with TWRP, see How to Root Your OnePlus 5 and Install TWRP Recovery.

If you don't see the ROM's logo, you're in the wrong recovery. Go back and repeat this step.

Step 5: Format Your Data

In recovery, tap "Factory Reset" → "Format data / factory reset".

This deletes everything on the phone, including encryption, which a new ROM needs.

Step 6: Install the ROM

  1. In recovery, tap "Apply update" → "Apply from ADB".
  2. On your computer, run adb -d sideload followed by the name of the ROM's zip file.
  3. Wait for it to finish. Don't reboot yet.

If recovery says signature verification failed on the ROM itself, the file is broken or not official. Download it again.

Step 7: Install Google Apps (Optional)

Want the Play Store?

You must install GApps before the first boot. If you start the ROM without them, you'll have to factory reset before you can add them.

When the ROM finishes installing, recovery asks if you want to reboot to recovery to install add-ons. Tap "Yes".

Then sideload your GApps package the same way as the ROM.

When it says "Signature verification failed", tap "Yes". That's normal for add-ons.

Step 8: Reboot

Tap the back arrow, then "Reboot system now".

The first boot usually takes no longer than 15 minutes. That completes the install.

Is There an Easier Way to Flash a Custom ROM?

Yes, for some phones.

In October 2026, LineageOS launched browser-based flashing tools at flash.lineageos.org. They talk to your phone over USB from a supported browser, so you don't need to install separate flashing programs.

They don't replace the install guides, though. Availability depends on your device, browser and computer.

What Are GApps?

A custom ROM comes without Google's apps. No Play Store, no Gmail, no Google Play services.

You can't just install those apps like normal ones. You flash a GApps package in recovery, right after the ROM.

In 2016, I linked you to OpenGApps. It stopped at Android 11, so don't use it on a new ROM.

LineageOS now recommends MindTheGapps. Pick the package that matches your ROM's Android version and your phone's architecture (almost every modern phone is ARM64).

Also Read: Download GApps for Android 17, 16 & 15 Custom ROMs

Can I Flash a Custom ROM Without Losing Data?

The title of my 2016 post promised this, so here is the honest answer.

  • The first time: no. Unlocking the bootloader wipes the phone, and a new ROM needs formatted data.
  • Switching to a different ROM: no. Plan on a full wipe every time.
  • Updating the same official ROM: usually yes. LineageOS says you don't need to wipe when moving from one official version to the next, unless your device's page says otherwise.

For apps rather than the whole phone, see How to Downgrade an App Without Losing Data on Android.

Final Thoughts

My recommendation: check your exact model first. If it can be unlocked and has an official ROM build, follow its install guide step by step.

If it can't, stay on stock software. The main caveat is that unlocking wipes the phone, and banking apps may stop working afterwards.

Back up first, take your time, and don't continue if a step fails. Unlocking rules change often, and the browser-based tools are new, so check the official guides before you start.

The secret isn't a special tool. It's using the right files for your exact phone.

FAQs

What If My Phone Is Not on Any ROM's List?

There's no official support for it, so don't flash a build made for another model, even a similar one. Look for a different ROM, or keep your phone on stock software.

Why Is My Phone Stuck on the Boot Animation?

The first boot can take up to 15 minutes. If it takes longer, you probably missed a step, such as using the wrong stock firmware, skipping the data format or adding GApps after the first boot.

Can I Install Another Device's ROM on My Phone?

No. Installing another device's ROM can brick your phone, so don't try it.

Will My Banking Apps Work on a Custom ROM?

Maybe not. Apps that need Play Integrity's device check won't pass on a custom ROM, so check the "device integrity" notes on your device's LineageOS page.

You can find the device list in LineageOS Supported Devices List and Downloads.

Still stuck? Tell me through the contact page.

Xaif (Huzaifa Dhapai) started TechVerge in 2015. He's a web developer and long-time Android enthusiast who writes about Android tricks, apps, Windows and the tech he uses every day.

Topics

Comments (27)

  1. Aman

    Dear Xaif,

    It's good to see you make scripts, but you make less you should make them often or someone else makes it and Bro I also have interest in programming.. Know a bit of Web development sone day want to become good in programing.. Cab u pls tell how this scripts our made working procedure like where to start how much time it will take, Wat things to refer? Pls tell I also want to stand with knowledge of programming

    1. XaifAuthor

      Actually even I am learning how to create this script from my friends. If they will teach me properly I will surely teach you...

      1. Aman Tyagi

        Bro can you give me ur friends fb link or something to contact them... I just want to know from where to start.. so I can get idea

        1. XaifAuthor

          They Are not on fb They are in college

  2. S

    Can custom kernels harm device?
    Any sort of damage....maybe in long run?

    1. XaifAuthor

      Some of them are good. Some of them are bad I will tell you to use the best kernels for your device

  3. Niket

    Hello Xaif,

    I want to flash custom rom using CWM recovery mode. Please advise or suggest me for online guidance.

    Actually i am using Moto G2 and after downloading device faker app from xposed installer my phone is not working. Always show the boot loader screen and it is stop there.

    Thanks,
    Niket.

  4. Rocky

    My Phone Samsung Galaxy Star 2 ,it has 512 mb ram & android 4.4.2
    My Phone Ram doesn't Support OTA update what should I do???

    1. XaifAuthor

      I will suggest you to not to do anything with your device. Just because of low RAM it may go to dead lock state or you will end up bricking your phone

  5. Rakesh

    How to flash a costom Rom in Lava A97 Phone give the link of costom Rom

  6. Rakesh Kumar

    Can you tell me how to flash a costom Rom on "Lava A97 " Mobile Which is Run on Android 6.0 & 1Gb Ram also give link of costom Rom.

    1. XaifAuthor

      You can't just because there is no custom ROM available for your device :(

      1. RAAKESH

        How TO Flash COstom RECovery ON LAVA A97

  7. Anupama

    Bro i am a great FAN of your website
    and a frequent visitor of your site
    i am eager to know more excellent tips luv u....????????????????

  8. Dbjt

    Sir Jee I wants to customize my swipe konnect plus (Rooted) ... But there is not having any custom ROM & my Gapps just crashed so I can't use play store for installing 3rd party application... How to recover gapps , pls help me

    1. XaifAuthor

      From where you have downloaded the Gapps?

  9. karthi

    Why it is said to wipe before flashing Gapps? And what is dalvik cache and why should we wipe them?

    1. XaifAuthor

      Sometimes its good to do clean installation. Some ROMS creates issues :(

        1. XaifAuthor

          dalvik cache is a program cache area for the program dalvik. Dalvik is a java based virtual machine that is the bases for running your programs (the ones that have the .apk extension). In order to make access times faster (because there's not JIT (just in time) compiler installed by default), the dalvik-cache is the result of dalvik doing a optimization of the running program. Sounds confusing. It's similar to the prefetch files in Windows.

  10. sonu

    Hiii
    i have samsung j1 SMJ100H
    which is the best custom rom for my device

    1. XaifAuthor

      Nowadays LineageOS is the trending OS give a try

Comments are closed. Have a question about this article? Ask through the contact page.