Tizen - inside look

Tizen xeyesI got into my hands for a while a sample phone with Tizen OS. I decided to take the opportunity to see what kind of Linux is hiding inside. Most Tizen OS reviews describe the user interaction interface, in this article I will conduct a small review of the phone and the operating system by the system administrator. The most interesting pre-installed console applications, work with the graphical interface and the possibility of updating from the repository will be considered.

In order to connect to the device’s console, we need the Smart Development Bridge (SDB) utility from the Tizen SDK. It can be downloaded separately from the developer's site.. In the form of a binary file, Smart Development Bridge is available for the same platforms as the Tizen SDK: Windows 7 (32 and 64 bit), Ubuntu (32 and 64 bit), Mac OS X (64 bit). Specifying Ubuntu in this case is somewhat arbitrary; my utility worked without problems under Fedora 19 (x64). Smart Development Bridge is able to work with several devices and provides a basic set of commands for working with the device, including remote access to the command shell of the device. He then interests us first of all. All further manipulations will be made from the console.

Tizen initially has two main users under which it is possible to work: developer and root, the default is developer. To get the maximum opportunities when interacting with the operating system, we will need to increase the level of privileges, for this we will need to enable superuser mode. We introduce the necessary commands to connect:
$ sdb root on
Switched to 'root' account mode
$ sdb shell
sh-4.1 #


So, we got root access to the system. To get started, we’ll do simple tests to get information about the platform. Let's try to find out the shell provided to us, the version of the system and the kernel.
sh-4.1 # echo $ SHELL
/ bin / sh
sh-4.1 # sh --version
sh --version
GNU bash, version 4.1.5 (1) -release (armv7l-unknown-linux-gnueabi)
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3 +: GNU GPL version 3 or later 
This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
sh-4.1 $ cat / etc / system-release 
Tizen release 2.2.0 (Tizen)
sh-4.1 # uname -a   
Linux TRATS2 3.0.15-00002-g277d62a # 1-Tizen SMP PREEMPT Tue Jul 16 13:12:44 KST 2013 armv7l GNU / Linux

Quite ordinary Linux is Tizen 2.2.0 with the kernel 3.0.15, and Bash 4.1.5 is used as a command shell. We request information about the characteristics of the platform such as the processor and memory.

