• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

Bootloader Unlock, Root, Xposed and TWRP On Asus Zenfone 2 (Android 5+)

Search This thread

Kapil Tapsi

Senior Member
Sep 16, 2014
570
1,501
New Delhi
Working On MM-WW-4.21.40.352 Z00A Z00AD And on Latest versions
MM-WW-4.21.40.327 Z00A Z00AD
MM-WW-4.21.40.223 Z00A Z00AD


Latest Stable Magisk : v16.3 Updated 28 March 2018. If there is update you will surely find it in telegram group. I don't visit xda much.

To download, Go to "Magisk" folder In download folder.
If you are using Magisk 12, Then first flash Magisk 12 uninstaller, then flash Latest Magisk from Twrp.
If Safetynet Fails, Then enable "Hide Magisk" in settings from magisk manager.
Warning:
  • Rooting voids warranty. Also If some damage occurs because of wrong steps taken by you, Neither me nor forum is responsible. Do at your Own risk. Though I'm sure If you follow the steps carefully you wont get problem.
  • Prefer to backup your device apps and data.
  • First read the post twice carefully then proceed.
  • I may change name of files in folder. Use common sense to identify them.

If you want to flash stock rom then visit here Flash Stock Rom Zenfone 2

Features:
  • Magisk ManagerNEW
  • MagiskLatest Warning: Never update magisk from the app. Flash the latest zip from here, otherwise you will get bootloop.
  • Systemless Xposed
  • TWRP Latest
  • UnRoot (Magisk SuperUser only)

Requirements:
1. Phone should be charged at least 60%.
2. Android USB Driver should be installed already, if it is not then install all drivers in the "Drivers Folder".
3. Enable USB Debugging.
For that go to "Settings" ,Scroll to bottom goto "about", goto "Software Information", tap "Build number" upto 7 times or till it
says "You are a developer now". Then go to "Settings" you will find "Developer Options", open it and enable "USB Debugging"

ALL .BAT FILES TO BE RUN IN FASTBOOT MODE ONLY, IF YOU DON'T KNOW ABOUT FASTBOOT MODE THEN GOOGLE "HOW TO GET FASTBOOT MODE IN ASUS ZENFONE 2.
"


There are two parts which should be followed precisely.
1. Unlock Bootloader and Install TWRP.
2. Root and Install Xposed*
*=Though Xposed is not necessary but Xposed is very helpful, so its your choice.

Part 1: Unlock Bootloader and Install TWRP.
Step 1: Connect your phone to PC, make sure usb debugging is "ON".
Step 2: Go to the folder and run "Bootloader Unlocker.bat" .
Wait for command to execute.
When you see "Unlock Successful" in your phone, your phone will shut down. Then keep hold Volume Up button on your phone until you see bootloader again. Then follow the instructions. If You Missed it, the close the application. Boot your phone into fastboot mode and try again..
Step 3: If you are in fastboot/bootloader mode then use "TWRP.bat" otherwise first go to fastboot/bootloader mode and then use "TWRP.bat"
It will install twrp. When you first go to twrp. Tick Always allow modifications.

Part 2: Root and Install Xposed
Step 1: Boot to fastboot mode.
Step 2: For rooting. First use "ROOT UNROOT MAGISK.bat", follow any given instruction in script.
Step 3: If you want Xposed, then use "XPOSED.bat" in fastboot mode and follow any instruction in script.
Step 4: Reboot to system.
Your phone may optimize for 5-10 minutes depending upon number of apps Installed.
YOUR PHONE SHOULD BE ROOTED NOW.

Unroot
Step 1: Boot to fastboot mode.
Step 2: For unrooting. First use "ROOT UNROOT MAGISK.bat", follow any given instruction in script for unroot.


For Any querry or doubt please ask. :D:confused:
Every Suggestion welcomed. Also you can join telegram group to get help and help others.

https://telegram.me/joinchat/ESGRD0Erde3o4dRPSzkBCQ

If the guide works for you or you want to thank me for development of tools then you can donate me via
Paypal paypal.me/KapilTapsi (You can donate any amount, It will be of great help)

