yashsingh1/xdaforums huggingface dataset:
[ZenFone 2 General] sTIMulat3:
After about 10 tries it finally worked, even though it said permission denied when I flashed TWRP, it looks like it worked anyway. :victory:
[ZenFone 2 General] Level99:
I'm actually not getting any permission denied errors like you are. I think what you're experiencing is due to your flashing the raw image of an earlier firmware.

Also thanks, I forgot that usb powerfeed turns on Android devices, guide has been modified accordingly.

---------- Post added at 03:40 PM ---------- Previous post was at 03:39 PM ----------

Awesome! But that means my assumption about the raw image flash causing permission denied was incorrect. Weird, because I haven't had any of those. But hey, if it works it works! The process is now definitely repeatable so woohoo!
[ZenFone 2 General] :
Yeah, I was just gonna say I don't think it was because of the raw image flash. When I did it it didn't actually do anything other than reboot quickly twice and once it had my fastboot was working properly (aside from the permission denied errors) and my system was back to working (didn't even wipe any data or anything).

Either way, I'm in a state where I can flash roms and have a TWRP recovery, so I don't really care. I am a bit concerned that fastboot is giving errors, but there are a number of threads with people with the same issue dating back many months, so I am fairly sure that it's a Zenfone 2 issue that's unrelated to the bootloader unlock tool.
[ZenFone 2 General] Kona67:
Cool. I have TWRP and Supersu and no permission denied

C:\Users\kona\>fastboot flash recovery twrp-2.8.7.2-Z00A.img

target reported max download size of 536870912 bytes

sending 'recovery' (14456 KB)...

OKAY [ 0.640s]

writing 'recovery'...

OKAY [ 0.708s]

finished. total time: 1.355s

Thanks Level99
[ZenFone 2 General] playingmax:
What did u do different?
[ZenFone 2 General] Kona67:
I dont know. I followed the Level99 steps.
[ZenFone 2 General] :
For you guys that you don't have permission denied errors, what's on the screen when in fastboot?

Mine is:

FASTBOOT MODE

PRODUCT_NAME - Z00A

VARIANT - ASUS_Z00A

HW_VERSION -

BOOTLOADER VERSION - unknown

IFWI VERSION - 0094.0173

SERIAL NUMBER - (This alternates between my actual serial and a fake one 1234567890ABCDEF)

SIGNING - ?

SECURE_BOOT - ?

I'm wondering if anything's different for those with the permission denied errors vs. those without.
[ZenFone 2 General] DeathStolas:
Mine displays the same.
[ZenFone 2 General] Kona67:
Me too
[ZenFone 2 General] ASUS_Khang:
This is great work...nice job guys! I wanted to try this myself and though I haven't gotten it to work, I'll play around with it more. I'm getting the same screen as the others. HQ is still trying to figure out a fix, but they gave me access to their FTP to download the boot, droidboot images along with some other things to play with.
[ZenFone 2 General] bewaffled1:
Level99 The Man!

Perma-fixed my issue! Can confirm working by unplugging the phone and then sending the code and plugging it back in quickly. Took me 3 tries! Also, can confirm the above problems.

[IMG="Fixed"]https://scontent-iad3-1.xx.fbcdn.net/hphotos-xpt1/v/t1.0-9/12191673_1100903519927610_2910958171578407594_n.jpg?oh=823aa6e3d889afa81dc700999ed0ce9d&oe=56BD0FAD[/IMG]
[ZenFone 2 General] Guelo_tweaks:
Lol, this is too funny. I didn't have to do anything. Took a three day mini vacation. Took lots of photos with the phone, recorded some videos. Today I returned, read the thread, ran the unlock tool again and it worked. 100% no problem. Flashed TWRP and am about to start exploring some roms. Thanks ASUS Lmfao
[ZenFone 2 General] ASUS_Khang:
Welp, glad it worked for you! :good:

---------- Post added at 04:59 PM ---------- Previous post was at 04:39 PM ----------

Hey everyone - per Level99's method, I flashed the stock recovery, system, droidboot and boot images. Every time I boot into fastboot, it is now stable and shows "Continue the fastboot process".

UPDATE: Flashed TWRP, not problems :)
[ZenFone 2 General] seby1234:
After I got the message about the partition it stopped working. I had no white screen flashing it was black but i still got to the fail message. I put in the code but it just says" 'fastboot' is not recognizable as an internal or external command, operable program or batch file." This happened every time.
[ZenFone 2 General] :
When you issue commands in fastboot do you get permission denied errors? I can flash recovery and boot even though I have those errors, but flashing larger images fails all the time.
[ZenFone 2 General] Guelo_tweaks:
Damn. Got overexcited, flashed cm12 and forgot to flash su.
[ZenFone 2 General] ASUS_Khang:
I haven't tried to flash anything large like another ROM. My plan is flash back to stock even though I've got TWRP and everything on it. That way I can provide the method for you guys.
[ZenFone 2 General] :
CM12 is rooted. Need to enable it in developer options.
[ZenFone 2 General] Guelo_tweaks:
Good looking out man.
[ZenFone 2 General] :
But did you see a success message when you flashed recovery or a permission denied message? It's a pretty strange error to get even though it's flashing successfully. There are a number of reports of this happening too and those predate the official unlock tool by months, so I'm pretty sure it's a problem all its own and not related to the bootloader tool at all.

