topjohnwu / Magisk

The Magic Mask for Android
GNU General Public License v3.0
47.43k stars 12.04k forks source link

Compression method of ramdisk in Pixel 6 boot image is incorrect #6441

Closed charlye30 closed 1 year ago

charlye30 commented 1 year ago

After switching to the beta version can't patch boot img and succesfully get root, with the stable version works.

Device: Pixel 6a Android version: Android 13 QPR2 Beta 1 (T2B1.221118.006) Magisk version name: 25.2 Magisk version code: 25205

SammCheese commented 1 year ago

Confirmed on Pixel 6 After updating to version T2B1.221118.006 (QPR2 Beta 1), patching and installing the boot.img results in a normal boot but no root.

Magisk version: 25205

m-pastuszek commented 1 year ago

Yep, Pixel 6 (oriole) also affected. Tried patching vendor_boot.img also, but still don't works.

Magisk Canary a468fd94 (25205)

canyie commented 1 year ago

Please upload a log saved from Magisk App and a bugreport file https://developer.android.com/studio/debug/bug-report

pKrysenko commented 1 year ago

Pixel 6 pro @canyie bugreport-raven-T2B1.221118.006-2022-12-13-15-44-44.zip magisk_log_2022-12-13T15.44.28.log

canyie commented 1 year ago

Hmm, nothing about Magisk can be found in your log, it behaves like boot is not patched.

And I found something interesting, someone successfully rooted a Pixel 6 by patching and flashing the boot image from Pixel 7 instead. That one said that Google published a broken boot image which cannot even boot (so device always refuses the new image and rollback to the old one? Just a crazy guess...)

pKrysenko commented 1 year ago

Hmm, nothing about Magisk can be found in your log, it behaves like boot is not patched. And I found something interesting, someone successfully rooted a Pixel 6 by patching and flashing the boot image from Pixel 7 instead. That one said that Google published a broken boot image which cannot even boot (so device always refuse the new image and rollback to the old one?)

I can confirm. Just patched a boot from p7pro and patched it. It successfully boota on p6ro and root works. Many thanks, seems like google really broke something

m-pastuszek commented 1 year ago

@canyie, it's actually big LOL. Patching boot image from Pixel 7 and flashing it on Pixel 6 works!

Tested with latest Canary.

H3llblazer commented 1 year ago

@canyie, it's actually big LOL. Patching boot image from Pixel 7 and flashing it on Pixel 6 works!

Tested with latest Canary.

Can you please share the patched boot img you used?

I need one for pixel 6 not the PRO.

m-pastuszek commented 1 year ago

@canyie, it's actually big LOL. Patching boot image from Pixel 7 and flashing it on Pixel 6 works! Tested with latest Canary.

Can you please share the patched boot img you used?

I need one for pixel 6 not the PRO.

Sure, this is the one that I flashed on my Pixel 6. But if You want to check it first, just use fastboot boot <pathed_boot.img>.

For Pixel 6 ONLY

magisk_patched-25205_Pixel7.zip

H3llblazer commented 1 year ago

@canyie, it's actually big LOL. Patching boot image from Pixel 7 and flashing it on Pixel 6 works! Tested with latest Canary.

Can you please share the patched boot img you used?

I need one for pixel 6 not the PRO.

Sure, this is the one that I flashed on my Pixel 6. But if You want to check it first, just use fastboot boot <pathed_boot.img>.

For Pixel 6 ONLY

magisk_patched-25205_Pixel7.zip

I tried that and it seems like it didn't work. I see others who have had success with this method so i know it's possible. Maybe it's the bad cable I'm using or something. Also tried to repatch the image on my second try , no buano.

I'll download the factory zip and give this another try later today. Thanks

Edit: seems like the flash did work but magisk app still shows super user tab in grey. I tried to uninstall and reinstall the app. A good old reboot even. No Bueno.

Can we report this to Google via the feedback app, would they attend to such matters??

AllenChangMusic commented 1 year ago

