Jump to content

ADB shell commands not found?


Guest vi3wmi

Recommended Posts

Hey!

I can't get ADB to work correctly.

Ive installed the SDK and drivers. I can connect to my phone using adb.

BUT

If i do "adb shell" then "cd <dir>" it works..

but if i use any other commands like rm or ls it says "not found".

My phone is rooted and in USB debugg mode.

Using win7 x64

Ive searched this forum for a couple of hours now and tried everything i can come up with.

Hope you guys have some tips on this one :)

Link to comment
Share on other sites

tried rebooting your PC ?

Ofcourse!

Still no luck tho..

I can give you an example on how it looks from commands prompt

C:\..\..\android-sdk-windows\tools>adb shell ls

ls: not found

Link to comment
Share on other sites

Guest chingy1788
Ofcourse!

Still no luck tho..

I can give you an example on how it looks from commands prompt

C:\..\..\android-sdk-windows\tools>adb shell ls

ls: not found

huh?

i use adb shell thusly

C:\..\..\android-sdk-windows\tools>adb shell

and then it comes up with the shell

#

then I type in ls

#ls <enter>

*stuff in dir*

#

Link to comment
Share on other sites

huh?

i use adb shell thusly

C:\..\..\android-sdk-windows\tools>adb shell

and then it comes up with the shell

#

then I type in ls

#ls <enter>

*stuff in dir*

#

Bouth ways should work.

I use your way. Just that i changed my example to one line instead of having it x rows long :)

Its no difference anyway so.

But the thing i feel confusing is that some commands works and some doesnt exist. :/

Link to comment
Share on other sites

dodgy or incomplete SDK maybe ?

I have no idea mate, sorry.

adb.exe = client software ( I guess? )

So the "not found" thing must be a responce from my device ( server side )

In that case it must be a buggy / incomplete ADB-server-thing on my device :S

Link to comment
Share on other sites

In that case it must be a buggy / incomplete ADB-server-thing on my device :S

It could just be that the PATH variable is not set correctly. Maybe try /system/bin/rm or export PATH=/system/bin inside the shell. Remember also that a lot of standard UNIX-like commands aren't there (such as cp) unless you install BusyBox.

Link to comment
Share on other sites

It could just be that the PATH variable is not set correctly. Maybe try /system/bin/rm or export PATH=/system/bin inside the shell. Remember also that a lot of standard UNIX-like commands aren't there (such as cp) unless you install BusyBox.

PATH has absolutely nothing to do with it. you want path set if you intend to use adb outside of the toolfolder but since he clearly said he opened a cmd window within the toolfolder the problem is something else. Most likely a fudged sdk install

Link to comment
Share on other sites

PATH has absolutely nothing to do with it. you want path set if you intend to use adb outside of the toolfolder but since he clearly said he opened a cmd window within the toolfolder the problem is something else. Most likely a fudged sdk install

I'm not talking about PATH on the PC but PATH on the phone. Hence why I said try it inside the shell.

Link to comment
Share on other sites

It could just be that the PATH variable is not set correctly. Maybe try /system/bin/rm or export PATH=/system/bin inside the shell. Remember also that a lot of standard UNIX-like commands aren't there (such as cp) unless you install BusyBox.

Tested but no luck, the export commands existed tho so i set the PATH to /system/bin.

Maby something is missing i the bin folder?

Link to comment
Share on other sites

Tested but no luck, the export commands existed tho so i set the PATH to /system/bin.

Maby something is missing i the bin folder?

This is also possible. A lot of commands such as ls are symlinked to an executable called 'toolbox'. If toolbox is missing then a lot of commands will also not work such as ls, id, ln and rm. Unfortunately chmod is also symlinked to toolbox so while you could theoretically adb push toolbox back onto the phone, you won't be able to chmod 755 it and make it executable.

Anyway, here's a dump of the files in my /system/bin for you to compare. If toolbox is missing you may have to reflash but if it's just the symlinks to app names then you will be re-create them using commands of the form toolbox ln -s /system/bin/toolbox /system/bin/ls.

