[ZE620KL/Android 9][TREBLE] COMPLETE GUIDE: Unlocking, Rooting & Flash GSI + Fixes

Search This thread

Conobipe

Member
Jun 26, 2019
5
5
[ZE620KL/Android 9][TREBLE] COMPLETE GUIDE: Unlocking, Rooting & Flash GSI + Fixes



Unlocking bootloader to Flashing GSI (Asus Zenfone 5 [ZE620KL] / Android 9.0)

Code:
/*
 * Your warranty is now void.
 *
 * I am not responsible for bricked devices, dead SD cards,
 * thermonuclear war, or you getting fired because the alarm app failed. Please
 * do some research if you have any concerns about features included in this ROM
 * before flashing it! YOU are choosing to make these modifications, and if
 * you point the finger at me for messing up your device, I will laugh at you.
 */

About :
The last guide could leads to soft brick, as the instructions were not clear nor the files not supported for Android 9.0.
Here is a complete guide with TWRP 3.3.0 for Android 9.0, clear instructions and multiple fixes for GSI.
It has been tested on stock version v16.0615.1903.92.

Requirements :
- A stock version V16.0610.XXXX.XX or higher
- A phone on Android 9.0 (not 8.0!)
- A fully working USB cable
- Latest ADB / Fastboot drivers
- Bootloader unlocker (download latest from Asus website or from here)
- TWRP 3.3.0 image
- Android9EncryptionDisablerZE620KL.zip
- Magisk v19.3

Instructions :

Unlocking Bootloader
1. Backup all your important data.
2. Install the bootloader unlocker APK, and follow the steps. You will loss your warranty here, and it will factory reset your data
3. If there is any issue here, go into your stock recovery (volume down + power button) and factory reset.​

Installing TWRP
4. Shutdown your device & boot in fastboot mode using volume up + power button.
5. Check that the connection between your device and your computer by typing this in your command line :
Code:
fastboot devices
6. Flash TWRP recovery using :
Code:
fastboot flash recovery <twrp_name>.img
7. Now reboot in recovery mode using :
Code:
fastboot oem reboot-recovery
8. In TWRP, select Wipe > Format Data > enter "yes" and confirm
9. Return to the main menu, select Reboot > Recovery
10. Do 8. & 9. and again
11. Using TWRP or ADB, install Android9EncryptionDisablerZE620KL.zip (on TWRP, go into Install > find Android9EncryptionDisablerZE620KL.zip > Install zip)

If everything has gone successfully, you now have a custom recovery.
As for some GSIs, a patched boot partition may cause bootloop, you should try installing Magisk after installing the GSI. If you want to keep your stock ROM, go directly to "Magisk Installation" section.
Installing a GSI

This step may vary depending on the different GSIs distribution. I assume you install Havoc OS v2.7 GSI which actually works on this device.
1. Backup all your important data using TWRP backup.
2. Select the arm64-aonly GSI image you want, and move it on your external SD.
3. Wipe Data, Dalvik, and Cache.
4. Go back in the main menu of TWRP, and reboot to recovery.
5. Remove Magisk if it was previously installed, by using its uninstaller script.
6. Flash the GSI to system partition.
7. Boot and perform a factory reset.​

Installing Magisk
1. Add the Magisk zip archive to your external storage.
2. Boot into TWRP recovery, and install the zip.
3. Enjoy!​

Bug fixes:
Insufficient storage in the system partition to flash GApps : Download your OpenGApps archive on your external SD, and use MagicGApps 2018.9.23 to install GApps.

Auto-Brightness doesn't work: Download framework-res__auto_generated_rro.apk from here.
Using a root explorer or command-line, push the APK to /vendor/overlay.
Then run the following command in a rooted terminal or ADB shell:
Code:
chcon u:object_r:vendor_overlay_file:s0 /vendor/overlay;chcon u:object_r:vendor_overlay_file:s0 /vendor/overlay/framework-res__auto_generated_rro.apk

