yashsingh1/xdaforums huggingface dataset:
[ZenFone 2 Q&A, Help & Troubleshooting] jimchee:
I think that your bootloader is corrupted, have you tried flashing the droidboot.img from bootloader? Only thing that makes sense, I have had no trouble flashing even after I bootlooped but your running now so point would be mute till you need to flash something again.
[ZenFone 2 Q&A, Help & Troubleshooting] TheBigRuss:
Flashing the droidboot.img from bootloader using Fastboot command also results in Permission denied failure:
[ZenFone 2 Q&A, Help & Troubleshooting] jimchee:
That is odd

---------- Post added at 04:30 PM ---------- Previous post was at 04:28 PM ----------

If it were my phone I would probably sideload the full .63 Rom when it is available from ASUS
[ZenFone 2 Q&A, Help & Troubleshooting] TheBigRuss:
I actually sideloaded .59 before updating to .63, and that worked fine, but still getting the fastboot flash permission error before and after.

I can dd the fastboot partition with the droidboot.img just fine with no errors, so I did that with the .63 version. However, that still didn't resolve the fastboot flashing error.
[ZenFone 2 Q&A, Help & Troubleshooting] J M L:
I have the same "permission denied" error with fastboot, and my bootloader is NOT unlocked. Searching around on google I found other people reported the same error on different phones, but none of the suggestions, such as "fastboot erase cache" changed anything for me.

It still mostly works, though. I can boot into TWRP tethered from fastboot, and at one point I flashed an older version of the stock recovery from fastboot. It gave the error, but worked. I was not able to flash the full OS image from fastboot. I had to go into stock recovery and sideload it.
[ZenFone 2 Q&A, Help & Troubleshooting] jimchee:
I don't have any idea what's causing that error I haven't been able to duplicate it on my phone at all, the only flashing error I encountered do far was with sideloading because I was using an older version of adb and fastboot. So I am stumped I can maybe find a phone with this problem near me and work on it myself.
[ZenFone 2 Q&A, Help & Troubleshooting] sangalaviral:
If I remember correctly you need to use the latest fastboot and this error is caused by not using proper fastboot
[ZenFone 2 Q&A, Help & Troubleshooting] wrecklesswun:
this is quite strange - i get the same error, but the action actually takes place...
[ZenFone 2 Q&A, Help & Troubleshooting] maxlifan:
I have the exact the same problem. Small procedures will work fine, but anything large like flashing system.IMG will actually fail. This has been bothering me a lot and it seems more and more people have it now so its an actual problem.
[ZenFone 2 Q&A, Help & Troubleshooting] jimchee:
Okay that makes sense regarding the version of fastboot,

This is latest version

http://xdaforums.com/htc-one/general/tool-updated-adb-version-1-0-32-fastboot-t2932160
[ZenFone 2 Q&A, Help & Troubleshooting] maxlifan:
Did using that version of fast boot solve the issue?

I had a near panic attack yesterday when I soft bricked my zf and couldn't flash anything using softboot.

Thank god regular recovery worked but I still prefer to have a working fast boot.
[ZenFone 2 Q&A, Help & Troubleshooting] J M L:
No, that version gives the same error for me. I also get the error using the latest version downloaded from Google through the Android SDK on Linux.

I don't know how to debug anything on while in fastboot mode, but if anybody can point me to some information I can try and figure out what's happening.

The bootloader/fastboot screen shows:

FASTBOOT MODE
PRODUCT_NAME - Z00A
VARIANT - ASUS_Z00A
HW_VERSION -
BOOTLOADER VERSION - unknown
IFWI VERSION - 0094.0177
SERIAL NUMBER - 0123456789ABCDEF
SIGNING - ?
SECURE_BOOT - ?

