常用命令

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定义

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值