lrwxr-xr-x root     shell             2009-12-29 10:44 mount -> toolbox
-rwxr-xr-x root shell 9832 2009-12-29 10:41 brcm_patchram
-rwxr-xr-x root shell 192 2009-12-29 10:41 svc
-rwxr-xr-x root shell 18216 2009-12-29 10:41 mtpd
lrwxr-xr-x root shell 2009-12-29 10:44 umount -> toolbox
-rwxr-xr-x root shell 5328 2009-12-29 10:41 system_server
lrwxr-xr-x root shell 2009-12-29 10:44 wipe -> toolbox
lrwxr-xr-x root shell 2009-12-29 10:44 ln -> toolbox
-rwxr-xr-x root shell 201 2009-12-29 10:41 input
lrwxr-xr-x root shell 2009-12-29 10:44 log -> toolbox
-rwxr-xr-x root shell 22544 2009-12-29 10:41 fsck_msdos
-rwxr-sr-x root net_raw 26620 2009-12-29 10:41 ping
lrwxr-xr-x root shell 2009-12-29 10:44 chown -> toolbox
-rwxr-xr-x root shell 205 2009-12-29 10:41 monkey
-rwxr-xr-x root shell 325635 2009-12-29 10:41 wl
-rwxr-xr-x root shell 5284 2009-12-29 10:41 sensorserver_yamaha
-rwxr-xr-x root shell 5304 2009-12-29 10:41 schedtest
lrwxr-xr-x root shell 2009-12-29 10:44 rmmod -> toolbox
-rwxr-xr-x root shell 9688 2009-12-29 10:41 alog
-rwxr-xr-x root shell 68256 2009-12-29 10:41 linker
lrwxr-xr-x root shell 2009-12-29 10:44 route -> toolbox
-rwxr-xr-x root shell 9724 2009-12-29 10:41 dumpsys
lrwxr-xr-x root shell 2009-12-29 10:44 lsmod -> toolbox
lrwxr-xr-x root shell 2009-12-29 10:44 id -> toolbox
-rwxr-xr-x root shell 22124 2009-12-29 10:41 debuggerd
-rwxr-xr-x root shell 9764 2009-12-29 10:41 service
-rwxr-xr-x root shell 13880 2009-12-29 10:41 CKPD-daemon
-rwxr-xr-x root shell 5288 2009-12-29 10:41 surfaceflinger
lrwxr-xr-x root shell 2009-12-29 10:44 top -> toolbox
-rwxr-xr-x root shell 192836 2009-12-29 10:41 wpa_supplicant
-rwxr-xr-x root shell 9572 2009-12-29 10:41 sound
-rwxr-sr-x root inet 5616 2009-12-29 10:41 netcfg
-rwxr-xr-x root shell 18892 2009-12-29 10:41 hciattach
lrwxr-xr-x root shell 2009-12-29 10:44 hd -> toolbox
-rwxr-xr-x root shell 5420 2009-12-29 10:41 get_prox_light_calib
-rwxr-xr-x root shell 9836 2009-12-29 10:41 servicemanager
lrwxr-xr-x root shell 2009-12-29 10:44 newfs_msdos -> toolbox
lrwxr-xr-x root shell 2009-12-29 10:44 sleep -> toolbox
lrwxr-xr-x root shell 2009-12-29 10:44 notify -> toolbox
lrwxr-xr-x root shell 2009-12-29 10:44 ls -> toolbox
lrwxr-xr-x root shell 2009-12-29 10:44 ioctl -> toolbox
-rwxr-xr-x root shell 191 2009-12-29 10:41 pm
lrwxr-xr-x root shell 2009-12-29 10:44 bugreport -> dumpstate
lrwxr-xr-x root shell 2009-12-29 10:44 smd -> toolbox
lrwxr-xr-x root shell 2009-12-29 10:44 schedtop -> toolbox
-rwxr-xr-x root shell 9644 2009-12-29 10:41 dexopt
-rwxr-xr-x root shell 18896 2009-12-29 10:41 qmuxd
-rwxr-xr-x root shell 9672 2009-12-29 10:41 logwrapper
-rwxr-xr-x root shell 14024 2009-12-29 10:41 installd
-rwxr-xr-x root shell 5460 2009-12-29 10:41 dvz
-rwxr-xr-x root shell 5608 2009-12-29 10:41 mm-abl-test
-rwxr-xr-x root shell 44208 2009-12-29 10:41 loc_api_app
lrwxr-xr-x root shell 2009-12-29 10:44 getevent -> toolbox
-rwxr-xr-x root shell 159624 2009-12-29 10:41 dbus_bt
lrwxr-xr-x root shell 2009-12-29 10:44 kill -> toolbox
-rwxr-xr-x root shell 13796 2009-12-29 10:41 port-bridge
lrwxr-xr-x root shell 2009-12-29 10:44 ifconfig -> toolbox
-rwxr-xr-x root shell 5420 2009-12-29 10:41 dalvikvm
-rwxr-xr-x root shell 73160 2009-12-29 10:41 toolbox
lrwxr-xr-x root shell 2009-12-29 10:44 dd -> toolbox
lrwxr-xr-x root shell 2009-12-29 10:44 sync -> toolbox
lrwxr-xr-x root shell 2009-12-29 10:44 setconsole -> toolbox
lrwxr-xr-x root shell 2009-12-29 10:44 stop -> toolbox
-rwxr-xr-x root shell 147648 2009-12-29 10:41 pppd
lrwxr-xr-x root shell 2009-12-29 10:44 cmp -> toolbox
-rwxr-xr-x root shell 17988 2009-12-29 10:41 mm-jpeg-enc-test
-rwxr-xr-x root shell 44540 2009-12-29 10:41 dhcpcd
lrwxr-xr-x root shell 2009-12-29 10:44 netstat -> toolbox
-rwxr-xr-x root shell 86780 2009-12-29 10:41 applypatch
lrwxr-xr-x root shell 2009-12-29 10:44 renice -> toolbox
-rwxr-xr-x root shell 9728 2009-12-29 10:41 handset-keypress
lrwxr-xr-x root shell 2009-12-29 10:44 date -> toolbox
lrwxr-xr-x root shell 2009-12-29 10:44 cat -> toolbox
lrwxr-xr-x root shell 2009-12-29 10:44 rmdir -> toolbox
-rwxr-xr-x root shell 86944 2009-12-29 10:41 sh
lrwxr-xr-x root shell 2009-12-29 10:44 reboot -> toolbox
-rwxr-xr-x root shell 14236 2009-12-29 10:41 bootanimation
lrwxr-xr-x root shell 2009-12-29 10:44 printenv -> toolbox
-rwxr-xr-x root shell 13932 2009-12-29 10:41 keystore
-rwxr-xr-x root shell 18028 2009-12-29 10:41 mm-jpeg-dec-test
lrwxr-xr-x root shell 2009-12-29 10:44 vmstat -> toolbox
lrwxr-xr-x root shell 2009-12-29 10:44 watchprops -> toolbox
-rwxr-xr-x root shell 5592 2009-12-29 10:41 rild
-rwxr-xr-x root shell 9736 2009-12-29 10:41 logcat
-rwxr-xr-x root shell 109436 2009-12-29 10:41 dbus-daemon
lrwxr-xr-x root shell 2009-12-29 10:44 chmod -> toolbox
-rwxr-xr-x root shell 194 2009-12-29 10:41 ime
-rwxr-xr-x root shell 5360 2009-12-29 10:41 mediaserver
lrwxr-xr-x root shell 2009-12-29 10:44 getprop -> toolbox
lrwxr-xr-x root shell 2009-12-29 10:44 iftop -> toolbox
lrwxr-xr-x root shell 2009-12-29 10:44 insmod -> toolbox
lrwxr-xr-x root shell 2009-12-29 10:44 mkdir -> toolbox
lrwxr-xr-x root shell 2009-12-29 10:44 ps -> toolbox
-rwxr-xr-x root shell 5496 2009-12-29 10:41 gzip
-rwxr-xr-x root shell 163132 2009-12-29 10:41 racoon
-rwxr-xr-x root shell 199 2009-12-29 10:41 bmgr
lrwxr-xr-x root shell 2009-12-29 10:44 rm -> toolbox
-rwxr-xr-x root shell 39044 2009-12-29 10:41 vold
lrwxr-xr-x root shell 2009-12-29 10:44 dmesg -> toolbox
-rwxr-xr-x root shell 14188 2009-12-29 10:41 dumpstate
-rwxr-xr-x root shell 7007 2009-12-29 10:41 i2ctest
-rwxr-xr-x root shell 5564 2009-12-29 10:41 app_process
-rwsr-xr-x root root 34612 2010-01-26 13:58 su
-rwxr-xr-x root shell 12194 2009-12-29 10:41 wifibtap
-rwxr-xr-x root shell 46460 2009-12-29 10:41 sdptool
lrwxr-xr-x root shell 2009-12-29 10:44 setprop -> toolbox
-rwxr-xr-x root shell 5144 2009-12-29 10:41 hcid
-rwxr-xr-x root shell 191 2009-12-29 10:41 am
lrwxr-xr-x root shell 2009-12-29 10:44 start -> toolbox
-rwxr-xr-x root shell 5428 2009-12-29 10:41 airbaggy
lrwxr-xr-x root shell 2009-12-29 10:44 dumpcrash -> dumpstate
lrwxr-xr-x root shell 2009-12-29 10:44 sendevent -> toolbox
lrwxr-xr-x root shell 2009-12-29 10:44 mv -> toolbox
lrwxr-xr-x root shell 2009-12-29 10:44 df -> toolbox[/codebox]