That is exactly what it shows, including the fake serial number. I don't remember what the bootloader said before the error started. It might have been the exact same thing. I have tried flashing a new bootloader, but of course that gives the same error, so I don't know if it's working or not.
[ZenFone 2 Q&A, Help & Troubleshooting] jimchee:
That's normal for the bootloader screen not sure why it doesn't read properly, funny cause my Nexus 7 2012 actually reads properly in bootloader
[ZenFone 2 Q&A, Help & Troubleshooting] Shad0wKn1ght93:
1) Try using a different USB Cable. Sounds silly, but I've had all kind of funky problems in the past, and sometimes the USB Cable is the problem.

2) Use a different PC/fastboot Setup.

If it works on a different PC then you know something is wrong with your drivers/Fastboot environment.
[ZenFone 2 Q&A, Help & Troubleshooting] J M L:
I've tried on my work and home computers (Linux), from Windows (using the binaries linked earlier in this thread), and from a Mac. I tried a few different USB cables at home plus the one at work. I appreciate the suggestions, because it's always possible that those of us with this problem are making the same easy mistake..

Because the error is "remote: permission denied" (or something like that) my guess is that it's a response from the phone. I just don't know anything about the technical details of the bootloader to start debugging it. Does anybody know what filesystems are mounted in the bootloader? Are they purely memory resident, or is it actually mounting something in flash that could be corrupted?
[ZenFone 2 Q&A, Help & Troubleshooting] maxlifan:
I personally think our fast boot is broke. Or corrupt. Is there a way to flash fast boot with stock recovery or without unlocking boot loader? Or flashing using ADB?
[ZenFone 2 Q&A, Help & Troubleshooting] Shad0wKn1ght93:
It is possible to flash droidboot (which is Intels version of an OSBL) both via fastboot and recovery. You should just try to flash a factory image. But as to the root of the problem, I am quite certain that the Remote Error is caused by something else. It just doesn't make sense. Could you [MENTION=2989373]J M L[/MENTION] post smoe screenshots of the console output?

And to [MENTION=2433963]jimchee[/MENTION] I sometimes have my proper SN in bootloader after i press up a few times and the bootloader crashes.(yes, that happenes on my phone)
[ZenFone 2 Q&A, Help & Troubleshooting] J M L:
On the upgrade to .59 I managed to get my phone in a bootloop. During that event the bootloader was definitely showing this problem. I don't know if it had the problem before that. During that event I did try running "fastboot flash bootloader droidboot.img" using the droidboot.img from .43 (or whatever version was prior to .59) to correct the permission denied problem. I finally did fix the bootloop by installing the recovery from .43, and then sideloading system.img. Installing the full .43 zip with fastboot did not work. I also did a full system reset, which in retrospect wasn't necessary, but I because of that I know have done a full reset since this problem appeared.

Here is a capture of some fastboot commands. This is booting to tethered TWRP (my bootloader is NOT unlocked). The commands being run are:

fastboot flash /tmp/recovery.zip /FB_RecoveryLauncher/recovery.zip
fastboot flash /tmp/recovery.launcher FB_RecoveryLauncher/recovery.launcher
fastboot oem start_partitioning
fastboot flash /system/bin/logcat FB_RecoveryLauncher/recovery.trigger.new
fastboot oem stop_partitioning

The phone does properly boot to TWRP, so despite the errors, the files are being copied over. Flashing small things, such as recovery, works, but large things, like the full system zip do not.

Script started on Sat Sep 5 10:11:21 2015
lefthand:~%adb reboot bootloader

lefthand:~%cd src/zenfone2/tethered/

lefthand:~/src/zenfone2/tethered%./cai_dat_CWM.sh

target reported max download size of 536870912 bytes
sending '/tmp/recovery.zip' (6463 KB)...
OKAY [ 0.403s]
writing '/tmp/recovery.zip'...
FAILED (remote: Permission denied
)
finished. total time: 0.550s
target reported max download size of 536870912 bytes
sending '/tmp/recovery.launcher' (400 KB)...
OKAY [ 0.231s]
writing '/tmp/recovery.launcher'...
FAILED (remote: Permission denied
)
finished. total time: 0.380s
...
(bootloader) Start partitioning

