• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

Root Magisk Pie For Unlocked Devices MR0 and MR1

Search This thread

Warrior1988

Senior Member
Jun 28, 2015
332
262
33
Root by Magisk

Click Here For MR0

Click Here For MR1

fastboot flash boot_a boot.img

fastboot flash boot_b boot.img

fastboot reboot


If you get this error

Your device is corrupt. It can’t be trusted and may not work properly.


Use a terminal app or use computer and type this.

su

reboot "dm-verity enforcing"


MR0 rooted to MR1 failed to install workaround
If you're already on rooted MR0 and OTA installation failed for the MR1 Update.

You must boot into fastboot mode and flash MR0 stock boot.img , vendor.img , system.img then check for update follow instructions below.

https://s3.amazonaws.com/cheryl-factory-images/aura-p-global-3040.zip

fastboot flash boot_a boot.img

fastboot flash boot_b boot.img

fastboot flash vendor_a vendor.img

fastboot flash vendor_b vendor.img

fastboot flash system_a system.img

fastboot flash system_b system.img

fastboot reboot
 
Last edited:

th3cavalry

Senior Member
Dec 1, 2010
50
10
The problem I have is it now says my device is corrupt even after side loading the whole OTA file. Still got the error right after the side loading.
 

CurtisMJ

Senior Member
May 23, 2013
633
533
Guys, the payload.bin doesn't contain the full images. It contains bdiff delta files. YOU CANNOT TYPICALLY FLASH THE IMAGES EXTRACTED FROM THE PAYLOAD.
You need to patch the previous factory images with the diff. I'm downloading the update now and will gladly post a stock boot image when I get it (and if nobody else does it before :p )
Not really needed now though thanks to OP

Edit: Major version upgrades do appear to have flat images, but that shouldn't be an expectation. Always check the patch method in the metadata (extractor programs should at least write this to the console) is image and not bdiff.
 
Last edited:

Warrior1988

Senior Member
Jun 28, 2015
332
262
33

FellpeSoares

Member
Sep 13, 2016
20
4
Brazil
are you sure that you are installing it on pie?
yes
YmwM3pJ.png
 

rogeriskira

Senior Member
Jun 16, 2011
143
27
Elizabeth, New Jersey
Is anyone having issues with Google Pay? I have been passing Safety Net with no issue. I even removed all of my modules and still can't make a payment with Google Pay. I noticed the only way to get it working is to go to Magisk Manager and check "Magisk Core Only Mode" so I can then use it. Anyone else having this issue?

Edit:
Razer Phone 2 Android 9
Magisk 18.1
 
Last edited:

simplegek

Member
Dec 24, 2018
12
3
Berlin
Root by Magisk

https://drive.google.com/file/d/1eHBPo2YZBWPe6zIe5sTct5SfbHQZUPa5/view?usp=drivesdk

fastboot flash boot_a boot.img

fastboot flash boot_b boot.img

fastboot reboot


If you get this error

Your device is corrupt. It can’t be trusted and may not work properly.


Use a terminal app or use computer and type this.

su

reboot "dm-verity enforcing"

I did the same way but after flashing the patched boot its booting normaly but i am still stuck in bootanimation.
If i flash again stock boot img works normaly.

what can be the reason for that ?

Best Regards
SimpleGek
 

rogeriskira

Senior Member
Jun 16, 2011
143
27
Elizabeth, New Jersey
Guys, the payload.bin doesn't contain the full images. It contains bdiff delta files. YOU CANNOT TYPICALLY FLASH THE IMAGES EXTRACTED FROM THE PAYLOAD.
You need to patch the previous factory images with the diff. I'm downloading the update now and will gladly post a stock boot image when I get it (and if nobody else does it before :p )
Not really needed now though thanks to OP
I must of gotten lucky then. I extracted the boot.img from the payload.bin then used magisk to patch the boot.img for root. No issues so far.
 

CurtisMJ

Senior Member
May 23, 2013
633
533
I must of gotten lucky then. I extracted the boot.img from the payload.bin then used magisk to patch the boot.img for root. No issues so far.
It is certainly possible from what I can tell. Most probably a guarantee when there's an OTA to the next version of Android(deltas would probably be bigger than a flat image). I'm more implying that this shouldn't be an expectation. If you tried to patch the boot.img extracted from the payload in the OTA for O-MR0 to O-MR2 there would most definitely have been problems, for instance.
So 'twas just a warning. That WAS lucky ;)
 
  • Like
