yashsingh1/xdaforums huggingface dataset:
[Moto G8 Plus Questions & Answers] SnowTalker:
Hello I tried flashing Android 11 Beta GSI on my Moto G8 Plus but it would not boot as it always booted to twrp right after. Any help is appreciated ?

P.s: I also factory reset, flashed root again etc. But nothing worked.

EDIT: I figured out I think it has to do with not having the right vendor installed (as which I guess you needed Android 10 stock to have it) :(
[Moto G Stylus (Moto G Pro) Guides, News, & Discuss] god_of_wisdom:
QUICK STEPS TO ROOT MOTOROLA MOTO G STYLUS USING MAGISK

Just Remember*I just want to warn you that, Rooting will void the warranty of your smartphone

Rooting will block the OTA updates

1.First of all, please download and extract the ROM on your computer.

https://r.tapatalk.com/shareLink/to...1&share_fid=3793&share_type=t&link_source=app

2:*Now, connect your moto g stylus with a micro USB cable, and copy only the boot.img file from the extracted folder to your Motorola moto g stylus device storage/memory.

3:*Now you need to Launch Magisk Manager.

4:*After that, you will see a popup window that will ask you to install Magisk.

5:*Finally please select INSTALL and choose to install it again.

6:*Now Please press on “Patch Boot Image File

7:*Navigate to internal storage and select your phone’s boot image that you transferred earlier.

8:*Wait for a couple of seconds. Magisk will start patching the boot image.

9:*Once the boot image has been patched, copy the “patched_boot.img” from the internal storage and replace it in the same extracted ROM folder on your PC.

10:*Now you can follow the second step to flash the patched boot image file.

Next, you need to enter the following commands step by step:

First of all, you need to Flash the “patched_boot.img” to install Magisk and root your Motorola moto g stylus: fastboot flash boot patched_boot.img

You can also use the devices with A/B partition system, with the following commands:

fastboot flash boot_a patched_boot.img

fastboot flash boot_b patched_boot.img

After that, you need to replace [patched_boot.img] with the same boot image file that you have already downloaded with the .img.

Now you will see the flashing process have has started. Now, run fastboot and reboot

HOW TO VERIFY IF YOUR MOTOROLA MOTO G STYLUS HAS A SYSTEMLESS ROOT?

Download and install the Magisk Manager app APK, and launch it.

If you want to verify that you have a systemless root, check the top of the screen and if you see all options with Green Tick which means you have successfully rooted and bypassed SafetyNet.
[Moto G Stylus (Moto G Pro) Guides, News, & Discuss] himesh82:
surprised to see no comments on this topic. I am thinking of getting this phone but only if there is a root method for it.
[Moto G Stylus (Moto G Pro) Guides, News, & Discuss] JimmyJurner:
It definitely works for the metro by TMobile version.
[Moto G Stylus (Moto G Pro) Guides, News, & Discuss] dafunk60:
I got root by using magisk to patch the boot image. I purchased the phone directly from Motorola's website. If you get a version where the bootloader can be unlocked (some carrier versions apparently cannot be unlocked) you can root without much trouble.
[Moto G Stylus (Moto G Pro) Guides, News, & Discuss] himesh82:
I am based in Uk and will order from their website.

How easy it is to use as It has been afew years i tried rooting and will need a super easy guide.
[Moto G Stylus (Moto G Pro) Guides, News, & Discuss] dafunk60:
I found it to be super easy using magisk, provided you have a PC to flash the patched boot.img to the phone via fastboot. I use the Lenovo Rescue & Smart Assist software on the PC to download the ROM from Motorola. You need to ensure the ROM you're downloading is the same version running on your phone. Using a boot.img from a different version will cause issues.

1. Copy the boot.img to the phone.

2. On the phone, patch the boot.img you just copied over with Magisk Manager.

3. Copy the patched magisk_patched.img back to your PC.

4. Connect to the phone via adb. (There's an adb.exe in the Lenovo Rescue & Smart Assist install directory "C:\Program Files (x86)\Rescue and Smart Assistant".)

5 . Reboot the phone to the bootloader with the following command on the PC:

adb reboot bootloader

6. Flash the patched boot image with the following command on the PC:

fastboot flash boot magisk_patched.img

7. Reboot the phone with the following command on the PC:

fastboot reboot

Once rebooted you can use Magisk Manager to hide root, check the SafetyNet status, etc.
[Moto G Stylus (Moto G Pro) Guides, News, & Discuss] himesh82:
Thank you for your help on this. I rooted my moto x4 long time ago and the process has definately changed.

Still confused regarding your points

1 - where can i find the boot.img

2 - how do you patch using magisk

Also do you not need to unlock boot loader and bypass the verification and why do you need to hide root after?

Thank you
[Moto G Stylus (Moto G Pro) Guides, News, & Discuss] dafunk60:
You're welcome.

In the Lenovo software you can choose a download location. The default appears to be "C:\ProgramData\LMSA\Download". In that directory you'll see a "RomFiles" folder which contains folders for the different ROM versions it has downloaded. SOFIAP_RETAIL_QPR30.80_58_subsidy_DEFAULT_regulatory_DEFAULT_CFC.xml or SOFIAP_RETAIL_QPRS30.80_58_3_subsidy_DEFAULT_regulatory_DEFAULT_CFC.xml for example. You can find the boot.img file within those folders.

The QPRD30.80_58_3 boot.img file is located in "C:\ProgramData\LMSA\Download\RomFiles\SOFIAP_RETAIL_QPRS30.80_58_3_subsidy_DEFAULT_regulatory_DEFAULT_CFC.xml"

Some people share links to the ROM files but I prefer to get mine from Motorola.

Google's your friend on this topic, https://www.xda-developers.com/how-to-use-magisk/

You do need to unlock the bootloader, unless you have the private key Motorola uses to sign images ;). Just follow the instructions on the Motorola website. Unlocking the bootloader & rooting are two separate things. You need to unlock the bootloader to allow the hardware to boot unsigned images, such as a patched boot image. Root provides applications root access to the Android OS.

You typically want to hide root as some apps won't function if they detect root, mostly banking & video streaming services I believe. It's not a requirement however.
[Moto G Stylus (Moto G Pro) Guides, News, & Discuss] himesh82:
Thank you again. I will take a good look at the guide and then decide if it is something that I can attempt
[Moto G Stylus (Moto G Pro) Guides, News, & Discuss] Growking99:
Can someone help me idk what I'm doing wrong but when doing the steps mentioned above boot b is flashed automatically and when my phone reboots I have no service, my screen doesn't work, it hangs for minutes at a time and randomly reboots. Please help
[Moto G Stylus (Moto G Pro) Guides, News, & Discuss] nokia4life2017:
Wait DOES THIS WIPE ALL THE DATA?? I CANT get a clear answer. Supposedly the "official" unlocking through Motorola does but this is the Magisk method and I'm hoping it doesn't wipe the user data or apps.

Also how do you root AFTER you unlock the bootloader?

---------- Post added at 06:43 PM ---------- Previous post was at 06:37 PM ----------

Does rooting wipe all the user data and apps?
[Moto G Stylus (Moto G Pro) Guides, News, & Discuss] JimmyJurner:
I honestly don't know. When I did the steps from op I unlocked the bootloader then rooted. I never booted into system. I can't check now because I'm running havoc os gsi and the op method doesn't work on gsis. I tried and it didn't boot but when I flashed the stock boot.img all my setup was still the same. Hope that helps some.
[Moto G Stylus (Moto G Pro) Guides, News, & Discuss] DMedina559:
Do you have a carrier model? You might be flashing the wrong boot.img although I'm not sure if theres anything different between then
[Moto G Stylus (Moto G Pro) Guides, News, & Discuss] Growking99:
No I bought the unlocked model from best buy cuz I know carrier models usually aren't rootable. Can some one post a link to the right boot.img

Here is my build number QPRS30.80-58-3 and my device info is in the pic TIA for any help
[Moto G Stylus (Moto G Pro) Guides, News, & Discuss] dafunk60:
There are instructions on rooting in these forums, even in this thread.

Unlocking the bootloader forces user data to be wiped (aka factory reset).

Rooting with Magisk does not wipe user data.

Unlocking the bootloader and rooting are two separate things. Unlocking the bootloader allows unsigned images, such as a modified boot.img, to be run on the device. Rooting provides applications root level access to the Android OS.

---------- Post added at 02:19 AM ---------- Previous post was at 02:10 AM ----------

It sounds like the boot image you're flashing does not match the version of the ROM on the phone. From your subsequent post, it looks like you're running QPRS30.80-58-3. Where did you get the boot.img file that you patched? You can use the Lenovo Rescue software to download the ROM files right from Motorola. These will contain the entire ROM, including the original boot image. Details are in the posts preceding yours. Flash the original boot.img & see if the phone boots. If it does, patch that image with Magisk & flash to obtain root.
[Moto G Stylus (Moto G Pro) Guides, News, & Discuss] JimmyJurner:
Try fastboot flash boot boot.img. When i did the stot a and b method i lost touchscreen etc

I bought a second stylus and the root method is different. So I fastboot flash the image (not to slots) and it worked but when the screen goes off the touch screen isn't responding.
[Moto G Stylus (Moto G Pro) Guides, News, & Discuss] Growking99:
I got it to work by using the assistant mentioned above. And using the fastboot flash magisk_patched.img or fastboot flash boot magisk_patched.img I can't remember which one at the moment but it automatically flashed both A and B slots with no problems. Also is TWRP available for the G Stylus?
[Moto G Stylus (Moto G Pro) Guides, News, & Discuss] Cdbarron727:
i just had the same thing happen to me. But i went to the assistant software and tried to rescue my device and it failed. Did you get it to work and how exactly did you get it working?

Edit: I just got it rescued and Im back up and running. Now I just need to figure out how not to repeat whatever mistake I just made and to get my device rooted. Did you ever figure out what you did wrong?
[Moto G Stylus (Moto G Pro) Guides, News, & Discuss] device.manager2010:
Without unlocking the Bootloader?

*edit*

Cancel that, Just Unlocked my MetroPCS Moto G Stylus's Bootloader :)

*edit* *edit*

FYI : There is a new build for the RETAIL Channel from 7/21 : mirrors.lolinet.com/firmware/moto/sofiap/official/RETAIL/
[Moto G Stylus (Moto G Pro) Guides, News, & Discuss] device.manager2010:
I am having the same issue while in fastboot, the device reboots bootloader every 20-30 seconds. I had to wait till the screen went off before hitting enter to get OEM Get_unlock_code.
[Moto G Stylus (Moto G Pro) Guides, News, & Discuss] 2dirty:
can someone please give a easier explanation on how to do this? i have been trying for hours but can not figure it out. i unlocked the bootloader but i am stuck on rooting it. can someone please help me out?

i tried following the steps and i still get stuck. which rom do i download and extract? how do i install magisk? if someone can help please message me or reply to my post.
[Moto G Stylus (Moto G Pro) Guides, News, & Discuss] dafunk60:
Let's start by installing magisk manager, I can confirm version 7.5.1 (267) works with the Moto G Stylus. You'll need to download the apk then sideload it. Take a look at https://www.xda-developers.com/how-to-use-magisk/.

Once you have magisk manager installed reply with your current build number & software channel.

You can find the build number at:

Settings > About Phone > Android 10 Version > Build Number

It will look something like QPRS30-80-58-5.

The software channel can be found at:

Settings > About Phone > Software Channel
[Moto G Stylus (Moto G Pro) Guides, News, & Discuss] 2dirty:
build number is: QPRS30.80-58-5

software channel: US retail

i installed magisk as well. thank you for dumbing it down. have not rooted anything in like 10 years. what should i do next?
[Moto G Stylus (Moto G Pro) Guides, News, & Discuss] dafunk60:
So next we need to get you a copy of the boot.img for this build. You have the same software channel & build number as me so I think this should be the correct download link straight from Motorola.

PATCHING THE BOOT.IMG

Download that zip, and grab the boot.img file it contains. Copy the boot.img file to your phone.

Patch the boot.img file with magisk manager using the 1st INSTALL button on 1st screen. Then use "Select and patch a file" option.

Select the boot.img file you copied to the phone.

Magisk manager will produce a magisk_patched.img, copy that back to your PC.

Install ADB & FASTBOOT

Connect your phone to your PC via USB.

You'll need a working adb.exe & fastboot.exe on your PC. The Lenovo software includes these so download it & install if you haven't already.

It should install to "C:\Program Files (x86)\Rescue and Smart Assistant" open a command prompt (not powershell) and navigate to that directory.

Now type adb devices. It should show your phone is connected.

Reply when you've gotten to this point & let me know if adb can see your phone or not.

PS - I'm always hesitant to get files from unknown sources and typically use the Lenovo software to get the files. With the 30.80-58-5 the Lenovo software was not offered, managed to figure out the download link the Lenovo software used for other builds & changed the file name. You can see details of how to get the rom files from the Lenovo software in this post.
[Moto G Stylus (Moto G Pro) Guides, News, & Discuss] 2dirty:
thank you for the detailed explanation and all the links. i connected my phone and adb did not show it. then i noticed that usb debugging was turned off for some reason. then it worked. what should i do now?
[Moto G Stylus (Moto G Pro) Guides, News, & Discuss] dafunk60:
On your PC, copy the patched boot image (magisk_patched.img) to the folder where fastboot.exe is located. You can use the one in the Lenovo software install folder "C:\Program Files (x86)\Rescue and Smart Assistant".

Connect to your phone via USB.

Open a command windows & navigate to the location of adb,exe & fastboot.exe, i.e. "C:\Program Files (x86)\Rescue and Smart Assistant".

Reboot the phone to the bootloader by typing:

adb reboot bootloader

Flash the patched boot image to the boot partition with:

fastboot flash boot magisk_patched.img

Reboot the phone.

fastboot reboot

Your phone should now boot to android and you should have root.
[Moto G Stylus (Moto G Pro) Guides, News, & Discuss] 2dirty:
Thank you very much! i have root now. one last thing. can you help me on what i could do to install a custom recovery(i know twrp is not supported on android 10) and install magisk modulus or exposed modules?
[Moto G Stylus (Moto G Pro) Guides, News, & Discuss] dafunk60:
Glad it worked out. When you get an OTA update it will not install with the rooted boot image. You'll need to flash the original unpatched boot image, install the OTA, & reboot. You'll then need to download the rom files for the new build version, patch the boot image, & flash the new patched boot image to get root back. You won't loose any data. Be aware you need to patch & flash the boot.img from the exact version your phone is running. You can't use a boot.img from a different build.

I don't think there are any custom recoveries available so I can't help there. There is a TWRP thread in the forums so you can check there & see if they're making any progress. I believe you can install magisk modules through magisk manager. You should check the magisk forum for help with magisk. I would check the Xposed framework forum for help with Xposed.
[Moto G Stylus (Moto G Pro) Guides, News, & Discuss] 2dirty:
thanks again for the detailed explanation of everything. i will definitely check those out. Thanks again!
[Moto G Stylus (Moto G Pro) Guides, News, & Discuss] griz.droidx:
My phone was in the process of updating when I patched my boot image. I think I used the wrong version as well because it does like the above person where it boots to the bootloader and when it does boot to the welcome screen the touch screen doesn't work or anything.

I forgot to mention that I am going to download the latest firmware and try doing that.

One question reading the OP it appears that flashing to a or b is optional is this true?
[Moto G Stylus (Moto G Pro) Guides, News, & Discuss] DMedina559:
If you just do

fastboot flash boot patched_boot.img

It'll automatically flash to your current activate slot.

Appending _a or _b is optional
[Moto G Stylus (Moto G Pro) Guides, News, & Discuss] dafunk60:
The non functioning touch screen appears to be a symptom of flashing a boot image from a different build, patched or not. Like you saw, it's possible that you flashed the right boot image to the wrong slot if you do this with an upgrade pending. I've never specified a slot when flashing, just made sure all updates were installed & did an extra reboot just to be sure. You can check which slot is active with the command:

fastboot getvar current-slot
[Moto G Stylus (Moto G Pro) Guides, News, & Discuss] griz.droidx:
That little command is a trick Thanks I'm new to Treble and Slots A/B

2

Getting ready to do flash the magisk patched stuff.

Noticed you owned an s3 as well, Iloved mine until it tore up after about 2-3 years seems like it was just thedigitizer and screen though, I've been meaning to try to hook it up to build another tv box kinda like a raspberry.. Soorry I know You guys can delete this..or I will trim it back after a day or so because this much off topic isn't cool.

You know whats sad is that I'm not a newbie.. It sure seems like I am definitely newbie on the way these moto's work now-a-days...

Man that command is awesome, I suppsoed I'll flash to whichever it says hopefully have root.

A guy has a how to on installing generic images I haven't finished reading it, (I actually read it once and forgot most of what Id read, I tell my little cousin when that happens he didn't "read" it.. LOL|

I don't under why the patched boot images are imcompatible with the GSI roms, theres a how to on how to use them and I hopie to use something other than stock in the next day hopefully. i

well thanks for all the opinions and assistance..I've been on this thing 2 days trying to just root stock.. i

When I bought my S5 it was a year old and I got it, a verizon model, for 140 or so. I knew after the droid x and the s3 I'd not own something without root and roms or heavy mods and reasearched in the store before buying and luckily it was a CID 15 "developer" model that was unlockable.. Anyway, the S5 was rooted, flashed and everything before 6 am and I read and read the evening I got it. I hope this phone takes off at least as much as the older g7s but I kinda doubt it.. FYI the screen on the Z4 will let you use a stylus as well..

IF this doesn't make much sense I'll fix it I have to hit the hay, have a long drive about 4 hours one way there and back tomorrow.. and didn't sleep any the night I got the device..
[Moto G Stylus (Moto G Pro) Guides, News, & Discuss] griz.droidx:
I can't remember if top or bottom quoting is correct edicate.

Patching a boot image to get root should be very simple common sense really. However I'm still not rooted, I probably don't need to be if I'm going to use a treble build. I patched then flashed it

---------- Post added at 08:00 AM ---------- Previous post was at 07:43 AM ----------

I'm using the latest version of the Retail US from the repair app. Pretty niftty that app is. I used the link one person above provided to verify my versions this time. The first time It was starting an update and that messed me up. But still no root. lol I'm going to flash the stock boot.img back using the regular and the A like I did to root. Then patch again iwth magisk.. I don't getit This sould be a piece of cake...
[Moto G Stylus (Moto G Pro) Guides, News, & Discuss] dafunk60:
Hey, not sure what's giving you a hard time. This is all pretty straight forward, no need to mess with partition slots. What build number is your phone running? I just walked another user through rooting starting at post 22 of this thread. Perhaps going over those steps will help you. Keep in mind, you just can't take any old boot.img & patch it and expect your phone to boot. It needs match the android build your phone is running. Where are you getting the boot image your patching?
[Moto G Stylus (Moto G Pro) Guides, News, & Discuss] griz.droidx:
Correct, that was the lesson I learned the first time lol. My phone was in the middle of an update when I would force it to reboot to the bootloader. That was the first time and it didn't get past the screen seemmm

Sorry replied too soon I'm still working on this post

At any rate Lenovo or Moto's tool too me too 118i think is the last 3 numbers.

I copied lot.img to the downloads folder or emu/0 downloaded the latest magiskical. To patch. It finished successfully I then copied it back to the folder it came from (the unzipped firmware}. But since I wanted to keep an original copy of stock boot.img I called mine like patched boot all one word or something dot mg.

I did flash the patched boot using the regular expression without an a or b. Then I found that my suck ROM was on a so I flashed it there to. That might be the issue.

No idea. I'm going to put it back to that original stuck firmwarei and try the thread with adding a GSI rom and twrp.

I feel so silly. I mean it should be a15 minute job lol. It's bound to be something simple and silly.

---------- Post added at 03:00 AM ---------- Previous post was at 02:48 AM ----------

Thanks for the suggestions I've re-read this and other threads but I'll take a look starting at 22 in a bit .

Thanks to everyone out there helping each other. This should be a decent phone. It's not built as nice as my z4 but I can love with that a zillion to 1 to have it with@ unlockedbootloader
[Moto G Stylus (Moto G Pro) Guides, News, & Discuss] squinto88:
i cant get it to work. i unlocked the bootloader, i got the boot.img file, and have adb installed but still have flash the package
[Moto G Stylus (Moto G Pro) Guides, News, & Discuss] griz.droidx:
Me either and I've been using custom crap since the droidx days I mean I I'm on the firmware ending in 116 from that rescue app

I'm thinking of trying again in a few minutes. I mean it's the most simple thing, I knew how before reading (except for the slot a and slot b stuff that I think is new in 10 that's caused issues with twrp on any device shipping with Android Q. } I think it's called dynamic partitioning h which would make me think they resize themselves or something on the fly. But I have read up on that yet.

Please excuse any grammar and punctuation errors. I swipe and miss things most of the time. It's bound to work to many have done it.

Finally and I know people probably get tired if hearing it but I really appreciate how nice and patient they've been.

The funky guy who posted the step by step instructions again, and the god of wisdom, have been super patient. As have many others j in other threads and stuff.

Thanks guys. And thanks to all who are working to get twrp and everything that they're doing to advance this device. Right now I don't know if I want to root the stock room and go with that or try Omni or even one of those treble images. I'm wanting microg and I need to completely get rid of any factory spyware disguised as something important and very well may be but 50 percent isn't necessary I guarantee it. But I'm no arm software engineer. Or Android developer but I'm going to learn eventually