Bluetooth real-Computer debug Android Wear app & real-computer uninstall debugging app

Source: Internet
Author: User

Wearable devices What's the market, Outlook, analysis, pigs and tuyere, etc... What what the Mandarin will not wordy, another day to change the role of XX spray, today record a technology paste backup.


First, the environment

Operating system: Mac OS X 10.10.1

Development environment: Android Studio 1.0.2 (Mac Edition)

Watch Equipment: Moto 360

Mobile device: Meizu MX4

Watch system: Ticwear v1.0.7 (Android Wear 4.4w.2)


Mobile phone Android Wear software environment is not much to say Baidu can, ticwear Chinese system can go to http://www.ticwear.com/understand brush machine and installation.


Second, turn on Bluetooth debugging

1. Start Android Studio, create a new project, check box select phone and watch two:
Select Phone and Tablet and minimum SDK selection API 15:android 4.0.3 (of course you can choose smaller as API 8:android 2.2)
Select Wear Select and Minimum SDK Select API 20:android 4.4 (KitKat Wear)



2, turn on the device commissioning:

See Google official: http://developer.android.com/intl/zh-cn/training/wearables/apps/bt-debugging.html

The steps are:

(1) Turn on the USB debug switch on the phone:
Open system settings, in the About phone, click on the bottom of the system version information seven times. Then press back to see the developer options. Open the developer option and turn on the USB debug switch. (Some domestic mobile phone systems may be opened in a different way, such as Meizu is in the Dial key input *#* #6961 #*#* exit, and then re- enter the settings-accessibility- developer tools)

(2) Turn on the Bluetooth debug switch on the Android Wear watch device:
--Native Android Wear system is: two times the main screen will show the wear menu or long press the right side of the Watch physical button, scroll to the bottom of the click Settings, then scroll to the end, if there is no developer options, click About, then click the System version information seven times, the developer options will appear. Go to developer options and turn on the Bluetooth debug switch.
-->ticwear Chinese system is the main screen on the left menu, scroll select Settings, scroll to the bottom, if there is no developer option, similarly, click About, then click the System version information seven times, there will be developer options. Go to developer options and turn on the Bluetooth debug switch.



3. Open the debugging session:
(1) Connect the USB cable to the computer and open the Android Wear app on the mobile phone (make sure the app is connected to the watch).
(2) Click on the Gear menu on the right side of the interface to enter settings (Settings)


(3) Turn on "debug via Bluetooth" (Debugging over Bluetooth). You can see the device connection status:
host:disconnected
target:connected
(4) Make sure the phone is connected to the computer with a USB cable and execute the ADB command:
ADB forward tcp:4444 Localabstract:/adb-hub; ADB Connect localhost:4444

You can see that the connection state has just become:
host:connected
target:connected



4. Commissioning Application
If you execute the ADB devices command, your wearable device should be displayed as localhost:4444. To execute any ADB command, the format should be similar to this:
Adb-s localhost:4444 <command>

If no other device is connected via TCP/IP (that is, no other emulator is connected), you can also use the simplified command:
Adb-e <command>

For example:
Adb-e Logcat
ADB-E Shell
Adb-e Bugreport


Note: In fact, the 3rd step OK after using the Android studio to run wear program can, the app will be automatically installed on the watch, a little bit slow patience and so on.



Third, uninstall the debugging app

Execute the command "adb-s localhost:4444 Uninstall package name", such as:

Adb-s localhost:4444 Uninstall COM.ARWER.TESTWEAR2

This way, there is no debug program on the watch.


OK, you are done, happy.



Bluetooth real-Computer debug Android Wear app & real-computer uninstall debugging app

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.