You can debug Android applications running on Google TV from the Eclipse IDE or with tools included in the Android SDK.
Debugging with Eclipse is done the same way for Google TV as for other devices. To learn more about debugging with Eclipse, please read the topic Debugging from Eclipse with ADT in the Android Developers Guide.
In most ways, debugging with the Android SDK tools is the same for a Google TV device as for other devices. To learn more about debugging with the Android SDK tools, please read the topic Debugging from Other IDEs in the Android Developers Guide.
Using Android Debug Bridge (ADB)
To debug an Android application, you use Android Debug Bridge (ADB). In the Android Developers Guide, debugging Android applications is described in the topic Debugging, and using ADB is described in the topic Android Debug Bridge.
Working with ADB over IP
You can't debug a Google TV device over USB, but you can use an IP connection.
To connect ADB to Google TV with IP:
- Find your workstation's IP address and write it down. The procedure varies according to the platform you're using. You will use this information later on to configure your Google TV device for debugging.
- Set up your Google TV device.
- On the Home screen, click the All Apps icon to view all Android applications, then click the Settings icon to see the settings.
- In the Settings application, select Applications > Development.
- Set Remote debugging to allow your workstation to connect to this device.
- Click Debugger IP address, then in the dialog enter your workstation's IP address and click Set.
- Navigate back to the main menu of the Settings application.
- Select Network > Status. Under IP address, find the IP address listed for your Google TV device and write it down.
Use ADB to connect to your Google TV device from your development workstation. To do this, on your development workstation open a terminal session
or command prompt and run the ADB tool:
$ /<SDKpath>/platform-tools/adb connect <IPAddress>
<SDKpath>is the path to your Android SDK, and
<IPAddress>is the IP address of your Google TV device.
To test the connection, enter the command:
$ adb devices
You should see the following output:
List of devices attached <IPAddress>:5555 device