If you get any info out of HQ on that I'd love to hear it!
[ZenFone 2 General] Level99:
Man, it's so awesome to see people getting past this issue. Real thanks goes to m3t4lw01f for the initial hunch to keep pushing, and ASUS_Khang for keeping hope alive.

Unless you have a white ASUS boot screen, your bootloader isn't unlocked yet. My fix is only for people who've run the official unlock tool, gotten the white screen, and not been able to issue fastboot commands.
[ZenFone 2 General] ASUS_Khang:
This was the cmd input/output:

D:\ACIData\Desktop\WW_ZE551ML_2.20.40.97_20150917>fastboot flash boot droidboot.
img
target reported max download size of 536870912 bytes
sending 'boot' (14822 KB)...
OKAY [ 0.655s]
writing 'boot'...
OKAY [ 0.469s]
finished. total time: 1.139s

D:\ACIData\Desktop\WW_ZE551ML_2.20.40.97_20150917>fastboot flash boot boot.img
target reported max download size of 536870912 bytes
sending 'boot' (11868 KB)...
OKAY [ 0.507s]
writing 'boot'...
OKAY [ 0.414s]
finished. total time: 0.936s

D:\ACIData\Desktop\WW_ZE551ML_2.20.40.97_20150917>fastboot flash system system.i
mg
target reported max download size of 536870912 bytes
erasing 'system'...
OKAY [ 1.211s]
sending sparse 'system' (524170 KB)...
OKAY [ 16.477s]
writing 'system'...
OKAY [ 6.634s]
sending sparse 'system' (517707 KB)...
OKAY [ 14.517s]
writing 'system'...
OKAY [ 6.698s]
sending sparse 'system' (505595 KB)...
OKAY [ 14.853s]
writing 'system'...
OKAY [ 6.400s]
sending sparse 'system' (516084 KB)...
OKAY [ 14.915s]
writing 'system'...
OKAY [ 6.375s]
sending sparse 'system' (172006 KB)...
OKAY [ 4.879s]
writing 'system'...
OKAY [ 2.395s]
finished. total time: 95.370s

D:\ACIData\Desktop\WW_ZE551ML_2.20.40.97_20150917>fastboot reboot-bootloader
rebooting into bootloader...
OKAY [ 0.086s]
finished. total time: 0.102s

D:\ACIData\Desktop\WW_ZE551ML_2.20.40.97_20150917>fastboot reboot
rebooting...

finished. total time: 0.109s

D:\ACIData\Desktop\WW_ZE551ML_2.20.40.97_20150917>adb devices
List of devices attached
F3AZFG040730 device

D:\ACIData\Desktop\WW_ZE551ML_2.20.40.97_20150917>adb reboot recovery

