由于本人英文能力实在有限,不足之初敬请谅解
本博客只要没有注明“转”,那么均为原创,转贴请注明本博客链接链接
Debugging over Bluetooth
通过蓝牙调试
You can debug your wearable over Bluetooth by routing its debug output to the handheld device that's connected to your development machine.
你可以通过蓝牙debug你的穿戴设备,把穿戴设备的debug输出定向到连接在你的来发机器上的手持设备中。
Setup Devices for Debugging
debug设置
1.Enable USB debugging on the handheld:
a)Open the Settings app and scroll to the bottom.
b)If it doesn't have a Developer Options setting, tap About Phone (or About Tablet), scroll to the bottom, and tap the build number 7 times.
c)Go back and tap Developer Options.
d)Enable USB debugging.
打开手持设备中的USB调试
打开设置app病滚动到底部
如果它没有开发者选项,点击“关于手机” (或者关于平板),滚动到底部,然后点击版本号7次。
返回病点击开发者模式,开启USB调试。
2.Enable Bluetooth debugging on the wearable:
a)Tap the home screen twice to bring up the Wear menu.
b)Scroll to the bottom and tap Settings.
c)Scroll to the bottom. If there's no Developer Options item, tap About, and then tap the build number 7 times.
d)Tap the Developer Options item.
e)Enable Debug over Bluetooth.
开启手持设备的通过蓝牙调试
点击home两次进入Wear菜单。
滚动到底部并点击设置
滚动到底部。如果没有开发者选项,点击“关于”,然后点击版本号7次。
点击开发者模式,开启通过蓝牙调试。
Set Up a Debugging Session
设置debug会话
1.On the handheld, open the Android Wear companion app.
在手持设备中,打开Android Wear伴侣app
2.Tap the menu on the top right and select Settings.
点击右上角菜单选择设置
3.Enable Debugging over Bluetooth. You should see a tiny status summary appear under the option:
开启通过蓝牙debug。你应该会看见出现在这个选项下一个很小的状态描述。
Host: disconnected Target: connected
4.Connect the handheld to your machine over USB and run:
通过USB连接手持设备并执行:
adb forward tcp:4444 localabstract:/adb-hub adb connect localhost:4444
Note: You can use any available port that you have access to.
注意:你可以使用任何可用端口。
In the Android Wear companion app, you should see the status change to:
在Android Wear伴侣app中,你会看到状态变为:
Host: connected Target: connected
Debug Your App
debug你的app
Your wearable should show up as localhost:4444 when running adb devices. To run any adb command, use this format:
当运行adb devices时,你的穿戴设备应该显示为localhost:4444。使用下面的格式执行adb命令:
adb -s localhost:4444 <command>
If there are no other devices connected over TCP/IP (namely emulators), you can shorten the command to:
如果没有其他设备通过TCP/IP(即模拟器)连接,你可以简写命令为:
adb -e <command>
For example:
例如:
adb -e logcat adb -e shell adb -e bugreport
原文地址如下,英文水平实在有限,希望拍砖同时能给予指正。
https://developer.android.com/training/wearables/apps/bt-debugging.html
转贴请保留以下链接
本人blog地址
相关推荐
智能穿戴制造-设备监控-工厂生产设备EMS解决方案.pptx
智能穿戴设备Android-SDK,Ble中心设备例子.rar
本书共分25章,循序渐进地讲解了基于Android系统开发穿戴设备应用程序的基本知识。内容包括Android开发技术基础、搭建Android应用开发环境、获取并编译源码、Android技术核心框架分析、HTTP网络通信、使用Socket实现...
MTK平台穿戴设备app源码,蓝牙推送 安装VXP文件
20140830 ELEC沙龙-天津站-智能穿戴 许永硕-可穿戴设备的发展之路pdf,本文以提问题的方式阐述了可穿戴设备的发展之路
Android智能穿戴设备开发从入门到精通
穿戴式蓝牙设备通讯程序,应用于单片机与安卓手机之间的通讯
G智能穿戴制造-设备监控-工业物联网行业解决方案.pptx
G智能穿戴制造-设备监控-IBM测试自动化解决方案.pptx
智能穿戴制造-设备监控-基站设备电力管理解决方案.pptx
【G008】智能穿戴制造-设备监控-基站设备电力管理解决方案.pptx
可穿戴设备是什么呢?很多人会想问。接下来小编给揭秘。可穿戴设备当下社会中必不可少的。对于很多开发者来说,可穿戴设备是一个激动人心的领域。...让我们翻开Android可穿戴设备高级编程,从头开始学习可穿戴App开发吧
手机通过蓝牙与手表(开发板)相连,手表接收手机讯息后,将它展示给用户;用户做出反馈,手表将反馈信号传回手机,总之就是一个简单的智能手表原型机。手表能显示来电、短信、天气、时间,还能玩点小游戏。 lm3s...
【G011】智能穿戴制造-设备监控-工厂生产设备EMS解决方案.pptx
智能穿戴制造-设备监控-物联指纹锁解决方案.pptx
智能穿戴制造-设备监控-工业物联网行业解决方案.pptx
《Android智能穿戴设备开发指南》随书源码
智能穿戴制造-设备监控-智能光交锁解决方案.pptx