博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
通过蓝牙调试(穿戴设备app) - 开发文档翻译
阅读量:4144 次
发布时间:2019-05-25

本文共 2299 字,大约阅读时间需要 7 分钟。

由于本人英文能力实在有限,不足之初敬请谅解

本博客只要没有注明“转”,那么均为原创,转贴请注明本博客链接链接

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: disconnectedTarget: connected

4.Connect the handheld to your machine over USB and run:

通过USB连接手持设备并执行:

adb forward tcp:4444 localabstract:/adb-hubadb 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: connectedTarget: 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 

If there are no other devices connected over TCP/IP (namely emulators), you can shorten the command to:

如果没有其他设备通过TCP/IP(即模拟器)连接,你可以简写命令为:

adb -e 

For example:

例如:

adb -e logcatadb -e shelladb -e bugreport

原文地址如下,英文水平实在有限,希望拍砖同时能给予指正。

转贴请保留以下链接

本人blog地址

转载地址:http://cycti.baihongyu.com/

你可能感兴趣的文章
二叉树的最近公共祖先LCA
查看>>
数组中累加和为定值K的最长子数组长度
查看>>
素数对--腾讯2017校招编程
查看>>
JAVA集合--ArrayList实现原理
查看>>
synchronized与Lock
查看>>
数据库索引
查看>>
实现包含min,max,push,pop函数的栈
查看>>
实验2-6 字符型数据的输入输出
查看>>
实验3-5 编程初步
查看>>
实验4-1 逻辑量的编码和关系操作符
查看>>
实验5-2 for循环结构
查看>>
实验5-3 break语句和continue语句
查看>>
实验5-4 循环的嵌套
查看>>
实验5-5 循环的合并
查看>>
实验5-6 do-while循环结构
查看>>
实验5-7 程序调试入门
查看>>
实验5-8 综合练习
查看>>
第2章实验补充C语言中如何计算补码
查看>>
深入入门正则表达式(java) - 命名捕获
查看>>
使用bash解析xml
查看>>