D:\ACIData\Desktop\WW_ZE551ML_2.20.40.97_20150917>fastboot devices
F3AZFG040730 fastboot

D:\ACIData\Desktop\WW_ZE551ML_2.20.40.97_20150917>fastboot flash recovery twrp_Z
00A_v24.img
target reported max download size of 536870912 bytes
sending 'recovery' (15663 KB)...
OKAY [ 0.621s]
writing 'recovery'...
OKAY [ 0.453s]
finished. total time: 1.076s

D:\ACIData\Desktop\WW_ZE551ML_2.20.40.97_20150917>fastboot reboot-bootloader
rebooting into bootloader...
OKAY [ 0.093s]
finished. total time: 0.095s
[ZenFone 2 General] playingmax:
did not work for me

C:\adb>fastboot boot 1.img

downloading 'boot.img'...

FAILED (command write failed (Unknown error))

finished. total time: 5.010s

C:\adb>fastboot boot 1.img

downloading 'boot.img'...

FAILED (command write failed (Unknown error))

finished. total time: 5.016s

C:\adb>fastboot reboot

rebooting...

finished. total time: 5.008s

C:\adb>fastboot reboot

< waiting for device >

rebooting...

finished. total time: 0.340s

C:\adb>fastboot boot 1.img

< waiting for device >

downloading 'boot.img'...

FAILED (command write failed (Unknown error))

finished. total time: 5.017s

C:\adb>fastboot boot 1.img

< waiting for device >

downloading 'boot.img'...

FAILED (command write failed (Unknown error))

finished. total time: 5.025s
[ZenFone 2 General] :
So you're not affected then. I think this is unrelated to the unlock tool as I've seen reports of it going back to earlier this year. If you do happen to talk to HQ about it I'll test anything.

I can flash recovery and boot from fastboot and anything else can be flashed from recovery of side loaded via adb so I'm happy that's working. Just concerns me that fastboot is throwing up errors.

---------- Post added at 07:37 PM ---------- Previous post was at 07:32 PM ----------

I wish I could take credit. I mostly just fumbled my way through thing's hammering on buttons until it worked. Mostly out of pure frustration that wiping the cache caused a major meltdown and wouldn't boot anymore.
[ZenFone 2 General] ASUS_Khang:
I flashed the stock recovery over TWRP to go "stock", but the recovery still gives me the "Installing system update" and "error". I tried sideloading via ADB within recovery, but that doesn't seem to work as the device isn't recognized. When you do adb sideload is that within recovery, or elsewhere?
[ZenFone 2 General] :
In TWRP. I haven't tried flashing a stock image as I'm really happy with CM. But, I always flash via adb side load in recovery. I only have a 16GB model so I tend to not fill up the internal storage with zips to flash.

Everything works as it should except for fastboot flash. I'll confirm tomorrow by flashing the latest CM build via adb side load in TWRP.

I'll take a nandroid and try flashing the latest stock from stock recovery tomorrow and see what happens as well. I'll let you know.
[ZenFone 2 General] ASUS_Khang:
Sideload via ADB works in TWRP, but doesn't really change/affect anything
[ZenFone 2 General] Level99:
I was able to adb sideload in the stock recovery the entire WW 97 firmware image. I know you said you're getting that error in the stock recovery, but are you able to get past that to the recovery options and that's where ADB is failing to recognize the device?

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

Might need to try it a few more times to get the timing right. Seems like it didn't work the first time for a couple people.
[ZenFone 2 General] ASUS_Khang:
Yeah, I tried it in the stock recovery, but as the recovery boots, it gives "Installing system update" => "Error!" Then the option to apply update from SD card is missing. When I tried to sideload via ADB, it just kinda hangs. It doesn't recognize the phone in recovery.

UPDATE: From our team in HQ

“Reboot 5 seconds” will be fixed in an upcoming FOTA/OTA image.

This issue only occurs on devices with country code US, that’s why they cannot reproduce the symptoms at first time. Sorry for any inconvenience.

