[ZTE Axon 10 Pro Guides, News, & Discussion] willwongprd:
My phone is A2020G, so the ROM version of the following instructions is for G only, but you can still try on A2020U (just notice the Android version).

I once flashed Magisk through TWRP on stock Pie ROM but caused freeze at the boot screen, even the same while patching the boot image. However, now I found that if you are at stock Q and R version, you can now successfully install Magisk by patching boot images.

The only problem is that there is no TWRP for the two versions of stock ROM (since the recovery was made into boot image), so be careful while installing modules.

My method is to use Axon 10 EDL Tool. Fastboot mode is unavailable for stock Pie and Q Bootloader, while R can but this fastboot cannot flash images. So we need to use the patched bootloader of EDL Tool to access the fastboot and flash the patched boot images, then recover to the original bootloader so it can boot the system (The patched bootloader of EDL Tool can only boot stock Pie ROM).

Before proceeding:

Make sure you have updated to at least stock Q version and unlocked bootloader.

If you have not unlocked at Q or R, you can still proceed unlocking. The program will auto backup your current bootloader, however the patched bootloader cannot boot stock Q and R. So following these instructions:

1.Turn on the Developer Options and turn on OEM unlocking, remove your Google Account and lock screen passwords cause it will ask you to login after wiping because of FRP.

2.Boot into EDL Mode (If the phone is off, hold on pressing Vol+ and Vol- and then connect the cable; If the phone is on, connect the cable, then hold on pressing two Volume buttons and then press the power button for about 10 sec and the phone will automatically reboot)

3.Execute the EDL Tool with administrator rights.

4.Choose Unlock-Unlock bootloader

5.Follow the instructions, when the program has flashed (not backup) patched bootloader (Display "DONE", ask you to press any key), hit enter, and your phone will reboot immediately. When your phone vibrates, press both of the Vol+ and Vol- button immediately to boot into fastboot. (If you press in advance you will boot into EDL mode)

6.Open Command Prompt, use the fastboot.exe of the EDL Tool to proceed this command line:

fastboot flashing unlock

or just drag the program into CMD, like this:

D:\Axon10Pro_EDL_Tool\tools\fastboot.exe flashing unlock

7.Your phone will display the unlock warning, use volume button to select Yes and press power button to confirm.

8.After pressing power button (keep the cable connecting), press the two volume button immediately to boot into EDL mode, open the EDL Tool again and Restore bootloader from backup.

9.While restoring completed, reboot and hold on pressing Vol+ button to boot into recovery, the phone will automatically erase data and unlocking is done.

After unlocked:

1.Use djkuz's Axon 10 EDL Tool

2.Backup your boot image.

3.Copy your boot image to your phone and install Magisk Application.

4.Patch the two boot images (a/b), and remember the filename of the patched a and b boot.

5.Copy the patched boot images to your computer.

6.Use the EDL Tool to proceed unlocking, follow step 5 above to boot into fastboot.

7.Use the fastboot.exe of EDL Tool to flash patched boot images:

fastboot flash boot_a pta.img
fastboot flash boot_b ptb.img

(pta, ptb is the filename of your patched boot image)

8.Use volume button to select the green "START" and hit power button to reboot.

9.Follow step 8 above to recover bootloader, and you are done.

Problems:

Cannot use the default "Files" application to install local modules in stock R ROM cause it will possibly crash, so you have to install a third-party file manager application (like Root Explorer) to select modules. (When it open "Files" app, click the menu icon of the left side and select your installed file manager, then select modules to install)

Notes:

I can't find a way of checking which slot(A/B) of the phone has been on without using recovery, so I have to patch the two bootloaders. If you know, then you can patch and flash only that one.

I don't know if you can update to stock Q while unlocked at Pie when I saw this thread, but you can still upgrade to stock R while unlocked and installed Magisk at Q (V2.8). Just remember not to reboot immediately after you installed the upgrade, use the Magisk Application to install to another slot and then reboot.

Hope you enjoy~

Thanks to djkuz for developing the EDL Tool