Link to comment
Share on other sites

This is also possible. A lot of commands such as ls are symlinked to an executable called 'toolbox'. If toolbox is missing then a lot of commands will also not work such as ls, id, ln and rm. Unfortunately chmod is also symlinked to toolbox so while you could theoretically adb push toolbox back onto the phone, you won't be able to chmod 755 it and make it executable.

Anyway, here's a dump of the files in my /system/bin for you to compare. If toolbox is missing you may have to reflash but if it's just the symlinks to app names then you will be re-create them using commands of the form toolbox ln -s /system/bin/toolbox /system/bin/ls.

lrwxr-xr-x root     shell             2009-12-29 10:44 mount -> toolbox
-rwxr-xr-x root shell 9832 2009-12-29 10:41 brcm_patchram
-rwxr-xr-x root shell 192 2009-12-29 10:41 svc
-rwxr-xr-x root shell 18216 2009-12-29 10:41 mtpd
lrwxr-xr-x root shell 2009-12-29 10:44 umount -> toolbox
-rwxr-xr-x root shell 5328 2009-12-29 10:41 system_server
lrwxr-xr-x root shell 2009-12-29 10:44 wipe -> toolbox
lrwxr-xr-x root shell 2009-12-29 10:44 ln -> toolbox
-rwxr-xr-x root shell 201 2009-12-29 10:41 input
lrwxr-xr-x root shell 2009-12-29 10:44 log -> toolbox
-rwxr-xr-x root shell 22544 2009-12-29 10:41 fsck_msdos
-rwxr-sr-x root net_raw 26620 2009-12-29 10:41 ping
lrwxr-xr-x root shell 2009-12-29 10:44 chown -> toolbox
-rwxr-xr-x root shell 205 2009-12-29 10:41 monkey
-rwxr-xr-x root shell 325635 2009-12-29 10:41 wl
-rwxr-xr-x root shell 5284 2009-12-29 10:41 sensorserver_yamaha
-rwxr-xr-x root shell 5304 2009-12-29 10:41 schedtest
lrwxr-xr-x root shell 2009-12-29 10:44 rmmod -> toolbox
-rwxr-xr-x root shell 9688 2009-12-29 10:41 alog
-rwxr-xr-x root shell 68256 2009-12-29 10:41 linker
lrwxr-xr-x root shell 2009-12-29 10:44 route -> toolbox
-rwxr-xr-x root shell 9724 2009-12-29 10:41 dumpsys
lrwxr-xr-x root shell 2009-12-29 10:44 lsmod -> toolbox
lrwxr-xr-x root shell 2009-12-29 10:44 id -> toolbox
-rwxr-xr-x root shell 22124 2009-12-29 10:41 debuggerd
-rwxr-xr-x root shell 9764 2009-12-29 10:41 service
-rwxr-xr-x root shell 13880 2009-12-29 10:41 CKPD-daemon
-rwxr-xr-x root shell 5288 2009-12-29 10:41 surfaceflinger
lrwxr-xr-x root shell 2009-12-29 10:44 top -> toolbox
-rwxr-xr-x root shell 192836 2009-12-29 10:41 wpa_supplicant
-rwxr-xr-x root shell 9572 2009-12-29 10:41 sound
-rwxr-sr-x root inet 5616 2009-12-29 10:41 netcfg
-rwxr-xr-x root shell 18892 2009-12-29 10:41 hciattach
lrwxr-xr-x root shell 2009-12-29 10:44 hd -> toolbox
-rwxr-xr-x root shell 5420 2009-12-29 10:41 get_prox_light_calib
-rwxr-xr-x root shell 9836 2009-12-29 10:41 servicemanager
lrwxr-xr-x root shell 2009-12-29 10:44 newfs_msdos -> toolbox
lrwxr-xr-x root shell 2009-12-29 10:44 sleep -> toolbox
lrwxr-xr-x root shell 2009-12-29 10:44 notify -> toolbox
lrwxr-xr-x root shell 2009-12-29 10:44 ls -> toolbox
lrwxr-xr-x root shell 2009-12-29 10:44 ioctl -> toolbox
-rwxr-xr-x root shell 191 2009-12-29 10:41 pm
lrwxr-xr-x root shell 2009-12-29 10:44 bugreport -> dumpstate
lrwxr-xr-x root shell 2009-12-29 10:44 smd -> toolbox
lrwxr-xr-x root shell 2009-12-29 10:44 schedtop -> toolbox
-rwxr-xr-x root shell 9644 2009-12-29 10:41 dexopt
-rwxr-xr-x root shell 18896 2009-12-29 10:41 qmuxd
-rwxr-xr-x root shell 9672 2009-12-29 10:41 logwrapper
-rwxr-xr-x root shell 14024 2009-12-29 10:41 installd
-rwxr-xr-x root shell 5460 2009-12-29 10:41 dvz
-rwxr-xr-x root shell 5608 2009-12-29 10:41 mm-abl-test
-rwxr-xr-x root shell 44208 2009-12-29 10:41 loc_api_app
lrwxr-xr-x root shell 2009-12-29 10:44 getevent -> toolbox
-rwxr-xr-x root shell 159624 2009-12-29 10:41 dbus_bt
lrwxr-xr-x root shell 2009-12-29 10:44 kill -> toolbox
-rwxr-xr-x root shell 13796 2009-12-29 10:41 port-bridge
lrwxr-xr-x root shell 2009-12-29 10:44 ifconfig -> toolbox
-rwxr-xr-x root shell 5420 2009-12-29 10:41 dalvikvm
-rwxr-xr-x root shell 73160 2009-12-29 10:41 toolbox
lrwxr-xr-x root shell 2009-12-29 10:44 dd -> toolbox
lrwxr-xr-x root shell 2009-12-29 10:44 sync -> toolbox
lrwxr-xr-x root shell 2009-12-29 10:44 setconsole -> toolbox
lrwxr-xr-x root shell 2009-12-29 10:44 stop -> toolbox
-rwxr-xr-x root shell 147648 2009-12-29 10:41 pppd
lrwxr-xr-x root shell 2009-12-29 10:44 cmp -> toolbox
-rwxr-xr-x root shell 17988 2009-12-29 10:41 mm-jpeg-enc-test
-rwxr-xr-x root shell 44540 2009-12-29 10:41 dhcpcd
lrwxr-xr-x root shell 2009-12-29 10:44 netstat -> toolbox
-rwxr-xr-x root shell 86780 2009-12-29 10:41 applypatch
lrwxr-xr-x root shell 2009-12-29 10:44 renice -> toolbox
-rwxr-xr-x root shell 9728 2009-12-29 10:41 handset-keypress
lrwxr-xr-x root shell 2009-12-29 10:44 date -> toolbox
lrwxr-xr-x root shell 2009-12-29 10:44 cat -> toolbox
lrwxr-xr-x root shell 2009-12-29 10:44 rmdir -> toolbox
-rwxr-xr-x root shell 86944 2009-12-29 10:41 sh
lrwxr-xr-x root shell 2009-12-29 10:44 reboot -> toolbox
-rwxr-xr-x root shell 14236 2009-12-29 10:41 bootanimation
lrwxr-xr-x root shell 2009-12-29 10:44 printenv -> toolbox
-rwxr-xr-x root shell 13932 2009-12-29 10:41 keystore
-rwxr-xr-x root shell 18028 2009-12-29 10:41 mm-jpeg-dec-test
lrwxr-xr-x root shell 2009-12-29 10:44 vmstat -> toolbox
lrwxr-xr-x root shell 2009-12-29 10:44 watchprops -> toolbox
-rwxr-xr-x root shell 5592 2009-12-29 10:41 rild
-rwxr-xr-x root shell 9736 2009-12-29 10:41 logcat
-rwxr-xr-x root shell 109436 2009-12-29 10:41 dbus-daemon
lrwxr-xr-x root shell 2009-12-29 10:44 chmod -> toolbox
-rwxr-xr-x root shell 194 2009-12-29 10:41 ime
-rwxr-xr-x root shell 5360 2009-12-29 10:41 mediaserver
lrwxr-xr-x root shell 2009-12-29 10:44 getprop -> toolbox
lrwxr-xr-x root shell 2009-12-29 10:44 iftop -> toolbox
lrwxr-xr-x root shell 2009-12-29 10:44 insmod -> toolbox
lrwxr-xr-x root shell 2009-12-29 10:44 mkdir -> toolbox
lrwxr-xr-x root shell 2009-12-29 10:44 ps -> toolbox
-rwxr-xr-x root shell 5496 2009-12-29 10:41 gzip
-rwxr-xr-x root shell 163132 2009-12-29 10:41 racoon
-rwxr-xr-x root shell 199 2009-12-29 10:41 bmgr
lrwxr-xr-x root shell 2009-12-29 10:44 rm -> toolbox
-rwxr-xr-x root shell 39044 2009-12-29 10:41 vold
lrwxr-xr-x root shell 2009-12-29 10:44 dmesg -> toolbox
-rwxr-xr-x root shell 14188 2009-12-29 10:41 dumpstate
-rwxr-xr-x root shell 7007 2009-12-29 10:41 i2ctest
-rwxr-xr-x root shell 5564 2009-12-29 10:41 app_process
-rwsr-xr-x root root 34612 2010-01-26 13:58 su
-rwxr-xr-x root shell 12194 2009-12-29 10:41 wifibtap
-rwxr-xr-x root shell 46460 2009-12-29 10:41 sdptool
lrwxr-xr-x root shell 2009-12-29 10:44 setprop -> toolbox
-rwxr-xr-x root shell 5144 2009-12-29 10:41 hcid
-rwxr-xr-x root shell 191 2009-12-29 10:41 am
lrwxr-xr-x root shell 2009-12-29 10:44 start -> toolbox
-rwxr-xr-x root shell 5428 2009-12-29 10:41 airbaggy
lrwxr-xr-x root shell 2009-12-29 10:44 dumpcrash -> dumpstate
lrwxr-xr-x root shell 2009-12-29 10:44 sendevent -> toolbox
lrwxr-xr-x root shell 2009-12-29 10:44 mv -> toolbox
lrwxr-xr-x root shell 2009-12-29 10:44 df -> toolbox[/codebox]

Thanks alot!

toolbox was missing and a reflash fixed the problem! :)

Link to comment
Share on other sites

  • 2 months later...
Guest sergiolas

hi! i have this problem but with "telnet command" .

I can't find where is this command anywhere , not even in the list of commands you posted.

thanks!

Link to comment
Share on other sites

Guest dguerre
hi! i have this problem but with "telnet command" .

I can't find where is this command anywhere , not even in the list of commands you posted.

thanks!

I don't think telnet is provided by default, for that you're going to need to install busybox.

Link to comment
Share on other sites

Guest Uxian
what do i have to do to install busy box?

Easiest method if you have a rooted phone - install Titanium Backup and that will automagically download and install busybox for you when you click on the "Problems?" button

Alternatively this thread: http://android.modaco.com/content/acer-liq...nstall-busybox/ has a Windows .exe that will install it for you

Or lastly to install manually, follow Paul's tutorial: http://android.modaco.com/content/htc-hero...alling-busybox/

If you're not rooted then you should be able to follow that last tutorial but use /data/local instead of /system/xbin (although the PATH will not include BusyBox so you'll need to use explicit pathnames for the commands e.g. /data/local/vi).

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.