DEV Community

Kelvin Ng
Kelvin Ng

Posted on

How to Install Custom Android ROM

I purchased a Redmi K30 from China, and it did not come with Google services. I attempted to install Google services from a third-party source, but it was missing some essential components, such as parental controls. Consequently, I decided to install an EU ROM.

The process was rather intricate, so I've documented the procedures here in case they might be helpful.

background knowledge

  • there are 2 partitions in your phone

    • recovery partition: contain tools to install the android os
    • system partition: where the android os resides
  • TWRP: a 3rd party recovery tool

    • can override the stock recovery program
    • allow you to install 3rd party android ROM, eg. EU ROM
    • optionally install to the recovery partition, replace the stock recovery program
  • fastboot mode

    • enter by long press volume down and power button
    • for unlock the phone, flash recovery partition... etc
  • fastboot tools

    • program to flash the recovery partition with TWRP
    • or directly run TWRP without flashing the original recovery partition
  • fastboot mode ≠ fastboot tools

tools download

unlock the phone (pc only)

  • enable dev mode on the phone
    • enable OEM unlocking and USB debugging
  • install phone driver on PC
  • apply phone unlock from xiaomi, using the unlock tool
  • ⚠️ wait 7 days ⚠️
    • don't press apply again within 7 days otherwise it will reset the waiting time‼️
  • after 7 days, unlock the phone
    • boot into fastboot mode (long press volume down & power button)
    • unlock with the xiaomi unlock tool

run TWRP (mac/pc)

  • boot the phone to fastboot mode (volume down + power) and connect to computer
  • rename the TWRP image to recovery.img and put it in the same folder with fastboot binary
  • in terminal, run fastboot boot recovery.img

  • (optional) flash the recovery partition with TWRP

    • do if you want to replace the stock recovery program for good
    • easier to re-install or change the android os in future
  • copy the EU rom to phone's root directory

    • you may not see the phone in computer before boot to TWRP
    • mac: use android file transfer
    • pc: use file manager
    • disconnect phone from computer

install custom ROM

  • in TWRP home, press install
  • select the rom image(zip file), slide to install
  • press wipe cache
  • back several times to TWRP home
  • press wipe > format data
  • press reboot system (if no response after 3mins, press power button to reboot)

  • done 🎉

questions?

Top comments (0)