rooting ( after unlocking bootloader)

Search This thread

flroots

Senior Member
Sep 12, 2012
418
27
I have rooted my Moto G Stylus (XT2043-4) without issues. Now if I want to receive future OTA updates, must I unroot? If so, what's the best method? Can I just flash the stock (unpatched) boot.img or is it more complicated?

Also since the magisk root is systemless, does that mean I will receive OTA announcements (even if I can't install them)?

Note: I understand this is the G Power forum not the G Stylus forum, but I haven't received a reply there. Hope you can help
 

Leroy_Sparks

Senior Member
Jun 12, 2018
56
9
I successfully performed rooting using this thread (magisk v21.4). Two minor observations:

In the original post there is mention of magisk_patched.bin I assume this is a typo as the patched file has a .img extension.

The other thing is that my patched file was named: magisk_patched_IuSnj.img I didn't change it, but tested it by booting it (not flashing it) using this filename. It worked, so I then flashed it (again using the full filename).

Two minor points, but this may give some clarification to anyone who saw this and was unsure - we always want to follow procedures EXACTLY to avoid screwing something up.
 

pjottrr

Senior Member
Jan 19, 2009
240
79
36
leeuwarden
pjottrr.no-ip.org
In the original post there is mention of magisk_patched.bin I assume this is a typo as the patched file has a .img extension.

hmm, nicely spotted, i'll change that in the OP. :)

The other thing is that my patched file was named: magisk_patched_IuSnj.img
i think that's new in the latest magisk, i haven't seen that earlyer at least.

But i'm glad you found help in the topic with rooting, have fun with it .
edit; and thnx for pointing out the mistake i made in the OP. You are the first to notice it.
 
Last edited:

Leroy_Sparks

Senior Member
Jun 12, 2018
56
9
hmm, nicely spotted, i'll change that in the OP. :)


i think that's new in the latest magisk, i haven't seen that earlyer at least.

But i'm glad you found help in the topic with rooting, have fun with it .
edit; and thnx for pointing out the mistake i made in the OP. You are the first to notice it.

I hope it helps anyone else in the future who is as easily confused as I am.

I think the patched file name thing could be new. I used it to patch the OEM bootloader and also on a custom ROM (Havoc). Both had a seffix in the filename (not the same letters). It's prbably good because it distinguishes one file from another.

Again, thanks for this guide, it seems every phone has it's own unique challenges in unlocking/rooting/etc.
 

halliessed

New member
Jan 26, 2021
2
2
So after you unlocked the boot loader ( see my previous post)
you can start rooting with magisk manager / patching the boot.img from the original firmware

I used this thread in order to get root ; i modified the contents so it would fit the moto phone a bit better:, but thnx goes to Ibolito over at the pixel 3 forums

1 ) Download the latest Android 10 factory image for your device ("see this guide on where to find it.

2 ) Extract the "boot.img" file from the downloaded image and copy it to your phone.



3 ) Download latest Magisk Manager application on your phone and install it :
Link

4 )Press on the Install Magisk button (the one on the top, not the Magisk Manager), then Install > Select and Patch a File and now select the Boot.img file you extracted earlier. When the process is done, just put the patched boot.img file on your computer in the same folder as your ADB and FASTBOOT tools, the file's name is magisk_patched.img
edit: i received a comment that the name might be something like Magisk_patched_somerandomletters_.img since the latest magisk update

5 ) Enable adb debugging on your phone and connect it to your computer via USB.
Open a command prompt on your computer and migrate to the folder where the ADB and Fastboot tools are located.
(for exemple, for me it's : cd C:\adb).

7 ) Reboot your phone to fastboot by typing adb reboot bootloader

8 ) Flash the Boot.img you just patched with magisk by typing fastboot flash boot magisk_patched.img
extra: You could test a single boot with that image by typing "fastboot boot magisk_patched.img"

9 ) When i'ts done, reboot by typing fastboot reboot

10 ) Open your Magisk Manager app and check if everything is good, and it should be

extra info:

I did worry a bit because the original boot.img is 64 megs , while the patched version is only 12
but i went with it, and it was fine.

good luck to you all

Edit: rewritten entire post so it would look more like a guide, and extra warning because a lot of people seem to loose touch if they don't have the exact same firmware downloaded as on their phone.

When my device is in the bootloader it does not show up under ADB Devices. It does show up when the phone is turned on. Whats up with this?

Edit: My immeasurable stupidity is clear. Nevermind.
 
Last edited:
  • Like
Reactions: pjottrr

culiacanazo

Senior Member
Jan 3, 2016
1,791
661
Culiacán
Thanks for your thread. Do you know anything, pertaining to this topic here of yours, whether it is doable for the g8 power lite, codenamed blackjack, aka XT-2055-2, not to be confused for any other, since we are on a MediaTek chip?
(Android 10)

