[General Questions and Answers] omar45896:
Hello! I created this account simply to share how I accomplished to root my Moto G Play (2023) using Magisk. This tutorial is specifically for MAC USERS. I have a Macbook Air with an M1 Chip.

My phone's build number is S3SGS32.39-191-5.

You can check your phone's build number under settings->about phone. It's at the very bottom of settings. If you have a different build version, this tutorial will still work, but you'll need to download the firmware that matches your build. Don't worry, it's not that hard, but I wont be listing some extra steps youll need to do if your build number doesnt match mine. Send me a message if your build number is different and I'll send you the steps. Really you just need to download the firmware, extract the boot.img file and patch it using magisk on your phone.

Before we can begin the rooting process, we need to 'unlock the bootloader'. Motorola has a dumb rule where you have to wait 7-10 days before you can unlock the bootloader on the phone if your phone is brand new. I dealt with this issue because I first bought the phone brand new from Best Buy. Once i figured this out, i went back and bought an Open Box version of the phone and it since it had been more than the 7-10 days since it was used, i was able to toggle the 'oem unlocking' option in the phone's settings. Again, if your phone is brand new, you will more than likely have to wait before you can proceed.

To verify, turn on Developer Mode on the phone by going to settings->about phone and then tap on the Build number between 7-10 times. You'll see a pop up telling you to keep tapping it to turn on Developer Mode and youll eventually see the bubble that says Developer Mode On. After it's turned on, go back to the main settings page and then go to system settings. It is the option right above the 'about phone' option under settings. You should then see 'developer options' as the second to last option. Click on it to go into the developer options and scroll down to find the 'OEM unlocking' option. If your phone was recently purchased, this option will be greyed out and you'll have to wait the 7-10 days. Otherwise, you should be able to toggle the OEM unlocking option. Once you've toggled the OEM unlocking option, also toggle and turn on USB Debugging. It should be further down the list so just scroll down and find it.

Now, I download the usb drivers from the link below, but I dont know if you actually need them to be honest. I say download them and install them to be on the safe side lol.

Drivers | 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.

en-us.support.motorola.com

Once youre done installing the drivers, turn your phone off. We are going to boot it into 'fastmode'. We do this by pressing and holding the power and volume down buttons at the same time while the phone is off. You'll notice the phone turn on and show a little android person and some text at the bottom left.

Now download the android sdk tools from the link below. It should be the second option under Downloads.

SDK Platform Tools release notes | Android Studio | Android Developers

Android SDK Platform-Tools is a component for the Android SDK.

developer.android.com

Once downloaded, extract the contents from the downloaded zip file. It should extract a folder named "platform tools".

Now plug your phone in to your Mac. You'll notice that the last text at the bottom of the phone's screen will say that the usb is connected.

Open a terminal window on your Mac. If you cant find the terminal icon on the Dock, just search for it under your applications. If you've never used the Terminal, just google "macbook terminal icon" so you can see what the icon looks like and find it under your applications. It's named Terminal so it's not hard to find. Once you have a terminal window open, you'll have to navigate to the 'platform-tools' folder by using the "cd" command. cd stands for 'change directory'. When you first open the terminal, you can type "ls" and press enter and it will show you a list of the files/folder that are in your current directory. Depending on where your platform-tools folder is, that's where youll have to navigate to. To make it easier, i say move your platform-tools folder to your desktop. So when you first open the terminal, type "ls" and you should see "Desktop" under the list. Now type "cd Desktop" , this will move you to the desktop directory. Now type "ls" again to confirm you are now in the desktop directory. You should see the platform-tools folder under the list. Now type "cd platform-tools". Type "ls" to confirm that you are now in the platform-tools folder. You'll see all the files/folders INSIDE the platform-tools listed.

Now type "./fastboot devices" in the terminal.

If your computer detects your phone you should see something like:

ZY22HSV65K fastboot

Now type "./fastboot oem get_unlock_data"

This fastboot command will return a character string. This is the Device ID which you will be using to generate your unique unlock key.

Example Device ID

$ fastboot oem get_unlock_data

(bootloader) 0A40040192024205#4C4D3556313230

(bootloader) 30373731363031303332323239#BD00

(bootloader) 8A672BA4746C2CE02328A2AC0C39F95

