5

I want to know if there is a way to install apps on Samsung Tizen TV using the command line.

I mean to say if I build the app and generate the "wgt" file using the IDE on my PC, is there a way to install the app using the "wgt" file from some other PC which does not have the IDE?

Basically is there something equivalent to a adb install in Tizen TV?

I went through the documentation which they have provided and I could only find installation procedure which requires the IDE:

https://www.samsungdforum.com/TizenGuide/tizen3511/index.html

Archit Sinha
  • 775
  • 1
  • 8
  • 33

2 Answers2

10

You can in the newest SDK 3.0, as of like February 2017

For this exercise, you will need at least the tizen studio command line installed (I recommend the IDE anyway), the TV Extensions, your Tizen TV in 'Developer Mode' and you'll need to configure your development environment so you can package from the command line. (This won't work without certificates in place in some manner.)

Instructions for packaging from the command line can be found, thusly: https://developer.tizen.org/development/tizen-studio/web-tools/cli Look for 'tizen package'

Once you have that done, you can generate a .wgt file any way you want. I'll consider that 'done' at this point.

Find your TV's IP address and run...

<tizen_studio path>/tools/sdb connect <tv ip address>

Then you need its name

<tizen_studio path>/tools/sdb devices

You should see something like

<ip address>:<port>      UN48E6300 

From there, you can do:

<tizen studio path>/tools/ide/bin/tizen install -n <.wgt> -t <tv name>

for example:

<tizen studio path>/tools/ide/bin/tizen install -n somefile.wgt -t UN48E6300

Next up, it should take 4-5 seconds. If it completes immediately, your TV might not be in develop mode, you might not be connected, or your certs/profile.xml might be wrong. After 4-5 seconds, it will say 'install failed' every time, but your application will show up under My Apps.

David
  • 305
  • 5
  • 10
  • 1
    This was the only working solution that had me sideload my .wgt after the 2.0 tizen studio update. Thanks! – Rados Dec 08 '17 at 22:18
  • 1
    The Tizen package CLI stuff moved to: https://developer.tizen.org/development/tizen-studio/web-tools/cli – David Jan 10 '18 at 03:56
  • 1
    Thanks if it wasn't for letting me know it always fails I might not have gotten it. This also allows you to debug as well which is great. – Brian F Leighty Apr 06 '18 at 19:08
  • I don't know how well this works anymore in March 2020 with SDK 5.5. There's a lot of 'need certificate' of the TV and signing it to your development environment. – David Feb 28 '20 at 20:41
  • There's a new bit of software called 'WITS' and this answer is dated a bit. I'll provide a new answer at some point. This doesn't deal with certificates at all. – David Oct 26 '20 at 16:14
  • Isn't there a way to run the application upon installing it? – kevin godfrey Jun 21 '21 at 09:01
  • This worked for me with vers 4.1.1. I couldn't figure out how to run the app using the CLI docs, but once I connected the TV using CLI, I used these instructions to install the app and then it showed up on my TV under Apps: Recent – Ascii Dude Aug 03 '21 at 18:56
2

This is not possible with a regular consumer television. It can only be done on special 'development' tv provided to you directly from Samsung. There is a difference between 'developer mode' on a consumer tv, and a 'developer tv' which comes from Samsung. And as I understand, those are only provided if you have 'platform' level privilege as an app developer.

According to this post on the samsungdforum, they say you can only do this if you have 'Partner' level access and only on the emulator.

According to Samsung TV security policy, shell command access is allowed to the limited users.

The Samsung TV security policy prevents command line access to consumer TVs because it's actually a very powerful tool that can cause much damage. I have contact with a team who have 'Platform' level access and a 'developer tv'. It took them all of about 15 mins to brick their first tv, because developers will be developers and will start poking around under the hood if given the opportunity. The current incarnation of Samsung's command line tool (sdb) just doesn't have the safeguards in place to protect us from ourselves.

davesaus
  • 436
  • 2
  • 9
  • 1
    I don't think it is the case.The link provided in the question, mentions how to enable the developer mode in the TV. So if you have the IDE on your PC then the link explains how to install apps on TV. What I wanted to ask was whether it can be done through the command line without using the IDE. Meaning is the IDE necessary for installing? or I can install the "wgt" file from any PC? I have seen that there are some commands for Tizen which start with "sdb" which seem similar to "adb". However I dnt know if they can be used for Tizen TV in this case and what exact sequence of commands to use – Archit Sinha Jul 12 '16 at 05:24
  • 1
    Ok just to clarify, if I understand you correctly: 1. Developer TV directly from Samsung ---- You can install apps both from IDE as well as command line 2. Consumer TV with developer mode enabled --- You can install apps from IDE, but NOT from command line. Please let me know if my understanding is correct. If not then please correct me. If it is correct, then lets assume I have a 'Developer TV' directly from Samsung, in that case, how can I install apps on it through the command line. As in what are the steps to be followed. – Archit Sinha Jul 12 '16 at 13:37
  • Also as a side note, is there a way to check if a Tizen TV is a consumer TV or a developer TV directly from Samsung? – Archit Sinha Jul 12 '16 at 13:40
  • This is like 5 years too late, but I know this now - the intro screen when you turn it on will have something like "Samsung Development " as the splash screen. – David Sep 27 '21 at 05:20