[Asus Zenfone 5Z  Guides, News, & Discussion] isthisadagger:
Warning - USE THIS GUIDE AT YOUR OWN RISK. I AM NOT RESPONSIBLE IF YOU END UP BRICKING YOUR DEVICE.

[Update 29.08.2019] Added new download locations for raw images

[Update 07.01.2019] Added more current raw image for ZS620KL WW 80.30.96.111

[Update 25.10.2018] Added raw image for ZS621KL.

[Update 09.08.2018] Updated for 80.11.37.95 and future versions.

[Update 20.07.2018] I was able to root FW 80.11.37.86 with Magisk Manager 5.8.3 so you are no longer locked to FW 80.11.37.69 and do not have to downgrade.

This guide is split into two sections: rooting and downgrade/unbrick.

Each section is split into a quick how to for experienced users and a more detailed guide.

General info:

The most current firmware as of 20.07.18 is 80.11.37.86. Newer versions will work too!

This guide is written for firmware 80.11.37.86. If you do not want to upgrade/downgrade to 80.11.37.86 you will need to use the firmware (zip file from ASUS) you are on in all the steps.

If you upgrade your firmware to a newer version AFTER rooting it you will lose root! You will need to patch the boot.img of the new firmware again > follow the rooting guide.

I have only tested this on my ZS620KL Z01RD WW version. It should work on other variants JP/RU.

Magisk hide is working and Safetynet check passes.

Bugs/problems:

Unlocking the bootloader will void your warranty! Currently there is no method known to relock it!

You will get a warning message about your unlocked bootloader at every boot.

You will no longer receive OTA updates but you can download the new firmwares directly from Asus.

You will get a warning message about an internal problem every boot. Which you can disable if you do not need write access to the vendor partition.

> see rooting guide 10.

[Downloads]

for rooting

The latest and official platform tools (adb/fastboot) directly from google.

https://dl.google.com/android/repository/platform-tools-latest-windows.zip

Payload_dumper to extract the boot.img from the firmware:

https://androidfilehost.com/?fid=818070582850510260

Magisk Manager:

https://xdaforums.com/apps/magisk/official-magisk-v7-universal-systemless-t3473445

The bootloader unlock app and the 80.11.37.86 firmware for your device (WW/RU/JP) from ASUS:

https://www.asus.com/Phone/ZenFone-5Z-ZS620KL/HelpDesk_Download/

for downgrade/unbrick

raw firmware (ZS620KL WW):

WW 80.10.8.54

https://www.androidfilehost.com/?fid=1899786940962570681

https://mega.nz/#F!2fIgmAoa!2q4ra3R1Cp0fyKZDYdVMwg

WW 80.30.96.111

https://www.androidfilehost.com/?fid=1899786940962570682

https://drive.google.com/file/d/16OgxiPFSDJwhitnqJaITuO-XPOrg_7q9/view

https://mega.nz/#F!2fIgmAoa!2q4ra3R1Cp0fyKZDYdVMwg

Confirmed working by amscova.

raw firmware (ZS621KL):

https://addrom.com/raw-rom-unbrick-for-asus-zenfone-5z-zs621kl/

https://www.androidfilehost.com/?fid=1899786940962570680

https://mega.nz/#F!2fIgmAoa!2q4ra3R1Cp0fyKZDYdVMwg

Confirmed working by B Nath.

[Rooting how to]

Upgrade to firmware 80.11.37.86 and enable usb debugging.

Unlock your bootloader with the app.

Extract boot.img from firmware using payload_dumper.

Patch boot.img with magisk manager.

fastboot flash boot patched_boot.img.

Enjoy root.

[Rooting guide]

You can root any firmware from 80.11.37.86 up with this guide. To upgrade to a newer firmware version copy the zip file (e.g. UL-Z01R-WW-80.11.37.86-user.zip) you downloaded from Asus

to the root of your phones internal memory and reboot or unplug your usb cable.

You will get an update found notification. Start the update. To downgrade check the downgrade guide below.

Enable usb debugging in System > Developer options. If you can not see System > Developer options go to System > About phone > Software information > Build number and tap it multiple times.

This will make the Developer options visible.

WARNING! Upgrading to some firmwares disables usb debugging and you need to enable it again.