@canyie, it's actually big LOL. Patching boot image from Pixel 7 and flashing it on Pixel 6 works! Tested with latest Canary.

Can you please share the patched boot img you used? I need one for pixel 6 not the PRO.

Sure, this is the one that I flashed on my Pixel 6. But if You want to check it first, just use fastboot boot <pathed_boot.img>. For Pixel 6 ONLY magisk_patched-25205_Pixel7.zip

I tried that and it seems like it didn't work. I see others who have had success with this method so i know it's possible. Maybe it's the bad cable I'm using or something. Also tried to repatch the image on my second try , no buano.

I'll download the factory zip and give this another try later today. Thanks

Edit: seems like the flash did work but magisk app still shows super user tab in grey. I tried to uninstall and reinstall the app. A good old reboot even. No Bueno.

Can we report this to Google via the feedback app, would they attend to such matters??

You could potentially try to flash the patched boot.img from the December QPR1. It should patch and allow you to boot.

ghost commented 1 year ago

After switching to the beta version can't patch boot img and succesfully get root, with the stable version works.

Device: Pixel 6a Android version: Android 13 QPR2 Beta 1 (T2B1.221118.006) Magisk version name: 25.2 Magisk version code: 25205

m-pastuszek commented 1 year ago

I tried that and it seems like it didn't work. I see others who have had success with this method so i know it's possible. Maybe it's the bad cable I'm using or something. Also tried to repatch the image on my second try , no buano.

I'll download the factory zip and give this another try later today. Thanks

Edit: seems like the flash did work but magisk app still shows super user tab in grey. I tried to uninstall and reinstall the app. A good old reboot even. No Bueno.

Can we report this to Google via the feedback app, would they attend to such matters??

@H3llblazer Can You try flash stock boot image, reboot, and then patched one again? I had someone on pm, for him this worked.

H3llblazer commented 1 year ago

I tried that and it seems like it didn't work. I see others who have had success with this method so i know it's possible. Maybe it's the bad cable I'm using or something. Also tried to repatch the image on my second try , no buano.

I'll download the factory zip and give this another try later today. Thanks

Edit: seems like the flash did work but magisk app still shows super user tab in grey. I tried to uninstall and reinstall the app. A good old reboot even. No Bueno.

Can we report this to Google via the feedback app, would they attend to such matters??

@H3llblazer Can You try flash stock boot image, reboot, and then patched one again? I had someone on pm, for him this worked.

Stock boot image from QPR2? I'll try this and report back if it was a success

Steps to test: 1.flash stock boot from QPR2 2.reboot 3.flash pixel 7 patched boot.

Edit: tried the above and it still fails to enable module/su tab. Screenshot:.Screenshot_20221214-131447.png

I'm going to full flash the latest beta and retry from the start

Edit 2: A clean flash fixed this. Those who updated from Stable to beta and got 160mb update to do so, if you're on the same boat then please clean flash and it'll fix what I've described above.

SammCheese commented 1 year ago

Can confirm the patched Pixel 7 boot.img from @m-pastuszek successfully roots my Pixel 6

yujincheng08 commented 1 year ago

Could anyone send the stock init_boot.img?

Hondo77 commented 1 year ago

Could anyone send the stock init_boot.img?

Here is the stock init_boot.img from the Pixel 7 Pro running QPR2 Beta 1. I don't believe the Pixel 6 series has an init_boot.img. Had to zip it up to attach it.

I'm guessing you were talking about the Pixel 6 though, but anyway, just in case...

init_boot.zip

yujincheng08 commented 1 year ago

Then please also provice the stock boot image from pixel 6

pndwal commented 1 year ago

Could anyone send the stock init_boot.img?

Here is the stock init_boot.img from the Pixel 7 Pro running QPR2 Beta 1. I don't believe the Pixel 6 series has an init_boot.img. Had to zip it up to attach it.

I'm guessing you were talking about the Pixel 6 though, but anyway, just in case...

init_boot.zip

Correct; P6 has 2 GKI boot images but boot.img retains generic ramdisk (vendor ramdisks are removed)... P7 has 4 and generic ramdisk is now moved to init_boot.img...