(bootloader) 1A3E5#1F53280002000000000000000

(bootloader) 0000000

Example Device ID

INFO0A40040192024205#4C4D3556313230

INFO30373731363031303332323239#BD00

INFO8A672BA4746C2CE02328A2AC0C39F95

INFO1A3E5#1F53280002000000000000000

INFO0000000

Paste together the 5 lines of output into one continuous string without "bootloader or info" or white spaces. Using the example above, the line you’d get would be:

0A40040192024205#4C4D355631323030373731363031303332323239#BD008A672BA4746C2CE02328A2AC0C39F951A3E5#1F532800020000000000000000000000

Save this string to your notes or anywhere where you can just copy and paste it to so you can have it ready.

Visit this motorola website, create an account or simply sign in using a google account: (if youre redirected to the home page after sign up /login, just copy and paste the bottom url again)

Login| 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.

en-us.support.motorola.com

Scroll to the bottom and enter the character string you copied to your notes and click on the 'can my device be unlocked' button. Scroll down and agree to the terms and conditions. If your device can be oem unlocked, a button will appear under the terms and conditions. The button reads something like "GET UNLOCK KEY". When you click it, you'll be sent an email to your email with an unlock key.

Go back to your terminal window and type "./fastboot devices" again to make sure your phone is still detected. Now type "./fastboot oem unlock UNIQUE_KEY".

Replace 'UNIQUE_KEY' with the actual the unlock key you go in your email. It is case-sensitive.

If the line was entered correctly, your device's screen will confirm that your device is unlocked. You have just unlocked your device's bootloader.

After a device is successfully unlocked, it will reboot and when it starts again you will see a message that tells you it's unlocked. This will come out everytime you turn on your phone now but it doesnt affect anything. Just leave it alone and let it boot up.

Now let's continue.

Download this file to your mac, it’s the already patched firmware:

magisk_patched-26400_FW6WK.img

drive.google.com

Drag n drop the downloaded file into the 'platform-tools' folder. Rename the file ‘magisk_patched.img”. Instead of “magisk_patched-26400_FW6WK.img”, rename it to just “magisk_patched.img”.

Now visit this site on your phone:

Release Magisk v26.4 · topjohnwu/Magisk

[MagiskBoot] Don't pad zeros if signed boot image is larger [MagiskPolicy] Fix genfscon and filename_trans [MagiskPolicy] Fix bug in libsepol [Zygisk] Fix and simplify file descriptor sanitization ...

github.com

Click "Magisk-v26.4.apk" under Assets.

This will download Magisk to your phone. Once downloaded, go to your Files app then the downloads folder and you'll see the APK file. Click on it to install it.

Once installed, you can proceed.

In your terminal, type "./adb devices". If your computer detects your phone you should see something like :

List of devices attached

ZY22HSV65K - device

Before you continue, make sure you see a response like that and that the list has only one device…

if you see a second device, you’ll have to restart your computer to kill those other processes or whatever

I got a device with an IP address on mine, so I just restarted my computer and started from the "Open a terminal window on your Mac" step.

If everything is good and you only see the phone under the list, type “./adb reboot bootloader".

Your phone is going to reboot automatically and go into the recovery mode “fastboot mode”.

Once it’s there, type “./fastboot devices” in your terminal

once again it’ll show a list with your device like this:

ZY22HSV65K fastboot

Now type “./fastboot flash boot magisk_patched.img”

You’ll see something like this in the terminal:

Sending 'boot_a' (32768 KB) OKAY [ 0.849s]

Writing 'boot_a' OKAY [ 0.648s]

Finished. Total time: 1.500s

Once it’s done, type “./fastboot reboot” to reboot the phone.

That’s it.

You can confirm by opening Magisk and seeing a "Yes" under 'Installed'. If Magisk is installed , it means you have root access. You can also download the "Root Checker" app from the play store to confirm.

If you notice your Wifi, Hotspot, or/and Bluetooth dont work, it's very likely that you downloaded the wrong firmware. Meaning the firmware version and the build number of your phone DO NOT match.

You'll have to reflash with the correct firmware version.

I couldnt' find a complete guide for this phone, so I hope this helps anyone wanting to root this phone.