Skip to content

Companion app guidance (Emulator)

HunseopJeong edited this page Jul 20, 2021 · 10 revisions

Prerequisite

  1. Prepare needed OS

    • Ubuntu(recommended) or Windows
  2. Install Tizen SDK & TV Emulator

  3. Create Samsung certificates

  4. Install Debugging Tool

    # Copy and reboot TV emulator
    $ cp sdbd-plugin-3.8.4-1.i686.rpm /PATH/TO/tizen-studio/platforms/tizen-6.0/tv-samsung/emulator-images/add-ons/package_folder
    
  5. Set up TV Emulator configuration

    [Only for Ubuntu] Configuration file for UDP forwarding : vm_launch.conf

    $ cp vm_config.xml /PATH/TO/tizen-studio-data/emulator/vms/T-samsung-6.0-x86/vm_launch.conf
    
  6. How to develop companion app

    https://github.com/Samsung/TAU/wiki/How-to-develop-companion-application

Make App Package

  1. Run Tizen SDK

  2. Import attached wgt file Video.wgt

  1. Choose Tizen Project

  1. Choose 'Archive file' (global service) : Video.wgt

  1. Choose your profile and Tizen version

  1. Fix your codes.
  2. Choose 'Build Signed Package'

  1. The wgt file will be generated.

Run TV Emulator

  1. Search & execute 'Emulator Manager' on Ubuntu or Windows

  1. Click 'Launch' button

  1. Launched TV Emulator

Install & Launch MDE Framework

  1. Please make sure that the emulator is connected to network.
$ sdb root on
# Check whether google web page is loaded or not
$ sdb shell /usr/apps/org.tizen.chromium-efl/bin/efl_webview_app http://google.com
  1. MDE F/W : DeviceHome.wgt
$ sdb root on
# Install MDE F/W
$ sdb install /PATH/TO/DeviceHome.wgt
# Launch MDE F/W
$ sdb shell app_launcher -s QKatUa7aon.Service

Launch Device Home

  1. [Host Web Brower] Load http://www.devicehome.net in web browser and input ID 'stester81@gmail.com'.

  1. [Host Web Brower] Choose available 'Tizen Emulator [127.0.0.1]'

  1. [Host Web Brower] Device home is loaded

Install & Execute App

  1. Install Sample App : Video.wgt

$ sdb root on
# Forward device home server port from host device to emulator
$ sdb forward tcp:9000 tcp:9000
# Install app
$ sdb install /PATH/TO/Video.wgt
  1. [Host Web Brower] Click the 'Video' icon in device home

  1. [Host Web Brower] Play video and click 'Play on Tizen Screen'

  1. [TV Emulator] The cooking video is synchronously played on Tizen screen.

Run Debugging Tool

  1. Run in TV console
(HOST)$ sdb shell
# Run debugging tool for app logs
(TV)$ dlogutil -v threadtime CHROMIUM -b apps

Trouble shooting

  1. Snapshot of Windows10

  1. app_launcher -s QKatUa7aon.Service

