-1

How do I control my android phone with the ADB shell?

Pls show me the commands for ADB

2
  • 3
    Can you expand your question to show how it relates to programming? Commented Feb 5, 2011 at 12:33
  • What OS do you use; what exactly do you mean by "control my android phone" ? Commented Jul 7, 2011 at 0:36

2 Answers 2

3

adb shell gives you an ash shell running on the device, which is an sh-compatible shell. So you've got the standard sh builtins: cd, echo, etc.

Then there are the command binaries on the PATH. My phone (Nexus One, Android 2.2.2) has the following:

$ ls /system/bin logwrapper logcat nandread linker ionice keystore installd hciattach fsck_msdos dumpsys dumpstate wpa_supplicant dhcpcd sleep dexopt vold stop bluetoothd route am cmp surfaceflinger iftop wipe monkey id toolbox insmod sync notify cat ioctl top dbus-daemon rmdir sh date ps ifconfig servicemanager ln netstat vdc sendevent input vmstat schedtop service brcm_patchram_plus mount dd bootanimation tc hd getprop ime setprop sdptool ls chown log run-as pand dmesg schedtest chmod pm kill rm df rild smd dalvikvm mkdir reboot omx_tests bugreport app_process lsmod svc racoon netd dvz akmd umount newfs_msdos ndc printenv gzip renice watchprops mv bmgr start mediaserver pppd getevent rmmod setconsole system_server ping mm-venc-omx-test iptables parse_radio_log applypatch dnsmasq debuggerd netcfg mtpd 

There are other directories on the PATH, but none of these are accessible (unless you've rooted your device?).

See also the documentation.

Sign up to request clarification or add additional context in comments.

2 Comments

If you need more commands to control your device from adb shell, consider installing Busybox on your android device. Busybox enables you to use most of the standard linux commands, such as file operations with cp, wget, grep, tar - which are very useful but not included in the standard adb command set.
Important to note that users must be rooted in order to use Busybox.
0

If you have a device or an emulator connected run adb with parameter shell as in

adb shell

You can also type adb for commands and/or parameters to adb

For all this to work - adb must be in the path

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.