My camera doesn't work well (green tint on face camera) and/or the app doesn't boot: If Asus Camera doesn't launch on your GSI, you should probably edit your /system/build.prob file.
You need to edit ro.product.model, ro.product.brand, ro.product.name, ro.product.device, ro.product.manufacturer & ro.build.product properties to be:
Code:
ro.product.model=ASUS_X00QD
ro.product.brand=asus
ro.product.name=WW_Phone
ro.product.device=ASUS_X00QD
ro.product.manufacturer=asus
ro.build.product=ZE620KL

You can instead use Google Camera mod (port from Arnova8G2 & modded by 5Z community, thanks to them!), which works well (edit: there is a bug on HavocOS, we can't access settings).
Bonus:
- You can reinstall DTS Headphone:X here.
- For booting your kernel in Permissive mode, check here

Sources:
TWRP 3.3.0 : On GitHub

If you need help or if you want to help on ZE620KL development go here:
https://t.me/Zenfone5Dev

(We will continue to update & help here though.)

Many thanks to all of the Zenfone 5 community (particularly Emincan, Pandolfi and Lmajkej),
Phhusson & Erfan for their works on GSI, and Shakalaca for its work on TWRP 3.3.0!
 
Last edited:

Conobipe

Member
Jun 26, 2019
5
5
On HavocOS v2.8 GSI (13-08-2019):

It works:
- Almost anything
- Adaptive Brightness (after manual fix)
- Notch overlay
- DTS Headphone X (after manual installation)
- NFC
- Face unlock
- Stock camera (after manual fix)
- Magisk
- SDcard access

It doesn't works:
- VoLTE / VoWifi
- Google Camera settings
- External speaker amplifier (NXP amp)
- APT-X / APT-X HD bluetooth
- Low microphone in normal use
- No microphone in calls (only headphone microphone works)
 
Last edited:
  • Like
Reactions: tombbb

Jolo110

Member
Sep 2, 2018
5
0
Samsung Galaxy S22
Hi thanks for this tutorial, this is my first time rooting my phone. I'm encountering a problem with my sd card after installing havoc os, everytime i try to move, save or any write functionality i do to my sd card, it always says the android version isn't compatible. I could still see my files from my sd, but everytime it asks permission it always say this
 

Conobipe

Member
Jun 26, 2019
5
5
But my google camera keep crashing when I want to go into camera settings
Same issue here. I will update the thread when I will find a more working GCam port (perhaps, this GCam port works well on ZenUI)

Hi thanks for this tutorial, this is my first time rooting my phone. I'm encountering a problem with my sd card after installing havoc os, everytime i try to move, save or any write functionality i do to my sd card, it always says the android version isn't compatible. I could still see my files from my sd, but every time it asks permission it always say this
It's a known issue, the GSI maintainer @vince31fr is working on it. I don't have it, but I can advice you to use Solid File Manager, which works like a charm on my device.
 
  • Like
Reactions: Jolo110

Ashenphoenix

Senior Member
Dec 19, 2010
103
49
Budapest
hearthstonehungary.hu
"- No microphone in calls (only headphone microphone works)"
Funny... I'm on stock latest firmware and I have this issue, so I thought I try something new, and this has that issue. It can't be a coincidence. Something is ****ed up with this device.
 

cf100clunk

Member
Dec 19, 2016
12
2
Thanks for the great instructions! Steps 1 through 11 worked perfectly for me, then I installed LineageOS (lineage-17.0-20191231-UNOFFICIAL-treble_arm64_avN.img) and it works properly. Then when I go back to TWRP and install Magisk v20.1 it reboots into an endless Lineage bootup logo animation (not boot loop). I can get an adb shell, but now also the external SD card has become invisible. Any suggestions?

UPDATE: I switched over to the patched Magisk version from PHH (https://forum.xda-developers.com/zenfone-5/general/ze620kl-add-support-to-evey-android-9-t3966918) and everything works perfectly now!
 
Last edited:
  • Like
Reactions: tombbb
Aug 28, 2017
25
8
Hi!! I thanks for these instructions you gave. I know this post is a bit older. But is the only one I think could help me.

I got an ZE620KL and I'm trying to root this device. I have some experience in unlocking bootloader and rooting devices. But this one... Is giving me a lot of work. Researching in a lot of forums and websites I tried a lot of things with no success. In theory, is just install the official apk provided by ASUS and run the application. But the app doesn't work for a long time as I researched (error accusing network problem). I tried unlock via fastboot commands but I always got stucked by "remote: permission denied" even with latest drivers and ADB Fastboot installed. And yes... I let my device with no one security feature enabled and didn't worked. I tried everything even after wiped data / cache and factory reset and no progress.

In my researches, I realized something about 'oem unlock'. It appears to be the key to solve this. And I guess the tool to work with this is the damn unlock tool from ASUS which don't work! Also, I've heard about workaround with Magisk by flashing a custom recovery to achieve the root. Magisk no longer supports zip files to flash. Only '.img' and '.tar' files. I'd like to find some light here... I don't know what to do. I appreciate any help!
 
  • Like
Reactions: tombbb

Milouz57

Member
Oct 7, 2012
37
1
Hello do I need to flash Android9EncryptionDisablerZE620KL.zip if Im gonna flash a non-GSI custom ROM? Or its only for GSI Treble ROM?
 

jioleight

Senior Member
Feb 18, 2011
650
128
CEBU CITY
Hi!! I thanks for these instructions you gave. I know this post is a bit older. But is the only one I think could help me.

I got an ZE620KL and I'm trying to root this device. I have some experience in unlocking bootloader and rooting devices. But this one... Is giving me a lot of work. Researching in a lot of forums and websites I tried a lot of things with no success. In theory, is just install the official apk provided by ASUS and run the application. But the app doesn't work for a long time as I researched (error accusing network problem). I tried unlock via fastboot commands but I always got stucked by "remote: permission denied" even with latest drivers and ADB Fastboot installed. And yes... I let my device with no one security feature enabled and didn't worked. I tried everything even after wiped data / cache and factory reset and no progress.

In my researches, I realized something about 'oem unlock'. It appears to be the key to solve this. And I guess the tool to work with this is the damn unlock tool from ASUS which don't work! Also, I've heard about workaround with Magisk by flashing a custom recovery to achieve the root. Magisk no longer supports zip files to flash. Only '.img' and '.tar' files. I'd like to find some light here... I don't know what to do. I appreciate any help!
Im not sure if you still have your phone or you have successfully unlocked bl. but I found an updated version of their tool which works.

*tried unlocking from android 10 not working, it says device model not supported*

Zenfone 5 Unlock BL
 
Last edited:

B123292179

New member
Sep 1, 2014
1
0
Thanks for the great instructions! Steps 1 through 11 worked perfectly for me, then I installed LineageOS (lineage-17.0-20191231-UNOFFICIAL-treble_arm64_avN.img) and it works properly. Then when I go back to TWRP and install Magisk v20.1 it reboots into an endless Lineage bootup logo animation (not boot loop). I can get an adb shell, but now also the external SD card has become invisible. Any suggestions?

UPDATE: I switched over to the patched Magisk version from PHH (https://forum.xda-developers.com/zenfone-5/general/ze620kl-add-support-to-evey-android-9-t3966918) and everything works perfectly now!
Do you still have the patched Magisk zip file, the original link in the post seems not working :(
 

Top Liked Posts

  • There are no posts matching your filters.
  • 3
    [ZE620KL/Android 9][TREBLE] COMPLETE GUIDE: Unlocking, Rooting & Flash GSI + Fixes



    Unlocking bootloader to Flashing GSI (Asus Zenfone 5 [ZE620KL] / Android 9.0)

    Code:
    /*
     * Your warranty is now void.
     *
     * I am not responsible for bricked devices, dead SD cards,
     * thermonuclear war, or you getting fired because the alarm app failed. Please
     * do some research if you have any concerns about features included in this ROM
     * before flashing it! YOU are choosing to make these modifications, and if
     * you point the finger at me for messing up your device, I will laugh at you.
     */

    About :
    The last guide could leads to soft brick, as the instructions were not clear nor the files not supported for Android 9.0.
    Here is a complete guide with TWRP 3.3.0 for Android 9.0, clear instructions and multiple fixes for GSI.
    It has been tested on stock version v16.0615.1903.92.

    Requirements :
    - A stock version V16.0610.XXXX.XX or higher
    - A phone on Android 9.0 (not 8.0!)
    - A fully working USB cable
    - Latest ADB / Fastboot drivers
    - Bootloader unlocker (download latest from Asus website or from here)
    - TWRP 3.3.0 image
    - Android9EncryptionDisablerZE620KL.zip
    - Magisk v19.3

    Instructions :

    Unlocking Bootloader
    1. Backup all your important data.
    2. Install the bootloader unlocker APK, and follow the steps. You will loss your warranty here, and it will factory reset your data
    3. If there is any issue here, go into your stock recovery (volume down + power button) and factory reset.​

    Installing TWRP
    4. Shutdown your device & boot in fastboot mode using volume up + power button.
    5. Check that the connection between your device and your computer by typing this in your command line :
    Code:
    fastboot devices
    6. Flash TWRP recovery using :
    Code:
    fastboot flash recovery <twrp_name>.img
    7. Now reboot in recovery mode using :
    Code:
    fastboot oem reboot-recovery
    8. In TWRP, select Wipe > Format Data > enter "yes" and confirm
    9. Return to the main menu, select Reboot > Recovery
    10. Do 8. & 9. and again
    11. Using TWRP or ADB, install Android9EncryptionDisablerZE620KL.zip (on TWRP, go into Install > find Android9EncryptionDisablerZE620KL.zip > Install zip)

    If everything has gone successfully, you now have a custom recovery.
    As for some GSIs, a patched boot partition may cause bootloop, you should try installing Magisk after installing the GSI. If you want to keep your stock ROM, go directly to "Magisk Installation" section.
    Installing a GSI

    This step may vary depending on the different GSIs distribution. I assume you install Havoc OS v2.7 GSI which actually works on this device.
    1. Backup all your important data using TWRP backup.
    2. Select the arm64-aonly GSI image you want, and move it on your external SD.
    3. Wipe Data, Dalvik, and Cache.
    4. Go back in the main menu of TWRP, and reboot to recovery.
    5. Remove Magisk if it was previously installed, by using its uninstaller script.
    6. Flash the GSI to system partition.
    7. Boot and perform a factory reset.​

    Installing Magisk
    1. Add the Magisk zip archive to your external storage.
    2. Boot into TWRP recovery, and install the zip.
    3. Enjoy!​

    Bug fixes:
    Insufficient storage in the system partition to flash GApps : Download your OpenGApps archive on your external SD, and use MagicGApps 2018.9.23 to install GApps.

    Auto-Brightness doesn't work: Download framework-res__auto_generated_rro.apk from here.
    Using a root explorer or command-line, push the APK to /vendor/overlay.
    Then run the following command in a rooted terminal or ADB shell:
    Code:
    chcon u:object_r:vendor_overlay_file:s0 /vendor/overlay;chcon u:object_r:vendor_overlay_file:s0 /vendor/overlay/framework-res__auto_generated_rro.apk

    My camera doesn't work well (green tint on face camera) and/or the app doesn't boot: If Asus Camera doesn't launch on your GSI, you should probably edit your /system/build.prob file.
    You need to edit ro.product.model, ro.product.brand, ro.product.name, ro.product.device, ro.product.manufacturer & ro.build.product properties to be:
    Code:
    ro.product.model=ASUS_X00QD
    ro.product.brand=asus
    ro.product.name=WW_Phone
    ro.product.device=ASUS_X00QD
    ro.product.manufacturer=asus
    ro.build.product=ZE620KL

    You can instead use Google Camera mod (port from Arnova8G2 & modded by 5Z community, thanks to them!), which works well (edit: there is a bug on HavocOS, we can't access settings).
    Bonus:
    - You can reinstall DTS Headphone:X here.
    - For booting your kernel in Permissive mode, check here

    Sources:
    TWRP 3.3.0 : On GitHub

    If you need help or if you want to help on ZE620KL development go here:
    https://t.me/Zenfone5Dev

    (We will continue to update & help here though.)

    Many thanks to all of the Zenfone 5 community (particularly Emincan, Pandolfi and Lmajkej),
    Phhusson & Erfan for their works on GSI, and Shakalaca for its work on TWRP 3.3.0!
    1
    On HavocOS v2.8 GSI (13-08-2019):

    It works:
    - Almost anything
    - Adaptive Brightness (after manual fix)
    - Notch overlay
    - DTS Headphone X (after manual installation)
    - NFC
    - Face unlock
    - Stock camera (after manual fix)
    - Magisk
    - SDcard access

    It doesn't works:
    - VoLTE / VoWifi
    - Google Camera settings
    - External speaker amplifier (NXP amp)
    - APT-X / APT-X HD bluetooth
    - Low microphone in normal use
    - No microphone in calls (only headphone microphone works)
    1
    But my google camera keep crashing when I want to go into camera settings
    Same issue here. I will update the thread when I will find a more working GCam port (perhaps, this GCam port works well on ZenUI)

    Hi thanks for this tutorial, this is my first time rooting my phone. I'm encountering a problem with my sd card after installing havoc os, everytime i try to move, save or any write functionality i do to my sd card, it always says the android version isn't compatible. I could still see my files from my sd, but every time it asks permission it always say this
    It's a known issue, the GSI maintainer @vince31fr is working on it. I don't have it, but I can advice you to use Solid File Manager, which works like a charm on my device.
    1
    Thanks for the great instructions! Steps 1 through 11 worked perfectly for me, then I installed LineageOS (lineage-17.0-20191231-UNOFFICIAL-treble_arm64_avN.img) and it works properly. Then when I go back to TWRP and install Magisk v20.1 it reboots into an endless Lineage bootup logo animation (not boot loop). I can get an adb shell, but now also the external SD card has become invisible. Any suggestions?

    UPDATE: I switched over to the patched Magisk version from PHH (https://forum.xda-developers.com/zenfone-5/general/ze620kl-add-support-to-evey-android-9-t3966918) and everything works perfectly now!
    1
    Hi!! I thanks for these instructions you gave. I know this post is a bit older. But is the only one I think could help me.

    I got an ZE620KL and I'm trying to root this device. I have some experience in unlocking bootloader and rooting devices. But this one... Is giving me a lot of work. Researching in a lot of forums and websites I tried a lot of things with no success. In theory, is just install the official apk provided by ASUS and run the application. But the app doesn't work for a long time as I researched (error accusing network problem). I tried unlock via fastboot commands but I always got stucked by "remote: permission denied" even with latest drivers and ADB Fastboot installed. And yes... I let my device with no one security feature enabled and didn't worked. I tried everything even after wiped data / cache and factory reset and no progress.

    In my researches, I realized something about 'oem unlock'. It appears to be the key to solve this. And I guess the tool to work with this is the damn unlock tool from ASUS which don't work! Also, I've heard about workaround with Magisk by flashing a custom recovery to achieve the root. Magisk no longer supports zip files to flash. Only '.img' and '.tar' files. I'd like to find some light here... I don't know what to do. I appreciate any help!