Question
I'm experiencing problems connecting to the Tizen emulator using sdb. After downloading the SDK from the official Tizen Studio download page and creating an emulator, I consistently receive "closed" messages when trying to execute various sdb commands.
Environment:
- OS: Ubuntu 16.04.1 LTS
- sdb version: 2.2.91
- Emulator type: TV-Emulator
Commands and outputs:
./sdb devices
List of devices attached
emulator-26101 device TV-Emulator
./sdb version
Smart Development Bridge version 2.2.91
./sdb get-state
device
./sdb dlog
closed
- waiting for device -
error: failed to run command: command 'wait-for-device' not supported
[repeated multiple times]
./sdb shell
closed
closed
./sdb install /path/to/package.wgt
closed
Interestingly, the push command works:
./sdb push logServer.conf /tmp/
[successful output]
IDE logs show:
E/sdb: sdb rejected shell command (0 list_showcontrol "/"): closed
E/sdb: excute doLS failed:org.tizen.sdblib.exception.SdbCommandRejectedException: closed
E/sdb: sdb rejected shell command (dlogctrl get platformlog): closed
Questions:
- Do I need to enable something specific on the emulator?
- Are there any configuration steps I'm missing for sdb?
Answer
Problem Understanding
The issue occurs due to security restrictions in Tizen TV emulator and devices. Many sdb commands are intentionally disabled for security reasons, especially for TV products.
Solution Methods
-
Understand the limitations:
- The "closed" messages indicate that the requested operations are not permitted due to security policies.
- Run
sdb capabilityto see what operations are allowed:
This will show which features are enabled/disabled on your device.sdb capability
-
Check for updates:
- While the user has version 2.2.91, newer versions might have different capabilities.
- Update to the latest Tizen Studio version from the official download page.
-
Alternative approaches:
- For development purposes, consider using non-TV Tizen emulators which have fewer restrictions.
- For TV development, you'll need to work with the limited set of available commands.
Code Examples
Example output from sdb capability on a restricted device:
secure_protocol:enabled
intershell_support:disabled
filesync_support:push
usbproto_support:disabled
sockproto_support:enabled
syncwinsz_support:enabled
rootonoff_support:disabled
zone_support:disabled
multiuser_support:enabled
cpu_arch:x86
log_enable:disabled
Additional Tips
- The push command works because file transfer is typically allowed even on restricted devices.
- Shell access and installation commands are often restricted on TV products for security reasons.
- For official TV development, consider applying for Samsung Smart TV Partner Developer program which might provide additional access.