recycle your android devices
TRANSCRIPT
![Page 1: Recycle Your Android Devices](https://reader033.vdocuments.net/reader033/viewer/2022051319/627b89cd2c8ce706d35000ed/html5/thumbnails/1.jpg)
Recycle Your Android Devices
Run real Linux on them
![Page 2: Recycle Your Android Devices](https://reader033.vdocuments.net/reader033/viewer/2022051319/627b89cd2c8ce706d35000ed/html5/thumbnails/2.jpg)
Who am I?
David Greaves
lbt on #mer #sailfishos ...
Co-founder of the Mer Project
work at Jolla
systems and infrastructure (OBS, QA, gitlab, bz ... VMs)
HA Documentation
Mer tools
![Page 3: Recycle Your Android Devices](https://reader033.vdocuments.net/reader033/viewer/2022051319/627b89cd2c8ce706d35000ed/html5/thumbnails/3.jpg)
This is not a Jolla pitch
![Page 4: Recycle Your Android Devices](https://reader033.vdocuments.net/reader033/viewer/2022051319/627b89cd2c8ce706d35000ed/html5/thumbnails/4.jpg)
This is not a Jolla pitch...but
![Page 5: Recycle Your Android Devices](https://reader033.vdocuments.net/reader033/viewer/2022051319/627b89cd2c8ce706d35000ed/html5/thumbnails/5.jpg)
This is not a Jolla pitch...but
![Page 6: Recycle Your Android Devices](https://reader033.vdocuments.net/reader033/viewer/2022051319/627b89cd2c8ce706d35000ed/html5/thumbnails/6.jpg)
This is not a Jolla pitch...but
Good case study
Galaxy S3 & Nexus 4 / 5 & more
Sailfish for Android
![Page 7: Recycle Your Android Devices](https://reader033.vdocuments.net/reader033/viewer/2022051319/627b89cd2c8ce706d35000ed/html5/thumbnails/7.jpg)
This is not a Jolla pitch...but
HADK ToC:
• Prerequisites
• Preparing Your Device
• Setting up the SDKs
• Building the Android HAL
• Setting up Scratchbox2 Target
• Packaging Droid HAL
• Creating the Sailfish OS root fs
• Getting In
• Flashing the rootfs image
• Manual Installation
• List of Repositories
• Tweaks and Patches
• Building a new Device
• List of Supported Devices
![Page 8: Recycle Your Android Devices](https://reader033.vdocuments.net/reader033/viewer/2022051319/627b89cd2c8ce706d35000ed/html5/thumbnails/8.jpg)
Talk about Technology
![Page 9: Recycle Your Android Devices](https://reader033.vdocuments.net/reader033/viewer/2022051319/627b89cd2c8ce706d35000ed/html5/thumbnails/9.jpg)
Talk about Technology
JEOS
Just Enough OS
![Page 10: Recycle Your Android Devices](https://reader033.vdocuments.net/reader033/viewer/2022051319/627b89cd2c8ce706d35000ed/html5/thumbnails/10.jpg)
Talk about Technology
wayland
systemd
btrfs
connman
ofono/pulseaudio
git
dbus
rpm
blueZ
Gecko
libzypp
gstreamer
eglibc
glib
kcalcore
GeoClue
kernel
![Page 11: Recycle Your Android Devices](https://reader033.vdocuments.net/reader033/viewer/2022051319/627b89cd2c8ce706d35000ed/html5/thumbnails/11.jpg)
Talk about Technology
wayland
systemd
btrfs
connman
ofono/pulseaudio
git
dbus
rpm
blueZ
Gecko
libzypp
gstreamer
eglibc
glib
kcalcore
GeoClue
kernel
![Page 12: Recycle Your Android Devices](https://reader033.vdocuments.net/reader033/viewer/2022051319/627b89cd2c8ce706d35000ed/html5/thumbnails/12.jpg)
Talk about Technology
Why?
• QML
• Performant
• Open
• Not Java
• Huge developer base
5.2
Qt 5.2-ish
![Page 13: Recycle Your Android Devices](https://reader033.vdocuments.net/reader033/viewer/2022051319/627b89cd2c8ce706d35000ed/html5/thumbnails/13.jpg)
Talk about Technology
QtWayland replaces SurfaceFlinger
More to come using hwcomposer.
Qt 5.2-ish
![Page 14: Recycle Your Android Devices](https://reader033.vdocuments.net/reader033/viewer/2022051319/627b89cd2c8ce706d35000ed/html5/thumbnails/14.jpg)
Talk about Technology
QtWayland replaces SurfaceFlinger
More to come using hwcomposer.
Qt 5.2-ish
![Page 15: Recycle Your Android Devices](https://reader033.vdocuments.net/reader033/viewer/2022051319/627b89cd2c8ce706d35000ed/html5/thumbnails/15.jpg)
Talk about Technology code
![Page 16: Recycle Your Android Devices](https://reader033.vdocuments.net/reader033/viewer/2022051319/627b89cd2c8ce706d35000ed/html5/thumbnails/16.jpg)
Routing around the breakage of closed binary blobs
![Page 17: Recycle Your Android Devices](https://reader033.vdocuments.net/reader033/viewer/2022051319/627b89cd2c8ce706d35000ed/html5/thumbnails/17.jpg)
Talk about Technology
Shim between GNU libc and bionic libc
Enables use of glibc stack on top of Android BSPlibhybris
![Page 18: Recycle Your Android Devices](https://reader033.vdocuments.net/reader033/viewer/2022051319/627b89cd2c8ce706d35000ed/html5/thumbnails/18.jpg)
Talk about Technology
Android linker code
dlopen
dlsym
dlclose
become
android_dlopen
android_dlsym
android_dlcloselibhybris
![Page 19: Recycle Your Android Devices](https://reader033.vdocuments.net/reader033/viewer/2022051319/627b89cd2c8ce706d35000ed/html5/thumbnails/19.jpg)
Talk about Technology
Patches to bionic - relatively few:
• Thread local storage
• pthreads
• errno
• hard vs softfp float-abi
• /dev/log
libhybris
![Page 20: Recycle Your Android Devices](https://reader033.vdocuments.net/reader033/viewer/2022051319/627b89cd2c8ce706d35000ed/html5/thumbnails/20.jpg)
Talk about Technology
android_dlopen(“libEGL.so”);
myeglCreateWindowSurfaceFP = android_dlsym(“eglCreateWindowSurface”);
*myeglCreateWindowSurface(....)
Gets you
• libEGL.so
or
• libGLESv2.so
as wrappers which present to glibc space
libhybris
![Page 21: Recycle Your Android Devices](https://reader033.vdocuments.net/reader033/viewer/2022051319/627b89cd2c8ce706d35000ed/html5/thumbnails/21.jpg)
Talk about Technology
Rinse and repeat for:
• Gralloc
• OpenGL ES 1.1/2.0
• NFC
• Hardware HAL
• OpenCL
• SurfaceFlinger
• OpenMAX
• Camera
• Hwcomposer
• and so on ...
libhybris
![Page 22: Recycle Your Android Devices](https://reader033.vdocuments.net/reader033/viewer/2022051319/627b89cd2c8ce706d35000ed/html5/thumbnails/22.jpg)
Building it
HA DK
• Mer SDK
• Scratchbox2•Device target
• Minimal Ubuntu (for Android build)
![Page 23: Recycle Your Android Devices](https://reader033.vdocuments.net/reader033/viewer/2022051319/627b89cd2c8ce706d35000ed/html5/thumbnails/23.jpg)
Building it
HA DK• Explaining the layout
• Bridge Android / Linux
Host OS (linux – but all kinds of variants)
Mer SDK
HABUILD SDK (ARM)
Android HA :Kernel; bionic;
SB2 Device Target (ARM)
Mer HA :(libhybris)
Qt / Wayland drivers, Pulseaudio, ...
![Page 24: Recycle Your Android Devices](https://reader033.vdocuments.net/reader033/viewer/2022051319/627b89cd2c8ce706d35000ed/html5/thumbnails/24.jpg)
Building it
Mer SDK
• Minimal install
• Some tools
• SB2 ready
![Page 25: Recycle Your Android Devices](https://reader033.vdocuments.net/reader033/viewer/2022051319/627b89cd2c8ce706d35000ed/html5/thumbnails/25.jpg)
Building it
HABUILD SDK
• Grab a tarball
• Install 'repo'
![Page 26: Recycle Your Android Devices](https://reader033.vdocuments.net/reader033/viewer/2022051319/627b89cd2c8ce706d35000ed/html5/thumbnails/26.jpg)
Building it
HABUILD DK
• Device specific XML manifest
• Sync the git repos
• Mix of CM & Mer
• Run 'make'
• Fix problems :)
![Page 27: Recycle Your Android Devices](https://reader033.vdocuments.net/reader033/viewer/2022051319/627b89cd2c8ce706d35000ed/html5/thumbnails/27.jpg)
Building it
Mer DK
• Package up the HABUILD built:
•binaries
•headers
•kernel
•boot & recovery .img
• Create a local rpm repository (headers)
• Make an SB2 'Target'
![Page 28: Recycle Your Android Devices](https://reader033.vdocuments.net/reader033/viewer/2022051319/627b89cd2c8ce706d35000ed/html5/thumbnails/28.jpg)
Building it
Mer SDK
• Build hybris
• Build drivers: • Qt hwcomposer
• Audio
• Haptic
• Sensors
![Page 29: Recycle Your Android Devices](https://reader033.vdocuments.net/reader033/viewer/2022051319/627b89cd2c8ce706d35000ed/html5/thumbnails/29.jpg)
Building it
Mer SDK
• Build SailfishOS rootfs
• Build <insert your system here> rootfs
![Page 30: Recycle Your Android Devices](https://reader033.vdocuments.net/reader033/viewer/2022051319/627b89cd2c8ce706d35000ed/html5/thumbnails/30.jpg)
Running it
Flashing
• Use adb or equiv
![Page 31: Recycle Your Android Devices](https://reader033.vdocuments.net/reader033/viewer/2022051319/627b89cd2c8ce706d35000ed/html5/thumbnails/31.jpg)
Running it
Booting
What happens?
• Bootloader
• Kernel
• Initrd and /init
• Systemd
• Android 'init'
![Page 32: Recycle Your Android Devices](https://reader033.vdocuments.net/reader033/viewer/2022051319/627b89cd2c8ce706d35000ed/html5/thumbnails/32.jpg)
Running it
Running
• ssh
• nodejs
• ruby/python
• webserver
• ...
![Page 33: Recycle Your Android Devices](https://reader033.vdocuments.net/reader033/viewer/2022051319/627b89cd2c8ce706d35000ed/html5/thumbnails/33.jpg)
SailfishOS Porters
• Currently around 25 active developers
• Working on 22 devices•Galaxy Nexus/Note/Tab2/S3/S4
•Nexus One/4/5/7's
•OnePlus, Photon Q, HTC Desire HD
•Ascend P6, G525-u00, Xperia Z1
•HP Touchpad
•N900, N9(50)
• N4, N5, Galaxy Nexus, are most mature and images are available
![Page 34: Recycle Your Android Devices](https://reader033.vdocuments.net/reader033/viewer/2022051319/627b89cd2c8ce706d35000ed/html5/thumbnails/34.jpg)
Where are we?
Status:http://bit.ly/port-devices-status
![Page 35: Recycle Your Android Devices](https://reader033.vdocuments.net/reader033/viewer/2022051319/627b89cd2c8ce706d35000ed/html5/thumbnails/35.jpg)
Working Together
• MultiromWorked with tassadar to add multirom support for sailfishOs images
• Upstreaming bugfixes code back to CM
During N5 port we contributed bugfix back to the upstream CM
http://review.cyanogenmod.org/#/c/67489/
![Page 36: Recycle Your Android Devices](https://reader033.vdocuments.net/reader033/viewer/2022051319/627b89cd2c8ce706d35000ed/html5/thumbnails/36.jpg)
Talk to us
• Xdadev sailfish section and also individual device forums have SailfishOs threads
• IRC channel #sailfishos-porters
• All source at https://github.com/mer-hybris• SailfishOs meetups , London, Berlin, Finland
• Regular IRC meeting where developers drive the agenda
![Page 37: Recycle Your Android Devices](https://reader033.vdocuments.net/reader033/viewer/2022051319/627b89cd2c8ce706d35000ed/html5/thumbnails/37.jpg)
Open Source
Open Working
Mer @ merproject.org
• Core & some MW
• Systems
• Community
Code is not enough
![Page 38: Recycle Your Android Devices](https://reader033.vdocuments.net/reader033/viewer/2022051319/627b89cd2c8ce706d35000ed/html5/thumbnails/38.jpg)
Unlike
freenode: #mer #sailfishos
github/mer-hybris
merproject.org
Not that hard
90 people made this:
![Page 39: Recycle Your Android Devices](https://reader033.vdocuments.net/reader033/viewer/2022051319/627b89cd2c8ce706d35000ed/html5/thumbnails/39.jpg)
Jolla's FOSDEMDiscountCode
Code: “FOSDEM2015”
€50 discount (€199)
31 Jan – 8 Feb
(One per person)
EU / Switzerland / Norway
Tablet : See us on Indiegogo