I believe P7 boot.img (kernel only and lacking ramdisk) works with P6 after patching because 1) kernel is compatible by some fluke (sources are very similar), and 2) Magisk manually adds basic ramdisk when missing for magiskinit injection (so P7 boot image has ramdisk restored after patching)...

To be clear, by patching and using P7 boot.img, P6 is loading a Magisk-added ramdisk containing Magisk different from P7 ... P7 uses a patched ramdisk in init_boot.img which P6 doesn't have AFAIK...

FWIW I posted info here: https://forum.xda-developers.com/t/magisk-general-support-discussion.3432382/post-87853419

SammCheese commented 1 year ago

Then please also provice the stock boot image from pixel 6

latest boot.img from my Pixel 6 boot.zip

Hondo77 commented 1 year ago

Could anyone send the stock init_boot.img?

Here is the stock init_boot.img from the Pixel 7 Pro running QPR2 Beta 1. I don't believe the Pixel 6 series has an init_boot.img. Had to zip it up to attach it. I'm guessing you were talking about the Pixel 6 though, but anyway, just in case... init_boot.zip

Correct; P6 has 2 GKI boot images but boot.img retains generic ramdisk (vendor ramdisks are removed)... P7 has 4 and generic ramdisk is now moved to init_boot.img...

I believe P7 boot.img (kernel only and lacking ramdisk) works with P6 after patching because 1) kernel is compatible by some fluke (sources are very similar), and 2) Magisk manually adds basic ramdisk when missing for magiskinit injection (so P7 boot image has ramdisk restored after patching)...

To be clear, by patching and using P7 boot.img, P6 is loading a Magisk-added ramdisk containing Magisk different from P7 ... P7 uses a patched ramdisk in init_boot.img which P6 doesn't have AFAIK...

FWIW I posted info here: https://forum.xda-developers.com/t/magisk-general-support-discussion.3432382/post-87853419

