Adb shell命令打电话测试4G
Adb shell命令打电话测试4G
在没有显示屏的情况下,怎么测试4G的打电话和上网功能:
1.上网功能测试
用route命令看路由信息
Kernel IP routing tableDestination Gateway Genmask Flags Metric Ref Use Iface10.157.91.16 * 255.255.255.252 U 0 0 0 rmnet_d0
用ifconfig命令获取到相关的信息:
rmnet_data0 Link encap:UNSPECinet addr:10.157.91.17 Mask:255.255.255.252inet6 addr:fe80::87df:218e:da9f:bc8e/64 Scope: LinkUP RUNNING MTU:1500 Metric:1RX packets:44 errors:0dropped:0 overruns:0 frame:0TX packets:56 errors:0dropped:0 overruns:0 carrier:0collisions:0 txqueuelen:1000RX bytes:33661 TX bytes:4928
这里的inet addr:10.157.91.17是ip地址
然后pingwww.baidu.com
PING www.a.shifen.com (163.177.151.110)56(84) bytes of data.64 bytes from 163.177.151.110:icmp_seq=1 ttl=51 time=197 ms64 bytes from 163.177.151.110:icmp_seq=2 ttl=51 time=43.3 ms64 bytes from 163.177.151.110:icmp_seq=3 ttl=51 time=47.4 ms
根据上面的测试结果,表示上网功能ok。
2.打电话测试
要测试这个功能,需要用adbshell service list查看android系统中有哪些service,
Found134 services:0 qtitetherservice:[com.qualcomm.qti.tetherstatsextension.ITetherService]1 AtCmdFwd:[com.qualcomm.atfwd.IAtCmdFwd]2 dpmservice:[com.qti.dpm.IDpmService]3 qti.ims.ext:[org.codeaurora.ims.internal.IQtiImsExt]4 ims:[com.android.ims.internal.IImsService]5 sip:[android.net.sip.ISipService]6 com.qualcomm.location.izat.IzatService:[com.qualcomm.location.izat.IIzatService]7 nfc:[android.nfc.INfcAdapter]8 carrier_config:[com.android.internal.telephony.ICarrierConfigLoader]9 phone:[com.android.internal.telephony.Itelephony]…………..
phone的service提供一些接口供其他进程调用。PhoneInterfaceManager是一个Service,在被创建时通过ServiceManager注册自己,他作为Telephony对外的接口,可以接受其他进程向Telephony的请求,我们通过该Service所继承的AIDL文件就能看到他所提供的具体功能:
frameworks/base/telephony/java/com/android/internal/telephony/*** Interface used to interact with the phone. Mostly this is used bythe* TelephonyManager class. A few places are still using thisdirectly.* Please clean them up if possible and use TelephonyManager instead.** {@hide}*/interfaceITelephony {/*** Dial a number. This doesn't place the call. It displays* the Dialer screen.* @param number the number to be dialed. If null, this* would display the Dialer screen with no number pre-filled.*/void dial(String number);/*** Place a call to the specified number.* @param callingPackage The package making the call.* @param number the number to be called.*/void call(String callingPackage, String number);/*** End call if there is a call in progress, otherwise doesnothing.** @return whether it hung up*/boolean en3dCall();…}
具体怎么用呢.用adbshell service call phone
service:No service specified for callUsage:service [-h|-?]service listservice check SERVICEservice 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 sendparcel.d: Write the 64-bit double-precision number N into the sendparcel.s16: Write the UTF-16 string STR into the send parcel.
SERVICE: 执行的service名称
CODE: 执行的方法id值
[i32INT | s16 STR]:参数类型以及紧跟参数值,i32代表int类型,s16代表String类型。
比如ITelephony的第1个方法dial用法
adbshell service call phone 1 s16 "10000"
Result:Parcel(00000000 '.…')
此方法只是显示拨号界面,还需要点击拨号图标才会拨号.
我们可以通过手机往设备打电话.然后通过11和3方法来判断.11方法是isIdle(),3方法是en3dCall().
root@xxx:~#adb shell service call phone 11---------------此时手机给设备打电话,查询状态结果为1
Result:Parcel(00000000 00000001 '........')
root@xxx:~#adb shell service call phone 3-----------------挂断电话
Result:Parcel(00000000 00000001 '........')
root@xxx:~#adb shell service call phone 11------------再查询状态为0
Result:Parcel(00000000 00000000 '........')
p { margin-bottom: 0.1in; line-height: 120%; }a:link { }
找到另一种方法:
adbshell am start -a android.intent.action.CALL -d tel:10010
挂断:adbshell service call phone 3
参考:
adb操作手机打电话、发短信
http://blog.csdn.net/jethai/article/details/52345081
adbshell命令整理之service
http://blog.csdn.net/mr_oldcold/article/details/53761759
Adb shell命令打电话测试4G相关推荐
- Android SDK: adb shell 命令的使用(am、pm、wm、screencap、monkey等)
本文链接: https://blog.csdn.net/xietansheng/article/details/86675136 adb其他命令介绍详见上一篇: Android SDK: adb 常用 ...
- python调用adb shell命令_Python之使用adb shell命令启动应用的方法详解
Python之使用adb shell命令启动应用的方法详解 一直有一个心愿希望可以用Python做安卓自动化功能测试,在一步步摸索中,之前是用monkeyrunner,但是发现对于控件ID的使用非常具 ...
- EasyClick adb shell命令大全
EasyClick adb.shell命令大全目录 EasyClick adb.shell命令大全 ADB包安装步骤 使用教程 ADB高级命令 Android 常用的Linux命令 Android a ...
- android ADB shell 命令启动 android程序
今天用eclipase写了个android程序,主要用到了service.activity.broadcast,在安卓系统手机上调试通过,现在想用ADB shell命令启动这个程序,使达到的效果和在e ...
- adb shell命令
adb查看当前activity无效(adb查看所有应用包名) 前面给大家分享了Airtest,感兴趣的小伙伴,可以前往:手机自动化测试IDE-–Airtest实战篇.手机自动化测试IDE -– 手把手 ...
- 怎么打开python shell_Python之使用adb shell命令启动应用的方法详解
一直有一个心愿希望可以用Python做安卓自动化功能测试,在一步步摸索中,之前是用monkeyrunner,但是发现对于控件ID的使用非常具有局限性,尤其是ID的内容不便于区分 具有重复性时,后面又发 ...
- adb shell 命令详解,android, adb logcat
http://www.miui.com/article-275-1.html http://noobjava.iteye.com/blog/1914348 adb shell 命令详解,android ...
- dos命令行输入adb shell命令为什么报错
在命令行(就是开始--运行--输入cmd)模式下输入adb shell命令一般会报两种错误,一是"adb不是内部命令或外部命令,也不是可运行的程序或批处理文件",二是"e ...
- 常用adb shell 命令
常用adb shell命令: 1.按键事件 input text <string> input a string to device input ...
最新文章
- jenkins漏洞导致服务器中了挖矿病毒!cpu飙高351%!看我如何消灭它!
- Python集合之set()使用方法详解
- weblogic.jdbc.wrapper.Blob_oracle_sql_BLOB cannot be cast to oracle.sql.BLOB 解决方法
- vector的初始化和遍历
- UA SIE545 优化理论基础4 对偶理论简介5 对偶的几何解释
- 前端开发-热更新原理解读
- 课堂经验值管理小程序_微信小程序怎么管理门店?
- php7 有ext skel吗,PHP扩展开发系列02 - 老司机起步之函数
- LeetCode 341. 扁平化嵌套列表迭代器(双栈)
- SpringBoot项目中,Redis的初次使用
- Linux编程之epoll
- [转]【Linux】一幅图秒懂LoadAverage(负载)
- (int),Int32.Parse,Convert.ToInt3…
- JAX-WS发布WebService
- uniapp 引入第三方包发起网络数据请求
- Responses 部分 | Http Header
- 搞笑git 程序员改bug_这些神奇又搞笑的bug,真的让程序员万万没想到!
- 农村小学计算机教育论文,浅谈小学信息技术教学
- 小米路由器3刷openWRT系统的实践过程
- 关于图片存储格式的整理(BMP)
热门文章
- 查看redis缓存大小_一个 bug 引发了服务器崩溃,对应 redis 的 key 回收原理你清楚了吗?...
- 001_SpringBoot入门
- 011_布尔值内建函数
- 087_html5表单元素
- php开发mvc教程,php开发一个简单的MVC
- string包含某个字符串_Tcl字符串操作基础2
- layer output 激活函数_深入理解YOLO v3实现细节 - 第3篇 构建v3的Loss_layer
- 小派(PiMax)vr Artisan固件升级失败,没反应了
- Poisson Image Editing 泊松融合 matlab代码完整
- 大学物理规范作业25稳恒磁场_山东一地出台规定:严禁家长代批作业,违反规定将被一票否决...