FAQ
1. Stuck at white screen with asus logo?
Sol. a) White screen means you are unlocked (action of unlock.bat), so you may give a try to restore.bat in fastboot mode.
b) If you can go to recovery mode then you can go to previous state(before starting unlocking) by using adb command
First boot to recovery(it should be the stock one), you'll see dead android logo, keep pressing power -then vol up-then release vol up- now release power. (This should be quick, otherwise pressing power button for too long will shut you down)
When successfull, you'll see options, choose apply update from adb, and follow command
Code:
adb sideload mm.zip
You must rename the downloaded zip to mm.zip . Or you can replace mm.zip to xxxxxxxxxxx.zip (whatever the name of downloaded zip)
Warning Before that you must download same version full firmware from asus website Here

2. Having problems with device connection? like waiting for device.
Sol. Make sure you have enabled USB Debugging (Not applicable for BL Unlocking and TWRP Flashing)
Uninstall all drivers previously installed on computer(every driver of any device)
Reboot your computer. And then install all drivers given in the driver folder.
If the problem persists, try different computer and different usb cable.


3. Facing permission denied in fastboot mode or while running script files.
Sol. Try disabling your lock screen security to none.

4. Want to relock bootloader?
Sol. No possible way for now. The post will be updated if it ever comes.

5. Safetynet Failed?
Sol. 1. Have you enabled Magisk Hide in the settings of Magisk Manager? Try toggle to disable, and re-enable again.
2. If you are using SuperSU, you often need suhide, or maybe other solutions. Developer do not have control of how SuperSU behaves.
3. It might be due to xposed. Either you remove xposed or wait for future updates.

Download files from here
https://www.androidfilehost.com/?w=files&flid=273540 AFH Link
All Files in folder are not useful for this purpose, but are used for other purpose also. You can download them if you want.
File credits.
Giovix92
topjohnwu

Some tools are not made by me. This guide is genuine based on my experience.

Generous Donor(s):
1. Peter Fedorow (20 Canadian Dollar):good:
2. Nicola Roncari (20 Euro):good:
 

Attachments

  • Magisk-v16.3-ZF2-signed.zip
    5.4 MB · Views: 8,776
  • Magisk-uninstaller-20180328.zip
    2.6 MB · Views: 3,794
  • MagiskManager-v5.6.4.apk
    1.9 MB · Views: 4,735
Last edited:

aguywithaname

New member
Sep 6, 2016
3
3
Hi, in the 5th step, installing twrp does not seem to work and my computer cannot find my device (using adb devices computer cannot find the phone)

flash recovery twrp.img
target reported max download size of 536870912 bytes
sending 'recovery' (15316 KB)...
OKAY 0.686s
writing 'recovery'...
FAILED (remote: Permission denied)
finished. total time: 0.849s

---------- Post added at 11:11 PM ---------- Previous post was at 11:00 PM ----------

Hi, in
the 5th step, installing twrp does not seem to work and my computer cannot find my device (using adb devices computer cannot find the phone)

flash recovery twrp.img
target reported max download size of 536870912 bytes
sending 'recovery' (15316 KB)...
OKAY 0.686s
writing 'recovery'...
FAILED (remote: Permission denied)
finished. total time: 0.849s

Ah nevermind I found the solution to the problem. From bootloader mode all I had to do was boot into recovery and then I got into twrp. Thanks anyway.
 

Kapil Tapsi

Senior Member
Sep 16, 2014
570
1,501
New Delhi
Hi, in the 5th step, installing twrp does not seem to work and my computer cannot find my device (using adb devices computer cannot find the phone)

flash recovery twrp.img
target reported max download size of 536870912 bytes
sending 'recovery' (15316 KB)...
OKAY 0.686s
writing 'recovery'...
FAILED (remote: Permission denied)
finished. total time: 0.849s

---------- Post added at 11:11 PM ---------- Previous post was at 11:00 PM ----------



Ah nevermind I found the solution to the problem. From bootloader mode all I had to do was boot into recovery and then I got into twrp. Thanks anyway.
Thanks. Permission denied to write means bootloader is still locked
 

Kapil Tapsi

