tizen 3 ivi architecture multi user app fw

30
Tizen 3 IVI Architecture Multi User App FW Dominig ar Foll (Intel Open Source Technology Centre) [email protected] 02 Feb 2014

Upload: others

Post on 21-Dec-2021

8 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Tizen 3 IVI Architecture Multi User App FW

Tizen 3 IVI ArchitectureMulti User App FW

Dominig ar Foll (Intel Open Source Technology Centre)[email protected]

02 Feb 2014

Page 2: Tizen 3 IVI Architecture Multi User App FW

2 FOSDEM'14 Automotive devroom – Tizen Multi User Application Framework

Tizen 3

What is an In Vehicule Infotainement (IVI)

Tizen Project Open development

Tizen Architecture Overview

Multi-user challenge

Tizen 3 AppFW

Tizen 3 User Mgt

Page 3: Tizen 3 IVI Architecture Multi User App FW

3 FOSDEM'14 Automotive devroom – Tizen Multi User Application Framework

Page 4: Tizen 3 IVI Architecture Multi User App FW

4 FOSDEM'14 Automotive devroom – Tizen Multi User Application Framework

Tizen 3 Open Project TSG Arch Forum API Forum

Release En-

gineer

QA Engineer

Domain

Maintainers

Integrators

Reviewers

package package

Architects

Domain

Maintainers

Integrators

Reviewers

package package

Architects

Git Group

Developers

Reviewers

[Integrators]

Maintainers

Architects

Page 5: Tizen 3 IVI Architecture Multi User App FW

5 FOSDEM'14 Automotive devroom – Tizen Multi User Application Framework

Tizen 3 : Code contribution Flow

Write codeWrite code

Developer

Reviewer

Submit to

Gerrit

Submit to

Gerrit

ReviewReviewOffer suggestionsOffer suggestions

Not OKApprove

contribution

Approve

contribution

OK

Maintainer

[Integrator]Integrate

contribution

Integrate

contribution

Release

engineer

Create imageCreate image Release imageRelease image

MaintainerMaintainer

Maintainer can override

code acceptance at any step

Release to

build system

Release to

build system

Smoke TestSmoke Test

Not OK

OK

Page 6: Tizen 3 IVI Architecture Multi User App FW

6 FOSDEM'14 Automotive devroom – Tizen Multi User Application Framework

General Architecture

- Fastboot- Embedded Security- Connected- HTML5- Specialised IVI Middleware

Page 7: Tizen 3 IVI Architecture Multi User App FW

7 FOSDEM'14 Automotive devroom – Tizen Multi User Application Framework

Architecture Overview (Mobile Profile)

Manufacturer

Adaptation

Interface

SMACKSMACK

Page 8: Tizen 3 IVI Architecture Multi User App FW

8 FOSDEM'14 Automotive devroom – Tizen Multi User Application Framework

Architecture Overview (IVI profile)

W3C/HTML5 W3C/HTML5 Device APIs Device APIs

Web Runtime Web Runtime

VideoVideo TouchTouch

CSS3CSS3 WebGLWebGL

WorkerWorker

BTBT CallCall

LBSLBS NFCNFC

MsgMsg… …

ApplicationsApplications

Web FrameworkWeb Framework

KernelKernel

CoreCore

Application

Framework

Application

FrameworkGraphics & UIGraphics & UI MultimediaMultimedia WebWeb MessagingMessaging LocationLocation

SecuritySecurity SystemSystem BaseBase ConnectivityConnectivity TelephonyTelephony PIMPIM

Linux Kernel & device driversLinux Kernel & device drivers

Web ApplicationsWeb Applications

Public

API

IVIIVI

Page 9: Tizen 3 IVI Architecture Multi User App FW

9 FOSDEM'14 Automotive devroom – Tizen Multi User Application Framework

Tizen Multi-user system

Page 10: Tizen 3 IVI Architecture Multi User App FW

10 FOSDEM'14 Automotive devroom – Tizen Multi User Application Framework

Tizen Multi-user requirement

● Guest log in by default▪ Start Generic Application

(e.g. rear cam, radio, ...)

● User logging in shall not stop running applications▪ ID user is added on top of Guest.

▪ Multiple user can share the same Display(e.g. passenger and drivers)

▪ Users can exchange seats (and so Display)

● Security must protect the user data and the system data.

Page 11: Tizen 3 IVI Architecture Multi User App FW

11 FOSDEM'14 Automotive devroom – Tizen Multi User Application Framework

Disociate Seat and User

● General Linux▪ Before Login → No use