OKAY [ 0.359s]
finished. total time: 0.359s
target reported max download size of 536870912 bytes
sending '/system/bin/logcat' (178 KB)...
OKAY [ 0.223s]
writing '/system/bin/logcat'...
FAILED (remote: Permission denied
)
finished. total time: 0.373s
...
(bootloader) Stop partitioning

FAILED (status read failed (No such device))
finished. total time: 5.831sy
lefthand:~/src/zenfone2/tethered%

Script done on Sat Sep 5 10:19:01 2015

I extracted droidboot.img from .59 and poked around in it. The best I can tell, it mounts /dev/block/by-name/factory and /dev/block/by-name/cache. I might be wrong, though, it was late at night when I was looking.

It looks like there might be ways to record logcats from droidboot, but that possibly it's disabled. Is there a list of valid fastboot oem commands for this phone? There might be a way to enable logging.
[ZenFone 2 Q&A, Help & Troubleshooting] Shad0wKn1ght93:
hmm. interesting...

If you open droidboot with a hex editor, right in the beginning of the file(offset 0x000060) there is the following line: loglevel=0

Perhaps changing that to 1 will do something?

Also, there is yet another fake SN at offset 0x0000D0. Seems that they don't even read the hardcoded one properly.

The fake one displayed in droidboot is located at offset 0x003A10 together with a version string.

I'm still new to Intel based smartphones, but if all of them have such hacked together Firmware then Intel is doomed. As far as I can tell, Intel uses a modifed EFI for their Phones with the droidboot(=fastboot) binary hacked ontop of it. The bootloader is supposed to grab configuration information from a partition (no idea which exactly, since Zenfone has a pretty interesting partition layout, I'll dump some of them later), similarly to how qcom devices take their bootloader configuration from /persist and /misc. But, as some of the time, a generic SN is shown and many values are just empty(Secure boot and Signing environment) not even that works properly. It would be interesting to see if that is just a display bug or whether one could do something interesting with this.(usb boot, here i come ;] )

Also, is my phone the only one where when i press up in the bootloader screen a couple of times, first the "normal boot" thing disappears and then the screen turns black? The screen comes back after a few seconds, but i still think that's strange...
[ZenFone 2 Q&A, Help & Troubleshooting] J M L:
Yes, mine does the same thing. If I try to go up past "Normal Boot" the status box disappears. Sometimes I can go down and get it back, but other times the screen goes blank and then it reloads normally.

I'm too timid to try flashing a hacked droidboot.img, because as long as the bootloader is intact I'm confident I can recover from bootloops and a broken system, etc., but I'm not sure what to do if I break the bootloader.

Looking through the droidboot executable shows some interesting things. Unfortunately running "fastboot oem adb_enable 1" doesn't let me get a shell on the phone. "fastboot oem shell_cmd <cmd>" does work. Anything in system/bin seems to work as expected, including ls and dmesg. Nothing seems to be put in "/logs"

BTW, and this might or might not be important. My phone is encrypted.

I've attached a dmesg from before and after running a "fastboot flash...", but nothing is jumping out at me. Unfortunately everything past 73 columns is truncated. That's coming off the phone, and I'm not sure how to fix it.

I just did:

lefthand:~/src/zenfone2/59/system/bin%fastboot oem shell_cmd "touch"
...
OKAY [ 0.181s]
finished. total time: 0.181s
lefthand:~/src/zenfone2/59/system/bin%fastboot oem shell_cmd "touch /tmp/foo"
...
OKAY [ 0.188s]
finished. total time: 0.188s
lefthand:~/src/zenfone2/59/system/bin%fastboot oem shell_cmd "ls -l /tmp/"
...
(bootloader) -rw------- root root 0 2015-09-05 19:49 foo