Senior Member
Sep 16, 2014
570
1,501
New Delhi
You bricked your phones 3 times, i also bricked mine can you tell me how to unbrick?? @Kapil Tapsi
Yes, But before that I need to know some things.
1. Your phone can be powered on(meaningless but still want to know.)
2. Can you reach bootloader.? I.e. fastboot mode.
3. Or you cannot see any bootloader while pressing volume + and power, but your phone is only showing asus logo.
 

shaza98

Member
Jul 18, 2015
21
0
Is there any way to access TWRP recovery after all is said and done? When ever I try to go into recovery via fastboot, it just takes me back to fastboot again.
 

Kapil Tapsi

Senior Member
Sep 16, 2014
570
1,501
New Delhi
Is there any way to access TWRP recovery after all is said and done? When ever I try to go into recovery via fastboot, it just takes me back to fastboot again.
Yes but you have to unlock bootloader again using unlock.bat and go to recovery menu flash whatever you want, reboot to bootloader again and run restore.bat.
 

dhogthag

Member
Feb 4, 2011
42
3
Metro Manila
Working guide as of 9/8/2016

I've been trying to root my Asus Zenfone 2 since the day Marshmallow Launched for it.
I bricked my phone 3 times. And finally I found true working process. I thought to share with you mates.

Rooting voids warranty. Also If some damage occurs because of wrong steps taken by you, Neither me nor forum is responsible. Do at your Own risk. Though Im sure If you follow the steps carefully you wont get problem.
Prefer to backup your device apps and data.

First read the post twice carefully then proceed.

There are two process which should be followed precisely.
1. Temporarily Unlock Bootloader.
2. Root and Install Xposed Installer*
*=Though Xposed is not necessary but Xposed is very helpful, so its your choice.
Download all Files given below

Step 1: Enable Usb Debugging
For that go to "Settings" ,Scroll to bottom goto "about", goto "Software Information", tap "Build number" upto 7 times or till it says
"You are a developer now". Connect phone to your computer via usb (Make sure you have Installed android drivers in your Pc, If not install pda.net from Here)
Step 2: Copy "Magisk-v6_repack_for_zf2_601.zip","phh-superuser-17-magisk-x86-fix.zip" and "xposed-v86.5-sdk23-topjohnwu_repack_for_zf2_601.zip" to your Internal Memory.
Step 3: Extract "unlock_for_zf2_551ml_6.0_20160703.zip" to your desktop. And run "Unlock.bat". It will restart your device to bootloader and install , and again reboot. Now it will struck at Asus logo with white background.
Step 4: Force Shutdown your phone by pressing power button for 10 seconds. Then start it into bootloader mode by pressing "Vol+"and "Power" buttons simultaneously. When it vibrates leave power button only(keep pressing "Vol+" until you see bootloader mode)
Step 5: Install twrp recovery from fastboot mode (google it if you dont know)
command " fastboot flash recovery twrp.img "
twrp is provided.
after successfull execution of command go to recovery mode by pressing down button on bootloader mode and allow modifications for twrp.
Step6: In TWRP, goto "Install" and browse three files which you copied to Internal Memory, And flash them In same order Which I say
  1. "Magisk-v6_repack_for_zf2_601.zip"
  2. "phh-superuser-17-magisk-x86-fix.zip"
  3. "xposed-v86.5-sdk23-topjohnwu_repack_for_zf2_601.zip"
tap soft button for "Back" and tap "Reboot" And choose "Bootloader"
Step7: When in bootloader mode. Go back to your PC and double click "Restore.bat".
It will again lock your Bootloader(As it is necessary for your phone to boot) and reboot your phone. Your phone will optimize for 5-10 minutes depending upon number of apps Installed.
Step8: Install 3 Apps for accessing root and xposed given in folder.
named: Magisk manager apk
phh super user apk
xposed apk
YOUR PHONE IS ROOTED NOW.
Thanks.

For Any querry or doubt please ask.:D:confused:
Every Suggestion welcomed

Download files from here
https://drive.google.com/open?id=0B6SZRpR9Q7C5RzFDMUx0bFkycEE
I seriously thank you for this guide. I have been spending the last 12 hours looking for a working guide; though other guides were correct, it's your guide that lead me right to where I should be. I've completed the guide without problems.:good::highfive::good:
 

