How To Guide The Complete Noob Guide to Rooting Moto G Stylus (2022) XT-2211 Mediatek Variant

Search This thread
This is NOT for the 2021 Moto 5G Stylus. This guide is exclusively for the Moto 5G Stylus 2022.

This tutorial is for people like me than just got the Moto 5G Stylus XT2211 (Factory Unlocked Mediatek Variant) running on stock Android 11. I got this phone literally Sunday brand new in the box from Best Buy (Yes, I took a Chance and copped it from them hoping it could be bootloader unlocked). This is a hand holding guide for the Noobs that really are intimidated by rooting their device, so even though there are other guides up, this one is for people like me that need every step explained.

Follow the following at your own risk! I am not responsible for any mishaps with your devices.

I've been rooting Motorola phones now for five years, so I'm pretty handy as a script kiddie (I know bad word) in doing it. I also was pretty active with my last phone over at the Moto One 5G Ace Forums, so here's to hoping my progress with these phones continues.

Thanks to Android 11 being System As Root with all these new super partitions running amuck (like Android 10), you cannot get Write access in the actual system files. So even when you achieve root, you can't do much without getting a script and accessing those partions. @lebigmac and @munjeni have been constantly working on that. Drop by their respective threads on R/W access and beta test his script so he can get more knowledge about how Moto phones work so we can have easy R/W access like Xiaomi and Huawei phones.

Introduction/Preparation
First, go and prepare by READING EVERYTHING. Very important. This is the Mediatek variant and NOT the Qualcomm variant. Flashing does make a difference between the two. Last thing you want to do is brick the device because you flashed the wrong firmware to the wrong processor, or you flashed other software for the other similar Moto One 5G Stylus (2021) and it bricked. This is the MILAN version.

Second, unlock the bootloader. All T-Mobile and their subsidiary variants can be unlocked by Motorola as well as International and Motorola factory variants; go to their bootloader official unlock site and follow their instructions, it's easy peasy. If you do it in firefox it may not go to the third step page and hang on the page where you put the long code in (follow instructions on page to get the unlock code you'll see what I'm talking about). It is HIGHLY ADVISABLE to do this in Firefox or Chrome (I used Firefox). And yes, you may have to request the code 3x to get it to send to your email depending on their server traffic. When you get it, follow Motorola's instructions for unlocking the bootloader in fastboot. It will show you that the bootloader is unlocked.

Make sure the code you're copying and pasting is correct. If it is incorrect it will not approve you for bootloading unlocking and not tell you the code was missing a letter/number. They are getting sneaky.

***IMPORTANT NOTE ABOUT OEM UNLOCKING GREYED OUT***
If your OEM Unlock tab is greyed out in the Developer Options, just know that Motorola/Lenovo now have some weird timer on that to activate. I had to wait 3 days for mine to activate. Some report it takes longer. Others reported it was 3-4 days. I factory restored, reflashed the firmware, etc. day one just to make sure anything funky that could be put in there was clean and brand spanking new. Not saying you have to do this but there have been varying reports on Moto phones since 2020 about how long this takes. If you're not sure if yours can be bootloader unlocked, get the code from Moto. If it can it will email it to you and from ther ejust wait.


Verizon and ATT Variants CANNOT BE BOOTLOADER UNLOCKED.

***NOTES SO YOU DON'T FREAK OUT***
1. The Command Prompt will tell you it is locked and you will see "flashing unlocked" on the phone in fastboot once it is done.

2. The only way to restore the phone if something goes wrong is by flashing it via fastboot. The way to get to fastboot is turn the phone off and press Volume Down and Power. The Motorola tool will NOT work. That's normal.

3. You will see a cute message that you've unlocked the bootloader and that the phone software integrity is compromised when you boot the phone up every single time after the bootloader unlock. It will also say press the power button to pause. This is normal. Give it a minute, you havent broke it.

