Getting Logs on Android STB via ADB

To get a detailed log of the SmartTUBE app, first connect to STB via ADB tool. Then follow the guide below.

Current application (JUNG)

  1. Make sure the SmartTUBE app is installed on the device and obtain its package name:

adb shell ‘pm list packages -f’ | grep tv

The package is usually named as tv.smartlabs.<%Customer_name%>. This path should be available if the application is installed.

  1. Upload the environment config — environment.cfg and environment.cfg.sig — to the device:

adb push environment.cfg* /sdcard/

adb shell mv /sdcard/environment.cfg* /sdcard/Android/data/<%SMARTTUBE_APP_PACKAGE_NAME%>/files/

adb shell chmod g+rw /sdcard/Android/data/<%SMARTTUBE_APP_PACKAGE_NAME%>/files/*

  1. If the app is running, stop it:

adb shell am force-stop <%SMARTTUBE_APP_PACKAGE_NAME%>

  1. Find out the Launchable Activity by the package name:

adb shell cmd package resolve-activity –brief <%SMARTTUBE_APP_PACKAGE_NAME%> | tail -n 1

  1. Relaunch the app:

adb shell am start -n “<%SMARTTUBE_APP_LAUNCHABLE_ACTIVITY_NAME%>” -a android.intent.action.MAIN –esa args –url=“h5vcc-embedded://overlay/portal/index.html?debug”

  1. Start writing a log via ADB:

adb logcat -v threadtime | grep -v RTKBT_HEARTBEAT > log.txt

  1. You can increase the log level by sending a control message to the application. To do this, please open SmartTUBE Admin Console > Service Accounts, select a particular account and press Send message button. The message text should be: setupAppProperty%3FdebugMode%3Dtrue

    Notice, that sometime after entering into the stand-by mode, adb disconnects the STB, so you may have to reconnect to it (in this case it’s better to start writing to a new file):

adb disconnect

adb connect <ip>

adb logcat -v threadtime | grep -v RTKBT_HEARTBEAT > log_1.txt

Deprecated application (STBUI)

  1. Make sure the SmartTUBE app is installed on the device and obtain its package name:

adb shell pm list packages

The package is usually named as tv.smartlabs.<%Customer_name%>. This path should be available if the application is installed.

  1. Upload the environment config — environment.cfg and environment.cfg.sig — to the device:

adb push environment.cfg* /sdcard/

adb shell mv /sdcard/environment.cfg* /sdcard/Android/data/<%SMARTTUBE_APP_PACKAGE_NAME%>/files/

adb shell chmod g+rw /sdcard/Android/data/<%SMARTTUBE_APP_PACKAGE_NAME%>/files/*

  1. If the app is running, stop it:

adb shell am force-stop <%SMARTTUBE_APP_PACKAGE_NAME%>

  1. Relaunch the app
  2. Start writing a log via ADB:

adb logcat -v threadtime | grep -v RTKBT_HEARTBEAT > log.txt

  1. You can increase the log level by sending a control message to the application. To do this, please open SmartTUBE Admin Console > Service Accounts, select a particular account and press Send message button. The message text should be: setupAppProperty%3FdebugMode%3Dtrue

    Notice, that sometime after entering into the stand-by mode, adb disconnects the STB, so you may have to reconnect to it (in this case it’s better to start writing to a new file):

adb disconnect

adb connect <ip>

adb logcat -v threadtime | grep -v RTKBT_HEARTBEAT > log_1.txt

CONTENTS
Sign-in
Sign-in with your SmartLabs Support Portal account credentials to see non-public articles.