Happykiller 发表于 2012-12-19 23:09:40

ADB Shell Command Reference

ADB Shell Command Reference

<div id="cnblogs_post_body">So we have seen a lot of ADB shell commands, but running below command will give you a full list:

[*]adb shell ls /system/bin
Actually they are files that located in the /system/bin/ directory of emulator/device.


[*]getprop/setprop/watchprops, running getprop will display settings of device/emulator like below:
    [ro.secure]:     ro means read-only
    :
    :
    [persist.service.adb.enable]:
    :
    :
    :
    :
    :
    :
    :
    ...
    :
    :
    :
    :
    : []
    More refers below, and check this out http://www.bobbog.com/archives/709 and http://blog.csdn.net/jackyu613/article/details/6136620
        /default.prop
        /system/build.prop
        /system/default.prop
        /data/local.prop
        /data/property/presist.*


[*]dumpsys/dumpstate, dump device/emulator system information
    dumpsys

cat/dd/mv/mkdir/rmdir/ls/rm/chown/chmod/sh/ln

lsmod/rmmod/insmod
top/ps

id


pm


vmstat

am/dvz/dalvikvm/app_process
ping/iftop/netstat/

dexopt

input, 模拟键盘

[*]input keyevent 1 http://developer.android.com/reference/android/view/KeyEvent.html
[*]input text “aaaaa”
adb shell sendevent /dev/input/event0 1 229 1 代表按下按下menu键

kill

[*]kill -10 465 will produce dump file /data/misc/heap-dump-tm1289007218-pid465.hprof



log
system_server
radiooptions

logwrapper
applypatch
fsck_msdos

keypress
bmgr
updater
flash_image
netcfg
schedtest
showlease
setconsole
service
reboot
hd
getevent
newfs_msdos
recovery
wipe
printenv
bugreport
installd
monkey
stop
qemud
smd
keystore
ime
date
ps
mediaserver
umount
bootanimation
renice
df
pppd
mount
gzip
dmesg
sync
vold
logcat
applypatch_static
keystore_cli
mtpd
qemu-props
svc
sendevent
notify
cmp
racoon
debuggerd
gdbserver
dumpcrash
servicemanager
fbtool
ioctl
check_prereq
ifconfig
sleep
sdutil
rild
dhcpcd
toolbox
start
linker
surfaceflinger
schedtop
dmagent
route
页: [1]
查看完整版本: ADB Shell Command Reference