-
ANDROID 调试技术:
-
1)Ps 指令
-
ls –l /proc/27/
-
cat /proc/27/cmdline #cmdline文件表示了这个进程所在的命令行。
-
cat /proc/27/status #status 文件表明了获知这个进程的相关信息。 #stat包含更多信息,但较难读。
-
cat /proc/27/task #task 文件表明了进程信息。
-
2)vmstat 查看虚拟内存统计信息
-
3)top 统计CPU的消耗情况
-
4)dumpstat dumpsys
-
#adb shell dumpstat |grep CPU
-
5)dmesg
-
6)ioctl
-
Ioctl –l 16 –r /dev/graphics/fb0 0x4600
-
Android专用调试命令:
-
1) netcfg
-
2) service
-
1. service list
-
会列出本机所有正在运行的service。
-
Service 调用:
-
service call phone <span style="color:#FF0000;">2</span> s16 "123"
-
service call isms <span style="color:#FF0000;">4</span> s16 "12345678" s16 "" s16 "hello world!" s16 "" s16 ""
-
3) am
-
# am start -n com.android.music/com.android.music.MusicBrowserActivity
-
# am start -n com.android.music/com.android.music.VideoBrowserActivity
-
# am start -n com.android.music/com.android.music.MediaPlaybackActivity
-
Camera(照相机)的启动方法为:
-
# am start -n com.android.camera/com.android.camera.Camera
-
Browser(浏览器)的启动方法为:
-
# am start -n com.android.browser/com.android.browser.BrowserActivity
-
启动浏览器 :
-
am start -a android.intent.action.VIEW -d http://www.google.cn/
-
拨打电话 :
-
am start -a android.intent.action.CALL -d tel:10086
-
启动 google map 直接定位到北京 :
-
am start -a android.intent.action.VIEW geo:0,0?q=beijing
-
附录: android shell 表
-
dumpcrash
-
sh
-
date
-
am
-
hciattach
-
dd
-
dumpstate
-
sdptool
-
cmp
-
input
-
logcat
-
cat
-
itr
-
servicemanager
-
dmsg
-
monkey
-
dbus-daemon
-
df
-
pm
-
debug_tool
-
getevent
-
svc
-
flash_image
-
getprop
-
ssltest
-
installd
-
hd
-
debuggerd
-
dvz
-
id
-
dhcpcd
-
hostapd
-
ifconfig
-
hostapd_cli
-
htclogkernel
-
insmod
-
fillup
-
mountd
-
ioctl
-
linker
-
qemud
-
kill
-
logwrapper
-
radiooptions
-
ln
-
telnetd
-
toolbox
-
log
-
iftop
-
hcid
-
lsmod
-
mkdosfs
-
route
-
ls
-
mount
-
setprop
-
mkdir
-
mv
-
sleep
-
dumpsys
-
notify
-
setconsole
-
service
-
netstat
-
smd
-
playmp3
-
printenv
-
stop
-
sdutil
-
reboot
-
top
-
rild
-
ps
-
start
-
dalvikvm
-
renice
-
umount
-
dexopt
-
rm
-
vmstat
-
surfaceflinger
-
rmdir
-
wipe
-
app_process
-
rmmod
-
watchprops
-
mediaserver
-
sendevent
-
sync
-
system_server
-
schedtop
-
netcfg
-
ping
-
chmod