Make a backup of all the data you do not want to lose.

Download the platform tools and extract them into a folder (i will use c:\5z\ in this guide) this will create a subfolder platform-tools.

You need a current fastboot version for this to work (due to a/b slots/partitions), so please use the current platformtools!

Download the bootloader unlock app, extract the UnlockTool_9.1.0.3_180621_fulldpi_Draco_GDPR.apk and copy it to your phone.

Use a filemanager on your phone to install it and follow the on screen instructions to unlock the bootloader.

WARNING! You will lose your warranty and all data on the phone so backup beforehand. You will see the first warning message at boot after this. There is currently no method know to relock the bootloader.

Download payload_dumper and extract it to c:\5z\. A payload_dumper-win64 folder will be created.

Download the firmware zip of the version you have on your phone and extract payload.bin from the zip to c:\5z\payload_dumper-win64\payload_input\ folder.

Start c:\5z\payload_dumper-win64\payload_dumper.exe and let it finish. Now copy the c:\5z\payload_dumper-win64\payload_output\boot.img to your phone (i will use the download folder).

Download Magisk Manager, copy the apk to your phone and use a filemanager on your phone to install it. Start the app and update it if you are asked.

When you are asked if you want to install Magisk > install. Select Method > Patch Boot Image File. Now select the boot.img in the download folder and let it finish patching.

Copy the patched_boot.img from the MagiskManager folder on your phone to c:\5z\platform-tools\

Start your phone in fastboot mode. To do that press and hold "power+volume up" to switch it on until you see the fastboot menu. If you are having trouble getting there,

it helps to release the power button first then the volume up when you see the menu.

Now connect the phone to your computer with the original usb cable. Open a command line with admin privileges and excute the following commands:

To switch to the fastboot dir:

cd c:\5z\platform-tools\

To check if your phone has been found:

fastboot devices

You should see the serial number of your phone.

Now flashing the patched boot image:

fastboot flash boot patched_boot.img

The output should look something like this:

target reported max download size of 268435456 bytes

sending 'boot' (18724 KB)...

OKAY [ 0.620s]

writing 'boot_a'...

OKAY [ 0.133s]

finished. total time: 0.756s

And the reboot:

fastboot reboot

Your phone should be booting now and you will see the second warning message "There is an internal problem with your device...".

If you want to get rid of that warning and do not need write access to your vendor partition (you most likely do not):

Open Magisk Manager and in the main screen press Uninstall > Restore Images to restore the images, check Preserve AVB 2.0/dm-verity checkbox in "Advanced Settings" on the main screen, then reinstall Magisk by pressing Install > direct install in the main screen.

Should you be stuck in the Zenfone boot animation or something went wrong, you will need to follow the steps in the unbrick section.

Otherwise your phone is rooted now. Enjoy.

[Downgrade/unbrick how to]

Download and extract the raw firmware.

With the phone in fastboot mode execute flashall_aft.cmd in the extraction folder.

You are now downgraded/unbricked with firmware 80.10.8.54.

Copy firmware version of your choice to internal sd card root and reboot/unplug usb cable to get "update notification".

Start the update to selected firmware from the "update found" notification.

[Downgrade/unbrick guide]

If you need to downgrade the firmware or if you have somehow bricked your device you can try to flash a raw (full) image of the phone.

Download and extract the raw firmware to c:\5z\raw.

If the download link is no longer working google for WW__ZS620KL_80.10.8.54_MP_user_20180517175955_release.zip and download it.

Start your phone in fastboot mode. To do that press and hold "power+volume up" to switch it on until you see the fastboot menu. If you are having trouble getting there,

it helps to release the power button first then the volume up when you see the menu.

Now connect the phone to your computer with the original usb cable. Open a command line with admin privileges and excute the following commands:

To switch to the fastboot dir:

cd c:\5z\raw

To flash the raw image:

flashall_aft.cmd

This will take a few minutes and the phone will reboot automatically. The first boot will take a little longer but your phone should now be unbricked and downgraded to 80.10.8.54.

You can now go to the root section of the guide and upgrade to a more current firmware.

Thanks to Renaf2 for his ZE620KL guide, GSPD and amscova for providing the ZS620KL raw image links and B Nath for finding the ZS621KL raw image.