07-05 21:11:12.840+0900 I/CHROMIUM(P 3368, T 3554): [96m[INFO:WRT(0)] Routing - getAppMetaData()[0m
07-05 21:11:12.840+0900 I/CHROMIUM(P 3368, T 3554): [96m[INFO:WRT(0)] Routing - getAppMetaData()[0m
07-05 21:11:12.850+0900 I/CHROMIUM(P 3368, T 3554): [96m[INFO:WRT(0)] Routing - getAppMetaData()[0m
07-05 21:11:12.850+0900 I/CHROMIUM(P 3368, T 3554): [96m[INFO:WRT(0)] Routing - getAppMetaData()[0m
07-05 21:11:12.850+0900 I/CHROMIUM(P 3368, T 3554): [96m[INFO:WRT(0)] Routing - getAppMetaData()[0m
07-05 21:11:12.860+0900 I/CHROMIUM(P 3368, T 3554): [96m[INFO:WRT(0)] Routing - getAppMetaData()[0m
07-05 21:11:12.860+0900 I/CHROMIUM(P 3368, T 3554): [96m[INFO:WRT(0)] Routing - getAppMetaData()[0m
07-05 21:11:12.860+0900 I/CHROMIUM(P 3368, T 3554): [96m[INFO:WRT(0)] Routing - getAppMetaData()[0m
07-05 21:11:12.870+0900 I/CHROMIUM(P 3368, T 3554): [96m[INFO:WRT(0)] Routing - getAppMetaData()[0m
07-05 21:11:12.870+0900 I/CHROMIUM(P 3368, T 3554): [96m[INFO:WRT(0)] Routing - getAppMetaData()[0m
07-05 21:11:12.870+0900 I/CHROMIUM(P 3368, T 3554): [96m[INFO:WRT(0)] Routing - getAppMetaData()[0m
07-05 21:11:12.880+0900 I/CHROMIUM(P 3368, T 3554): [96m[INFO:WRT(0)] Routing - getAppMetaData()[0m
07-05 21:11:12.880+0900 I/CHROMIUM(P 3368, T 3554): [96m[INFO:WRT(0)] Routing - getAppMetaData()[0m
07-05 21:11:12.880+0900 I/CHROMIUM(P 3368, T 3554): [96m[INFO:WRT(0)] Routing - getAppMetaData()[0m
07-05 21:11:12.880+0900 I/CHROMIUM(P 3368, T 3554): [96m[INFO:WRT(0)] Routing - getAppMetaData()[0m
07-05 21:11:12.890+0900 I/CHROMIUM(P 3368, T 3554): [96m[INFO:WRT(0)] Routing - getAppMetaData()[0m
07-05 21:11:12.890+0900 I/CHROMIUM(P 3368, T 3554): [96m[INFO:WRT(0)] Routing - getAppMetaData()[0m
07-05 21:11:12.890+0900 I/CHROMIUM(P 3368, T 3554): [96m[INFO:WRT(0)] Routing - getAppMetaData()[0m
07-05 21:11:12.890+0900 I/CHROMIUM(P 3368, T 3554): [96m[INFO:WRT(0)] Routing - getAppMetaData()[0m
07-05 21:11:12.900+0900 I/CHROMIUM(P 3368, T 3554): [96m[INFO:WRT(0)] Routing - getAppMetaData()[0m
07-05 21:11:12.900+0900 I/CHROMIUM(P 3368, T 3554): [96m[INFO:WRT(0)] Routing - getAppMetaData()[0m
07-05 21:11:12.910+0900 I/CHROMIUM(P 3368, T 3554): [96m[INFO:WRT(0)] Routing - getAppMetaData()[0m
07-05 21:11:12.910+0900 I/CHROMIUM(P 3368, T 3554): [96m[INFO:WRT(0)] Routing - getAppMetaData()[0m
07-05 21:11:12.910+0900 I/CHROMIUM(P 3368, T 3554): [96m[INFO:WRT(0)] Routing - getAppMetaData()[0m
07-05 21:11:12.910+0900 I/CHROMIUM(P 3368, T 3554): [96m[INFO:WRT(0)] Routing - getAppMetaData()[0m
07-05 21:11:12.910+0900 I/CHROMIUM(P 3368, T 3554): [96m[INFO:WRT(0)] Routing - getAppMetaData()[0m
07-05 21:11:12.920+0900 I/CHROMIUM(P 3368, T 3554): [96m[INFO:WRT(0)] Routing - getAppMetaData()[0m
07-05 21:11:12.920+0900 I/CHROMIUM(P 3368, T 3554): [96m[INFO:WRT(0)] Routing - getAppMetaData()[0m
07-05 21:11:12.930+0900 I/CHROMIUM(P 3368, T 3554): [96m[INFO:WRT(0)] Routing - getAppMetaData()[0m
07-05 21:11:12.930+0900 I/CHROMIUM(P 3368, T 3554): [96m[INFO:WRT(0)] Routing - getAppMetaData()[0m
07-05 21:11:12.930+0900 I/CHROMIUM(P 3368, T 3554): [96m[INFO:WRT(0)] Routing - getAppMetaData()[0m
07-05 21:11:12.930+0900 I/CHROMIUM(P 3368, T 3554): [96m[INFO:WRT(0)] Routing - getAppMetaData()[0m
07-05 21:11:12.930+0900 I/CHROMIUM(P 3368, T 3554): [96m[INFO:WRT(0)] Routing - getAppMetaData()[0m
07-05 21:11:12.930+0900 I/CHROMIUM(P 3368, T 3554): [96m[INFO:WRT(0)] Routing - getAppMetaData()[0m
07-05 21:11:12.930+0900 I/CHROMIUM(P 3368, T 3554): [96m[INFO:WRT(0)] Routing - getAppMetaData()[0m
07-05 21:11:12.930+0900 I/CHROMIUM(P 3368, T 3554): [96m[INFO:WRT(0)] Routing - getAppMetaData()[0m
07-05 21:11:12.930+0900 I/CHROMIUM(P 3368, T 3554): [96m[INFO:WRT(0)] Routing - getAppMetaData()[0m
07-05 21:11:12.950+0900 I/CHROMIUM(P 3368, T 3554): [96m[INFO:WRT(0)] [DeviceHome][service.js] webclip path : /opt/usr/globalapps/OZBS6gG8Jl/shared/res/webclip/manifest.json[0m
07-05 21:11:12.950+0900 I/CHROMIUM(P 3368, T 3554): [96m[INFO:WRT(0)] arguments : /opt/usr/globalapps/OZBS6gG8Jl/shared/res/webclip/manifest.json,r[0m
07-05 21:11:12.950+0900 I/CHROMIUM(P 3368, T 3554): [96m[INFO:WRT(0)] updated argument[0] : /opt/usr/globalapps/OZBS6gG8Jl/shared/res/webclip/manifest.json[0m
07-05 21:11:12.950+0900 I/CHROMIUM(P 3368, T 3554): [96m[INFO:WRT(0)] [DeviceHome][service.js] tizen.filesystem.openFile (error): /opt/usr/globalapps/OZBS6gG8Jl/shared/res/webclip/manifest.json NotFoundError: Could not open file: No such file or directory[0m
07-05 21:11:12.970+0900 I/CHROMIUM(P 3368, T 3554): [96m[INFO:WRT(0)] [DeviceHome][service.js] __dirname: /opt/usr/apps/QKatUa7aon/res/wgt/service[0m
07-05 21:11:12.970+0900 I/CHROMIUM(P 3368, T 3554): [96m[INFO:WRT(0)] [DeviceHome][service.js] TV Profile[0m
07-05 21:11:12.970+0900 I/CHROMIUM(P 3368, T 3554): [96m[INFO:WRT(0)] Routing - getCurrentApplication() : QKatUa7aon.Service[0m
07-05 21:11:13.060+0900 I/CHROMIUM(P 3368, T 3554): [96m[INFO:WRT(0)] [DeviceHome][service.js] ID, packageId: QKatUa7aon.Service org.tizen.chromium-efl[0m
07-05 21:11:13.060+0900 I/CHROMIUM(P 3368, T 3554): [96m[INFO:WRT(0)] [DeviceHome][service.js] g.baseDir: /opt/usr/apps/[0m
07-05 21:11:13.110+0900 I/CHROMIUM(P 3368, T 3554): [96m[INFO:WRT(0)] [DeviceHome][service.js] onStart is called in DNS Resolver[0m
07-05 21:11:13.110+0900 I/CHROMIUM(P 3368, T 3554): [96m[INFO:WRT(0)] [DeviceHome][service.js] Server is listening on 10.0.2.15:9000[0m
07-05 21:11:13.110+0900 I/CHROMIUM(P 3368, T 3554): [96m[INFO:WRT(0)] [DeviceHome][service.js] login_id : stester81@gmail.com[0m
07-05 21:11:13.110+0900 I/CHROMIUM(P 3368, T 3554): [96m[INFO:WRT(0)] [DeviceHome][service.js] device_ip : 127.0.0.1[0m
07-05 21:11:13.110+0900 I/CHROMIUM(P 3368, T 3554): [96m[INFO:WRT(0)] [DeviceHome][service.js] device_name : Tizen Emulator[0m
07-05 21:11:13.150+0900 I/CHROMIUM(P 3368, T 3554): [96m[INFO:WRT(0)] [DeviceHome][service.js] xhr text: DEVICE_EXISTS[0m
07-05 21:11:13.150+0900 I/CHROMIUM(P 3368, T 3554): [96m[INFO:WRT(0)] [DeviceHome][service.js] device exists[0m

Clone this wiki locally