Getting the device ready for custom ROMs
Last updated : 21/1/2025 (added A-only Samsung, cut up some cruft.)
Intro
So, you've unlocked your devices' bootloader. Now, all that's left to do before you can start installing custom ROMs is to install TWRP (or whatever custom recovery was recommended by your devices& custom ROM maintainer) & make sure it's not replaced by the stock recovery. Here's my guide (among infinite amount of guides) to prepare a device for a custom ROM. Requires adb & fastboot to be set up on your computers.
Booting your Android device to system immediately after flashing custom recovery will override it (the custom recovery) with stock recovery.
A-only partitioned devices (Poco F1, OnePlus 3T)
- Plug device to computer, boot the device to fastboot.
- Open terminal (or Command Prompt / PowerShell for Windows) and type fastboot flash recovery (name of recovery).img.
- Boot to recovery by either using button combo / fastboot boot recovery / fastboot boot (name of recovery).img.
A-only Samsung (S9)
Taken after flashing stock Samsung ROM, performing a factory reset, unlocking the bootloader, and/or a combination of those factors (which are usually #1 & #2). Sourced from the Magisk installation guide (archive.org) & starlte LineageOS installation guide (archive.org). Requires Heimdall in addition to the usual adb & fastboot stuff (and Samsung adb drivers on Windows)
- Rush through initial setup, making sure to connect the device to Internet during the setup.
- Enable developer options & confirm OEM unlocking option exists (and is either grayed out, or at the very least shows "bootloader is already unlocked")
- Boot to download mode (for the S9 it's volume down + Bixby + power), click on the button that correlates to "Continue", and check if KnoxGuard is either absent or shows Checking, Completed, or Broken, at the very least. If it shows Prenormal (which could happen when setting up without internet access) you won't be able to flash stuff.
- Plug device to computer.
- Open terminal (or Command Prompt / PowerShell for Windows).
- Flash recovery using heimdall flash --RECOVERY (name of recovery).img --no-reboot.
- Boot to recovery. Hold the buttons that correlates to "Restart" (for the S9 it's volume down & power) until the screen shuts off. Afterwards, immediately release the buttons & hold the necessary button combos to boot to recovery (for the S9 it's volume up + Bixby + power).
A-only 2SI (Xiaomi) (Poco X3[N/P])
- Plug device to computer, boot the device to fastboot.
- Open terminal (or Command Prompt / PowerShell for Windows) and type fastboot flash recovery (name of recovery).img.
- Boot to recovery by either using button combo / fastboot boot recovery / fastboot boot (name of recovery).img.
A/B partitioned devices (Pixel XL, Mi A1, Mi A2, Zenfone 6)
- Plug device to computer, boot the device to fastboot.
- Open terminal (or Command Prompt / PowerShell for Windows) and type fastboot boot (name of recovery).img in order to boot to custom recovery (in this case it's TWRP).
- Install TWRP installer zip (or install TWRP img in Advanced > Install Recovery Ramdisk) for your device & reboot to recovery.
Back to top
Index - cellphone
Main Page