sh-4.1 # cat / proc / cpuinfo
Processor: ARMv7 Processor rev 0 (v7l)
processor: 0
BogoMIPS: 1590.88
processor: 1
BogoMIPS: 1590.88
processor: 2
BogoMIPS: 1590.88
processor: 3
BogoMIPS: 1590.88
Features: swp half thumb fastmult vfp edsp neon vfpv3 tls 
CPU implementer: 0x41
CPU architecture: 7
CPU variant: 0x3
CPU part: 0xc09
CPU revision: 0
Chip revision: 0011
Hardware: TRATS2
Revision: 000c
Serial: 4df764b878e3cf00
sh-4.1 # cat / proc / meminfo | grep mem
MemTotal: 797944 kB
MemFree: 385720 kB
sh-4.1 # fdisk -l
WARNING: GPT (GUID Partition Table) detected on '/ dev / mmcblk0'! 
The util fdisk doesn't support GPT. Use GNU Parted.
Disk / dev / mmcblk0: 15.8 GB, 15758000128 bytes
1 heads, 16 sectors / track, 1923584 cylinders, total 30777344 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical / physical): 512 bytes / 512 bytes
I / O size (minimum / optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
        Device Boot Start End Blocks Id System
/ dev / mmcblk0p1 1 30777343 15388671+ ee GPT

The expected parameters are the quad-core armv7 with a frequency of 1.6 GHz and a gigabyte of RAM, of which about 800 MB are available to the system. 16 Gb drive. The specifications are fully consistent with the Samsung Galaxy S III (GT-i9300), which is provided to the Tizen developers as a depleuner.

Let's try to get information about the available executable files by pressing TAB twice. In response to this, the shell offers to withdraw about a thousand items. I don’t give the exact number, since with several launches the number of options ranged from 952 to 1003. In any case, this number is quite large for the phone’s operating system. The whole list has been listed for a very long time, so I’ll note the most interesting ones in my opinion: X11, enlightenment, scp, ssh, sshd, rpm, zypper, xclock, xeyes, xmessage. From this we can conclude that the phone has an operating system for a set of applications that is not inferior to the desktop - there are X's, shell, package managers. The desktop environment used is Enlightenment. Some applications, when launched from the console, are displayed on the phone screen, closing the menu. If you run xeyes, we see eyes on the phone screen following the touches to the screen. An example of the result of launching xeyes is shown in the photo at the beginning of the article. Similarly, you can display oclock, xclock, xlogo, xmessage on the display.

sh-4.1 $ xmessage -geometry 240x120 -center HELLO HABRAHABR!

Tizen xmessage Hello Habrahabr!

Not all applications are functional “out of the box”, in order to use them you will need to configure them. So, for example, the scripts for running the sshd daemon are absent in the system, and the daemon itself does not start directly, displaying the message “Missing privilege separation directory: / var / run / sshd ". The problem is solved simply - you need to create this directory and give the necessary rights to it:
mkdir / var / run / sshd
chmod 0755 / var / run / sshd

After the manipulations are done, the daemon can be launched:
start-stop-daemon --start --pidfile /var/run/sshd.pid --exec / usr / sbin / sshd - -p 22

Connecting to the ssh server as root occurs without a password, so we will not leave the server turned on.
start-stop-daemon --stop --pidfile /var/run/sshd.pid

Let's move on to the package management system. The system has the Red Hat package manager version 4.9.1 installed.
sh-4.1 # rpm --version
RPM version 4.9.1

Let's check the possibility of updating preinstalled packages. Zypper is a console package manager used in the GNU / Linux openSUSE distribution. If there is a package manager, then there must be repositories in which it takes packages. We try to update the list of packages with the zypper refresh command, but here disappointment awaits - the repository was not found.
sh-4.1 # zypper refresh
Retrieving repository 'Tizen-main' metadata [\]
Specified path '/srv/snapshots//tizen-2.2/common/tizen-2.2_20130717.6/repos/tizen-main/armv7l/packages/' is not a directory: file: /srv/snapshots//tizen-2.2/ common / tizen-2.2_20130717.6 / repos / tizen-main / armv7l / packages /
Retrieving repository 'Tizen-main' metadata [error]
Repository 'Tizen-main' is invalid.
[|] Valid metadata not found at specified URL (s)
Please check if the URIs defined for this repository are pointing to a valid repository.
Skipping repository 'Tizen-main' because of the above error.
Could not refresh the repositories because of errors.

Judging by the text of the error message, the Tizen-Main repository is located on a nonexistent path. Let's look at the official site of the repository. As we already found out on our phone, we have TIZEN 2.2, at http://download.tizen.org there are several suitable repositories. Disconnect the old repository and connect a couple of new ones. Together with the tizen-2.2 repository, at the same time we will connect a slightly more recent tizen-2.2_20130719.3. Unclaimed repositories can always be turned off.
zypper mr -d 1
zypper ar http://download.tizen.org/releases/2.2/tizen-2.2/repos/tizen-base/armv7l/packages/ Base
zypper ar http://download.tizen.org/releases/2.2/tizen-2.2/repos/tizen-main/armv7l/packages/ Main
zypper ar http://download.tizen.org/releases/2.2/tizen-2.2_20130719.3/repos/tizen-base/armv7l/packages/ Base20130719
zypper ar http://download.tizen.org/releases/2.2/tizen-2.2_20130719.3/repos/tizen-main/armv7l/packages/ Main20130719
zypper refresh

The system is ready to install packages and upgrade.

Tizen is a fairly flexible system in which there is a lot of potential. In conclusion, I note that in the connected repositories there were development tools: cmake, ccache, gcc and others. This fact opens up new possibilities for development under Tizen.

Also popular now: