[Motorola Razr 5G Guides, News, & Discussion] lucausee:
FIRST READ THIS>>>>Use this guide only if you are 100% sure about the risks involved in flashing your device. I'm not responsible for any damage caused by using this guide on this thread. !!!!!!!! If you are not expert don't read this guide!!!

What you need:

1-windows 10 on a PC

2-Motorola Razr 5g :) full charged

3-Usb Driver Motorola

4- Adb and Fastboot Tools

5- Enable developer option :Head over to the Settings app of your device via the notification shade or app drawer.

Enable developer options

Scroll down and tap on 'About phone. '

Find an entry labeled 'Build number. ' Keep on tapping until you see a prompt that says 'You are now a developer! '. ...

Then Enable USB debug and unlock bootloader options

Step A Unlock Bootloader (make a backup ! > you lost ALL your data!!!

1- First take a full backup of your phone as unlocking the bootloader on Motorola Razr 5G will wipe all the data.

2- To connect devices you need some drivers, so install ADB & Fastboot drivers and Motorola USB Driver on your PC.

3- Open Settings and go to About Phone. Tap 7-8 times on Build Number, and it will show ‘You are now a developer.’

4- After enabling the developer options, go back to Settings and then go to System > Developer Options. In Developer options, enable OEM Unlocking and also enable USB Debugging.

5- Turn off your device. Press & hold Volume Down + Power button together to boot Motorola Razr 5G into Fastboot Mode.

6- And when the Fastboot screen appears on the phone, release both buttons. Connect your phone to your PC after booting into Fastboot.

7- Now open the Command window or CMD on your computer. Open Command window from Platform Tools location in case of macOS and Linux.

8- Enter the below command in the Command/PowerShell window

fastboot oem get_unlock_data

9- It will display 5-line code. Copy the code and make it in one line, use notepad for convenience. Remember not to copy (bootloader) in case of windows and Info in case of Mac.

10- Go to Motorola unlock page and click next and login with the Motorola account.

11- Copy the one-line code that you just adjusted in Notepad and paste it into the Motorola unlock page.how to unlock bootloader of motorola razr 5g

12- Click on ‘Can my device be unlocked’ and then click ‘Request Unlock Key’ (make sure to select I Agree).

13- Then you will receive a code via mail (Motorola account ID). Copy the code and paste in place of ‘code’ without inverted commas in the below command and press Enter

fastboot oem unlock 'code'

14- Entering the above command will unlock bootloader of Motorola Razr 5G. It will erase all the data on your phone. After unlocking the bootloader, reboot, and set up your device.

Once you unlock the bootloader of Motorola Razr 5G, you can check for it by going to Developer Options and OEM Unlocking. It should be enabled. After unlocking bootloader of Motorola Razr 5G, you can proceed with rooting your phone. Also make sure to go through the requirements.

Step B - Root with Magisk modify file boot.img

You can root your phone using Magisk in different ways such as flashing Magisk Zip or installing a Patched boot image. Since you need a custom recovery to flash Magisk, you need to first install custom recovery. Here in this guide, we will share how to root Motorola Razr 5G with a patched boot image.

1-Copy the Motorola Razr 5G firmware to your computer. And then extract the firmware using 7Zip or WinRAR.

2-Open the extracted folder and copy the boot.img file to your phone storage.

3-Install the Magisk Manager app on your phone.

4-After installing, open the Magisk Manager app and click on the first Install and again click on Install.

5-It will ask for the method, so choose ‘Select and Patch a File’ from the option

6-Now browse and select the boot.img file, and it will start patching the boot image.

7-The output file will be stored in the download folder with the name magisk_patched.img.

8-Copy the patched boot image file to your computer in folder C:\adb. Also, rename the patched file to boot.img.

9-Reboot your Motorola Razr 5G to Fastboot mode and connect it to your computer. Follow the steps given in the unlock bootloader guide above.

10-In the C:\adb folder (or platform-tools folder) press Shift + Right click on an empty area and select ‘Open Command window here’ or ‘Open PowerShell window here.’

11-Enter the below command in the Command/PowerShell window to check the device is connected or not, entering command should return some number id.

fastboot devices

12-Now enter the below command to flash Magisk and root Motorola Razr 5G.

fastboot flash boot boot.img

13-After that, reboot your device to the system.

14-If the Magisk Manager is not installed on your phone, then install the app. Skip if the app is already present.

15-Complete the in-app instructions, and the device will automatically reboot into the system.

Step C - Flash firmware (if you flash oly boot.img bbe sure to download the SAME FIRMWARE YOU HAVE ON YOUR PHONE)

Boot your device into bootloader mode. Phone off > press and hold at the same time :volume down and power on buttons

Connect your Motorola Razr 5g to the PC using the USB Cable.

Download Stock ROM/Firmware and extract it inside the adb and fastboot folder

Inside the ADB folder, open the command window and enter the following command

fastboot flash partition gpt.bin

fastboot flash bootloader bootloader.img

fastboot flash bluetooth BTFM.bin

fastboot flash dsp dspso.bin

fastboot flash radio radio.img

fastboot flash logo logo.bin

Now toggle to fastbootdfastboot reboot fastboot

fastboot reboot fastboot

Flash the following command

fastboot flash boot boot.img

fastboot flash recovery recovery.img

fastboot flash dtbo dtbo.img

fastboot flash vbmeta vbmeta.img

fastboot flash super super.img_sparsechunk.0

fastboot flash super super.img_sparsechunk.1

fastboot flash super super.img_sparsechunk.2

fastboot flash super super.img_sparsechunk.3

fastboot flash super super.img_sparsechunk.4

fastboot flash super super.img_sparsechunk.5

fastboot flash super super.img_sparsechunk.6

fastboot flash super super.img_sparsechunk.7 and 8 ,9 etc....

Toggle back to bootloader

fastboot reboot bootloader

fastboot erase carrier

fastboot erase metadata

fastboot erase ddr

(Optional except you want to wipe) fastboot erase userdata

fastboot reboot

Now your device will reboot into bootloader with the firmware you installed.

you can flash only boot.img (modified) file!

You can flash other country firmware, i try with india and italy firmware...

I find very important info from these Links:

How to Root Motorola Razr 5G and Unlock Bootloader

Want to root Motorola Razr 5G with Magisk? Here's how to root Motorola Razr 5G along with guide to unlock bootloader.

www.ytechb.com

Motorola XT2052-1 Firmware Flash File (Stock ROM)

Here we have shared the latest stock ROM for Motorola Moto E 2020 XT2052-1 (ginna). You can download and flash the firmware file on your Motorola XT2052-1 using the flash tool Firmware Installation Guide: Boot your device into bootloader mode. Connect your Motorola XT2052-1 to the PC using the...

droidfilehost.com

Motorola unlock bootloader link

https://motorola-global-portal.custhelp.com/cc/cas/sso/redirect/standalone%2Fbootloader%2Funlock-your-device-c

Official site to download Magisk

Releases · topjohnwu/Magisk

The Magic Mask for Android. Contribute to topjohnwu/Magisk development by creating an account on GitHub.

github.com

Firmware:

Motorola Razr 5G XT2071-4 Stock ROM Firmware (Flash File)

Download the official Motorola Razr 5G XT2071-4 Stock Firmware (Flash File) for your Motorola Smartphone. We also provide all other Motorola Stock Firmware.

motostockrom.com

or (better!!) Telegram bot: Moto Updates Tracker >> t.me/motoupdatestracker

Adb and Fastboot Tool:

Download ADB and Fastboot tool 15 seconds ADB Installer v1.5.6

ADB or Android Debug bridge is used to establish a successful connection (bridge) between your device and PC. Once this connection is established, you could carry out plenty of tweaks, both at the system level as well as the application level. For example, you could remove bloatware from your...

droidfilehost.com

Usb Motorola Driver

Where can I download the USB drivers for my device?| Motorola Support US

Visit the customer support page to view user guides, FAQs, bluetooth pairing, software downloads, drivers, tutorials and to get repair and contact us information.Where can I download the USB drivers for my device?

support.motorola.com

I hope i've been helpful...