peoro's Android notes 🔗

peoro's Android notes 🔗

Installing custom ROMs 🔗

  1. Unlock the bootloader using whathever method your phone uses.
  2. Reboot to the bootloader: adb reboot bootloader
  3. Boot a recovery. From the bootloader either boot whatever recover image you want (fastboot boot recovery.img, the image is on your computer) or otherwise flash the recovery image (fastboot flash recovery recovery.img).
    • Recoveries: TWRP, OrangeFox: see which one is supported by your phone and suggested by the community.
    • To enter the recovery, hold power+volume-up while booting (it might be different on different phones. Or use adb reboot recovery.
  4. Flash the ROM and whatever you need. The recovery is meant to easily install images. The .zip files you can download (with ROM, GApps or whatever) can be flashed by the recovery and they write stuff to the right partition. You can wipe and format partitions too. Normally you want to first flash the ROM, then NikGapps, then Magisk (just rename the .apk to .zip and flash it: this is the old method, but still works on most phones; haven't tried the new method yet).
    • /system is where the ROM and system apps live.
    • /data is where apps' and their data live.
    • Cache, dalvik etc is cache of the virtual machine. Can be safely removed.
    • /boot contains the firmware. I believe this is needed to prepare some of the hardware.
    • /sdcard contains user files and stuff. It gets formatted when you wipe data; I'm not sure why.
  5. Boot and enjoy.

Dirty flash or clean flash 🔗

Dirty flash means that you leave the data there and just re-install a ROM. Clean flash means that you wipe the data.