Reactions: rogeriskira

Gamesoul Master

Senior Member
Aug 26, 2010
682
177
Alright, so, I'm gonna be the one to ask the stupid question. All a completely stock user has to do to get root now (on an unlocked RP2) is... Update to Android Pie normally, unlock the bootloader, and then follow the OP?
 

simplegek

Member
Dec 24, 2018
12
3
Berlin
It is certainly possible from what I can tell. Most probably a guarantee when there's an OTA to the next version of Android(deltas would probably be bigger than a flat image). I'm more implying that this shouldn't be an expectation. If you tried to patch the boot.img extracted from the payload in the OTA for O-MR0 to O-MR2 there would most definitely have been problems, for instance.
So 'twas just a warning. That WAS lucky ;)

Do you working now with diff ? so how i understand diff means that we need merge RP2 with RP0 boot.img ?
 

CurtisMJ

Senior Member
May 23, 2013
633
533
Do you working now with diff ? so how i understand diff means that we need merge RP2 with RP0 boot.img ?
Ok, so the OTA packages work like this:
The package has some metadata and a number of "payloads"(concatenated in a single file)
There is one sub-payload per partition in a firmware slot(A or B)
The metadata specifies the checksums, sizes etc of each payload, along with a patch method
The patch method tells the update engine how it should go about patching the matching partition with the payload.
Most of the time this patch method will be a bdiff(binary diff).
When its bdiff, the payload is not a full image, hence the previous image is required. This previous image can be extracted from a factory image, and the diff combined with it to form a flat image which you can flash directly (and patch with magisk)
SOMETIMES (like with a major upgrade where a diff will likely be larger than a image) the patch method is image, where the payload is a flat disk image of the partition which is simply written to the partition.

The Pie update evidently contained a flat boot image. So in this case, you DO NOT need to merge the images. But with with subsequent smaller updates, we likely will need to do that.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 13
    Root by Magisk

    Click Here For MR0

    Click Here For MR1

    fastboot flash boot_a boot.img

    fastboot flash boot_b boot.img

    fastboot reboot


    If you get this error

    Your device is corrupt. It can’t be trusted and may not work properly.


    Use a terminal app or use computer and type this.

    su

    reboot "dm-verity enforcing"


    MR0 rooted to MR1 failed to install workaround
    If you're already on rooted MR0 and OTA installation failed for the MR1 Update.

    You must boot into fastboot mode and flash MR0 stock boot.img , vendor.img , system.img then check for update follow instructions below.

    https://s3.amazonaws.com/cheryl-factory-images/aura-p-global-3040.zip

    fastboot flash boot_a boot.img

    fastboot flash boot_b boot.img

    fastboot flash vendor_a vendor.img

    fastboot flash vendor_b vendor.img

    fastboot flash system_a system.img

    fastboot flash system_b system.img

    fastboot reboot
    2
    Man, you ain't kidding! It literally takes me about a full day to get my phone set back up the way I like it, and I dread resetting the phone & wiping everything out because of that!

    Is there no way of using fastboot to like "dirty flash" the update and not lose all my data/settings, or do I not understand that applying a system update like this just automatically means your data will be wiped?

    I got the OTA update to work by flashing MR0 stock boot.img vendor.img and system.img both in slot A/B
    2
    So, this will keep all our settings and such? No need to relock bootloader and factory reset? We'll only have to configure Magisk and modules again?

    Correct.
    2
    Do you working now with diff ? so how i understand diff means that we need merge RP2 with RP0 boot.img ?
    Ok, so the OTA packages work like this:
    The package has some metadata and a number of "payloads"(concatenated in a single file)
    There is one sub-payload per partition in a firmware slot(A or B)
    The metadata specifies the checksums, sizes etc of each payload, along with a patch method
    The patch method tells the update engine how it should go about patching the matching partition with the payload.
    Most of the time this patch method will be a bdiff(binary diff).
    When its bdiff, the payload is not a full image, hence the previous image is required. This previous image can be extracted from a factory image, and the diff combined with it to form a flat image which you can flash directly (and patch with magisk)
    SOMETIMES (like with a major upgrade where a diff will likely be larger than a image) the patch method is image, where the payload is a flat disk image of the partition which is simply written to the partition.

    The Pie update evidently contained a flat boot image. So in this case, you DO NOT need to merge the images. But with with subsequent smaller updates, we likely will need to do that.