...the file's name is magisk_patched.img edit: i received a comment that the name might be something like Magisk_patched_somerandomletters_.img...

a patched image from BLACKJACK_RETBR_QOD30.163-7 produced magisk_patched_Fbrjm.img, so, other than the two BR, i find no explanation from the naming (I'm, well, the phone is Mexican but the rest after retail brasil is a match which (i think?) is what matters)

...flash the Boot.img you just patched with magisk by typing fastboot flash boot magisk_patched.img extra: You could test a single boot with that image by typing "fastboot boot magisk_patched.img"...

That's it? Because i remember you could reboot thru the commands in huawei, then it started having to have the button combo or it would boot where it wanted (mate 10 pro, between oreo and pie, although methinks it had to do more with the loss of the boot partition...)

...I did worry a bit because the original boot.img is 64 megs , while the patched version is only 12 but i went with it, and it was fine...

That's because images acquired in that manner usually just weigh however big the partition may happen to be, whereas the patched image only weighs what the actual amount of what's being used is plus the usually tiny patch on top.
Open up said stock image and you'll see.
 
Last edited:

pjottrr

Senior Member
Jan 19, 2009
240
79
36
leeuwarden
pjottrr.no-ip.org
Thanks for your thread. Do you know anything, pertaining to this topic here of yours, whether it is doable for the g8 power lite, codenamed blackjack, aka XT-2055-2, not to be confused for any other, since we are on a MediaTek chip?
(Android 10)

i don't think it's any difference, the cpu might be different, but the process ( i guess) is the same.
there might however be something with a/b paritions , mine doesn't have that, but i beleive some us models have an a and a b boot partition.
it might as wel be the case with the light version.

culiacanazo said:
a patched image from BLACKJACK_RETBR_QOD30.163-7 produced magisk_patched_Fbrjm.img, so, other than the two BR, i find no explanation from the naming (I'm, well, the phone is Mexican but the rest after retail brasil is a match which (i think?) is what matters)

i noticed the new naming as well in the last update. i think it is just random so it is getting less confusing ( what the latest magisk patched image is...) . but if you really want the answer you could dig into it by looking trough the changelog of the magisk manager.

culiacanazo said:
pjottrr said:
...flash the Boot.img you just patched with magisk by typing fastboot flash boot magisk_patched.img extra: You could test a single boot with that image by typing "fastboot boot magisk_patched.img"...
That's it?

well the most important thing is test how the boot image behaves, especially on your device. , just boot the patched boot image, and ( of cource in your case it would be:
"fastboot boot magisk_patched_Fbrjm.img"

if all works fine, you could decide to flash it, and then it is sort of permanent... ( until you want to install the next update....)
 

creedzeppelin

Member
Mar 28, 2021
6
1
I use minimal ADB and fastboot and had zero problems with my sofia phone getting root. I've only ever had HTC phones and I've never used Magisk before, but it was so easy. Thanks a lot everyone!
 
  • Like
Reactions: tcaudill01

Onoitsu2

Senior Member
May 4, 2013
60
36
8 ) Flash the Boot.img you just patched with magisk by typing fastboot flash boot magisk_patched.img
extra: You could test a single boot with that image by typing "fastboot boot magisk_patched.img"
I actually found it to feel smoother doing it by booting from it, for that single boot, and opening the magisk app, and letting it, re-flash it. I have fully reverted mine to stock once and tried both methods now and I dunno, maybe an alternative route, since Magisk would have the perms to install itself again, so you know it does it with latest files since it's pretty hardcore about updating itself at that time. Might be safest in case to prevent outdated files usage.

Oh yeah, this worked on the moto g power (2021) version, just got, not even a week out of the box, but did take about 3-days before could enable the unlocking option in Dev options, was blocked till then.
 
Last edited:
  • Like
Reactions: pjottrr

pjottrr

Senior Member
Jan 19, 2009
240
79
36
leeuwarden
pjottrr.no-ip.org
So i finally got it as well,

However, when trying to boot the patched boot image, i get stuck on a Motorola logo.
it is booting, i get the screen flicker, yet it's stuck on the moto logo after that.

If i flash back the non-patched boot.img from fastboot it works fine.

has anyone here had the same ?


i'm using:
update channel reteu
magisk manager 22.1
build number: RPE31.Q4U-47-35





update 2:

it appeared i had a module installed not compatible with android 11
so i booted into safemode ( hold volume down as soon as the phone vibrates) , then reboot the phone ( magisk modules will be disabled after a safemode boot) , i removed all modules, and i'm back :)...
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    you allready have android 11?
    i'm still waiting for that update
    Yes, I had already upgraded to 11. The method works very well Guys. Thanks.
  • 11
    So after you unlocked the boot loader ( see my previous post)
    you can start rooting with magisk manager / patching the boot.img from the original firmware

    I used this thread in order to get root ; i modified the contents so it would fit the moto phone a bit better:, but thnx goes to Ibolito over at the pixel 3 forums

    1 ) Download the latest Android 10 factory image for your device ("see this guide on where to find it.

    2 ) Extract the "boot.img" file from the downloaded image and copy it to your phone.

    Warning! Make absolutely sure the firmware is exactly the same as the installed one. If not, you might loose touch.
    Be aware that LMSA will download the latest firmware, even if it is not yet installed. That might break your touchscreen

    3 ) Download latest Magisk Manager application on your phone and install it :
    Link

    4 )Press on the Install Magisk button (the one on the top, not the Magisk Manager), then Install > Select and Patch a File and now select the Boot.img file you extracted earlier. When the process is done, just put the patched boot.img file on your computer in the same folder as your ADB and FASTBOOT tools, the file's name is magisk_patched.img
    edit: i received a comment that the name might be something like Magisk_patched_somerandomletters_.img since the latest magisk update

    5 ) Enable adb debugging on your phone and connect it to your computer via USB.
    Open a command prompt on your computer and migrate to the folder where the ADB and Fastboot tools are located.
    (for exemple, for me it's : cd C:\adb).

    7 ) Reboot your phone to fastboot by typing adb reboot bootloader

    8 ) Flash the Boot.img you just patched with magisk by typing fastboot flash boot magisk_patched.img
    extra: You could test a single boot with that image by typing "fastboot boot magisk_patched.img"

    9 ) When i'ts done, reboot by typing fastboot reboot

    10 ) Open your Magisk Manager app and check if everything is good, and it should be

    extra info:

    I did worry a bit because the original boot.img is 64 megs , while the patched version is only 12
    but i went with it, and it was fine.

    good luck to you all

    Edit: rewritten entire post so it would look more like a guide, and extra warning because a lot of people seem to loose touch if they don't have the exact same firmware downloaded as on their phone.
    3
    I had the same problem as described previously with the touchscreen not working after attempting to patch the boot.img. Turns out the problem was a build number mismatch. I got the correct version using LMSA, and I am including links to the unmodified and patched boot.img for the most recent firmware, QPM30.80-51-3. I hope it will save others from having to download the whole ROM.

    sofia-QPM30.80-51-magisk_patched.img
    sofia-QPM30.80-51-boot.img
    2
    I'm noticing some conflicting information when installing a Magisk patched boot.img, some say to use fastboot, others say fastbootd.

    Does anyone have a definitive answer to this? And if it does use fastbootd, does the command look like this: "fastbootd flash boot magisk_patched.img"?

    I'm guessing this is a change for devices that shipped with Android 10, but want to make sure before I proceed and potentially brick my device. Don't need those headaches right now.
    Thanks in advance! :D

    apparently you could do both, but i used the "normal" fastboot from the boot loader,
    and used the command "fastboot boot magisk_patched.img"

    After i noticed everything working , i flashed the patched image via the same fastboot;
    fastboot flash boot magisk_patched.img

    i did not do anything with fastbootd, i tried to figure out what to do with it, but haven't so far.

    if the patched image doesn't work, you can simply recover by flashing the original boot.img from the recovery.

    I guess most importantly is using the proper boot.img , make sure it's the same as your current build.
    If you have any more questions, feel free to ask

    Greets,
    Pjottrr
    2
    Thanks for posting this. I unlocked my bootloader and would like to root like you did.
    Do you install magisk first on your phone, then get the magisk_patched file from your phone? Or is the magisk_patched file obtained somewhere else?


    You need to install the magisk manager
    In magisk manager you can click on "install (magisk)"--> "by patching a file"

    then you select the file to be patched ( extracted from the original rom )

    after that you can copy the patched file from your phone back to the pc and install it via fastboot.
    After that magisk is installed

    i hope you succeed :)
    2
    maybe try with the "correct" firmware? ( not sure if the minor diference changes anything, but you could try....
    i found it here:
    rsdsecure-cloud.motorola.com/download/SOFIA_RETAIL_QPM30.80-51_subsidy-DEFAULT_regulatory-DEFAULT_CFC.xml.zip

    Thanks for finding this link.
    Unfortunately i am not able to download this for some reason. I get an access denied error message.

    edit:
    I was able to find the most recent firmware here:
    github.com/AndroidDumps/motorola_sofia_dump/tree/sofia_retail-user-10-QPM30.80-51-bd0b4-release-keys
    I downloaded just the boot.img file and flashed it. That fixed the touchscreen issue. I then used magisk to batch the boot.img and I now have root.

    Just to be clear, this worked on a US retail moto g power purchased unlocked from best buy. The phone model number is XT2041-4.
    Hope this helps.
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone