./flash-all.sh: line 16: fastboot: command not found I'm trying to "Get Started" with Setting Up the Preview SDK | Android Developers to Install the L Preview System Image Android L Developer Preview | Android Developers on my Nexus 7 (Wifi) "razor".

I'm getting following error:

mbp:razor-lpv79 alexus$ ./flash-all.sh 
./flash-all.sh: line 17: fastboot: command not found
./flash-all.sh: line 18: fastboot: command not found
^C
mbp:razor-lpv79 alexus$


here is my fastboot, it's in /Applications/Android Developer Tools/sdk/platform-tools/ folder:

mbp:razor-lpv79 alexus$ ls /Applications/Android\ Developer\ Tools/sdk/platform-tools/fastboot 
/Applications/Android Developer Tools/sdk/platform-tools/fastboot
mbp:razor-lpv79 alexus$ 


What can I do? I do NOT wish to modify flash-all.sh script (if possible).
This isn't an Android problem at all. You can simply run the commands from flash-all.sh by hand, changing each one to name fastboot by its full path, or you can set the $PATH in your shell.

PATH="$PATH:/Applications/Android Developer Tools/sdk/platform-tools/"
./flash-all.sh


You should also check that the fastboot executable is executable. This probably won't be the case if you've extracted the files onto a non-ext partition. The following output is a correct example: note the x in the fourth column, and that the files are owned by the user I'm running as.

z1@foyle platform-tools% ls -l
total 3292
-rwxr-xr-x 1 z1 z1 1355536 1105 27 Jun 14 adb
drwxr-xr-x 2 z1 z1    4096 1105 27 Jun 14 api
-rwxr-xr-x 1 z1 z1   47828 1105 27 Jun 14 dmtracedump
-rwxr-xr-x 1 z1 z1  225253 1105 27 Jun 14 etc1tool
-rwxr-xr-x 1 z1 z1  201380 1105 27 Jun 14 fastboot
-rwxr-xr-x 1 z1 z1   10071 1105 27 Jun 14 hprof-conv
-rw-r--r-- 1 z1 z1  720629 1105 27 Jun 14 NOTICE.txt
-rw-r--r-- 1 z1 z1   16520 1105 27 Jun 14 source.properties
-rwxr-xr-x 1 z1 z1  771959 1105 27 Jun 14 sqlite3
drwxr-xr-x 2 z1 z1    4096 1105 27 Jun 14 systrace