Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

It is impossible Debugging over Bluetooth

Trying to debug an application on wear. Prior to this, using the emulator, we now have the device. Following the instructions, stopped on the line

In the Android Wear companion app, you should see the status change to:

Host: connected Target: connected

The phone status host: not connected target device is connected.

what could be the problem? I have a feeling that it is impossible to connect device.

P.s. USB debugging on my phone, and debugging via bluetooth on the clock included. App for my phone (for my model LG G Watch), also downloaded and installed.

like image 422
Garf1eld Avatar asked Sep 13 '26 23:09

Garf1eld


1 Answers

1)Setup Devices for Debugging

Enable USB debugging on the handheld:

Open the Settings app and scroll to the bottom.

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.

Go back and tap Developer Options.

Enable USB debugging.

Enable Bluetooth debugging on the wearable:

Tap the home screen twice to bring up the Wear menu.

Scroll to the bottom and tap Settings.

Scroll to the bottom. If there's no Developer Options item, tap About, and then tap the build number 7 times.

Tap the Developer Options item.

Enable Debug over Bluetooth.

2)Set Up a Debugging Session

On the handheld, open the Android Wear companion app.

Tap the menu on the top right and select Settings.

Enable Debugging over Bluetooth. You should see a tiny status summary appear under the option:

    Host: disconnected

    Target: connected

Connect the handheld to your machine over USB and run: 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:

Host: connected

Target: connected

3)Debug Your App

Your wearable should show up as localhost:4444 when running adb devices. To run any adb command, use this format:

      adb -s localhost: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 logcat

      adb -e shell

      adb -e bugreport
like image 125
Roy Mourad Avatar answered Sep 15 '26 12:09

Roy Mourad



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!