Take the 2-minute tour ×
Android Enthusiasts Stack Exchange is a question and answer site for enthusiasts and power users of the Android operating system. It's 100% free, no registration required.
> adb shell
sh-4.1$ ls -F
-F: No such file or directory

-F switch works fine on my Ubuntu. Why doesn't it work on android?

Is there a way to make it work?

share|improve this question
4  
Most commands are not the original gnu versions, they are either from toolbox or busybox and mostly stripped down versions. –  ott-- Feb 21 '13 at 9:53
    
@ott I know what busybox is, but to what are you referring when you say toolbox? –  Kshitiz Sharma Feb 21 '13 at 10:08
    
@ott-- Mind making that an answer, including some more details (what is Busybox (link), what is Toolbox (link), stripped-down for size/performance, etc)? –  Izzy Feb 21 '13 at 10:22
    
@KshitizSharma Look into /system/bin with adb shell, most programs are a symlink to toolbox. See the first answer in androidquestions.org/threads/189-Android-Command-Reference –  ott-- Feb 21 '13 at 10:40
    
@ott Is toolbox specific to android or is it an independent tool by itself like busybox? I ask this because googling for toolbox doesn't return anything useful. –  Kshitiz Sharma Feb 21 '13 at 10:47
show 2 more comments

1 Answer 1

up vote 8 down vote accepted

Most shell commands in Android are not GNU versions or another POSIX-compliant implementation, they are either from Toolbox or Busybox and mostly stripped down versions.

A lot of commands in /system/bin are symlinks to /system/toolbox. I haven't found much documentation about it, just the source at https://android.googlesource.com/platform/system/core/+/jb-mr1-release/toolbox/

Busybox is another implementation of several common shell commands, with more commands and features than the default Toolbox. It's used on other embedded systems too, and some bootable GNU/Linux CDs, so you may already be familiar with it. Because it's open-source, there are several installers available on Google Play: just search for "Busybox".

share|improve this answer
    
There is a guide at github.com/jackpal/Android-Terminal-Emulator/wiki/… –  Kshitiz Sharma Feb 21 '13 at 13:33
1  
Strictly speaking, GNU userland command tools are not "original", they were designed based on existing Unix command tools and POSIX. –  Lie Ryan Feb 22 '13 at 10:48
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.