[Huawei P9 Guides, News, & Discussion] Tecalote:
Root with any version of Magisk (flashing with TWRP)

A) Preparation

1. step (just in case): First make sure, you have not during experiments with Canary Builds (or random named Magisk Manager) - two Magisk Manager in data/app.

So open Root Explorer (like MixPlorer) and go to /data/app and look to all installed apps. Search for the folder "com.topjohnwu.magisk-xxxx==" this is okay, but if there is any other MagiskManager randomely named - you must find out, which one you are actually using, when you open Magisk Manager. Check settings of Magisk Manager (menu above left /settings) and make sure, Magisk Manager itself is not hidden in this settings (if it is hidden, restore normal Magisk Manager without random name and reboot phone) - Now there should be only one Magisk Manager in /data/app → in case there are still two (backup the apk files on external sd - propably they are the same?) delete both Magisk folders in /data/app, reboot phone and install the apk (which you had backup)

2. step: Open Magisk Manager and click on "Uninstall" - "Complete Uninstall" Magisk Manager should download the uninstall.zip in the Background and will flash this automatically. After that the phone reboot by itself and Magisk is uninstalled. → Check after reboot, if Magisk is clean uninstalled.

3. step (just in case): If phone would not boot - boot to Fastboot Mode and flash the right ramdisk.img (not recovery_ramdisk!!) for your current firmware (I guess you have b540) - can be found here: https://www.androidfilehost.com/?fid=1395089523397898709

B) With following method you can flash any stable Magisk version with TWRP:

1) Download the favorite Magisk version from here (all releases): https://github.com/topjohnwu/Magisk/releases

The actual and newest stable version you can get always from here too: https://xdaforums.com/apps/magisk/official-magisk-v7-universal-systemless-t3473445

- for example, if you want to flash the older version 17.3 → you can use Magisk Manager 6.1.0 (Magisk Manager 7.0.x is only up Magisk v18.x)

→ Following steps can be done with any new Version of Magisk

2) Copy the flashable Magisk-vXX.zip and Magisk Manager apk to external SD

3) Reboot device to TWRP, cancle Password, allow system-modification (swipe to confirm)

4) On the main menu go first to "Mount" - down left click on "Select storage" and choose "Micro SD"

5) Go back to main menu and open "Advanced" and in there open "Terminal"

Before the next step remember: did you have installed b540 Firmware Patch02 before flashing NetworkPatch? (because after NetworkPatch, you will not see this in "About phone") If you dont remember, then use both Lines in Terminal, but if you are sure, you have only b540 without Patch02, then use just "Keep Forceencrypt" Line

6) Write following code with Terminal:

echo KEEPVERITY=true>>/cache/.magisk
echo KEEPFORCEENCRYPT=true>>/cache/.magisk

→ Confirm one Line with blue/white checkmark on keyboard, before writing the next Line and confirm also the second Line (if you use two)

7) Go back to the main menu to "Install" and flash Magisk - after that reboot phone without wipe of Dalvik/Cache!

8) Search for Magisk Manager on Homescreen - if it is not installed, just install the Magisk Manager apk

9) Open Magisk Manager

(if you like to use an older version of Magisk - do not install the Update for Magisk Manager) → everything should be okay (you can use menu for superuser etc...)

10) Install Safetynet-Check apk and check safetynet → everything should be okay.

11) Notes:

→ Older versions of Magisk has not automatically enabled permission for storage for Magisk Manager → Open normal settings /apps & notifications /Magisk Manager /permissions and enable permission for storage.

If your previous installation was Magisk 18.1 with Magisk Manager 7.0.x - and you would use now a older Magisk Version with Manager 6.1.x - older Magisk Manager is not able to check safetynet backwards. But this is not really a problem, if you use safetynet check apk.

→ (all versions of) Magisk can work better, if you have enabled in Developer Options 1) ADB Debugging 2) USB Debugging (it does not stay enabled, without enabling first ADB Debugging)