▪ Seat = Display

● IVI▪ Before Login → Guest

▪ Login → add user to a seat

▪ User can change seat

Page 12: Tizen 3 IVI Architecture Multi User App FW

12 FOSDEM'14 Automotive devroom – Tizen Multi User Application Framework

What needs to change

● Application Frame work

● Login Manager

● Startup procedure

● Sécurity model

Page 13: Tizen 3 IVI Architecture Multi User App FW

13 FOSDEM'14 Automotive devroom – Tizen Multi User Application Framework

Application Framework

▪ Launching Application▫ Explicit or implicit information (Combination of Action, URI, and

MIME) can be used to determine an app to launch and the control backend.

▫ Allowed to launch different type of app (i.e. Web to Native and Native to Web)

▪ Application life cycle management▫ Install – delete – update▫ List all, recently launch– Search – swap active

▪ Event Handler▫ Screen orientation size and number, dim, off▫ Critical resources RAM, disk, batterie, ...

▪ Inter App communication▫ Service Req▫ Message exchange▫ Copy/Paste▫ Drag/Drop

Page 14: Tizen 3 IVI Architecture Multi User App FW

14 FOSDEM'14 Automotive devroom – Tizen Multi User Application Framework

Multiple back-endsApplication Framework

Tizen App Run Time

WRTbackend

CoreBackend

CloudBackend

Event handler

Page 15: Tizen 3 IVI Architecture Multi User App FW

15 FOSDEM'14 Automotive devroom – Tizen Multi User Application Framework

Tizen 3.x : Launching App (general model)

App svc AMDCheck all App Info

Native-core

LaunchpadSet environment

Forkedas user

WRT

Hybridpre-launch

Launched

D-Bus Request

User env

Page 16: Tizen 3 IVI Architecture Multi User App FW

16 FOSDEM'14 Automotive devroom – Tizen Multi User Application Framework

Tizen 3: Single Launcher – Multi User

● Accumulate environment information for each logged user(a PAM module could be a good entry point for initial env. collection)

● Serve launch request(by name, ID, Mime type, …)

● Ask user for choice when multi application can serve the request.

● Verify if Launch is authorised for the user (profile) in current context(car in movement, battery status, data roaming, ....)

● Subcontract the launch to a specialised launcher (launchpad) per App type(OSP, WRT, Core native)

● Three launchpads can be foreseen(OSP, WRT, Core Native).

● Receive all the context (sécurity, environment, ...) from AMD.

● Insert the Application at launch in the user context

● Manage lib and info caching to speed launch(preload, pre-link, …)

● Manage App Live cycle (could also be in AMD)(kill, pause, slowdown, garbage collection)

AMD & Launchpadrun with privilege

LaunchpadAMD

Page 17: Tizen 3 IVI Architecture Multi User App FW

17 FOSDEM'14 Automotive devroom – Tizen Multi User Application Framework

Launching Sequence | (1/2)

• Preload daemon on system session– CoreApp / NativeApp

Application Management Daemon

Request

Launchpad/tmp/alaunch/-1

system sessionuser session

Request

UID 7001

UID 7002

SO_PEERCRED- pid- uid- gid

Launchpad

set_app_privilege(,uid,)set_env(user-env)

libprivilege-control.so

set_app_privilege(,uid,) { set_dac(,uid,)}

set_dac(,uid,) { setgroups() setgid(APP_GID) setuid(uid)}

{uid, user-env}

Page 18: Tizen 3 IVI Architecture Multi User App FW

18 FOSDEM'14 Automotive devroom – Tizen Multi User Application Framework

• Preload daemon on system session– WebApp

Launching Sequence | (2/2)

Application Management Daemon

Wrt_launchpad/tmp/alaunch/-3

system sessionuser session

UID 7001

SO_PEERCRED- pid- uid- gid

{uid, user-env}

Process pool launch

Normal launch

A webapp

Webapp.ui_process

Webapp.web_process

Wrt-client

forkset_user(uid, gid)set_env(user-env)

fork {uid}

Candidate.ui_process

Candidate.web_process

Launch request{uid, user-env}

Request{uid, user-env}

A webapp

Webapp.ui_process

Webapp.web_process

instantiation

instantiation

instantiation

IPC

Function call

set_user(uid, gid)set_env(user-env)

set_user(uid, gid)set_env(user-env)

Page 19: Tizen 3 IVI Architecture Multi User App FW

19 FOSDEM'14 Automotive devroom – Tizen Multi User Application Framework

AppFW with TLM

Page 20: Tizen 3 IVI Architecture Multi User App FW

