shell后的指令用分号隔开。如下面,获取手机的型号和厂商。
(以下代码在java项目-eclipse中执行的)
1 2 3 4 |
String cmd = "adb -s " + device + " -d shell getprop ro.product.model ; getprop ro.product.brand" + "\n"; Process process = Runtime.getRuntime().exec(cmd); |
end
声明
本文由崔维友 威格灵 cuiweiyou vigiles cuiweiyou 原创,转载请注明出处:http://www.gaohaiyan.com/2296.html
承接App定制、企业web站点、办公系统软件 设计开发,外包项目,毕设