[Xperia Z5 Compact General] nlra:
I'm having a hard time following the "drama" in this thread, so hopefully I'm not running afoul of something that is well-covered ground.

HOWEVER...

...I can tell you that although upgrading to Magisk 13.3 the way you describe may have worked for you on the latest official Sony Nougat release, it did not work for me on Lollipop (32.0.A.6.200). Yeah, yeah, I know, it's an old release...spare me. Point being that people choosing to run other versions of stock Sony software on their Z5-family devices may not necessarily have success. (Haven't tried Marshmallow yet; intend to do so at some point, hopefully sooner vs. later.)

In an effort not to get yelled at for not reading things, let me outline exactly what I can tell you:

I'm running a custom-built LP kernel compiled from Sony "copyleft" sources that is otherwise stock, but with SafetyNet patches applied.

The kernel's ramdisk has also been patched and repacked by tobias' excellent script to disable dm-verity and Sony-RIC.

I saved my DRM keys before unlocking the bootloader, re-packaged them up into an FTF with flash_dk, and re-flashed them to the TA partition. Along with the drmfix applied, Sony firmware is content that my phone is locked/stock and DRM keys are intact.

As long as the phone is not rooted (SuperSU, Magisk, etc.) it passes all SafetyNet checks.

I have no problems installing and using Magisk 12.0 along with Manager 4.3.3...those work just fine. But of course they no longer pass SafetyNet checks ever since the latest Google Play Services update.

Given all of this, if I either...

...first upgrade my Manager APK to 5.1.1 from 4.3.3, then set "Mount namespace mode" to "All root sessions use the global mount namespace", then allow Manager to download and upgrade Magisk in the boot partition's ramdisk to 13.3 from 12.0, OR...

...uninstall the Manager 4.3.3 APK, boot to TWRP, "install" the Magisk uninstall ZIP file, then (for extra-good measure) re-flash my boot partition with a known-clean image that has NO TRACE of Magisk anywhere, reboot again into TWRP, and finally install Magisk 13.3 ZIP onto a device that is now absolutely clean of Magisk, boot the main system back up, and finally install the 5.1.1 Manager APK...

...I get the exact same result, which is that Manager says I am not rooted and that it doesn't detect that Magisk is installed, even though both paths to installing Magisk 13.3 (the upgrade path or the absolutely clean install path) threw zero (0) errors during the install process. Furthermore, if I either bring up an ADB shell to my phone, or fire up Terminal Emulator, there is no 'su' binary to be found. (I suspect it actually does exist in the initramfs under /sbin after installation/patching, but that /sbin remains unreadable.)

Since these symptoms are exactly the same as what others who are simply trying to install Magisk 13.x against a completely stock Sony boot image are reporting again and again and again and Again and AGAIN, it would seem that there is something elemental about the way that the Xperia kernel ramdisks are put together that is causing this issue, and that this will likely have to be addressed by [MENTION=4470081]topjohnwu[/MENTION] himself. Since it would seem that this problem started with 13.1, I'd guess you are even correct about the entry in the changelog re: "Unlock all block devices for read-write support".

But as things stand, unless I'm missing something extremely basic here, it looks like it is not possible for all Xperia owners to bypass this issue at this time. I would love to be proven wrong.

-- Nathan