20 FOSDEM'14 Automotive devroom – Tizen Multi User Application Framework

ImpactSingle AMD/Launchpad running with privileges

● User session ENV must be known ● UID is extracted from Launch request● App Launch control is simple● Resource optimisation● Simplification to Tizen DB access

Issues● Apps are added in user session from outside● Some ENV variables are created only in user

session, e.g. d-bus, display, …● AMD or Launchpad need to manage App live

cycle and do the App garbage collector

Page 21: Tizen 3 IVI Architecture Multi User App FW

21 FOSDEM'14 Automotive devroom – Tizen Multi User Application Framework

Soft coded paths All positions are positions are platform defined

● Position defined by a unique source code● Apps user Env variables for all location● XDG names are use when defined by

Freedesktop.orgAll user dir are relative to $HOME

● Created at run time (no pre-installation)● Music, Photos, videos, ...● Apps (private and shared)● Vconf (equivalent) private Data● Apps data remain private● Documents (e.g. Media) shared or public

Tizen DB● Position are absolute● User add/remove utilities

Page 22: Tizen 3 IVI Architecture Multi User App FW

22 FOSDEM'14 Automotive devroom – Tizen Multi User Application Framework

Add / remove / Activate UserSupport creating, editing and deleting users and groups through a D-Bus APISupport GUI-less session managementSupport auto-login of guest and default user accountsSupport clean-up of guest environmentSupport via PAM plug-ins multiple authentication credentials per user (key fob, NFC, password/pin code)Support auto-relogin after short power outages (IVI)

Page 23: Tizen 3 IVI Architecture Multi User App FW

23 FOSDEM'14 Automotive devroom – Tizen Multi User Application Framework

gumd / libgum (user management daemon / lib)

(Optional)Daemon providing D-Bus and GObject-based client APIs toCreate, modify and delete usersCreate, modify and delete groupsAssign permissions to users through groupsSupport shared group foldersSupport additional user information like avatar images and nick namesAPI access controlled through SMACK – caller doesn’t need root privileges or execute setuid binariesBetter implementation model compared to running scripts from a GUI

Page 24: Tizen 3 IVI Architecture Multi User App FW

24 FOSDEM'14 Automotive devroom – Tizen Multi User Application Framework

tlm (tizen login manager)

Creating default sessions at startupGUI-less user switching through hardware authentication (key fob, fingerprint, etc)Support simultaneous sessions on multiple seatsSuspend/resume of sessions on different seatsCleanup of guest data on logoutManages session namespaces

Page 25: Tizen 3 IVI Architecture Multi User App FW

Q & A

Gulf of Morbihan, south of Brittany, France

Page 26: Tizen 3 IVI Architecture Multi User App FW

Pointers

Page 27: Tizen 3 IVI Architecture Multi User App FW

27 FOSDEM'14 Automotive devroom – Tizen Multi User Application Framework

Links – Tizen

● Main site: tizen.org

● Tizen Association: www.tizenassociation.org

● Applications Development: developer.tizen.org

● Platform Development: source.tizen.org

● Snapshots: download.tizen.org

● Documentation: developer.tizen.org/documentation

● Wiki: wiki.tizen.org

● Bugs: bugs.tizen.org

Page 28: Tizen 3 IVI Architecture Multi User App FW

28 FOSDEM'14 Automotive devroom – Tizen Multi User Application Framework

Links – Tizen IVI

● General info: wiki.tizen.org/wiki/IVI

● GENIVI: genivi.org

Page 29: Tizen 3 IVI Architecture Multi User App FW

29 FOSDEM'14 Automotive devroom – Tizen Multi User Application Framework

Links – Tizen build tools

● Development tools : download.tizen.org/tools

● GBS: source.tizen.org/documentation/reference/git-build-system

● MIC : source.tizen.org/documentation/reference/mic-image-creator

● OBS : openbuildservice.org

● GERRIT: code.google.com/p/gerrit

● GIT: git-scm.com

Page 30: Tizen 3 IVI Architecture Multi User App FW

30 FOSDEM'14 Automotive devroom – Tizen Multi User Application Framework

Upstream projects

● Linux Kernel, SMACK, systemd, dbus

● OpenSSL, Sqlite

● X, Wayland, EFL, Enlightenment, Cairo

● Connman, BlueZ, oFono, wpa_supplicant

● Gstreamer, PulseAudio

● Webkit

● Eclipse (SDK)

● Qemu, U-boot (emulator)

● GCC, llvm, cmake, git (build)

● … and more ...