remote: Permission Denied Asus Zenfone 2 I recently (dumbly) removed my internal through TWRP on my Asus Zenfone 2 whilst trying to flash SuperZen from xda. So now I'm attempting to go back to stock, and I've tried doing a factory reset with the stock recovery, but with no luck. I'm currently trying to flash boot.img, recovery.img, droidboot.img and system.img via fastboot on Linux and Windows, but I get:

$ fastboot flash system system.img

target reported max download size of 536870912 bytes
erasing 'system'...
FAILED (remote: Permission denied)
finished. total time: 0.136s


for each one. This is when trying to flash using version WW_2.19.40.22. The interesting thing is, is that when I flash twrp.img or recovery.img(stock) it still gives me that same error, but when I boot into recovery, I have either TWRP or stock recovery, which shows that it did work. Sadly, this is not the case with system, so if I reboot into the system, it does not work properly and hangs on the "Powered by Android" splash screen.

EDIT:
just tried using fastboot update -w Zip_Name.zip and it gives me:

archive does not contain 'android-info.txt'
archive does not contain 'android-product.txt'
error: update package has no android-info.txt or android-product.txt


EDIT 2:
booted into TWRP and used "Install" to try and flash the .zip I put on the SD card, I got the logs copied to the SD, and here is the relevant section:

minzip: Missed a central dir sig (at 0)
E:Zip file is corrupt!
MtpServer::run fd: 13
E:request read returned -1, errno: 5, exiting MtpServer::run loop
Error flashing zip '/external_sd/UL-Z00A-JP-2.19.40.21-user.zip'
Updating partition details...
I:Data backup size is 0MB, free: 55424MB.
...done


Basically, it gave me E:Zip file is corrupt! and ended up with "Failed".
To solve you problem execute the following :


Boot your Phone into TWRP Recovery.
Plug your phone to PC and make sure it is recognized by adb you can run adb devices command to check.
on you Phone TWRP go to wipe &gt; advanced wipe  check data ,cache and system then swipe the swipe zone in the bottom
Now go back to the home of TWRP and navigate to Advanced &gt;&gt; ADB sideload swipe where it is written Swipe to Start Sideload
go to you PC and fire up a terminal or a cmd (depend on your operating system) and type this command adb sideload path/to/you_firmaware.zip
Your phone will start flashing the zip wait until it's done and then reboot your system.
the first boot may take awhile be patient.