请问大家,在android中如何发布、启动ViewServer服务啊???ViewServer服务端口号是:4939请大家帮忙看看,解决给分。
解决方案 »
- android 的短信识别
- android设备如何获取WiFi的AP发射功率,噪音强度,最大码率等参数?
- 用ubuntu编译源码出错!!!
- DDMS发送中文短信时出现乱码如何解决
- 华为U8150内核编译出错怎么解决
- 分享一个android开发者超级交流群(500人)
- android 通过wifi和互联网连接打印机实现打印功能怎么做?
- android ScrollView滚动到底部和顶部的检测
- 请高手帮我看下如下Android代码,问题在哪里
- android 开发listview中实现仿新浪微博和人人推荐关注的ui设计
- android google map http请求 返回是英文?
- MediaPlayer 播放视频旋转问题
假设我们有多台设备连接在PC上,该命令的输出为:
1 List of devices attached
2 emulator-5554 device
3 emulator-5556 device
以设备emulator-5556为例,接下来我们把它的4939端口映射到PC的4939端口上:
1 adb -s emulator-5556 forward tcp:4939 tcp:4939
如果连接了多台Android设备,HierarchyViewer将把下一台Android设备的4939端口映射到PC的4940端口,以此类推。
(2)打开ViewServer服务。
首先,需要判断ViewServer是否打开:
1 adb -s emulator-5556 shell service call window 3
如果返回值是"Result: Parcel(00000000 00000000 '........')",说明ViewServer没有打开,那么需要用下面的命令打开ViewServer:
1 adb -s emulator-5556 shell service call window 1 i32 4939
反之,关闭ViewServer的命令是:
1 adb -s emulator-5556 shell service call window 2 i32 4939