ADB Debugging over Bluetooth
来源:互联网 发布:避孕套 知乎 编辑:程序博客网 时间:2024/05/22 06:48
原文 https://developer.android.com/training/wearables/apps/bt-debugging.html
Debugging over Bluetooth
PreviousNext
This lesson teaches you to
- Set Up Devices for Debugging
- Set Up a Debugging Session
- Debug Your App
You should also read
- Android Wear Design Principles
You can debug a watch app over Bluetooth by routing the app's debug output to the phone that is connected to your development machine.
Set Up Devices for Debugging
Enable USB debugging on the phone:
- In Settings > About phone, tap Build number seven times to enable the Developer Options.
- In Settings > Developer Options, enable USB debugging.
Enable Bluetooth debugging on the watch:
- Open the Settings menu on the watch.
- Scroll to the bottom of the menu and tap About.
- Tap the build number 7 times.
- From the Settings menu, tap Developer Options.
- Confirm that ADB debugging is enabled.
- Enable Debug over Bluetooth.
Set Up a Debugging Session
- On the phone, open the Android Wear companion app.
- Tap the Settings icon.
- Enable Debugging over Bluetooth. A status summary, as follows, is displayed under the option:
Host: disconnectedTarget: connected
- Connect the phone to your machine over USB and run:
adb forward tcp:4444 localabstract:/adb-hubadb connect 127.0.0.1:4444
Note: You can use any available port to which you have access.
- When prompted on the watch, confirm that you are allowing ADB Debugging.
In the Android Wear companion app, you should see the status change to:
Host: connectedTarget: connected
Debug Your App
Your watch is connected as 127.0.0.1:4444
when running adb devices
. To run any adb
command, use this format:
adb -s 127.0.0.1:4444 <command>
If there are no other devices connected over TCP/IP (namely emulators), you can shorten the command to:
adb -e <command>
For example:
adb -e logcatadb -e shelladb -e bugreport
0 0
- ADB Debugging over Bluetooth
- android Wearable-Packaging Wearable Apps and Debugging over Bluetooth
- <等待翻译>Android Wear 进阶 2.6 Debugging over Bluetooth 通过蓝牙调试
- BlueTooth Over Wince
- Debugging SQLite with adb
- Bluetooth LE Testing Over UART
- ADB OVER WIFI
- ADB over WiFi
- Connecting to GPRS over Bluetooth on Linux
- Use adb over Wi-Fi
- Multiple adb connections over WiFi
- How do you make Ubuntu accept files sent over bluetooth
- connect android with adb over tcp
- Using Android Debug Bridge (ADB) over Wifi
- 使用 ADB over network 通过网络调试
- Debugging
- Debugging
- debugging
- [嵌入式]存储器管理
- Python中的闭包
- 闭包所带来的问题
- 学习python3 01 list与tuple
- 利用反射和注解模拟ORM框架中的自动建表功能
- ADB Debugging over Bluetooth
- 算法分析与设计总结
- Android MVPVM架构实践
- 多线程——内存访问顺序 (序)
- 在eclipse中配置Python开发环境
- 分布式系统全链路应用监控系统解决方案
- dubbo+zookeeper+spring整合demo
- 从零开始搭建一个HTTPS网站
- Linux系统上hdparm工具参数详解,硬盘检查、测速、设定和优化