Table of Contents
Custom ROM has a fanbase of its own. People who once tried this on their device want to flash it on their every device. Fortunately, our Moto G 5G or Motorola One 5G Ace also has the support for custom recovery and Custom ROM. Letโs see How to Unlock the Bootloader and Flash Custom ROM on Moto G 5G or Motorola One 5G Ace.
Moto G 5G / Motorola One 5G Ace Flash Custom ROM and Unlock Bootloader [Kiev]
Downloads
- Letโs start by downloading all the necessary files that we will need for the process.
- Visit this website link and download the 15-second ADB installer. This will help us to control our device from ADB and also in fast boot mode.

- To make sure fast boot commands work well, weโll download the Motorola device drivers from this link. This will reassure us that our phone will be recognizable in the fast boot mode.
- Now let us download the ROM file and Gapps. Currently, we have Lineage OS and Havoc OS available for our devices. Both are made by the same developer and are Official Android 11 ROMs.
- We also need the Android 11 Gapps to use Google Play Store and services.
- Download the latest Lineage OS from here and Havoc OS from here.
- Download Lineage OS 19.1 here and Pixel Experience 12 here.
- Download the latest TWRP recovery image and TWRP Installer Zip from this link.
- We will also need Partitions ZIP to set-up the slot A and B from here.
- Lastly, get the Android 11 Nano Gapps from here.
Getting Startedโฆ
- After you have installed the ADB, youโll see an ADB folder in the C Drive.

- Open the folder and copy the TWRP recovery file here.
- Now, right-click while pressing the Shift key and youโll see the open terminal option. Open a terminal here and weโll run our commands here.
- Now connect your phone to the system. Go to your about device and find the build number.
- Now tap on it seven times to enable developer options.
- Now go to the developer options and enable USB debugging.
- Also, enable the OEM Unlocking option.
Unlock bootloader on Moto G 5G / Motorola One 5G Ace
- Type โadb devicesโ in the terminal and youโll see a pop-up on your phone asking to authorize ADB debugging; we need to allow it.
- Now before this next command make sure you have your important data backed up including your messages and photos. As unlocking Bootloader will wipe out everything on the internal storage.
- Now type โadb reboot bootloaderโ and your device will boot into the fast boot mode.
- Youโll see an Android bot icon. In the terminal type โfastboot devicesโ and it should show your device code. This is necessary to run further commands.
- Now type โfastboot oem get_unlock_dataโ and youโll get some random bootloader numbers.
- Now we need all the numbers and not anything else. So, copy just the numbers and make sure there are no spaces in between. Even if thereโs a hidden space the next process will not succeed.
- Visit this website from Motorola and sign in with your Google account. This site will give us the Unlock key needed to unlock the bootloader.

Moto G 5G / Motorola One 5G Ace Flash Custom ROM and Unlock Bootloader [Kiev]
- On the website read the instructions and click next. Youโll see a space to enter the bootloader numbers that we generated earlier.
- And click on the โcan my device be unlockedโ option. If successful youโll receive an email from Motorola with the Unlock key. The email can take a while to arrive.
- Now in the terminal, weโll type โfastboot oem unlock (your unlock key)โ. Youโll see a prompt on your phone that will ask for confirmation.

- You need to use your volume buttons to select unlock the bootloader option and press the power button to confirm. This will unlock the bootloader of our Moto G 5G or Motorola One 5G Ace.
Flash TWRP Recovery on Moto G 5G / Motorola One 5G Ace
- Now go to the TWRP recovery file and copy its name.
- In the terminal type โfastboot boot (TWRP name).imgโ this will boot the device in the TWRP recovery.
- If you see any pattern unlock just hit cancel and youโll be on the home screen of TWRP.
- Now tap on Reboot and make sure youโre in Slot A.
- Now before flashing anything weโll first backup our EFS and Persist.
- We need an external SD card or a USB drive attached to our phone to access the files.

- Move all the files i.e. ROM, Gapps, and partitions zip to the SD card or USB drive.
- Now tap on Backup and make a backup of the EFS and Persist partition.

Flash Custom ROM on Moto G 5G / Motorola One 5G Ace
- Now go to install and find the partitions zip and flash it.
- Then after it, locate the ROM file of your choice and flash it.
- After this now flash the TWRP installer zip.
- Now tap on reboot and select recovery to boot into TWRP again.
- Now select the Gapps and flash it. If you want to root you can also flash the magisk zip right now as well.
- Now reboot and select bootloader.
- In the terminal type โfastboot -wโ to erase all the user data and cache. After this type โfastboot rebootโ to reboot into the custom ROM.
- Now you can unplug your device from the system.
- Now set up your Google account and enjoy your custom ROM on the Moto G 5G or Motorola One 5G Ace.
Read here. Havoc OS on Moto G 5G / Moto One 5G Ace with Android 11

To update your custom ROM on Moto G 5G or Motorola One 5G Ace, boot into the TWRP from the terminal and flash the ROM file + TWRP installer then reboot to recovery and flash the Gapps+ Magisk and then just reboot to system. No need to flash the partitions zip or check for slots A or B.