Magisk v20.2 (and onwards) does not work on Razer Phone 2.

Created on 3 Jan 2020  Â·  26Comments  Â·  Source: topjohnwu/Magisk

I'm using Razer Phone 2 with arter97's kernel r12, and I found that Magisk v20.2 (20200) and onwards no longer works on this device. The last known good version is Magisk v20.1 (20100).

  • Direct Install from system does not work (after reboot Magisk stays at previous version) and will render the kernel's built-in TWRP unusable. Trying to boot to the recovery at this point will result in the device stuck at Razer logo then reboot to fastboot afterwards.
  • Reflashing arter97's kernel will restore TWRP. Flashing Magisk v20.2 from TWRP will result in the system being unable to boot at all, and reboots to fastboot afterwards.
  • This issue was first observed in Magisk Canary build 20107. At that time I thought the canary build itself was bugged, but it turned out not be the case. The most recent Canary build (15bd2da8) does not work, either.

Most helpful comment

All 26 comments

Can confirm. Perfect explanation.

Similar for Lightrom on Android 9/Pie for Samsung Note 9's.
Magisk manager freezes, root xs is lost.

@lss4: It would likely have helped to have reported this when 20107 was actually released.. Can you upload the boot.img you're seeing the issue with? Does it work with stock boot.img? Upload it too.

@jult: Go start your own Issue. Your description is not "similar" at all.

Flashing Magisk v20.2 on top of Magisk v20.1 will produce the same result as Direct installing it from system: The system can boot, but Magisk is still v20.1, and TWRP is broken.

After investigating, it seems when flashing Magisk v20.2, at the step "Checking ramdisk status", these following lines are absent, and it went straight to Patching ramdisk:

- Stock boot image detected
- Backing up stock boot image

NOTE: It should say something like Magisk patched boot image detected instead, if Magisk has already been flashed (which would be the case when upgrading).

This was also the case with Magisk Canary 20107, and for that reason, at that time I dismissed it as the canary build itself was bugged.

I was using the Canary channel at that time and I think the last known good Canary (which I was able to successfully install directly) was probably around 20105. I'm not sure which build exactly, and I haven't tested TWRP at that time.

Can't test about stock boot.img as I'm currently running a GSI (Havoc 3.0, to be precise) and the phone is currently my daily driver which I need to make sure it's usable for work.

I've dumped the boot images using TWRP backup and attached here. I backed them up right after flashing Magisk v20.2 (as I would not be able to re-enter TWRP afterwards), so I'm afraid these might not be entirely correct.

Boot-Flashed-Magisk20.2-Directly.tar.gz
This one is after flashing Magisk v20.2 on top of original arter97's kernel boot image (which would not boot).

Boot-Upgraded-to-Magisk20.2-From-Magisk20.1.tar.gz
This one is after flashing Magisk v20.2 on top of Magisk v20.1 (which boots, but Magisk is still v20.1 and TWRP is now broken).

@jult: Go start your own Issue. Your description is not "similar" at all.

It is. I found that Magisk v20.2 (20200) and onwards no longer works on my SM N960F. The last known good version is Magisk v20.1 (20100). Sounds pretty darn similar to me..

@jult: Go start your own Issue. Your description is not "similar" at all.

It is. I found that Magisk v20.2 (20200) and onwards no longer works on my SM N960F. The last known good version is Magisk v20.1 (20100). Sounds pretty darn similar to me..

You said your device boots. This one doesn't. Therefore a different cause. Stop hijacking and go make your own separate Issue for your separate issue.

It is. I found that Magisk v20.2 (20200) and onwards no longer works on my SM N960F. The last known good version is Magisk v20.1 (20100). Sounds pretty darn similar to me..

Sorry but this issue is specifically about my Razer Phone 2. You should start a separate issue and you may reference this one if you insist the cause might be similar.

However, I don't think we're having the same issue as Magisk Manager never froze on me. It's just that Magisk v20.2 cannot be installed on my device (while Magisk v20.1 could).

A little update.

I could now confirm that the last known good Canary is indeed 20105 (b29f0ca4). So it's very likely one of the commits between this build and 20107 (474cc7d5) that broke it.

NOTE: There was no 20106 according to the commits in the Canary release (magisk_files) repo.

