[Asus ZenFone 3 Questions & Answers] richsch:
Preamble

Hello, all.

Soooo I've never posted on this forum before. I've mainly leeched the invaluable info for my personal gain. I'm sure many a googler has come here trying to figure out how to root their phone. And I'm sure many a "swimmer" in Schitz Creek has come here via Google to figure out how to save their device from what had been perceived as an upgrade. I'm speaking, of course, of trying to root/unlock a phone and finding said phone "bricked".

Well, it’s time to give back.

Because yesterday, I was neck deep in Schitz Creek. After a series of dumb decisions and a lack of knowledge, I bricked the phone I’d bought for my wife’s birthday. I was just trying to be able to delete the Asus bloatware and install titanium backup and greenify. By the way, since when did Facebook become a system app? How is this a thing? Anyways, my wife deserves better battery life. And it’s fun to feel like Cyber MacGuyver by rooting a phone. But the situation went awry. My wife kept telling me that everything was going to be alright, but I know the limitations of my knowledge.

Brief aside: I'm decently computer/phone savvy, but I would, in no way, consider myself an advanced user. Sure, to my family, I'm a computer wizard. But that doesn't mean a whole lot. To them, opening up a command prompt in Windows is seen as an act of magic. And I haven't had my planeswalker spark yet. However, I have successfully rooted, and in most cases unlocked the bootloader, for several phones (HTC desire, Galaxy S3 [three different models over three years], Asus Zenfone 5, LG G4 [once pre-motherboard-death and once post (after a downgrade)], and now the ZE552KL). So I know how to at least fumble my way around adb, fastboot, odin, and various recoveries. As long as you’re at this level, or willing to learn, then you should be able to follow these instructions. End aside.

Mistakes not to make

Let’s get down to brass tacks. I made two big mistakes that you shouldn’t make. Both mistakes stemmed from the basic mistake of using a root method other than this one: https://xdaforums.com/zenfone-3/help/guide-how-to-root-zenfone-3-ze552kl-t3471524

The problem with not using this EXACT method is that some of the files/programs which you need to use have specific versions which will ensure an easypeasy root. Honestly, if you properly follow the instructions in the above post, you will most likely not run into any problems. The only addition I can make is that instead of steps 6 and 7, you might find it easier to install SuperSU.zip through TWRP instead of pushing and sideloading.

Mistake 1: Not using the proper TWRP file and SuperSU file

For some reason, there are multiple versions of these files. Your SuperSU file should be 4.8MB. Using the wrong SuperSU will break the dm-verity. Your TWRP should NOT be the latest experimental version. It should be the one from November or earlier of 2016. Using the wrong TWRP will leave you unable to use the touchscreen. Trust me. I know from experience.

Mistake 2: KEEP TWRP READ ONLY

Disabling read only has no current benefits. It will just break the dm-verity. Your device will still be able to be written to if you keep TWRP read only. I have no idea why it’s called “read only”.

How to unbrick the phone

I’m sure some of you skipped straight to here. While I can’t blame you, please at least read the above paragraph. It will help you.

First I will describe the situation the phone was in, and then I will explain how I saved it. Before I continue, I want to give a big shout out to Niemer. Without their helpful post, I would’ve had no idea what to do. Thanks!

Situation the phone was in

--TWRP could not be used because the touchscreen wasn’t working.

--The dm-verity was messed up (i.e. “not started in enforcing mode").

Before you look at the solutions, make sure that your phone shows up in the windows device manager as an ADB device/ASUS ADB device/ADB composite device/etc. no matter which step you’re in. Google it to figure out how if you don’t already know.

The solution

Part 1 - Create and flash a system image which will restore your dm-verity

step 1. download the latest system “update” from the asus drivers website. I have a WW version of the phone, so I downloaded “WW_V13.20.10.152”. It’s a 1.76GB file, so be patient. I haven’t tested this method with other versions of the phone, but they should work in theory.

step 2. go into the updater script file (META_INF → com → google → android → updater-script). Open it with notepad ++.

step 3. delete from the beginning of the file up until the line “ui_print("Target: asus/WW_Phone/ASUS_Z012D:6.0.1/MMB29P/13.20.10.152-20161222:user/release-keys");”

The code that you are deleting checks to make sure that your phone is the proper model. But there is a good chance that it will mistakenly identify your phone as a phony. So we need to get rid of this code.

step 4. save the updater-script file

step 5. create a copy of the modified system update zip file. You should now have two 1.76GB files (or maybe slightly different if your phone is a CN, JP, or other model. Once again, I have a WW version of the phone). Name one of the files “realupdate.zip” and name the other “dmsaver.zip”. The names aren’t actually important.

step 6. enter dmsaver.zip. delete these four files: file_contexts, system.new.dat, system.patch.dat, and system.transfer.list. Exit out of the file. It should now be about 60MB.

step 7. turn on your ZE552KL and enter fastboot mode

step 8. in a cmd screen from your main folder (i.e. the one with adb, fastboot, and all the other files, including the ones you just created), type in the command “fastboot flash system dmsaver.zip”

step 9. if successful, you have just restored the dm-verity. You should now no longer get that sinister red text which has been ruining all your fun.

Part 2 - Install a proper version of TWRP

(This is only important if your version of TWRP won’t let you do anything because you can’t use your touch screen)

Download the version of TWRP that is included in the how-to-root post I linked to above. Also, you can download the oldest version (NOT the newest) from a sharing website which is linked to in a post on the ASUS website. It’s not in english though. Flash it to your phone in fastboot mode using the “fastboot flash recovery” command. Make sure you turn your phone off before turning it back on, or your recovery might not activate correctly.

Part 3 - Install a new version of your system.

Go into TWRP and install the zip file “realupdate.zip” that you created in Part 1 - step 5.

Part 4 - Root your phone

Follow the instructions in the link I posted earlier. It comes from this website, so you know it’s good. This time, though, you probably don’t need to unlock the bootloader ;)

Part 5 - Breathe a sigh of relief

Parting words

I really hope this guide can be of assistance to you. The full procedure for fixing “my” phone wasn’t really recorded anywhere (although once again, big shout out to Niemer for their post). I went through hundreds of iterations of seemingly random fastboot, recovery, and adb actions before everything worked out. Because of this, I feel quite fortunate to have saved the phone, and I really wanted to give back. This community has been super helpful to me over the last seven years, and this is my chance to reciprocate. I sincerely hope that this post will help you.

I hope I didn’t forget anything. I have a sneaking suspicion that I did. In any event, if you have any questions, please post them, and I’ll try to be of assistance. Happy rooting!