SlideShare a Scribd company logo
1 of 34
AsteroidOS: architecture of a FOSS
smartwatch platform
By Florent Revest
January the 30th
, 2016
2 AsteroidOS: architecture of a FOSS smartwatch platform
Who am I ?
Mail: revestflo@gmail.com
GitHub: FlorentRevest
LinkedIn: FlorentRevest
IRC: kido@irc.freenode.net
Twitter: @Xenon132
Site: http://florentrevest.github.io/
AsteroidOS
Raspcopter Drone
Quasar Kernel
Nebulae DE
3 AsteroidOS: architecture of a FOSS smartwatch platform
General presentation of AsteroidOS
Why, what and how ?
4 AsteroidOS: architecture of a FOSS smartwatch platform
Why AsteroidOS ?
Source: xda-developers
“
More wearable devices and less control over our data
Current operating systems are not open or hackable enough
→ need for an open platform to unleash the full potential
5 AsteroidOS: architecture of a FOSS smartwatch platform
What is AsteroidOS ?
6 AsteroidOS: architecture of a FOSS smartwatch platform
How does AsteroidOS work ? General overview
Hardware
Linux Kernel (Android's one with minor modifications for systemd/connmand etc...)
Minimal Android /system dir (drivers)
Connectivity (Connman, Bluez5, usb-moded, adbd)
Asteroid-launcher (based on Lipstick)
Qt5.5 (qml-asteroid, qml, qpa-hwcomposer, qtwayland, qtbluetooth...)
Standard GNU/Linux built with OpenEmbedded
(GNU tools, systemd, dbus, udev, etc...)
Compatibility layer (libhybris)
NemoMobile Middleware (mce, dsme, ngfd, timed, sensorfwd, statefs, mapplauncherd etc...)
Standard apps (asteroid-settings, asteroid-timer, asteroid-calendar etc...)
7 AsteroidOS: architecture of a FOSS smartwatch platform
Boot Process
Fastboot, Boot.img, Rootfs, Adb...
8 AsteroidOS: architecture of a FOSS smartwatch platform
How does AsteroidOS work ? Boot process
Hardware
Linux Kernel (Android's one with minor modifications for systemd/connmand etc...)
9 AsteroidOS: architecture of a FOSS smartwatch platform
The LG G Watch's bootloader: fastboot
Fastboot: command and protocol implemented by bootloaders
oem-unlock free your device
Allows partitions flashing, remote kernels booting etc...
boot.img format: mkbootimg, unmkbootimg
10 AsteroidOS: architecture of a FOSS smartwatch platform
The LG G Watch's bootloader: diagram
Bootloader
BOOT Partition RECOVERY Partition Remote boot via fastboot
Android Kernel Android Kernel Modified Android Kernel
Android initrd Recovery initrd AsteroidOS initrd
Mount Android Partitions Rootfs with loop or SYSTEM partition
boot.img
format
Propri
etary
System
11 AsteroidOS: architecture of a FOSS smartwatch platform
Debugging the kernel and init
CONFIG_TTY_PRINTK and CONFIG_ANDROID_RAM_CONSOLE
Brings /proc/last_kmesg accessible from Android
Adbd: Android Debug Bridge Daemon
Functionfs and usb otg modules of the kernel
Remote shell from the computer
Push/Pull files
...
12 AsteroidOS: architecture of a FOSS smartwatch platform
Hardware Acceleration
GLES2, Libhybris, Bionic/Glibc, Hwcomposer...
13 AsteroidOS: architecture of a FOSS smartwatch platform
How does AsteroidOS work ? Hardware accel.
Hardware
Linux Kernel (Android's one with minor modifications for systemd/connmand etc...)
Minimal Android /system dir (drivers)
Compatibility layer (libhybris)
14 AsteroidOS: architecture of a FOSS smartwatch platform
Hardware acceleration choices
Framebuffer not enough for a “smart” experience
Just used by “psplash”
Free drivers developed by reverse-engineering
Perfect from the freedom's point of view
Often unfinished, unmaintained, hard to backport...
Proprietary Android (Wear) drivers via libhybris
Means integration of a /system directory with proprietary
binary blobs: /! not 100% free anymore !
Works really well
15 AsteroidOS: architecture of a FOSS smartwatch platform
Libhybris: General overview
Created by Carsten Munk for Mer and Jolla
Mostly a dirty hack... but with great potential
Not ideal, but better than nothing
Large imbalance between “Linux” and Android mobile drivers
Due to Bionic - the Android's libc - and its dynamic linker
OEMs provide Android /system with proprietary drivers
Used by Sailfish OS / Mer (via Wayland for ex), Ubuntu Touch
(via Mir for ex), WebOS Ports...
Used for EGL/GLES, Camera, NFC, Audio, Sensors, etc...
16 AsteroidOS: architecture of a FOSS smartwatch platform
Libhybris: Linking scheme
test-vibrator
Reimplemented Android linker (android_dlopen/android_dlsym)
System linker (dlopen/dlsym)
Glibc (ex: my_fclose → fclose)
vibrator.so
libhybris-common.so
Table Hooks
Bionic (ex: setjmp, longjmp)
Custom code (ex: dlopen, dlsym, pthread)
17 AsteroidOS: architecture of a FOSS smartwatch platform
Using HWComposer through libhybris
Compositing HAL used in Android
Offloads compositing to GPU
Better performance and battery-life
Since Qt5: Qt Platform Abstraction
Android, Cocoa, Direct2D, Directfb, Eglfs, iOS, KMS, Fbdev,
Offscreen, OpenWfd QNX, Windows, WinRt, Xcb…
qt5-qpa-hwcomposer-plugin uses hwcomposer via libhybris
18 AsteroidOS: architecture of a FOSS smartwatch platform
Qt5.5 Based UX
QPA, QtWayland, QML, Lipstick, QtBluetooth...
19 AsteroidOS: architecture of a FOSS smartwatch platform
How does AsteroidOS work ? User experience
Hardware
Linux Kernel (Android's one with minor modifications for systemd/connmand etc...)
Standard apps (asteroid-settings, asteroid-timer, asteroid-calendar etc...)
Minimal Android /system dir (drivers)
Asteroid-launcher (based on Lipstick)
Qt5.5 (qml-asteroid, qml, qpa-hwcomposer, qtwayland, qtbluetooth...)
Compatibility layer (libhybris)
NemoMobile Middleware (mce, dsme, ngfd, timed, sensorfwd, statefs, mapplauncherd etc...)
20 AsteroidOS: architecture of a FOSS smartwatch platform
asteroid-launcher: the wayland compositor
Under the hood: QtWayland's API for compositors
Based on Lipstick, like GlacierUX and Jolla-Home
Lipstick: “Home-screen creation toolkit”
Source: twitter.com“
21 AsteroidOS: architecture of a FOSS smartwatch platform
asteroid-launcher: the wayland compositor
Two examples of used NemoMobile daemons :
MCE
Handles screen on/off
Blocks input when off
Wakelocks all things battery life related…
DSME
Handles device state
Reboot etc...
22 AsteroidOS: architecture of a FOSS smartwatch platform
asteroid-settings: an example of app
Developed in QML
Declaration of elements, properties, states, transitions…
Extensible with Javascript
QML-Asteroid set of custom components
Already used by BlackBerry 10, SailfishOS, NemoMobile,
WebOS-Ports, Ubuntu Touch, Plasma Mobile…
Using components like QtBluetooth
Bluetooth HAL supporting BlueZ5
Supports Bluetooth Low Energy
23 AsteroidOS: architecture of a FOSS smartwatch platform
asteroid-settings: an example of app
Two examples of used NemoMobile daemons :
Mapplauncherd:
Booster daemons that preloads libraries
Faster apps startup
Used through /usr/bin/invoker
Timed:
Handles system's time and date
Alarm clock
24 AsteroidOS: architecture of a FOSS smartwatch platform
Complete graphic stack
asteroid-settings
libhardware.so (glibc)
QML/ qml-asteroid QtWayland (client API)
asteroid-launcher QtWayland (compositor API)
Wayland-egl protocol
QML/ qml-asteroid
Qt5-qpa-hwcomposer
libhardware.so (bionic)
Binary blobs
GPU
libhybris
Lipstick
25 AsteroidOS: architecture of a FOSS smartwatch platform
A system based on OpenEmbedded
Layers, Recipes, Distro, BSP, Pkgs, SDK, Jenkins...
26 AsteroidOS: architecture of a FOSS smartwatch platform
How does AsteroidOS work ? OpenEmbedded
Hardware
Linux Kernel (Android's one with minor modifications for systemd/connmand etc...)
Standard apps (asteroid-settings, asteroid-timer, asteroid-calendar etc...)
Minimal Android /system dir (drivers)
Connectivity (Connman, Bluez5, usb-moded, adbd)
Asteroid-launcher (based on Lipstick)
Qt5.5 (qml-asteroid, qml, qpa-hwcomposer, qtwayland, qtbluetooth...)
Standard GNU/Linux built with OpenEmbedded
(GNU tools, systemd, dbus, udev, etc...)
Compatibility layer (libhybris)
NemoMobile Middleware (mce, dsme, ngfd, timed, sensorfwd, statefs, mapplauncherd etc...)
27 AsteroidOS: architecture of a FOSS smartwatch platform
The OpenEmbedded build system
Build-system for creating AsteroidOS from sources
Supported by Yocto from the Linux Foundation
git clone https://github.com/AsteroidOS/asteroid
cd asteroid/
. ./prepare-build.sh dory
# Downloads BB & the layers and configures the target
bitbake asteroid-image
# Downloads, configures, compiles, installs, packages,
and gathers in a single image the whole AsteroidOS
28 AsteroidOS: architecture of a FOSS smartwatch platform
General overview of OpenEmbedded
Images (ex: asteroid-image) made from
Packages (ex: asteroid-launcher-dev) made from
Recipes (ex: asteroid-launcher_git.bb) provided by
Layers (ex: meta-asteroid)
29 AsteroidOS: architecture of a FOSS smartwatch platform
The meta-asteroid layer
meta-asteroid: AsteroidOS definition
classes/conf: description of the distro and image
recipes-asteroid: all kind of apps, themes etc…
recipes-nemomobile: mce, dsme, mapplauncherd etc...
… : various patches applied to other recipes
Depends on meta-qt5
Qt5.5 and related libs
Qt SDK generation
30 AsteroidOS: architecture of a FOSS smartwatch platform
The meta-dory-hybris layer
meta-dory-hybris: BSP for LG G Watch
recipes-android: the /system directory
recipes-kernel: the dory's kernel with custom defconfig
… : various patches applied to other recipes
Depends on meta-smartphone/meta-android
Provides libhybris
And various android tools (adbd for ex.)
31 AsteroidOS: architecture of a FOSS smartwatch platform
The future of AsteroidOS
An open platform, You!
32 AsteroidOS: architecture of a FOSS smartwatch platform
The future of AsteroidOS: an open platform
Open-source personal assistant:
Sirius ? (open-source research project)
Open-source offline mapping:
Maps.me (open-source, based on
OpenStreetMap)
Use your imagination:
Pentesting suite
LibreOffice remote command
Etc ...
33 AsteroidOS: architecture of a FOSS smartwatch platform
The future of AsteroidOS: You!
Developers: create QML components and apps,
maintain the OpenEmbedded layers
Porters: port AsteroidOS to new
smartwatches
Evangelists: spread the word and
gather a community
Testers: needs users
34 AsteroidOS: architecture of a FOSS smartwatch platform
Thanks … Questions ?
Site: http://asteroidos.org/
GitHub: AsteroidOS
Twitter: @AsteroidOS
IRC: #asteroid@irc.freenode.net
Oh and by the way, I'm looking for a summer internship!

More Related Content

Similar to AsteroidOS: Architecture of a FOSS smartwatch platform

How to save the environment
How to save the environmentHow to save the environment
How to save the environment
Aaron Zauner
 
Evolution of Linux Containerization
Evolution of Linux Containerization Evolution of Linux Containerization
Evolution of Linux Containerization
WSO2
 

Similar to AsteroidOS: Architecture of a FOSS smartwatch platform (20)

Droidcon uk2012 androvm
Droidcon uk2012 androvmDroidcon uk2012 androvm
Droidcon uk2012 androvm
 
Ivan Zhuravel and Ihor Khlaponin "DC/OS vs Kubernetes. Let the Fight Begin!"
Ivan Zhuravel and Ihor Khlaponin "DC/OS vs Kubernetes. Let the Fight Begin!"Ivan Zhuravel and Ihor Khlaponin "DC/OS vs Kubernetes. Let the Fight Begin!"
Ivan Zhuravel and Ihor Khlaponin "DC/OS vs Kubernetes. Let the Fight Begin!"
 
6202942
62029426202942
6202942
 
Linux containers – next gen virtualization for cloud (atl summit) ar4 3 - copy
Linux containers – next gen virtualization for cloud (atl summit) ar4 3 - copyLinux containers – next gen virtualization for cloud (atl summit) ar4 3 - copy
Linux containers – next gen virtualization for cloud (atl summit) ar4 3 - copy
 
Evolution of containers to kubernetes
Evolution of containers to kubernetesEvolution of containers to kubernetes
Evolution of containers to kubernetes
 
Introduction to OpenSolaris 2008.11
Introduction to OpenSolaris 2008.11Introduction to OpenSolaris 2008.11
Introduction to OpenSolaris 2008.11
 
Bringing up Android on your favorite X86 Workstation or VM (AnDevCon IV, 2012)
Bringing up Android on your favorite X86 Workstation or VM (AnDevCon IV, 2012)Bringing up Android on your favorite X86 Workstation or VM (AnDevCon IV, 2012)
Bringing up Android on your favorite X86 Workstation or VM (AnDevCon IV, 2012)
 
App container rkt
App container rktApp container rkt
App container rkt
 
Build and Run Android N Source Ccode on NXP SABRESD platform
Build and Run Android N Source Ccode on NXP SABRESD platformBuild and Run Android N Source Ccode on NXP SABRESD platform
Build and Run Android N Source Ccode on NXP SABRESD platform
 
Core Android
Core AndroidCore Android
Core Android
 
How to save the environment
How to save the environmentHow to save the environment
How to save the environment
 
Learning, Analyzing and Protecting Android with TOMOYO Linux (JLS2009)
Learning, Analyzing and Protecting Android with TOMOYO Linux (JLS2009)Learning, Analyzing and Protecting Android with TOMOYO Linux (JLS2009)
Learning, Analyzing and Protecting Android with TOMOYO Linux (JLS2009)
 
Dev opsec dockerimage_patch_n_lifecyclemanagement_2019
Dev opsec dockerimage_patch_n_lifecyclemanagement_2019Dev opsec dockerimage_patch_n_lifecyclemanagement_2019
Dev opsec dockerimage_patch_n_lifecyclemanagement_2019
 
Introduction to Xamarin Mobile Platform
Introduction to Xamarin Mobile PlatformIntroduction to Xamarin Mobile Platform
Introduction to Xamarin Mobile Platform
 
XOS in open CORD project
XOS in open CORD projectXOS in open CORD project
XOS in open CORD project
 
Android on Intel Architecture: ROM Cooking Tutorial
Android on Intel Architecture: ROM Cooking TutorialAndroid on Intel Architecture: ROM Cooking Tutorial
Android on Intel Architecture: ROM Cooking Tutorial
 
Building Your Robot using AWS Robomaker
Building Your Robot using AWS RobomakerBuilding Your Robot using AWS Robomaker
Building Your Robot using AWS Robomaker
 
Operating Systems 3
Operating Systems 3Operating Systems 3
Operating Systems 3
 
Docker Ecosystem on Azure
Docker Ecosystem on AzureDocker Ecosystem on Azure
Docker Ecosystem on Azure
 
Evolution of Linux Containerization
Evolution of Linux Containerization Evolution of Linux Containerization
Evolution of Linux Containerization
 

More from Florent Revest (6)

AsteroidOS: la liberté sur votre poignet
AsteroidOS: la liberté sur votre poignetAsteroidOS: la liberté sur votre poignet
AsteroidOS: la liberté sur votre poignet
 
Qt et QML dans AsteroidOS par l'exemple
Qt et QML dans AsteroidOS par l'exempleQt et QML dans AsteroidOS par l'exemple
Qt et QML dans AsteroidOS par l'exemple
 
Utilisation de Qt dans l'embarqué: L'exemple d'AsteroidOS
Utilisation de Qt dans l'embarqué: L'exemple d'AsteroidOSUtilisation de Qt dans l'embarqué: L'exemple d'AsteroidOS
Utilisation de Qt dans l'embarqué: L'exemple d'AsteroidOS
 
Réutiliser des composants Android avec libhybris
Réutiliser des composants Android avec libhybrisRéutiliser des composants Android avec libhybris
Réutiliser des composants Android avec libhybris
 
AsteroidOS: plateforme ouverte pour smartwatches
AsteroidOS: plateforme ouverte pour smartwatchesAsteroidOS: plateforme ouverte pour smartwatches
AsteroidOS: plateforme ouverte pour smartwatches
 
Portez Qt au poignet avec AsteroidOS
Portez Qt au poignet avec AsteroidOSPortez Qt au poignet avec AsteroidOS
Portez Qt au poignet avec AsteroidOS
 

Recently uploaded

%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
masabamasaba
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
VictoriaMetrics
 
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
masabamasaba
 

Recently uploaded (20)

%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
 
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
 
What Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the SituationWhat Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the Situation
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
 
%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go Platformless
 
tonesoftg
tonesoftgtonesoftg
tonesoftg
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
 
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 

AsteroidOS: Architecture of a FOSS smartwatch platform

  • 1. AsteroidOS: architecture of a FOSS smartwatch platform By Florent Revest January the 30th , 2016
  • 2. 2 AsteroidOS: architecture of a FOSS smartwatch platform Who am I ? Mail: revestflo@gmail.com GitHub: FlorentRevest LinkedIn: FlorentRevest IRC: kido@irc.freenode.net Twitter: @Xenon132 Site: http://florentrevest.github.io/ AsteroidOS Raspcopter Drone Quasar Kernel Nebulae DE
  • 3. 3 AsteroidOS: architecture of a FOSS smartwatch platform General presentation of AsteroidOS Why, what and how ?
  • 4. 4 AsteroidOS: architecture of a FOSS smartwatch platform Why AsteroidOS ? Source: xda-developers “ More wearable devices and less control over our data Current operating systems are not open or hackable enough → need for an open platform to unleash the full potential
  • 5. 5 AsteroidOS: architecture of a FOSS smartwatch platform What is AsteroidOS ?
  • 6. 6 AsteroidOS: architecture of a FOSS smartwatch platform How does AsteroidOS work ? General overview Hardware Linux Kernel (Android's one with minor modifications for systemd/connmand etc...) Minimal Android /system dir (drivers) Connectivity (Connman, Bluez5, usb-moded, adbd) Asteroid-launcher (based on Lipstick) Qt5.5 (qml-asteroid, qml, qpa-hwcomposer, qtwayland, qtbluetooth...) Standard GNU/Linux built with OpenEmbedded (GNU tools, systemd, dbus, udev, etc...) Compatibility layer (libhybris) NemoMobile Middleware (mce, dsme, ngfd, timed, sensorfwd, statefs, mapplauncherd etc...) Standard apps (asteroid-settings, asteroid-timer, asteroid-calendar etc...)
  • 7. 7 AsteroidOS: architecture of a FOSS smartwatch platform Boot Process Fastboot, Boot.img, Rootfs, Adb...
  • 8. 8 AsteroidOS: architecture of a FOSS smartwatch platform How does AsteroidOS work ? Boot process Hardware Linux Kernel (Android's one with minor modifications for systemd/connmand etc...)
  • 9. 9 AsteroidOS: architecture of a FOSS smartwatch platform The LG G Watch's bootloader: fastboot Fastboot: command and protocol implemented by bootloaders oem-unlock free your device Allows partitions flashing, remote kernels booting etc... boot.img format: mkbootimg, unmkbootimg
  • 10. 10 AsteroidOS: architecture of a FOSS smartwatch platform The LG G Watch's bootloader: diagram Bootloader BOOT Partition RECOVERY Partition Remote boot via fastboot Android Kernel Android Kernel Modified Android Kernel Android initrd Recovery initrd AsteroidOS initrd Mount Android Partitions Rootfs with loop or SYSTEM partition boot.img format Propri etary System
  • 11. 11 AsteroidOS: architecture of a FOSS smartwatch platform Debugging the kernel and init CONFIG_TTY_PRINTK and CONFIG_ANDROID_RAM_CONSOLE Brings /proc/last_kmesg accessible from Android Adbd: Android Debug Bridge Daemon Functionfs and usb otg modules of the kernel Remote shell from the computer Push/Pull files ...
  • 12. 12 AsteroidOS: architecture of a FOSS smartwatch platform Hardware Acceleration GLES2, Libhybris, Bionic/Glibc, Hwcomposer...
  • 13. 13 AsteroidOS: architecture of a FOSS smartwatch platform How does AsteroidOS work ? Hardware accel. Hardware Linux Kernel (Android's one with minor modifications for systemd/connmand etc...) Minimal Android /system dir (drivers) Compatibility layer (libhybris)
  • 14. 14 AsteroidOS: architecture of a FOSS smartwatch platform Hardware acceleration choices Framebuffer not enough for a “smart” experience Just used by “psplash” Free drivers developed by reverse-engineering Perfect from the freedom's point of view Often unfinished, unmaintained, hard to backport... Proprietary Android (Wear) drivers via libhybris Means integration of a /system directory with proprietary binary blobs: /! not 100% free anymore ! Works really well
  • 15. 15 AsteroidOS: architecture of a FOSS smartwatch platform Libhybris: General overview Created by Carsten Munk for Mer and Jolla Mostly a dirty hack... but with great potential Not ideal, but better than nothing Large imbalance between “Linux” and Android mobile drivers Due to Bionic - the Android's libc - and its dynamic linker OEMs provide Android /system with proprietary drivers Used by Sailfish OS / Mer (via Wayland for ex), Ubuntu Touch (via Mir for ex), WebOS Ports... Used for EGL/GLES, Camera, NFC, Audio, Sensors, etc...
  • 16. 16 AsteroidOS: architecture of a FOSS smartwatch platform Libhybris: Linking scheme test-vibrator Reimplemented Android linker (android_dlopen/android_dlsym) System linker (dlopen/dlsym) Glibc (ex: my_fclose → fclose) vibrator.so libhybris-common.so Table Hooks Bionic (ex: setjmp, longjmp) Custom code (ex: dlopen, dlsym, pthread)
  • 17. 17 AsteroidOS: architecture of a FOSS smartwatch platform Using HWComposer through libhybris Compositing HAL used in Android Offloads compositing to GPU Better performance and battery-life Since Qt5: Qt Platform Abstraction Android, Cocoa, Direct2D, Directfb, Eglfs, iOS, KMS, Fbdev, Offscreen, OpenWfd QNX, Windows, WinRt, Xcb… qt5-qpa-hwcomposer-plugin uses hwcomposer via libhybris
  • 18. 18 AsteroidOS: architecture of a FOSS smartwatch platform Qt5.5 Based UX QPA, QtWayland, QML, Lipstick, QtBluetooth...
  • 19. 19 AsteroidOS: architecture of a FOSS smartwatch platform How does AsteroidOS work ? User experience Hardware Linux Kernel (Android's one with minor modifications for systemd/connmand etc...) Standard apps (asteroid-settings, asteroid-timer, asteroid-calendar etc...) Minimal Android /system dir (drivers) Asteroid-launcher (based on Lipstick) Qt5.5 (qml-asteroid, qml, qpa-hwcomposer, qtwayland, qtbluetooth...) Compatibility layer (libhybris) NemoMobile Middleware (mce, dsme, ngfd, timed, sensorfwd, statefs, mapplauncherd etc...)
  • 20. 20 AsteroidOS: architecture of a FOSS smartwatch platform asteroid-launcher: the wayland compositor Under the hood: QtWayland's API for compositors Based on Lipstick, like GlacierUX and Jolla-Home Lipstick: “Home-screen creation toolkit” Source: twitter.com“
  • 21. 21 AsteroidOS: architecture of a FOSS smartwatch platform asteroid-launcher: the wayland compositor Two examples of used NemoMobile daemons : MCE Handles screen on/off Blocks input when off Wakelocks all things battery life related… DSME Handles device state Reboot etc...
  • 22. 22 AsteroidOS: architecture of a FOSS smartwatch platform asteroid-settings: an example of app Developed in QML Declaration of elements, properties, states, transitions… Extensible with Javascript QML-Asteroid set of custom components Already used by BlackBerry 10, SailfishOS, NemoMobile, WebOS-Ports, Ubuntu Touch, Plasma Mobile… Using components like QtBluetooth Bluetooth HAL supporting BlueZ5 Supports Bluetooth Low Energy
  • 23. 23 AsteroidOS: architecture of a FOSS smartwatch platform asteroid-settings: an example of app Two examples of used NemoMobile daemons : Mapplauncherd: Booster daemons that preloads libraries Faster apps startup Used through /usr/bin/invoker Timed: Handles system's time and date Alarm clock
  • 24. 24 AsteroidOS: architecture of a FOSS smartwatch platform Complete graphic stack asteroid-settings libhardware.so (glibc) QML/ qml-asteroid QtWayland (client API) asteroid-launcher QtWayland (compositor API) Wayland-egl protocol QML/ qml-asteroid Qt5-qpa-hwcomposer libhardware.so (bionic) Binary blobs GPU libhybris Lipstick
  • 25. 25 AsteroidOS: architecture of a FOSS smartwatch platform A system based on OpenEmbedded Layers, Recipes, Distro, BSP, Pkgs, SDK, Jenkins...
  • 26. 26 AsteroidOS: architecture of a FOSS smartwatch platform How does AsteroidOS work ? OpenEmbedded Hardware Linux Kernel (Android's one with minor modifications for systemd/connmand etc...) Standard apps (asteroid-settings, asteroid-timer, asteroid-calendar etc...) Minimal Android /system dir (drivers) Connectivity (Connman, Bluez5, usb-moded, adbd) Asteroid-launcher (based on Lipstick) Qt5.5 (qml-asteroid, qml, qpa-hwcomposer, qtwayland, qtbluetooth...) Standard GNU/Linux built with OpenEmbedded (GNU tools, systemd, dbus, udev, etc...) Compatibility layer (libhybris) NemoMobile Middleware (mce, dsme, ngfd, timed, sensorfwd, statefs, mapplauncherd etc...)
  • 27. 27 AsteroidOS: architecture of a FOSS smartwatch platform The OpenEmbedded build system Build-system for creating AsteroidOS from sources Supported by Yocto from the Linux Foundation git clone https://github.com/AsteroidOS/asteroid cd asteroid/ . ./prepare-build.sh dory # Downloads BB & the layers and configures the target bitbake asteroid-image # Downloads, configures, compiles, installs, packages, and gathers in a single image the whole AsteroidOS
  • 28. 28 AsteroidOS: architecture of a FOSS smartwatch platform General overview of OpenEmbedded Images (ex: asteroid-image) made from Packages (ex: asteroid-launcher-dev) made from Recipes (ex: asteroid-launcher_git.bb) provided by Layers (ex: meta-asteroid)
  • 29. 29 AsteroidOS: architecture of a FOSS smartwatch platform The meta-asteroid layer meta-asteroid: AsteroidOS definition classes/conf: description of the distro and image recipes-asteroid: all kind of apps, themes etc… recipes-nemomobile: mce, dsme, mapplauncherd etc... … : various patches applied to other recipes Depends on meta-qt5 Qt5.5 and related libs Qt SDK generation
  • 30. 30 AsteroidOS: architecture of a FOSS smartwatch platform The meta-dory-hybris layer meta-dory-hybris: BSP for LG G Watch recipes-android: the /system directory recipes-kernel: the dory's kernel with custom defconfig … : various patches applied to other recipes Depends on meta-smartphone/meta-android Provides libhybris And various android tools (adbd for ex.)
  • 31. 31 AsteroidOS: architecture of a FOSS smartwatch platform The future of AsteroidOS An open platform, You!
  • 32. 32 AsteroidOS: architecture of a FOSS smartwatch platform The future of AsteroidOS: an open platform Open-source personal assistant: Sirius ? (open-source research project) Open-source offline mapping: Maps.me (open-source, based on OpenStreetMap) Use your imagination: Pentesting suite LibreOffice remote command Etc ...
  • 33. 33 AsteroidOS: architecture of a FOSS smartwatch platform The future of AsteroidOS: You! Developers: create QML components and apps, maintain the OpenEmbedded layers Porters: port AsteroidOS to new smartwatches Evangelists: spread the word and gather a community Testers: needs users
  • 34. 34 AsteroidOS: architecture of a FOSS smartwatch platform Thanks … Questions ? Site: http://asteroidos.org/ GitHub: AsteroidOS Twitter: @AsteroidOS IRC: #asteroid@irc.freenode.net Oh and by the way, I'm looking for a summer internship!