Also, from the RP2 Telegram group, some suspected that a dtbo update might be the culprit, and this is probably not the only device broken on v20.2 as #2212 might be a similar issue as mine.

I'm on a razer phone 2 with MR2 and stock boot image, magisk works fine for
me, for what it's worth, on the latest OTA.

I rooted last night with 20.2 and no issues here.

On Sun, Jan 5, 2020, 09:28 L.S.S. notifications@github.com wrote:

A little update.

I could now confirm that the last known good Canary is indeed 20105 (
b29f0ca
https://github.com/topjohnwu/Magisk/commit/b29f0ca4d1504cf2d9358ed098bc0e456ec56195).
So it's very likely one of the commits between this build and 20107 (
474cc7d
https://github.com/topjohnwu/Magisk/commit/474cc7d56dbabe97efc983478e4342aca6d3fde6)
that broke it.

NOTE: There was no 20106 according to the commits in the Canary release
(magisk_files) repo.

Also, from the RP2 Telegram group https://t.me/razer_phone, some
suspected that the dtbo update might be the culprit, and this is probably
not the only device broken on v20.2 as #2212
https://github.com/topjohnwu/Magisk/issues/2212 might be a similar
issue as mine.

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/topjohnwu/Magisk/issues/2203?email_source=notifications&email_token=AAEAENOR5XC24LFQENWDVB3Q4IDBVA5CNFSM4KCIREL2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEID2MSI#issuecomment-570926665,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAEAENPRCAKGP6TWVKKHM5LQ4IDBVANCNFSM4KCIRELQ
.

Hi,
my device is a OnePlus 3T ... i can confirm V20.2 is not working on my device as well ... i tried installing it from the Magisk Manager and the phone wouldn't boot ... only after i restored the previously backed V20.1 boot image in recovery is when it booted.

@gordol, can you upload the stock boot.img so I can compare against @arter97's?

Separate boot.img would be helpful to save me the bandwidth at work. :wink:

I think I figured it out. lz4_legacy compression is used in arter's ramdisk, and stock likely uses gzip which works fine.

@topjohnwu is aware and working on a fix. :+1:

9.0
P-MR2-RC001-RZR-190914.3123
boot.img: https://drive.google.com/file/d/1Acl9HFufdSK8LQy1uxlkpcnUklHLe5Po

@osm0sis arter97 uses gzip by default: https://github.com/arter97/android_kernel_razer_sdm845/blob/bb0989d65ff5466515a336e1e98f1188dea75388/Makefile#L1001

or doesn't it?

edit

arter97-kernel-r12-20191028.img-ramdisk.gz: LZ4 compressed data (v0.1-v0.9)

Wow, well, the version listed here is definitely not using the default that is listed in github: https://arter97.com/browse/aura/kernel/r12/

@osm0sis arter97 uses gzip by default: https://github.com/arter97/android_kernel_razer_sdm845/blob/bb0989d65ff5466515a336e1e98f1188dea75388/Makefile#L1001

or doesn't it?

I unpacked r12 myself and the ramdisk is lz4_legacy.

Wait for the fix in the next release.

Yep, I checked it, see my edit above, apologies...

Will give it a try once the canary build with the commit becomes available.

Just as @osm0sis mentioned, lz4_legacy format should be fixed. The latest canary build has that commit included, please check it out!

Confirmed. The latest canary (20202) works. System boots, and TWRP is working.

The flashing process correctly recognized the environment as "Magisk patched boot image", and Magisk manager correctly reported the build 20202 has been installed.

Many thanks! :-)

So if i try and install it from the manager will it work ?
or should i wait until the fix is pushed as an update to the manager ?

So if i try and install it from the manager will it work ?
or should i wait until the fix is pushed as an update to the manager ?

You need to obtain the latest Magisk canary build here and flash from recovery (If you already flashed v20.2 stable which had the issue, you'll probably want to flash the original kernel image first so you can enter recovery).

Or you can manually set your Magisk manager to use the Canary channel, and it'll automatically become available as an update. However, you need to choose Custom channel and type the canary debug/release json path manually if you're on Stable.

Can any of you guys confirm this is still working in the latest Canary?

My Razer Phone 2 is currently running fine on 20419 canary (manager build 291) with arter97's r14 kernel.

Was this page helpful?
0 / 5 - 0 ratings