OKAY [ 0.196s]
finished. total time: 0.196s

That means shell_cmd is running as root. I can also do fastboot oem shell_cmd "echo bar > /tmp/foo" and that works. This seems pretty powerful to me.

I don't think I'm going to have any more time today to play with this, but if anybody has ideas of things to examine or poke, let me know and I'll try when I get a chance.
[ZenFone 2 Q&A, Help & Troubleshooting] Shad0wKn1ght93:
Wow, you make me feel dumb... I didn't even know there was a fastboot oem shell command..

And speaking about me feeling dumb: Where the heck do you look in droidboot??? I looked through it in hex editor and didn't find anything, and even IDA doesn't show me much... I've never had that before...

Now that that's out of the way:

Encryption shouldn't matter, as it only affects the data partition.

However, I was wondering whether you have unlocked your bootloader, as i cannot imagine Asus would have left such a big loophole. (on the other hand, I shouldn't be surprised xD)

Also, recovering from a bad boodloader flash should be possible, since Zenfone has a special pre-bootloader flash mode where it identifies itself as MOOREFIELD. I believe it is similar to QHUSB_DLOAD.
[ZenFone 2 Q&A, Help & Troubleshooting] J M L:
This is what I did. You may know many of these steps, but if anybody else is interested:

I unzipped the full rom image. .59, because it was on hand.

Found the droidboot.img from the full zip.

Unpacked it with abootimg -x

Unpacked the initrd.img with gunzip -c initrd | cpio -i

That left me with all of the files in droidboot/fastboot/bootloader. Then in system/bin/ is another file called droidboot. Looking at the init.rc stuff, that is run as the shell, but I could be misreading things. It is definitely the program that handles commands sent from fastboot on the computer. I opened system/bin/droidboot in a hex editor (or just used strings) and searched for "start_partitioning", because that was the only fastboot oem command I was sure. I tried the other text in that area, and they do seem to work.

Here is the list of strings that might be oem commands:

ifwi

token_umip

capsule

ulpmc

esp_update

silentlake

user

dnx_timeout

custom_boot

erase_token

erase

repart

write_osip_header

erase_osip_header

start_partitioning

partition

retrieve_partitions

stop_partitioning

get_batt_info

get_build_version

wipe

config

mount

check_secure

mfg_get

shell_cmd

adb_enable

get-spid

get-fru

get-part-id

get-lifetime

start-update

cancel-update

finalize-update

remove-token

token

force_shutdown

I've not tested more than a few of those, and many may not be commands, just strings near the commands. There might be more commands, too.

I didn't think encryption would matter, but you never know...

My bootloader is not unlocked, though the phone is rooted. I did one time run "getprop ro.isn" and saved the output, but not to /factory/asuskey, just to a regular file. I never got the white screen or anything.

The hole in the bootloader does seem huge. It's possible to mount the main /system read/write and then modify or add any file you feel like. If it wasn't trivial to get root as it is, then this could be leveraged to acquire it. As proof of concept, I created a file in /mnt/system/xbin and then deleted it.

I think the lesson is, don't leave your phone on the bootloader screen and then plug it into an untrusted host.

I also found I can boot to a tethered recovery easily by running:

fastboot flash /tmp/recovery.zip FB_RecoveryLauncher/recovery.zip
fastboot flash /tmp/recovery.launcher FB_RecoveryLauncher/recovery.launcher
fastboot oem shell_cmd "chmod 755 /tmp/recovery.launcher"
fastboot oem shell_cmd "/tmp/recovery.launcher /tmp/recovery.zip"

After all this, I'm still no closer to discovering what's going on with the permission denied error.
[ZenFone 2 Q&A, Help & Troubleshooting] eric_lensherr:
Any news on this front? I've got the same problem (see thread).
[ZenFone 2 Q&A, Help & Troubleshooting] micnerd:
fastboot erase cache

fastboot erase dalvik

fastboot erase recovery

fastboot erase system

now flash stock rom img files
[ZenFone 2 Q&A, Help & Troubleshooting] eric_lensherr:
How do I recover the phone is this doesn't work since I'm erasing recovery I won't be able to sideload the stock rom. BTW I factory reset the phone and erased cache through the bootloader, I didn't erase system, recovery, or dalvik though.
[ZenFone 2 Q&A, Help & Troubleshooting] micnerd:
dude try my post above

erase everything then flash everything from stock img files

do everything via Fastboot not the recovery
[ZenFone 2 Q&A, Help & Troubleshooting] eric_lensherr:
Booted to bootloader, entered: fastboot erase cache and am getting: <remote: permission denied> again.
[ZenFone 2 Q&A, Help & Troubleshooting] micnerd:
fastboot erase cache

fastboot erase dalvik

fastboot flash system system.img(download it)
[ZenFone 2 Q&A, Help & Troubleshooting] eric_lensherr:
All I get is permission denied for all and any of the commands you suggest.

I can erase through recovery but that is it. Fastboot cannot do anything. The phone seems to be locked to it. I'm really getting frustrated, no one else seems to have this issue.

I am also having a problem with receiving SMS messages which often do not show up. All I want to do is put CM on this thing like other people have in order to fix this issue. It's a great phone otherwise just kind of letting me down right now.
[ZenFone 2 Q&A, Help & Troubleshooting] bradlaue:
Doesn't help much but I'm also experiencing it. Most folks seem to be happy once they've flashed stock firmware back onto it, or figured out how to use tethered TWRP to flash things, but I'm unsettled by the fact that fastboot persistently gives the permission denied error. I've fallen back to the stock ROM and OTA'd to the latest 2.20.40.97 WW and have found no solution or mindshare on the subject.

I'm rather curious as to whether ASUS has locked us out somehow - but you'd figure more xda folks would have noticed this not working for them.

I wonder if anyone with a current ROM is able to run "fastboot erase cache" (a non-destructive test) - that would be a valid test of whether or not everyone is locked out.
[ZenFone 2 Q&A, Help & Troubleshooting] :
Sorry to dig up an old thread, but this one seems to have the best info on what's going on with this permission denied error. I'm seeing it too, and I can flash recovery and boot from fastboot (they say permission denied, but they still "take") but larger image files fail.

AS per the last post in this thread, fastboot erase cache gets permission denied. Upon reboot it doesn't set about rebuilding the cache, so the command *actually* failed.

EDIT: I did an adb sideload of the latest official firmware (full 1.3GB image) via stock recovery and the 'permission denied' errors have gone away. I booted to recovery, did a factory reset, then did an adb sideload and now everything appears to be working. Maybe this might work for folks still having the problem as well.

EDIT 2: After restoring a nandroid of CM12.1 and booting back to fastboot, I'm back to permission denied errors. So, that's a bust.

Backstory of how I got to this point:

I bought the phone new about four months ago. Not sure what version it started on but I had updated via OTAs to 2.20.40.97. When the "official" bootloader unlock tool was released I gave it a go and was struck with the 5 second reboot fastboot purgatory problem. While tinkering around trying to get fastboot to work again, I ended up hosing something. I used the asus flash tool and a raw image file from another thread here. The tool didn't appear to actually do anything other than reboot my phone twice quickly. But, after that fastboot was working again and my phone booted, so I was happy.

So at this point I had the latest stock ROM (no root or anything), an unlocked bootloader and what I thought was a working fastboot.

The whole point was to run cyanogen, so I got the official twrp image and did a fastboot flash recovery twrp.img. Permission denied. Rebooted to recovery to wipe cache (figured that might help?) and low and behold it was TWRP. From there I flashed the October 23rd nightly of the unofficial CM12.1.

Everything works except flashing from fastboot. If anyone has come up with anything on this I'd love to give it a whirl.
[ZenFone 2 Q&A, Help & Troubleshooting] yunusoglu:
I have a similar problem along with being stuck in the bootloader. Whether I choose 'Normal Boot', 'Recovery Mode' or 'Restart Bootloader', the phone reboots and ends up showing the same bootloader screen again.

Any fastboot command ends up failing, giving the 'Permission Denied' error.

I too would appreciate if anyone comes up with a solution.
[ZenFone 2 Q&A, Help & Troubleshooting] cenovita:
Hi guys,

I have this issue as well...

Luckily, I use this process to update so I am not bootlooped but I don't like the idea that I will not be able to update my phone software ever again.

To be honest I like the stock rom (I used the pre.rooted ones) so I don't like the idea of moving to CM.

Anyone was able to find a solution?

This problem started very recently, I was able to flash the pre-rooted images with no issues.

Thanks in advance.
[ZenFone 2 Q&A, Help & Troubleshooting] poopymonster:
Sup guys,

I am having the same exact problem. "Normal Boot" restarts the phone fine; but selecting "Recovery Mode" goes back to the fastboot screen. I also get the "permission denied" when I try to flash twrp.img. The phone is rooted and bootloader "unlocked" via the unlock app.

Any help is greatly appreciated!
[ZenFone 2 Q&A, Help & Troubleshooting] cenovita:
Were you able to find a solution? Did you happen by chance performed full wipe recently?

Enviado desde mi ASUS_Z00AD mediante Tapatalk
[ZenFone 2 Q&A, Help & Troubleshooting] piway:
Get .63 full Rom stock Zip then flash using adb sideload.

It should clear your problem
[ZenFone 2 Q&A, Help & Troubleshooting] kenbo111:
You need to have root or administrator privileges on your computer.
[ZenFone 2 Q&A, Help & Troubleshooting] leonglap:
Hi...

I tried every simple solution you guys suggest, but this doesn´t work... :confused::crying:

C:\adb>fastboot erase cache

******** Did you mean to fastboot format this partition?

erasing 'cache'...

FAILED (remote: Permission denied)

finished. total time: 0.142s

C:\adb>fastboot erase dalvik

erasing 'dalvik'...

FAILED (remote: Permission denied)

finished. total time: 0.180s

C:\adb>fastboot erase recovery

erasing 'recovery'...

FAILED (remote: Permission denied)

finished. total time: 0.192s

C:\adb>fastboot erase system

******** Did you mean to fastboot format this partition?

erasing 'system'...

FAILED (remote: Permission denied)

finished. total time: 0.183s

C:\adb>
[ZenFone 2 Q&A, Help & Troubleshooting] ponnuvelpandian:
If you can use dd command, do it for fastboot... i.e. flash droidboot.img using this method and try on fastboot....
[ZenFone 2 Q&A, Help & Troubleshooting] yoelnico:
Im currently having the same problem.

Does anybody knows

I cant flash any recovery and when i turn on the mobile it just gets stuck on this:
[ZenFone 2 Q&A, Help & Troubleshooting] timbernot:
What have done to get to this state ? Downgraded ?

I think you need to be looking in the unbricking threads.

If you can enter fastboot ?

Try flashing a raw firmware in flashtool

If you can't enter fastboot try flashing ifwi,dnx fwr,os image before it then flash raw...obviously setting up driver correctly first
[ZenFone 2 Q&A, Help & Troubleshooting] yakub234go:
Make sure u r using latest version for adb & fastboot http://xdaforums.com/showthread.php?p=48915118#post48915118

If u r using linux try apending sudo to the fastboot commands for example "sudo fastboot flash recovery recovery.img" & if using windows open cmd as an admin
[ZenFone 2 Q&A, Help & Troubleshooting] madman604:
If you get permission denied...

Disable your lockscreen password before getting into fastboot/ recovery. Set it to "none"

Sounds dumb but yeah. It worked for me.

Sent from M919V Galaxy S4 via XDA Premium HD app.