----rwxr-x system sdcard_rw 26172 2009-12-12 20:46 flash_image
/dev/block//vold/179:1 /sdcard vfat rw,dirsync,nosuid,nodev,noexec,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 o
excellent, see that "noexec" in the mount entry for sdcard? that should be your permission denied issue.
What's my workaround ?
okay - here's my instructions as i recall them, and hopefully some insightful explanation:
PLEASE: do not follow this unless you are /sure/ you know what you are doing. ALSO if you have disabled reflash of recovery on system boot, please UNDO the changes you made. It's okay for this to roll-back on first full-boot, we can go through it a second time after we validate everything is working as expected.
1 - place the required files (flash_image binary and recovery.img - naming shouldn't matter i kept the version number on it) on your sdcard - you can do this with a microsdcard reader, adb push, whatever you like =)
2 - start a root session using adb shell and su
3 - mount -o rw,remount /system - this makes /system writable
4 - mkdir /system/xbin - if it already exists you will simply get an error
5 - using cp (if you have busybox...) or cat FILE > TARGET - you should place flash_image in a place we can execute from (/system/xbin seems good to me)
6 - chmod 700 /system/xbin/flash_image - validate permissions on /system/xbin/flash_image - you are the root user afterall, don't need world and group executable or even read =)
7 - sync - flush changes to block device
8 - mount -o ro,remount /system - remount in read-only - you shouldn't need to make any more changes
9 - as /system/xbin is in your path, you can simply type: flash_image recover /sdcard/recovery.img
10 - hit power button, select power off
11 - hold x, hit power button
12 - you should be greated by the custom recovery firmware, if you are, rejoice, reboot into android. IF NOT: stop here, let me know what you encountered
13 - let's test to make sure our roll back worked, we should now (being fully booted in android) have the stock recovery image again, power-off, hold x, power on, you should see the stock recovery screen
14 - if you've gotten this far, you now have the basics for how to make the change, to make it permanent follow the above steps and simply move the /system/recovery-on-boot.p before step 7. follow until step 12, you may want to reboot one more time to validate that it sticks.
let me know if that's clear enough =)