语言

Menu
Sites
Language
Debug both Tizen and Android at the same time?

I'm developing a Tizen native app and an Android app that are supposed to communicate with each other (using the Samsung Accessory SDK).  However, I've found that I can't debug on both devices at the same time; if Tizen Studio is connected to a watch, I can't connected Android Studio to a phone, and vice versa.

With neither open, using just the command line, I've found that if I kill both the adb and sdb servers, then either connect to an Android device with ADB or connect to a Tizen device with SDB, the other one can't connect.

Has anyone found a way to debug both at the same time?

 

响应

5 回复
Anirban Dutta

Hi!

I have tried an application which sends a notification from Android Phone to Tizen Watch. I can debug the app both from Android Studio and Tizen Studio when the watch is connected to the Phone via Gear Manager.

Please check the following steps:

1. Connect the watch with the Android device through Gear Manager.

2. Make sure App on Android device can connect with the watch.

Debugging from Android & Tizen Studio worked for me after making successful connection from the application to watch.

If you still get debugging error after checking these steps, Please let me know the error log  here.

Thanks.

Steven Merel

Hi, I have tried those steps but can't debug.  I'm using Tizen Studio and Android Studio, latest versions of each.

Which error log would you like?  

Steven Merel

Here is what happens on the command line, using sdb and adb:

first, kill both servers, then start server & list Android devices:

adb kill-server
sdb kill-server
adb start-server
adb devices

output is:

* daemon not running. starting it now on port 5037 *
* daemon started successfully *
List of devices attached
00812584e114a1cf    device

now do the same but with the sdb server running:

adb kill-server
sdb kill-server
sdb start-server
adb start-server
adb devices

output is:

info: server not running
* server not running. starting it now on port 26099 *
* server started successfully *
* daemon not running. starting it now on port 5037 *
adb E 25580 909607 usb_osx.cpp:327] Could not open interface: e00002c5
adb E 25580 909607 usb_osx.cpp:289] Could not find device interface
* daemon started successfully *
List of devices attached

note that no devices are listed (even though one is physically connected).

 

Anirban Dutta

Hi,

I have checked again.

Smart Development Bridge (SDB) can list all avaiable devices (tizen and android) where ADB tool can't. It only checks for android devices connected to the development machine.

I have checked with both tizen and android device connected to my machine.

If we start and run sdb command first like this:

adb kill-server
sdb kill-server
sdb start-server
adb start-server
sdb devices
adb devices

sdb can list both tizen and android devices where android only list available android devices.  So, If we start sdb server before adb server, adb won't get notified about connected android device (as it is already listed to sdb and busy, which throws the error e00002c5: "could not open interface" in OSX. It doesn't show any device at all.
If we kill sdb-server now and  check 'adb devices' again , we will find the device listed. (As the device will be released from sdb daemon).
Take a look at my log:

anirban@anirban:~/tizen-studio/tools$ ./sdb kill-server
info: server not running
anirban@anirban:~/tizen-studio/tools$ adb kill-server
anirban@anirban:~/tizen-studio/tools$ ./sdb connect 192.168.43.203 server not running. starting it now on port 26099 *
* server started successfully *
error: failed to connect to remote target '192.168.43.203'
anirban@anirban:~/tizen-studio/tools$ ./sdb connect 192.168.43.203
connecting to 192.168.43.203:26101 ...
connected to 192.168.43.203:26101
anirban@anirban:~/tizen-studio/tools$ ./sdb devices
List of devices attached 
192.168.43.203:26101    device        SM-R735S
01157df14d284139    	device    	SM-G920F
anirban@anirban:~/tizen-studio/tools$ adb devices
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
List of devices attached 

anirban@anirban:~/tizen-studio/tools$ ./sdb kill-server
anirban@anirban:~/tizen-studio/tools$ adb devices
List of devices attached 
01157df14d284139	device

If we check from sdb again we will see the device is connected but offline (busy listed under adb).

anirban@anirban:~/tizen-studio/tools$ ./sdb devices
List of devices attached
01157df14d284139        offline       device-1
192.168.43.203:26101    device        SM-R735S

Same things happens for Android and Tizen Studio. If you open Tizen Studio before Android Studio, sdb will list available devices and Android Studio will fail to detect the device. I have started Android Studio prior to Tizen and Everything works fine!

Thanks.

 

Steven Merel

Ah yes, starting Android Studio first seems to do the trick.

thanks!