Flashing a custom ROM

Last updated : 15/2/2024

- Intro -

- Pre-reqs -

- A-only -

- A/B 2SI -

- A / B -

- My opinions regarding GApps -

Intro

Here's a custom ROM flashing guide I've constantly relied on. However, this guide assumes that TWRP recovery is used, as I have 0 experience with other custom recoveries (if it's TWRP-based, hopefully they're similar).

This guide will work on most custom ROMs except for the likes of official Calyx & Graphene (and some non-TWRP-flashable ROMs such as LineageOS on Zenfone 6). Also, if you want to follow this guide on any other devices other than the ones listed in this guide, do at your own risk (or just don't & follow the Lineage wiki for your device, if & only if it's official LineageOS).

Pre-reqs (especially important when coming from encrypted ROM) :

  1. Backup your data & place the backups in the external storage. You can use Titanium, Migrate, Neo Backup (these 3 require root), and/or SeedVault (if available).
  2. Remove your SIM card, if it's attached. Skip this step if not.
  3. Remove lock screen security. This stops TWRP from asking for decryption password.
  4. Boot to TWRP recovery (or any other TWRP-based recovery of your choice)
  5. If you haven't removed your lock screen security, TWRP will ask for the password to decrypt files.

  6. Enter Wipe > Format Data & type yes when prompted
  7. Reboot to recovery
  8. Skip the 2nd step of the flashing guide found below. Which guide to follow depends on your device.

A-only partitioned devices (Poco F1; LG V30; OnePlus 3[T])

  1. Place custom ROM in external storage, along with whatever else you're going to flash
  2. Boot to recovery with external storage attached to the device. If you come from the encrypted pre-reqs, start here.
  3. Go to Wipe > Advanced Wipe. Then, wipe Dalvik, Cache, System, Data. Some TWRP and/or devices (such as official TWRP for F1) has the option of wiping vendor, which is optional (since most F1 ROMs comes with OSV)
  4. Return to the main menu, select Install & browse to the external storage where you placed your ROM in. Flash it & wait until it's done.
  5. For firmware updates on Xiaomi phones (such as the F1 here); flash them before flashing custom ROM.

  6. Reboot to system, and wait until it boots.

A/B 2SI (Poco X3 [N/P])...?

  1. Place custom ROM in external storage, along with whatever else you're going to flash
  2. Boot to recovery with external storage attached to phone. If you come from the encrypted pre-reqs, start here.
  3. In the main menu, select Install & browse to the external storage where you placed your ROM in. Flash it & wait until it's done.
  4. For firmware updates on Xiaomi phones (such as the X3(N/P) here); flash them before flashing custom ROM.

  5. Reboot to system, and wait until it boots.

A/B partitioned devices (Pixel XL [Pie]; Mi A1; Mi A2; OnePlus 6 [without any repartitioning cruft]; Zenfone 6 [Pie, A10])

  1. Place custom ROM (or the full stock ROM for Zenfone 6, if using) & recovery installer zip in external storage
  2. Boot to recovery with external storage attached to the device. If you come from the encrypted pre-reqs, start here.
  3. Zenfone 6 users coming from firmware updates will also start here, if using custom ROM.

  4. Go to Wipe > Advanced Wipe. Then, wipe Dalvik, Cache (cache option may not appear, so it's optional), & System (may cause issues, so it's optional). For some device and/or TWRP variants, there may be a "Vendor" option, which generally shouldn't be wiped.
  5. Return to main menu, go to Install. Browse to the external storage where you placed your ROM & recovery installer in, and flash both of them, in the order of ROM > recovery zip (or install recovery .img in Advanced > Install Recovery Ramdisk after flashing ROM if your preferred recovery isn't a flashable zip file).
  6. Some TWRP variants (like this one) have its own TWRP survival script, rendering the recovery zip installation unnecessary.
    Some ROMs have prebuilt TWRP (or other TWRP-based recovery), which allows you to flash only the ROM. In this case, recovery zip flashing is optional, but still possible.
    If you prefer to hotboot TWRP with a PC & ADB commands, you may skip installing the recovery.

  7. Reboot Recovery. (If you installed a recovery zip on the previous step, ignore the first note below)
  8. If you're not flashing TWRP, reboot to bootloader & boot TWRP using fastboot commands (this part requires you to connect your bootloader-booted PDA to a PC with adb/fastboot commands).
  9. Check the partition you're on. If you previously came from A, you should be on B & vice versa. However, if you're still stuck on the previously active partition, manually change partition in Reboot by selecting the other partition.
  10. Head to Wipe > Format Data, and follow instructions to wipe data. Alternatively, do a factory reset if your device isn't encrypted.
  11. Reboot to system, and wait until it boots.

My opinions regarding GApps

When it comes to GApps (Google's Play Services, Play Store, etc.), they are :

I don't recommend flashing GApps (unless you absolutely need to use it; but at that point you might as well flash a Pixel ROM), so I won't write a guide on how to flash them - you can search the internet for those guides. However, there are times where I had no choice but to rely on GApps to make apps work, such as in my "phone" phone, so take that as you wish.

Back to top

Index - cellphone

Main Page