Right now, I suggest not to do unlocking before the next image released.

BTW, it’s necessary to disable the lock screen before unlocking.

I've asked the team what the plan is for a fix because according to the tool, we won't get the FOTA/OTA image...so how can those who used the tool get the fix? So please sit tight!
[ZenFone 2 General] scopty:
Thank you Guys!

I was able to install CM12.1 on my phone! following Level99's instructions!

I had to flash TWRP twice ... got the same error twice (failed...) but it started up and was able to flash CM !
[ZenFone 2 General] playingmax:
BINGO!!

but now it wont boot into TWRP after writing

C:\adb>fastboot boot 1.img

downloading 'boot.img'...

FAILED (data transfer failure (Unknown error))

finished. total time: 5.101s

C:\adb>fastboot boot 1.img

downloading 'boot.img'...

FAILED (command write failed (Unknown error))

finished. total time: 5.008s

C:\adb>fastboot reboot

rebooting...

finished. total time: 5.008s

C:\adb>fastboot reboot

< waiting for device >

rebooting...

finished. total time: 108.999s

C:\adb>fastboot reboot

< waiting for device >

rebooting...

finished. total time: 5.002s

C:\adb>fastboot boot 1.img

< waiting for device >

downloading 'boot.img'...

FAILED (command write failed (Too many links))

finished. total time: 0.340s

C:\adb>fastboot boot 1.img

downloading 'boot.img'...

OKAY [ 0.920s]

booting...

OKAY [ 0.190s]

finished. total time: 1.110s

C:\adb>
[ZenFone 2 General] :
I've never been able to fastboot boot something. Can you fastboot flash recovery <<twrp image file.img>>?
[ZenFone 2 General] playingmax:
Im up and running now!

thank you so much!!!!!

off to test new roms.

C:\adb>fastboot flash recovery 1.img

target reported max download size of 536870912 bytes

sending 'recovery' (14456 KB)...

OKAY [ 0.930s]

writing 'recovery'...

OKAY [ 0.640s]

finished. total time: 1.580s
[ZenFone 2 General] ASUS_Khang:
UPDATE: According to HQ, even though we won't receive OTAs, we can still sideload the OTAs that are posted officially on the support sites. So if you can atleast get your ADB sideload working, you should be okay!
[ZenFone 2 General] RealYoti:
On WW (RU) too.
[ZenFone 2 General] YayILikePie:
Perfect. I was wondering about adb sideload. Couldn't test it since it prevents sideloading older firmware, and since I was running off of the latest already, that was out of the question.

Thanks for your hard work and keeping us in the loop with the development team, Khang. We all really appreciate the work you've put in for us regarding the issue, and the same goes for all of you working towards a fix.
[ZenFone 2 General] :
I just side loaded the entire WW .97 zip via stock recovery ADB. So, mine definitely works. I'm tempted to say that the entire bootloader/fastboot/recovery for these phones is poor because while I'm having fastboot permission denied errors and yours works there, you're having problems sideloading from stock recovery.

Can you sideload the official firmware via TWRP recovery ADB? Does that work?

Also, [MENTION=4030110]bjf182[/MENTION] could you update the first post with the new info on how to recovery from this from [MENTION=3600083]Level99[/MENTION] 's post? At this point it's worked for a number of people, so having the info there might be a good idea.
[ZenFone 2 General] ASUS_Khang:
I actually tried sideloading the firmware via TWRP. Now, I'm not exactly sure what's supposed to happen, but nothing really changed. I expected TWRP to get replaced with stock recovery and the bootloader to be fixed, but it was still there.
[ZenFone 2 General] :
When I adb sideloaded via stock recovery the process replaced everything. I mean, I was on stock recovery already but the process indicated that it was flashing fastboot, recovery, system, ifwi, etc...I'd assume TWPR recovery would behave the same way, but I've never flashed a stock image via TWRP so I don't really know.

HOLY CRAP! After sideloading via ADB the full .97 factory image and rebooting, my fastboot is working again:

