Getting the device ready for custom ROMs

So, you've unlocked your PDA's bootloader. Now, all that's left to do before you can start installing custom ROMs is to install TWRP & make sure it's not replaced by the stock recovery. Here's my guide (among infinite amount of guides) to prepare a PDA for a custom ROM.

This guide assumes you're on Windows & have adb & fastboot tools ready. If you haven't, search it on the internet. In addition, for Windows users, powershell will require adding .\ before the commands.

If you're using Linux & have fastboot tools installed (Arch distros, as an example, has android-tools in the main repo), open the terminal in the directory containing the recovery files instead. The commands stay the same.

A-only partitioned devices (Poco F1; OnePlus 3T) (Poco X3N also follows this method)

  1. Plug PDA to PC, boot to fastboot
  2. Using the file explorer, browse to the directory containing adb / fastboot tools. Then, press shift & right click, & click on the "open PowerShell window here". Test for device detection by entering "fastboot devices".
  3. Afterwards, type "fastboot flash recovery (name of recovery).img.
  4. Boot to TWRP by either using button combo / fastboot boot recovery / fastboot boot (name of recovery).img
  5. Install Magisk. This roots the stock OS, as well as preventing it from replacing TWRP. Version required depends on the stock OS' Android version. For example, Pie tops out at 19.3, A10 & A11 up to 22.1.
  6. Wipe Dalvik & Cache & reboot to system.

Poco X3P

  1. Plug PDA to PC, boot to fastboot
  2. Using the file explorer, browse to the directory containing adb / fastboot tools. Then, press shift & right click, & click on the "open PowerShell window here". Test for device detection by entering "fastboot devices".
  3. Afterwards, type "fastboot flash recovery (name of recovery).img.
  4. Boot to TWRP by either using button combo / fastboot boot recovery / fastboot boot (name of recovery).img
  5. In TWRP (this guide assumes you're using Nebrassy's TWRP), head to Wipe > Format Data, and follow instructions to wipe data, since TWRP will not be able to read storage in MIUI.
  6. Reboot to recovery. At this step, be sure to have the latest Xiaomi.eu ROM in the external storage, which should already be inserted into the device.
  7. Flash the Xiaomi.eu ROM zip, format data, & reboot to recovery once it's done. From this step, you can immediately proceed to flash a custom ROM.

A/B partitioned devices (Pixel XL; Mi A1; Mi A2; Zenfone 6)

  1. Plug PDA to PC, boot to fastboot
  2. Using the file explorer, browse to the directory containing adb / fastboot tools. Then, press shift & right click, & click on the "open PowerShell window here. Test for device detection by entering "fastboot devices".
  3. Afterwards, type "fastboot boot (name of recovery).img.
  4. Install TWRP installer zip (or install TWRP img in Advanced > Install Recovery Ramdisk) for your device & reboot to recovery
  5. Install Magisk. This roots the stock OS, as well as preventing it from replacing TWRP. Version required depends on the stock OS' Android version. For example, Pie tops out at 19.3, A10 & A11 up to 22.1.
  6. On the Mi A2 (latest stock A10, Nebrassy's TWRP 3.5.1), I find it unnecessary to flash Magisk.

  7. Wipe Dalvik (& Cache, if available) & reboot to system.

LG V30 is an exception from the two above.

Main Page