Yes, I have both device and am aware of the changes with devices launching with Android 13 whereby these devices have a new init_boot image containing the generic ramdisk The Pixel 6 does not have an init_boot.img since it did not ship with Android 13. Also familiar with this commit (https://github.com/topjohnwu/Magisk/commit/985249c3d0bccff479f8c1efd5967922ab8d855e) that you are likely referring to.

Due to GKI, both devices have the same GKI kernel in the boot image, which is why you can boot the Pixel 7 boot image on the Pixel 6. But if you add the drivers, it likely won't boot.

amritpal2489 commented 1 year ago

Can some one provide patched boot image for Pixel 6 Pro from 7P?

Kastilo commented 1 year ago

Can some one provide patched boot image for Pixel 6 Pro from 7P?

magisk_patched_boot.img

amritpal2489 commented 1 year ago

Can some one provide patched boot image for Pixel 6 Pro from 7P?

magisk_patched_boot.img

Thanks but this did not work. I think this is 6pro patched boot img only and not 7 pro

amritpal2489 commented 1 year ago

Can some one provide patched boot image for Pixel 6 Pro from P7P which gives root access through Magisk?

AllenChangMusic commented 1 year ago

Can some one provide patched boot image for Pixel 6 Pro from P7P which gives root access through Magisk?

It will take far less time for you to patch it yourself. Cheers

amritpal2489 commented 1 year ago

Can some one provide patched boot image for Pixel 6 Pro from P7P which gives root access through Magisk?

It will take far less time for you to patch it yourself. Cheers

I tried but my 6p failed to boot with that

amritpal2489 commented 1 year ago

Can somebody provide me Pixel 7 Pro's magisk patched boot img from the latest QPR2 Beta 1 update? The one which succesfully roots the Pixel 6 Pro

rly907 commented 1 year ago

Does any of this help rooting the pixel 6a beta?

pndwal commented 1 year ago

Does any of this help rooting the pixel 6a beta?

Guessing Edit 2 here: https://github.com/topjohnwu/Magisk/issues/6441#issuecomment-1350458251 might be good for all models... 😀

aussiebro commented 1 year ago

So will this issue happen in future top John wu? What caused this. I'm using 64bit rom p6 and the p7s boot image patched lol. It doesn't sound right tho having different phones file. I hope you fix

lssong99 commented 1 year ago

For anyone wants a patched boot.img ONLY for Pixel 6 Pro, I verified this works:

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

This image is not from me but from @Kastilo (https://github.com/topjohnwu/Magisk/issues/6441#issuecomment-1353678284). This image is patched with a Pixel 7 series unit.

john-uirbe commented 1 year ago

thanks it worked for my pixel 6pro

Nereuxofficial commented 1 year ago

Doesnt work for me at least with fastboot boot IMAGE_NAME Is there anything special required?

Kastilo commented 1 year ago

Doesnt work for me at least with fastboot boot IMAGE_NAME Is there anything special required?

That shouldn't be the case, but it seems the issue with resolved with the January 2023 update, was able to patch the default Pixel 6 Pro boot image without issue so it might have just been a borked update on Google's end

Hondo77 commented 1 year ago

Doesnt work for me at least with fastboot boot IMAGE_NAME Is there anything special required?

That shouldn't be the case, but it seems the issue with resolved with the January 2023 update, was able to patch the default Pixel 6 Pro boot image without issue so it might have just been a borked update on Google's end

The issue is with the QPR2 betas, or at least Beta 1 so far. There is no issue when using stable builds like the January update you mention.

lssong99 commented 1 year ago

Doesnt work for me at least with fastboot boot IMAGE_NAME Is there anything special required?

What doesn't work in your case?

If you are talking about using Magisk direct patch boot.img of Pixel 6 (Pro) QPR2b1 factory image, then nothing you could do to make this work at this moment.

If you are talking about using the Pixel 7 Pro image posted by https://github.com/topjohnwu/Magisk/issues/6441#issuecomment-1361102484 here, then it should just work by flashing with fastboot flash boot xxx.img without any options. (Maybe update your fastboot binary?)

Nereuxofficial commented 1 year ago

Doesnt work for me at least with fastboot boot IMAGE_NAME Is there anything special required?

What doesn't work in your case?

If you are talking about using Magisk direct patch boot.img of Pixel 6 (Pro) QPR2b1 factory image, then nothing you could do to make this work at this moment.

If you are talking about using the Pixel 7 Pro image posted by https://github.com/topjohnwu/Magisk/issues/6441#issuecomment-1361102484 here, then it should just work by flashing with fastboot flash boot xxx.img without any options. (Maybe update your fastboot binary?)

I was talking about the latter, which didn't work on my Pixel 6 Pro. The fastboot binary was the latest one on Arch Linux so should be pretty up to date

lssong99 commented 1 year ago

Doesnt work for me at least with fastboot boot IMAGE_NAME Is there anything special required?

What doesn't work in your case? If you are talking about using Magisk direct patch boot.img of Pixel 6 (Pro) QPR2b1 factory image, then nothing you could do to make this work at this moment. If you are talking about using the Pixel 7 Pro image posted by #6441 (comment) here, then it should just work by flashing with fastboot flash boot xxx.img without any options. (Maybe update your fastboot binary?)

I was talking about the latter, which didn't work on my Pixel 6 Pro. The fastboot binary was the latest one on Arch Linux so should be pretty up to date

It should work without issue. I suggest change another PC with non-USB C interface. I did have strange issues with USB C under Windows. Anyway redownload them image and use different PC (and OS) is the only thing I could recommend.

I have also patched the image with latest Magisk and it works like charm.

KieronQuinn commented 1 year ago

For the record, exact same situation with QPR2 B2. Magisk doesn't work on the P6P image, patching the P7P image and using that works fine.

Patched Pixel 7 Pro image for use on the Pixel 6 Pro: https://drive.google.com/file/d/1bpcj6JntADL5-gcMPH5kbjW541ZfrwAI/view?usp=sharing

tlxxxsracer commented 1 year ago

Confirmed same thing on QPR2 B2 for Pixel 6a.

tlxxxsracer commented 1 year ago

Flashed the patched P7 boot on Pixel 6a, but now Magisk keeps disappearing when I open it. Running Canary. But the device has root though.

Nereuxofficial commented 1 year ago

For the record, exact same situation with QPR2 B2. Magisk doesn't work on the P6P image, patching the P7P image and using that works fine.

Patched Pixel 7 Pro image for use on the Pixel 6 Pro: https://drive.google.com/file/d/1bpcj6JntADL5-gcMPH5kbjW541ZfrwAI/view?usp=sharing

I dont know why but this image has bricked my Pixel 6 Pro and i had to factory reset

SammCheese commented 1 year ago

Patched QRP2 B2 Pixel 7 image for PIXEL 6 ONLY. (T2B2.221216.006)

magisk_patched-25206_pixel7_for_6.zip

raven2411 commented 1 year ago

Patched QRP2 B2 Pixel 7 image for PIXEL 6 ONLY.

magisk_patched-25206_pixel7_for_6.zip

not working for me P6 in QPR2 B2

update- now working, I have to reinstall magisk app & flash 2 times boot ing

BlazeCodeDev commented 1 year ago

For the record, exact same situation with QPR2 B2. Magisk doesn't work on the P6P image, patching the P7P image and using that works fine.

Patched Pixel 7 Pro image for use on the Pixel 6 Pro: https://drive.google.com/file/d/1bpcj6JntADL5-gcMPH5kbjW541ZfrwAI/view?usp=sharing

This causes my P6Pro to reboot as soon as I try to open any app

SammCheese commented 1 year ago

Thats odd, it works just fine for me

Patched QRP2 B2 Pixel 7 image for PIXEL 6 ONLY. magisk_patched-25206_pixel7_for_6.zip

not working for me P6 in QPR2 B2

mosin commented 1 year ago

For the record, exact same situation with QPR2 B2. Magisk doesn't work on the P6P image, patching the P7P image and using that works fine. Patched Pixel 7 Pro image for use on the Pixel 6 Pro: https://drive.google.com/file/d/1bpcj6JntADL5-gcMPH5kbjW541ZfrwAI/view?usp=sharing

This causes my P6Pro to reboot as soon as I try to open any app

Hello, I was able to keep root by flashing the P7P boot image. Normally I just boot using the patched boot image then install root using the app. This time I would lose root after rebooting. I've shared my patched boot image here https://drive.google.com/file/d/1-q7IJVLgKZGoL1khKoCz4urgX7IhJ4DN/view?usp=share_link

Jilfeye commented 1 year ago

Then how ?

On Tue, Jan 10, 2023, 7:11 PM mosin @.***> wrote:

For the record, exact same situation with QPR2 B2. Magisk doesn't work on the P6P image, patching the P7P image and using that works fine. Patched Pixel 7 Pro image for use on the Pixel 6 Pro: https://drive.google.com/file/d/1bpcj6JntADL5-gcMPH5kbjW541ZfrwAI/view?usp=sharing

This causes my P6Pro to reboot as soon as I try to open any app

Hello, I was able to keep root by flashing the P7P boot image. Normally I just boot using the patched boot image then install root using the app. This time I would lose root after rebooting. I've shared my patched boot image here https://drive.google.com/file/d/1-q7IJVLgKZGoL1khKoCz4urgX7IhJ4DN/view?usp=share_link http://url

— Reply to this email directly, view it on GitHub https://github.com/topjohnwu/Magisk/issues/6441#issuecomment-1377091776, or unsubscribe https://github.com/notifications/unsubscribe-auth/AZWYUGY47AKZLMPGLAW57EDWRU7VVANCNFSM6AAAAAAS5CU4ME . You are receiving this because you are subscribed to this thread.Message ID: @.***>

mosin commented 1 year ago

Then how ? Just flashing the patched P7P boot image i.e. fastboot flash boot fastboot flash boot magisk_patched-25206_lBM7l.img