C:\platform-tools\Z00A>fastboot flash recovery recovery-twrp.img
target reported max download size of 536870912 bytes
sending 'recovery' (14456 KB)...
OKAY [ 0.665s]
writing 'recovery'...
OKAY [ 0.703s]
finished. total time: 1.368s

I think my phone is back to 100% working. WAHOO! Hopefully you can solve your adb issues. Do you maybe have something on your SD card that recovery is reading automatically and failing? That's about all I can think of at this point...
[ZenFone 2 General] Level99:
I'm honestly not sure if the latest firmware has any update to the recovery image. I do know that the stock firmware flash via ADB can take up to 10, or even 20 minutes, where it will seem to hang at around 50% of loading. I've never tried flashing firmware ADB via TWRP, though.

Unless you wipe data and factory reset, nothing of your regular user experience should change. I'll test it tonight to see if a) I can flash stock via ADB over TWRP and b) if that happens, whether or not it replaces the current recovery with stock.

I will update my post recommending people who experience a permission denied message (even though it actually writes) to sideload via ADB their latest stock firmware.
[ZenFone 2 General] ASUS_Khang:
Also - my service team gave me the flashtools files so I may try this later with them to see if we can flash to stock now that the Bootloader seems stable and doesn't reboot. ADB should be an alternative method.
[ZenFone 2 General] playingmax:
I agree.

it worked for me. I have superzen running
[ZenFone 2 General] ASUS_Khang:
Actually quick question, what does your stock recovery menu look like? Do you happen to have a before/after? How did you flash the stock recovery...I assume fastboot flash recovery recovery.img? (wondering which file you used to flash stock)
[ZenFone 2 General] Level99:
Go here and grab the recovery.img for your current firmware:

http://www.mediafire.com/folder/setyy42t2cymy

then fastboot flash recovery recovery.img

Stock recovery menu first starts up with "Installing system update" followed by "error!". Pressing Volume up while holding down the power button gets you to the actual menu to select the option for installing from ADB.
[ZenFone 2 General] ASUS_Khang:
Hahha..yeah! I actually have the stock recovery file my team gave me. But the issue I'm having is that it looks like the menu isn't complete..like it's missing "Apply update via SD card". Also, when trying to sideload via ADB, it fails.
[ZenFone 2 General] Level99:
Oof. My latest stock recovery is also missing the apply update via SD card, but ADB is working. Weird. Not sure, maybe try flashing this recovery as long as its not a higher firmware version than what is publicly available? Otherwise, it's a bug with the new recovery in beta.
[ZenFone 2 General] Onyx VI:
I don't believe any stock recoverys have install from SD card. Because if they did then that would almost mean we won't need to flash a custom recovery onto phone. To flash whatever we wanted.
[ZenFone 2 General] ASUS_Khang:
Before unlocking the device, it was available at the time, so it seemed weird that somehow that option disappeared.
[ZenFone 2 General] Onyx VI:
Ahhh. I don't really remember if it was or wasn't. But I never knew stock ones had that option. I only wish I still had my phone rooted..... I had it rooted and unrooted it and flashed a full firmware package.
[ZenFone 2 General] ASUS_Khang:
For some reason, the phone isn't recognized anymore when in Recovery and when I try the update via ADB sideload option, it sorta just hangs there without running anything. Not sure how to fix this:

D:\ACIData\Desktop\WW_ZE551ML_2.20.40.97_20150917>adb sideload UL-Z00A-WW-2.20.4
0.97-user.zip
loading: 'UL-Z00A-WW-2.20.40.97-user.zip'
error: device not found
[ZenFone 2 General] :
I don't rightly remember what my stock recovery had. After I did all this tinkering I flashed TWRP and re-installed CM, restored my backup so I'm back to where I was this morning. I could re-flash the stock recovery image I had though if you'd like me to tell you for sure.