4. OEM Unlocking should already be activated and greyed out in the Developer Options once the bootloader is unlocked; you can't access it anymore and it will tell you if the bootloader is unlocked.

Files
You will need an SD card for root. You will also need other apks to successfully help you pull off root ready to install. Pull ALL the necessary files you will need.

1. Get Minimal ADB and Fastboot OR Tiny ADB and Fastboot (it's easier).
2. Download the Motorola Drivers from their site if yo don't already have them (if you run into problems you will have to uninstall and reinstall them through their utility which is found on PC here: C:\Program Files\Common Files\Motorola Shared\Mobile Drivers
3. Cpu-Z.apk (Very important, its hard to know your hardware without this).
4. Magisk v22.0.apk (They no longer have a separate Magisk Manager)
5. Root Explorer.apk (This software helps navigation better but you can use any Explorer of your choice).
6. Root Checker.apk
7. Stock Firmware XT2211-2_MILAN_RETUS_11_RRDE31.Q3-73-12_subsidy-DEFAULT_regulatory-DEFAULT_cid50_R2_CFC.xml (This is important if you mess up the boot image trying to root). You can get the firmware of your choice at Motorola Official Firmware For Milan.
8. Patience (and a good movie keeping you going).

As of now this device as no TWRP, so you have to do this the old fashioned way to root. And just so you know, I used Windows 10 for all of this.

Pre-Rooting
1. Make sure the phone is fully charged.
2. Make sure your sim card is REMOVED from the phone. Everytime you wipe the phone or do anything messing with the boot image the phone resets itself to factory settings, and tries to push an update. Just take the silver key thing and pop it out. You will have to push it back in and out in a second, but start with it out.
3. Make sure your wifi is OFF.
4. Make sure your SD is in and mountable and all files you need are on the card.
5. Make sure you Save boot.img to your SD Card from your firmware files. This is very important for root.
6. Make sure your developer options are activated.
7. Make sure your USB debugging is enabled AND you've given permissions for your computer to have administrative access with it enabled (more on this below).
8. Make sure to check CPU-Z for your hardware specs so you download the right files for the phone and avoid potential problems.
9. Make sure you manually set USB to Transfer files (no other option will work and by default its set to Charge this Device).
10. Make sure you have the STOCK CABLE that comes with the phone. Like most Motorolas this model is funky about using other cables.
11. Make sure you back up all your calls, texts, pics, etc. Flashing the firmware is the ultimate factory reset and you will lose all your files on the phone. SMS Restore is a good software to backup Calls and Text logs and it supports keeping MMS.
12. Make sure you have the internet. It is necessary for some steps.

Rooting
1. Make sure all the firmware files are extracted into your Minimal ADB and Fastboot folder (or whatever ADB folder you're using for this).
2. Open FlashFile.xml in Notepad. This is located among the firmware files you put in the Minimal ADB and Fastboot folder.
3. Cut, copy, and paste everything from the FlashFile that is shown and then paste it in an online Flash file Converter if you are flashing a fresh version of the stock firmware. I used Online Flash File Converter here. I recommend this just in case you're on a newer firmware - if not jump to Step 13.
4. Convert the text by pressing the bar below where you pasted the text. It may be in Spanish or Portuguese but is should say something like Cerar Commandos.
5. Copy the text by hitting the two pieces of paper icon in the corner after it's converted. Or just cut copy and paste manually.
6. Turn the phone completely OFF.
7. Plug your phone via USB cable into the computer.
8. Press Volume Down and Power to boot into fastboot mode. Do not use "adb reboot bootloader" as that command may or may not work and hang at "waiting for device" (it was iffy for me and it knocked off USB permissions BADLY).
9. Open up Minimal ADB and Fastboot (Make sure you don't have it set to open this as an administrator, it messes with permissions) Make sure your firmware files are in the Minimal ADB directory or it won't work.
10. Paste the contents of the flashfile converter into Minimal ADB and Fastboot. This should start the process of the flashing.
11. When the entire flash is complete, boot the phone and disconnect phone from the computer. Ignore the bootloader unlock error.
12. Wait. Sometimes this takes up to 3-5 minutes on a new flash. You should see the boot animation of Motorola.
13. Push your Sim Card back into the phone.
14. Start setting up your device on the screen. Sim Card must be in or it will give you a message your phone is Network Locked.
15. Once you make it to the Wifi Setup screen take the Sim back OUT the phone. Do not connect to Wifi.
16. Once you are done with setup, go to Settings>About phone.
17. Go all the way down to Build Number and press it until you unlock Developer Options.
18. Go to Settings>System>Advanced>Developer Options. Advanced is a pull down tab that will reveal Developer Options.
19. Disable Automatic System Updates. I know this is hard for some people, but a forced OTA update may cause problems and prohibit root.
20. Enable USB Debugging. Disable Verify bytecode of debuggable apps. Disable Verify apps over USB if it is highlighted. Exit.
21. Put your SD/Sim card back into the phone.
22. Go to the Files folder and install Magisk first, then Root Explorer and Root Checker.
23. Open Magisk. You will see Magisk and App. Hit Install by Magisk (a fingerprint looking icon is to its left).
24. Allow Magisk to access photos, media, and files if it asks.
25. Select option "Select and Patch A File."
26. It will take you to a screen where you can select your explorer to navigate to your SD card where you saved the boot.img. Go there and select it.
27. Magisk will save it as magisk_patched.img. Once you get it patched, find where it saved, make sure it's on your SD card and then turn off the phone.
28. Plug your phone via USB cable into the computer.
29. Press Volume Down and Power to boot into fastboot mode.
30. Open up a fresh Minimal ADB and Fastboot (Make sure you don't have it set to open this as an administrator, it messes with permissions) Make sure you transfer the magisk_patched.img that Magisk patched off your SD card into this folder.
31. Rename your original boot.img to "boot.img original" or whatever distinct name you want to give it in your Minimal ADB and Fastboot folder.
32. Rename your magisk_patched.img to boot.img.
33. In Minimal ADB and Fastboot type "fastboot flash boot boot.img" and hit enter.
34. If all goes well it should flash to the partition before it says done and in how many seconds.
35. When it is done, reboot phone by selecting START (keep pressing volume rockers until you see it, then press the power button).
36. Wait for the bootloader cannot be trusted screen to pass (may take a minute) and wait for the Hello Moto opening.
37. Open Root Checker and confirm root. You can uninstall it after confirmation if you like.
38. Open Root Explorer. A prompt asking you to grant permission should pop up.

Congrats. You should be rooted now.

***NOTES SO YOU DON'T FREAK OUT***
1. Do NOT flash someone else's patched boot image. It WILL NOT WORK. Do the work, find your firmware, and patch the boot image yourself. You're asking for bootloop hell if you do as your boot.img that Magisk patches needs to match that particular firmware you used.

2. While it hasn't happened to me, You may have followed everything perfect and it still bootlooped. Save yourself the frustration and just flash it over. See the next section on the proper way to flash so you don't lose your baseband, IMEI, or any other important stuff.

3. While you won't lose anything just flashing boot.img, you will lose everything having to flash ALL the firmware over. Keep backups of all your important stuff.


****Notes on Flashing The Stock Firmware if you have to****
In the event you bootloop and have to start from scratch, follow my guide on restoring the firmware on the phone. And don't worry - it won't relock the bootloader. You can find my guide here: The Complete Noob Guide to Flashing via Fastboot Factory Unlocked Moto 5G Stylus XT2211 [Mediatek Variant]

Hope this helps my fellow TMobile and subdiary acolytes and others. I'll be working on securing R/W access soon.

I will try and answer questions if I can or point you in the right direction.
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    Moderator Announcement
    This guide is only for the The Moto 5G Stylus (2022), and will be moved once the Administrators create a separate forum for this device.

    -Regards: Badger50