ADB命令
adb shell dumpsys activity top
adb shell setprop sys.verity 1
adb disable-verity
adb reboot
adb shell setprop persist.sys.usb.config mtp,serial,diag,adb
增加三条命令将触摸音等静音。
adb shell settings put system dtmf_tone 0
adb shell settings put system lockscreen_sounds_enabled 0
adb shell settings put system sound_effects_enabled 0
拨打电话
1)通过phone service
adb shell route查看路由信息
adb shell ifconfig查看IP配置信息
adb shell service list查看Android系统中有哪些service,其中打电话的服务为phone:[com.android.internal.telephony.Itelephony]
adb shell service call的用法如下:
Usage: service [-h|-?]
service list
service check SERVICE
service call SERVICE CODE [i32 N | i64 N | f N | d N | s16 STR ] ...
Options:
i32: Write the 32-bit integer N into the send parcel.
i64: Write the 64-bit integer N into the send parcel.
f: Write the 32-bit single-precision number N into the send parcel.
d: Write the 64-bit double-precision number N into the send parcel.
s16: Write the UTF-16 string STR into the send parcel.
其中CODE对应AIDL中的第几个接口函数序号,从1开始,后面就是函数的入参。比如ITelephony的第1个方法dial用法
adbshell service call phone 1 s16 "10000"
Result:Parcel(00000000 '.…')
此方法只是显示拨号界面,还需要点击拨号图标才会拨号
挂断电话就是adbshell service call phone 3
2)通过AM命令
adb shell am start -a android.intent.action.CALL -d tel:10010
REPO命令
repo sync -c --no-tags
Linux命令
find ./ -name Android.mk -exec grep -l init {} \;先通过查找Android.mk文件,找到init相关的代码目录
git grep -wn dsi_cmd_desc或是find ./ -iname *.c|xargs grep -wrn dsi_cmd_desc kernel目录下查找结构体dsi_cmd_desc定义