Attachments

  • Screenshot_20160908-225327.jpg
    Screenshot_20160908-225327.jpg
    71.3 KB · Views: 3,982
  • Screenshot_20160908-225414.jpg
    Screenshot_20160908-225414.jpg
    114.7 KB · Views: 3,983
  • Screenshot_20160908-225559.jpg
    Screenshot_20160908-225559.jpg
    161.2 KB · Views: 3,907
  • Screenshot_20160908-225930.jpg
    Screenshot_20160908-225930.jpg
    244.3 KB · Views: 3,893

Kapil Tapsi

Senior Member
Sep 16, 2014
570
1,501
New Delhi

I seriously thank you for this guide. I have been spending the last 12 hours looking for a working guide; though other guides were correct, it's your guide that lead me right to where I should be. I've completed the guide without problems.:good::highfive::good:
Thanks. When I got my phone rooted after 3 times brick. I thought to help, so no one face problem.
Help others reach this post. And give me suggestion if any.
 

tm_muri

Member
Oct 21, 2008
35
11
Bogor
I am totally confused, every time, the phone rebooted, it rolled back to unroot... :(
I had already followed any single instruction, as stated in this thread.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 76
    Working On MM-WW-4.21.40.352 Z00A Z00AD And on Latest versions
    MM-WW-4.21.40.327 Z00A Z00AD
    MM-WW-4.21.40.223 Z00A Z00AD


    Latest Stable Magisk : v16.3 Updated 28 March 2018. If there is update you will surely find it in telegram group. I don't visit xda much.

    To download, Go to "Magisk" folder In download folder.
    If you are using Magisk 12, Then first flash Magisk 12 uninstaller, then flash Latest Magisk from Twrp.
    If Safetynet Fails, Then enable "Hide Magisk" in settings from magisk manager.
    Warning:
    • Rooting voids warranty. Also If some damage occurs because of wrong steps taken by you, Neither me nor forum is responsible. Do at your Own risk. Though I'm sure If you follow the steps carefully you wont get problem.
    • Prefer to backup your device apps and data.
    • First read the post twice carefully then proceed.
    • I may change name of files in folder. Use common sense to identify them.

    If you want to flash stock rom then visit here Flash Stock Rom Zenfone 2

    Features:
    • Magisk ManagerNEW
    • MagiskLatest Warning: Never update magisk from the app. Flash the latest zip from here, otherwise you will get bootloop.
    • Systemless Xposed
    • TWRP Latest
    • UnRoot (Magisk SuperUser only)

    Requirements:
    1. Phone should be charged at least 60%.
    2. Android USB Driver should be installed already, if it is not then install all drivers in the "Drivers Folder".
    3. Enable USB Debugging.
    For that go to "Settings" ,Scroll to bottom goto "about", goto "Software Information", tap "Build number" upto 7 times or till it
    says "You are a developer now". Then go to "Settings" you will find "Developer Options", open it and enable "USB Debugging"

    ALL .BAT FILES TO BE RUN IN FASTBOOT MODE ONLY, IF YOU DON'T KNOW ABOUT FASTBOOT MODE THEN GOOGLE "HOW TO GET FASTBOOT MODE IN ASUS ZENFONE 2.
    "


    There are two parts which should be followed precisely.
    1. Unlock Bootloader and Install TWRP.
    2. Root and Install Xposed*
    *=Though Xposed is not necessary but Xposed is very helpful, so its your choice.

    Part 1: Unlock Bootloader and Install TWRP.
    Step 1: Connect your phone to PC, make sure usb debugging is "ON".
    Step 2: Go to the folder and run "Bootloader Unlocker.bat" .
    Wait for command to execute.
    When you see "Unlock Successful" in your phone, your phone will shut down. Then keep hold Volume Up button on your phone until you see bootloader again. Then follow the instructions. If You Missed it, the close the application. Boot your phone into fastboot mode and try again..
    Step 3: If you are in fastboot/bootloader mode then use "TWRP.bat" otherwise first go to fastboot/bootloader mode and then use "TWRP.bat"
    It will install twrp. When you first go to twrp. Tick Always allow modifications.

    Part 2: Root and Install Xposed
    Step 1: Boot to fastboot mode.
    Step 2: For rooting. First use "ROOT UNROOT MAGISK.bat", follow any given instruction in script.
    Step 3: If you want Xposed, then use "XPOSED.bat" in fastboot mode and follow any instruction in script.
    Step 4: Reboot to system.
    Your phone may optimize for 5-10 minutes depending upon number of apps Installed.
    YOUR PHONE SHOULD BE ROOTED NOW.

    Unroot
    Step 1: Boot to fastboot mode.
    Step 2: For unrooting. First use "ROOT UNROOT MAGISK.bat", follow any given instruction in script for unroot.


    For Any querry or doubt please ask. :D:confused:
    Every Suggestion welcomed. Also you can join telegram group to get help and help others.

    https://telegram.me/joinchat/ESGRD0Erde3o4dRPSzkBCQ

    If the guide works for you or you want to thank me for development of tools then you can donate me via
    Paypal paypal.me/KapilTapsi (You can donate any amount, It will be of great help)

    FAQ
    1. Stuck at white screen with asus logo?
    Sol. a) White screen means you are unlocked (action of unlock.bat), so you may give a try to restore.bat in fastboot mode.
    b) If you can go to recovery mode then you can go to previous state(before starting unlocking) by using adb command
    First boot to recovery(it should be the stock one), you'll see dead android logo, keep pressing power -then vol up-then release vol up- now release power. (This should be quick, otherwise pressing power button for too long will shut you down)
    When successfull, you'll see options, choose apply update from adb, and follow command
    Code:
    adb sideload mm.zip
    You must rename the downloaded zip to mm.zip . Or you can replace mm.zip to xxxxxxxxxxx.zip (whatever the name of downloaded zip)
    Warning Before that you must download same version full firmware from asus website Here

    2. Having problems with device connection? like waiting for device.
    Sol. Make sure you have enabled USB Debugging (Not applicable for BL Unlocking and TWRP Flashing)
    Uninstall all drivers previously installed on computer(every driver of any device)
    Reboot your computer. And then install all drivers given in the driver folder.
    If the problem persists, try different computer and different usb cable.


    3. Facing permission denied in fastboot mode or while running script files.
    Sol. Try disabling your lock screen security to none.

    4. Want to relock bootloader?
    Sol. No possible way for now. The post will be updated if it ever comes.

    5. Safetynet Failed?
    Sol. 1. Have you enabled Magisk Hide in the settings of Magisk Manager? Try toggle to disable, and re-enable again.
    2. If you are using SuperSU, you often need suhide, or maybe other solutions. Developer do not have control of how SuperSU behaves.
    3. It might be due to xposed. Either you remove xposed or wait for future updates.

    Download files from here
    https://www.androidfilehost.com/?w=files&flid=273540 AFH Link
    All Files in folder are not useful for this purpose, but are used for other purpose also. You can download them if you want.
    File credits.
    Giovix92
    topjohnwu

    Some tools are not made by me. This guide is genuine based on my experience.

    Generous Donor(s):
    1. Peter Fedorow (20 Canadian Dollar):good:
    2. Nicola Roncari (20 Euro):good:
    10
    New Version Of Magisk Has been launched...

    Magisk 14..
    Download from below.

    Happy Rooting:laugh::fingers-crossed:
    8
    From Now On All the developments, updates and support will be done on other page. link is given in the description.

    And I am coperating with Giovix92 for making single tool on single page.
    8
    Magisk 15 is released.
    I have attached magisk modified for zenfone 2.
    Credits: Whole zenfone 2 group members.
    7
    Magisk 15.3
    Changelog
    Magisk
    v15.3
    - [Daemon] Fix the bug that only one script would be executed in post-fs-data.d/service.d
    - [Daemon] Add MS_SILENT flag when mounting, should fix some devices that cannot mount magisk.img
    - [MagiskBoot] Fix potential segmentation fault when patching ramdisk, should fix some installation failures