I'm *pretty sure* that it had install from SD and install from ADB. (Plus the various wipes and reboot options)
[ZenFone 2 General] ASUS_Khang:
It's okay, you're in a good place...I wouldn't want to mess around with it too much!
[ZenFone 2 General] :
Long shot: Try moving your USB cable to a different port on your PC. I had fastboot completely stop working on me yesterday and moving the cable seemed to kick its butt back in gear.
[ZenFone 2 General] ASUS_Khang:
Yeah i'll give it a shot! UPDATE: No go...:( lol. I'll try to work with my team to see if there's anything they can do..Maybe the flash tool might work.
[ZenFone 2 General] :
My experience with the flash tool was negative. It gave lots of errors about the raw image being older than what was on the phone and ended up with a permission denied error.

Wondering now what would happen if I tried it again since I appear to have solved that permission denied problem in fastboot though...

I'm happy with how CM has been running now though so I think I'm just going to stop messing with things before I actually brick this thing and am left phoneless. Lol
[ZenFone 2 General] hmm888:
This is ending up a disaster. This is reminding me of the Dell/Nvidia class action that started with revelations in a forum just like this.
[ZenFone 2 General] sTIMulat3:
I'm having the same problem on Windows. Device manager shows that there is an error with "AsusVirtual Enumerator01".
[ZenFone 2 General] :
After re-flashing the stock rom and getting fastboot working again, it seems restoring my nandroid or CM12 has brought the permission denied error back as well. I'm pretty sure what ROM you're running has nothing to do with fastboot and the bootloader, so I'm confused. This is unrelated to the bootloader unlock tool I think though, so I'm going to do a bit more research on it and maybe open a new thread (or post in one of the permission denied threads) instead of continuing here.

And...doing the entire flash of the stock rom via ADB sideload didn't fix it again. Pretty sure it was a fluke the first time.
[ZenFone 2 General] ASUS_Khang:
Our team is working on a fix. Again, this issue didn't happen to everyone, so it's a mix of conditions that caused the problem. Again they've told me on the next OTA we should be expecting a solution.
[ZenFone 2 General] Level99:
Sorry to hear the trouble for yours continues! I'm in the middle of flashing WW 97 on stock recovery for testing. My device was discoverable and it's loading pretty typically. Some notes:

1) sideload adb on TWRP doesn't work, because the flashable image expects the stock recovery and as a result can't properly interpret the commands the firmware sends (gives me a date conflict issue, specifically).

2) If you have root, I would recommend trying Flashify from the Play Store and flashing the stock recovery for WW 97 from there, then booting into it and seeing what your computer recognizes. If you're using windows (assuming that you are), go to the Device Manager and check to see if anything comes up as not having a driver installed. If so, that's probably your issue with not being able to sideload on the stock recovery. (this is probably something you've already thought of, but best to be comprehensive).

Obviously it's great that an official fix is going to be out the door at some point, and props to ASUS for continuing to listen to us.
[ZenFone 2 General] Kona67:
Flash OTA & Full Rom with TWRP

http://xdaforums.com/zenfone2/general/how-to-flash-ota-rom-twrp-t3209545
[ZenFone 2 General] ASUS_Khang:
Another way to update your phone as I just found out is to add the firmware zip file to an SD card and change the filename to MOFD_SDUPDATE.zip. Then, boot into Recovery and it will automaticallly start updating your device by installing that zip. Once you're done. Just delete the zip file, or remove your SD card. I tried doing this to fix the recovery problem I have, but it still doesn't recognize ADB to do a sideload...At least this is another solution.
[ZenFone 2 General] :
Another shot in the dark for you: have you tried uninstalling the ASUS drivers on your pc and reinstalling them? Does it recognize it when you enable USB debugging in android?
[ZenFone 2 General] seangeorgereid:
Ze551ml stuck in twrp

I had the five second bootloader issue

I followed the steps and bootloader is fixed and twep is flashed and supersu installed.

The problem is that whenever I flash a ROM(cm or stock) it flashes successfully.

The phone however never boots into the ROM, it only boots into twrp.

How can I get the phone to boot into the ROM?
[ZenFone 2 General] playingmax:
what rom are you using? also try clearing cache after writing rom.