SlideShare uma empresa Scribd logo
1 de 44
Baixar para ler offline
Android as a Digital Signage platform

Betabeers Barcelona November 2013
Hello world
The company

Clients

20 people

Orange

Digital Signage

El Corte Inglés

User Interactivity

Endesa
Sodexo

Projects
Spain
United Kingdom
Germany
Netherlands
Finland

www.focusonemotions.com
@focusonemotions

Ikea
Nespresso
Fira Barcelona
Ajuntament de Barcelona
ESADE
The Phone House
Hello world
Orestes Carracedo
8 years as a developer
4 years as an Android user
3,5 years at Focus On Emotions
Software Development Director
Certified SCRUM Master
PHP 5.3 Zend Certified Engineer

Read about me
http://blog.orestes.io

Follow me
@orestesCA
What’s Digital Signage?
What’s Digital Signage?
The beginning
Briefing
Make it on time
Code as less as possible

Be robust
Make use of existing OS tools
Make use of existing apps

Be flexible
Create multiple decoupled tools that work together
System architecture
Apache Cordova

A
D
B

API Client

JavaScript player
V
P
N

cron

scheduler

SuperSU
BusyBox

HTTP API

S
S
H

CLI API
Prototype

http://vimeo.com/72032877
Let’s do it!
Quick ADB recap
$ adb devices
List of devices attached
4df144cb39376f2f
device # Over USB
192.168.1.42:5555
device # Over NET
$ adb shell echo “Hello world”
Hello world
$ adb -d shell ls /mnt/sdcard
$ adb -s 192.168.1.42:5555 shell ls /mnt/sdcard

Enable ADB over Wi-Fi
$ adb shell setprop service.adb.tcp.port 5555
$ adb shell stop adbd && start adbd # or you’ll be locked out
$ adb connect 192.168.1.42:5555
Quick ADB recap
Sending keys
$ adb shell input keyevent 3 # home
Starting activities
$ adb shell am start -n com.focusonemotions.android.player./Wrapper
Killing a process
$ pm stop com.focusonemotions.android.player
Installing apps
$ adb install foe-player-v1.1.apk
$ adb push foe-player-v1.1.apk /system/app

Android Monitor
<android-sdk>/tools/monitor
http://developer.android.com/reference/android/view/KeyEvent.html
Features
Player
Cordova
Rotates screen
Shows WebView
Provides OS shell access

JavaScript
Displays content
Reads content index file
Listens for gesture
Asks for security code
Shows config manager
Scheduler
Power management
$ reboot # (duh)
Screen state management
$ input keyevent 26 # power
$ input keyevent 82 # menu
Player state management
$ killall com.focusonemotions.android.player
$ am start -n com.[...].player/.Wrapper

http://developer.android.com/reference/android/view/KeyEvent.html
Restricted user access
●

Kill UI process
● Custom launcher
AndroidManifest
<category android:name="android.intent.category.HOME" />

/system/build.prop
qemu.hw.mainkeys=1

●

Custom ROM

http://thebitplague.wordpress.com/2013/04/05/kiosk-mode-on-the-nexus-7/
Local configuration manager
Content Index file

Configuration manager

Player configuration file

Content player
Static IP address

$ openvpn --config /mnt/sdcard/focus/openvpn/conn.conf >
/mnt/sdcard/focus/openvpn/run.log &
$ cat /mnt/sdcard/focus/openvpn/conn.conf | grep resolv
resolv-retry infinite

https://play.google.com/store/apps/details?id=de.schaeuffelhut.android.openvpn.installer
https://play.google.com/store/apps/details?id=de.blinkt.openvpn
Remote shell
$ adb connect 192.168.1.42:5555
.
.

$ time adb connect 192.168.1.42:5555
unable to connect to 192.168.1.42:5555
real
user
sys

1m3.163s
0m0.000s
0m0.020s

$ time timeout 9s adb connect 192.168.1.42
real
user
sys

0m9.003s
0m0.000s
0m0.020s
Screen capture
$ adb shell screencap /mnt/sdcard/focus/capture.png
$ adb pull /mnt/sdcard/focus/capture.png
$ ./capture.sh oratab-030-01
Getting screencap from oratab-030-01 ... done.
Wi-Fi management
$ echo "12345678" | wpa_passphrase "SSID"
# reading passphrase from stdin
network={
ssid="SSID"
#psk="12345678"
psk=34b59e6b0182725d42460 [...]
}
$ wpa_passphrase "SSID" "12345678" # may malfunction
$ wpa_passphrase "SSID" # may malfunction
# reading passphrase from stdin

Android Wi-fi/WPA settings
/data/misc/wifi/wpa_supplicant.conf
Content management
$ adb push /local/folder /remote/folder

PHP SFTP Wrapper

/mnt/sdcard/focus
+ openvpn
+ player

$ php load-device-content.php 300 7

+ scheduler

Loading content …

+ upload

50 % 20/40 KB
100 % 40/40 KB
Done.

- content
- october_2013
+ media
Statistics & graphs
Statistics & graphs
Whisper database (updates to past data)
Carbon aggregation (Use an IP, not a hostname UDP is better than TCP, is off by default)
Graphite for rendering
$ /opt/graphite/bin/carbon-cache.py start --debug
$ echo ‘value.received’ `date +%s` | nc -w 1 127.0.0.1 2003

StatsD/statsite as aggregator/proxy (v8 nodejs vs C)
<?php StatsD::increment(‘com.focusonemotions.app.pushing’);

http://graphite.readthedocs.org/en/latest/
https://github.com/etsy/statsd/
https://github.com/armon/statsite
Platforming
Platforming
1.
2.
3.
4.
5.

Plug device in
Enable ADB over USB
Launch script
Enter ID
Done!

Check
●
●
●
●

PING
SFTP
SSH
ADB
Platforming
Install SuperSU + settings
Install BusyBox
Install DropBearSSH
Fix SFTP subsystem
Install player
Install scheduler
Install OpenVPN certificates from ID
Reboot
$ sftp root@192.168.1.42:mnt/sdcard/focus
bash: /usr/libexec/sftp-server: No such file or directory
$ sftp -s /system/xbin/sftp-server root@192.168.1.42:mnt/sdcard/focus
sftp>
# quick fix
[adb] $ ln -s /system/xbin/sftp-server /usr/libexec/sftp-server
http://www.chainfire.eu/projects/52/SuperSU/
https://play.google.com/store/apps/details?id=stericson.busybox
https://github.com/yath/android_external_dropbear
Content Management System
Testing
Testing
Quick feedback
Acceptance Tests
● CLI API
● Web API
Physical testing devices
Testing
Scenario Outline: Get a list of cities based on the passed parameters
Given I have an endpoint "http://api.pushmaster.focusonemotions.com/1.0/city/"
And I pass an argument "id" "<id>"
And I pass an argument "title" "<title>"
When I make a "<method>" request to the endpoint
Then I should get a valid response "<response>"
Examples:
| method
| GET
| GET
| GET
| GET
| GET

| id | title
|
|
| 1 |
|
| Hobbiton
| -1 |
|
| FOO

|
|
|
|
|
|

response
city/city-list.json
city/city-get-by-id.json
city/city-get-by-title.json
null.json
null.json

|
|
|
|
|
|
All done
Ha ha!
Monitoring with Nagios
Monitoring with Nagios
$ php check-device-content.php 192.168.1.42
Up-to-date
$ php check-device-content.php 192.168.1.42
Out of date

http://nagios.sourceforge.net/docs/3_0/quickstart.html
Monitoring with Nagios
<?xml version="1.0" encoding="UTF-8"?>
<nagios_status>
<hosts>
<host name="dev-001">
<status last_change="2013-10-08T16:27:37+02:00">0</status>
<connectivity last_change="2013-10-08T16:27:37+02:00">0</connectivity>
<content last_change="2013-10-08T16:27:37+02:00">0</content>
<sftp last_change="2013-10-08T16:27:37+02:00">0</sftp>
</host>
[...]
Thank you!
Feedback
orestes.ca@gmail.com

Team
Project Manager Juanra Posada
Lead Developer Orestes Carracedo
Developers Javier Morales
Dimas López

http://www.focusonemotions.com

JavaScript Ninja Raúl Jiménez
System Administrators Javier Domingo

dev@focusonemotions

Gonzalo Rodríguez
Challenge
Break out of the player app, win an
Amazon gift card!
●
●
●
●

Try to guess the unlock gesture
Try to guess the unlock code
No buttons
No fastboot

Mais conteúdo relacionado

Mais procurados

Working with the AOSP - Linaro Connect Asia 2013
Working with the AOSP - Linaro Connect Asia 2013Working with the AOSP - Linaro Connect Asia 2013
Working with the AOSP - Linaro Connect Asia 2013Opersys inc.
 
drone continuous Integration
drone continuous Integrationdrone continuous Integration
drone continuous IntegrationBo-Yi Wu
 
Learning AOSP - Android Booting Process
Learning AOSP - Android Booting ProcessLearning AOSP - Android Booting Process
Learning AOSP - Android Booting ProcessNanik Tolaram
 
Android booting sequece and setup and debugging
Android booting sequece and setup and debuggingAndroid booting sequece and setup and debugging
Android booting sequece and setup and debuggingUtkarsh Mankad
 
Drone 1.0 Feature
Drone 1.0 FeatureDrone 1.0 Feature
Drone 1.0 FeatureBo-Yi Wu
 
The Future of Firefox and JavaScript
The Future of Firefox and JavaScriptThe Future of Firefox and JavaScript
The Future of Firefox and JavaScriptjeresig
 
@arzumy Dev Setup #klxrb
@arzumy Dev Setup #klxrb@arzumy Dev Setup #klxrb
@arzumy Dev Setup #klxrbArzumy MD
 
Native Containers on Windows 10 using Docker – a game changer for developers
Native Containers on Windows 10 using Docker – a game changer for developersNative Containers on Windows 10 using Docker – a game changer for developers
Native Containers on Windows 10 using Docker – a game changer for developersJorge Arteiro
 
Android open source project build system phi innovations - android summit 2015
Android open source project build system   phi innovations - android summit 2015Android open source project build system   phi innovations - android summit 2015
Android open source project build system phi innovations - android summit 2015Rafael Coutinho
 
How to Make Android's Bootable Recovery Work For You by Drew Suarez
How to Make Android's Bootable Recovery Work For You by Drew SuarezHow to Make Android's Bootable Recovery Work For You by Drew Suarez
How to Make Android's Bootable Recovery Work For You by Drew SuarezShakacon
 
Android Internals at Linaro Connect Asia 2013
Android Internals at Linaro Connect Asia 2013Android Internals at Linaro Connect Asia 2013
Android Internals at Linaro Connect Asia 2013Opersys inc.
 
Android Booting Sequence
Android Booting SequenceAndroid Booting Sequence
Android Booting SequenceJayanta Ghoshal
 
Selenium&amp;behave introduction
Selenium&amp;behave introductionSelenium&amp;behave introduction
Selenium&amp;behave introductionChyi-Shian Jiang
 
Red Hat, CentOS, Fedora 2019
Red Hat, CentOS, Fedora 2019Red Hat, CentOS, Fedora 2019
Red Hat, CentOS, Fedora 2019Saeid Bostandoust
 
Davide Berardi - Linux hardening and security measures against Memory corruption
Davide Berardi - Linux hardening and security measures against Memory corruptionDavide Berardi - Linux hardening and security measures against Memory corruption
Davide Berardi - Linux hardening and security measures against Memory corruptionlinuxlab_conf
 
44CON London 2015 - Is there an EFI monster inside your apple?
44CON London 2015 - Is there an EFI monster inside your apple?44CON London 2015 - Is there an EFI monster inside your apple?
44CON London 2015 - Is there an EFI monster inside your apple?44CON
 
HackInTheBox - AMS 2011 , Spying on SpyEye - What Lies Beneath ?
HackInTheBox -  AMS 2011 , Spying on SpyEye - What Lies Beneath ?HackInTheBox -  AMS 2011 , Spying on SpyEye - What Lies Beneath ?
HackInTheBox - AMS 2011 , Spying on SpyEye - What Lies Beneath ?Aditya K Sood
 

Mais procurados (20)

Working with the AOSP - Linaro Connect Asia 2013
Working with the AOSP - Linaro Connect Asia 2013Working with the AOSP - Linaro Connect Asia 2013
Working with the AOSP - Linaro Connect Asia 2013
 
drone continuous Integration
drone continuous Integrationdrone continuous Integration
drone continuous Integration
 
Learning AOSP - Android Booting Process
Learning AOSP - Android Booting ProcessLearning AOSP - Android Booting Process
Learning AOSP - Android Booting Process
 
Log 2012.04.09 07.48.24
Log   2012.04.09 07.48.24Log   2012.04.09 07.48.24
Log 2012.04.09 07.48.24
 
Android booting sequece and setup and debugging
Android booting sequece and setup and debuggingAndroid booting sequece and setup and debugging
Android booting sequece and setup and debugging
 
Drone 1.0 Feature
Drone 1.0 FeatureDrone 1.0 Feature
Drone 1.0 Feature
 
The Future of Firefox and JavaScript
The Future of Firefox and JavaScriptThe Future of Firefox and JavaScript
The Future of Firefox and JavaScript
 
@arzumy Dev Setup #klxrb
@arzumy Dev Setup #klxrb@arzumy Dev Setup #klxrb
@arzumy Dev Setup #klxrb
 
Native Containers on Windows 10 using Docker – a game changer for developers
Native Containers on Windows 10 using Docker – a game changer for developersNative Containers on Windows 10 using Docker – a game changer for developers
Native Containers on Windows 10 using Docker – a game changer for developers
 
Android open source project build system phi innovations - android summit 2015
Android open source project build system   phi innovations - android summit 2015Android open source project build system   phi innovations - android summit 2015
Android open source project build system phi innovations - android summit 2015
 
How to Make Android's Bootable Recovery Work For You by Drew Suarez
How to Make Android's Bootable Recovery Work For You by Drew SuarezHow to Make Android's Bootable Recovery Work For You by Drew Suarez
How to Make Android's Bootable Recovery Work For You by Drew Suarez
 
Android Internals at Linaro Connect Asia 2013
Android Internals at Linaro Connect Asia 2013Android Internals at Linaro Connect Asia 2013
Android Internals at Linaro Connect Asia 2013
 
Android Booting Sequence
Android Booting SequenceAndroid Booting Sequence
Android Booting Sequence
 
Root via XSS
Root via XSSRoot via XSS
Root via XSS
 
Random numbers
Random numbersRandom numbers
Random numbers
 
Selenium&amp;behave introduction
Selenium&amp;behave introductionSelenium&amp;behave introduction
Selenium&amp;behave introduction
 
Red Hat, CentOS, Fedora 2019
Red Hat, CentOS, Fedora 2019Red Hat, CentOS, Fedora 2019
Red Hat, CentOS, Fedora 2019
 
Davide Berardi - Linux hardening and security measures against Memory corruption
Davide Berardi - Linux hardening and security measures against Memory corruptionDavide Berardi - Linux hardening and security measures against Memory corruption
Davide Berardi - Linux hardening and security measures against Memory corruption
 
44CON London 2015 - Is there an EFI monster inside your apple?
44CON London 2015 - Is there an EFI monster inside your apple?44CON London 2015 - Is there an EFI monster inside your apple?
44CON London 2015 - Is there an EFI monster inside your apple?
 
HackInTheBox - AMS 2011 , Spying on SpyEye - What Lies Beneath ?
HackInTheBox -  AMS 2011 , Spying on SpyEye - What Lies Beneath ?HackInTheBox -  AMS 2011 , Spying on SpyEye - What Lies Beneath ?
HackInTheBox - AMS 2011 , Spying on SpyEye - What Lies Beneath ?
 

Semelhante a Betabeers Android as a Digital Signage platform

Android as a digital signage platform
Android as a digital signage platformAndroid as a digital signage platform
Android as a digital signage platformOrestes Carracedo
 
Android as a digital signage platform
Android as a digital signage platformAndroid as a digital signage platform
Android as a digital signage platformBeMyApp
 
Android Embedded - Smart Hubs als Schaltzentrale des IoT
Android Embedded - Smart Hubs als Schaltzentrale des IoTAndroid Embedded - Smart Hubs als Schaltzentrale des IoT
Android Embedded - Smart Hubs als Schaltzentrale des IoTinovex GmbH
 
Android porting for dummies @droidconin 2011
Android porting for dummies @droidconin 2011Android porting for dummies @droidconin 2011
Android porting for dummies @droidconin 2011pundiramit
 
DomDisc and the Domino data api
DomDisc and the Domino data apiDomDisc and the Domino data api
DomDisc and the Domino data apiJens Bruntt
 
DevFest 2022 - Cloud Workstation Introduction TaiChung
DevFest 2022 - Cloud Workstation Introduction TaiChungDevFest 2022 - Cloud Workstation Introduction TaiChung
DevFest 2022 - Cloud Workstation Introduction TaiChungKAI CHU CHUNG
 
Advanced Eclipse Workshop (held at IPC2010 -spring edition-)
Advanced Eclipse Workshop (held at IPC2010 -spring edition-)Advanced Eclipse Workshop (held at IPC2010 -spring edition-)
Advanced Eclipse Workshop (held at IPC2010 -spring edition-)Bastian Feder
 
Developing Cross Platform Applications with Golang
Developing Cross Platform Applications with GolangDeveloping Cross Platform Applications with Golang
Developing Cross Platform Applications with GolangErhan Yakut
 
Embedded Android
Embedded AndroidEmbedded Android
Embedded Android晓东 杜
 
The Modern Developer Toolbox
The Modern Developer ToolboxThe Modern Developer Toolbox
The Modern Developer ToolboxPablo Godel
 
C# Production Debugging Made Easy
 C# Production Debugging Made Easy C# Production Debugging Made Easy
C# Production Debugging Made EasyAlon Fliess
 
Debugging Effectively in the Cloud - Felipe Fidelix - Presentation at eZ Con...
Debugging Effectively in the Cloud - Felipe Fidelix - Presentation at  eZ Con...Debugging Effectively in the Cloud - Felipe Fidelix - Presentation at  eZ Con...
Debugging Effectively in the Cloud - Felipe Fidelix - Presentation at eZ Con...eZ Systems
 
.NET Debugging Tips and Techniques
.NET Debugging Tips and Techniques.NET Debugging Tips and Techniques
.NET Debugging Tips and TechniquesBala Subra
 
.Net Debugging Techniques
.Net Debugging Techniques.Net Debugging Techniques
.Net Debugging TechniquesBala Subra
 
An Introduction To Android
An Introduction To AndroidAn Introduction To Android
An Introduction To Androidnatdefreitas
 
An OpenShift Primer for Developers to get your Code into the Cloud (PTJUG)
An OpenShift Primer for Developers to get your Code into the Cloud (PTJUG)An OpenShift Primer for Developers to get your Code into the Cloud (PTJUG)
An OpenShift Primer for Developers to get your Code into the Cloud (PTJUG)Eric D. Schabell
 
Porting your favourite cmdline tool to Android
Porting your favourite cmdline tool to AndroidPorting your favourite cmdline tool to Android
Porting your favourite cmdline tool to AndroidVlatko Kosturjak
 
Orchestrated Android-Style System Upgrades for Embedded Linux
Orchestrated Android-Style System Upgrades for Embedded LinuxOrchestrated Android-Style System Upgrades for Embedded Linux
Orchestrated Android-Style System Upgrades for Embedded LinuxKynetics
 
Orchestrated Android-Style System Upgrades for Embedded Linux
Orchestrated Android-Style System Upgrades for Embedded LinuxOrchestrated Android-Style System Upgrades for Embedded Linux
Orchestrated Android-Style System Upgrades for Embedded LinuxNicolaLaGloria
 
Linux Security and How Web Browser Sandboxes Really Work (NDC Oslo 2017)
Linux Security  and How Web Browser Sandboxes Really Work (NDC Oslo 2017)Linux Security  and How Web Browser Sandboxes Really Work (NDC Oslo 2017)
Linux Security and How Web Browser Sandboxes Really Work (NDC Oslo 2017)Patricia Aas
 

Semelhante a Betabeers Android as a Digital Signage platform (20)

Android as a digital signage platform
Android as a digital signage platformAndroid as a digital signage platform
Android as a digital signage platform
 
Android as a digital signage platform
Android as a digital signage platformAndroid as a digital signage platform
Android as a digital signage platform
 
Android Embedded - Smart Hubs als Schaltzentrale des IoT
Android Embedded - Smart Hubs als Schaltzentrale des IoTAndroid Embedded - Smart Hubs als Schaltzentrale des IoT
Android Embedded - Smart Hubs als Schaltzentrale des IoT
 
Android porting for dummies @droidconin 2011
Android porting for dummies @droidconin 2011Android porting for dummies @droidconin 2011
Android porting for dummies @droidconin 2011
 
DomDisc and the Domino data api
DomDisc and the Domino data apiDomDisc and the Domino data api
DomDisc and the Domino data api
 
DevFest 2022 - Cloud Workstation Introduction TaiChung
DevFest 2022 - Cloud Workstation Introduction TaiChungDevFest 2022 - Cloud Workstation Introduction TaiChung
DevFest 2022 - Cloud Workstation Introduction TaiChung
 
Advanced Eclipse Workshop (held at IPC2010 -spring edition-)
Advanced Eclipse Workshop (held at IPC2010 -spring edition-)Advanced Eclipse Workshop (held at IPC2010 -spring edition-)
Advanced Eclipse Workshop (held at IPC2010 -spring edition-)
 
Developing Cross Platform Applications with Golang
Developing Cross Platform Applications with GolangDeveloping Cross Platform Applications with Golang
Developing Cross Platform Applications with Golang
 
Embedded Android
Embedded AndroidEmbedded Android
Embedded Android
 
The Modern Developer Toolbox
The Modern Developer ToolboxThe Modern Developer Toolbox
The Modern Developer Toolbox
 
C# Production Debugging Made Easy
 C# Production Debugging Made Easy C# Production Debugging Made Easy
C# Production Debugging Made Easy
 
Debugging Effectively in the Cloud - Felipe Fidelix - Presentation at eZ Con...
Debugging Effectively in the Cloud - Felipe Fidelix - Presentation at  eZ Con...Debugging Effectively in the Cloud - Felipe Fidelix - Presentation at  eZ Con...
Debugging Effectively in the Cloud - Felipe Fidelix - Presentation at eZ Con...
 
.NET Debugging Tips and Techniques
.NET Debugging Tips and Techniques.NET Debugging Tips and Techniques
.NET Debugging Tips and Techniques
 
.Net Debugging Techniques
.Net Debugging Techniques.Net Debugging Techniques
.Net Debugging Techniques
 
An Introduction To Android
An Introduction To AndroidAn Introduction To Android
An Introduction To Android
 
An OpenShift Primer for Developers to get your Code into the Cloud (PTJUG)
An OpenShift Primer for Developers to get your Code into the Cloud (PTJUG)An OpenShift Primer for Developers to get your Code into the Cloud (PTJUG)
An OpenShift Primer for Developers to get your Code into the Cloud (PTJUG)
 
Porting your favourite cmdline tool to Android
Porting your favourite cmdline tool to AndroidPorting your favourite cmdline tool to Android
Porting your favourite cmdline tool to Android
 
Orchestrated Android-Style System Upgrades for Embedded Linux
Orchestrated Android-Style System Upgrades for Embedded LinuxOrchestrated Android-Style System Upgrades for Embedded Linux
Orchestrated Android-Style System Upgrades for Embedded Linux
 
Orchestrated Android-Style System Upgrades for Embedded Linux
Orchestrated Android-Style System Upgrades for Embedded LinuxOrchestrated Android-Style System Upgrades for Embedded Linux
Orchestrated Android-Style System Upgrades for Embedded Linux
 
Linux Security and How Web Browser Sandboxes Really Work (NDC Oslo 2017)
Linux Security  and How Web Browser Sandboxes Really Work (NDC Oslo 2017)Linux Security  and How Web Browser Sandboxes Really Work (NDC Oslo 2017)
Linux Security and How Web Browser Sandboxes Really Work (NDC Oslo 2017)
 

Último

Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 

Último (20)

Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 

Betabeers Android as a Digital Signage platform

  • 1. Android as a Digital Signage platform Betabeers Barcelona November 2013
  • 2. Hello world The company Clients 20 people Orange Digital Signage El Corte Inglés User Interactivity Endesa Sodexo Projects Spain United Kingdom Germany Netherlands Finland www.focusonemotions.com @focusonemotions Ikea Nespresso Fira Barcelona Ajuntament de Barcelona ESADE The Phone House
  • 3. Hello world Orestes Carracedo 8 years as a developer 4 years as an Android user 3,5 years at Focus On Emotions Software Development Director Certified SCRUM Master PHP 5.3 Zend Certified Engineer Read about me http://blog.orestes.io Follow me @orestesCA
  • 6.
  • 7.
  • 9. Briefing Make it on time Code as less as possible Be robust Make use of existing OS tools Make use of existing apps Be flexible Create multiple decoupled tools that work together
  • 10. System architecture Apache Cordova A D B API Client JavaScript player V P N cron scheduler SuperSU BusyBox HTTP API S S H CLI API
  • 13. Quick ADB recap $ adb devices List of devices attached 4df144cb39376f2f device # Over USB 192.168.1.42:5555 device # Over NET $ adb shell echo “Hello world” Hello world $ adb -d shell ls /mnt/sdcard $ adb -s 192.168.1.42:5555 shell ls /mnt/sdcard Enable ADB over Wi-Fi $ adb shell setprop service.adb.tcp.port 5555 $ adb shell stop adbd && start adbd # or you’ll be locked out $ adb connect 192.168.1.42:5555
  • 14. Quick ADB recap Sending keys $ adb shell input keyevent 3 # home Starting activities $ adb shell am start -n com.focusonemotions.android.player./Wrapper Killing a process $ pm stop com.focusonemotions.android.player Installing apps $ adb install foe-player-v1.1.apk $ adb push foe-player-v1.1.apk /system/app Android Monitor <android-sdk>/tools/monitor http://developer.android.com/reference/android/view/KeyEvent.html
  • 16. Player Cordova Rotates screen Shows WebView Provides OS shell access JavaScript Displays content Reads content index file Listens for gesture Asks for security code Shows config manager
  • 17. Scheduler Power management $ reboot # (duh) Screen state management $ input keyevent 26 # power $ input keyevent 82 # menu Player state management $ killall com.focusonemotions.android.player $ am start -n com.[...].player/.Wrapper http://developer.android.com/reference/android/view/KeyEvent.html
  • 18. Restricted user access ● Kill UI process ● Custom launcher AndroidManifest <category android:name="android.intent.category.HOME" /> /system/build.prop qemu.hw.mainkeys=1 ● Custom ROM http://thebitplague.wordpress.com/2013/04/05/kiosk-mode-on-the-nexus-7/
  • 19. Local configuration manager Content Index file Configuration manager Player configuration file Content player
  • 20. Static IP address $ openvpn --config /mnt/sdcard/focus/openvpn/conn.conf > /mnt/sdcard/focus/openvpn/run.log & $ cat /mnt/sdcard/focus/openvpn/conn.conf | grep resolv resolv-retry infinite https://play.google.com/store/apps/details?id=de.schaeuffelhut.android.openvpn.installer https://play.google.com/store/apps/details?id=de.blinkt.openvpn
  • 21. Remote shell $ adb connect 192.168.1.42:5555 . . $ time adb connect 192.168.1.42:5555 unable to connect to 192.168.1.42:5555 real user sys 1m3.163s 0m0.000s 0m0.020s $ time timeout 9s adb connect 192.168.1.42 real user sys 0m9.003s 0m0.000s 0m0.020s
  • 22. Screen capture $ adb shell screencap /mnt/sdcard/focus/capture.png $ adb pull /mnt/sdcard/focus/capture.png $ ./capture.sh oratab-030-01 Getting screencap from oratab-030-01 ... done.
  • 23. Wi-Fi management $ echo "12345678" | wpa_passphrase "SSID" # reading passphrase from stdin network={ ssid="SSID" #psk="12345678" psk=34b59e6b0182725d42460 [...] } $ wpa_passphrase "SSID" "12345678" # may malfunction $ wpa_passphrase "SSID" # may malfunction # reading passphrase from stdin Android Wi-fi/WPA settings /data/misc/wifi/wpa_supplicant.conf
  • 24. Content management $ adb push /local/folder /remote/folder PHP SFTP Wrapper /mnt/sdcard/focus + openvpn + player $ php load-device-content.php 300 7 + scheduler Loading content … + upload 50 % 20/40 KB 100 % 40/40 KB Done. - content - october_2013 + media
  • 26. Statistics & graphs Whisper database (updates to past data) Carbon aggregation (Use an IP, not a hostname UDP is better than TCP, is off by default) Graphite for rendering $ /opt/graphite/bin/carbon-cache.py start --debug $ echo ‘value.received’ `date +%s` | nc -w 1 127.0.0.1 2003 StatsD/statsite as aggregator/proxy (v8 nodejs vs C) <?php StatsD::increment(‘com.focusonemotions.app.pushing’); http://graphite.readthedocs.org/en/latest/ https://github.com/etsy/statsd/ https://github.com/armon/statsite
  • 28. Platforming 1. 2. 3. 4. 5. Plug device in Enable ADB over USB Launch script Enter ID Done! Check ● ● ● ● PING SFTP SSH ADB
  • 29. Platforming Install SuperSU + settings Install BusyBox Install DropBearSSH Fix SFTP subsystem Install player Install scheduler Install OpenVPN certificates from ID Reboot $ sftp root@192.168.1.42:mnt/sdcard/focus bash: /usr/libexec/sftp-server: No such file or directory $ sftp -s /system/xbin/sftp-server root@192.168.1.42:mnt/sdcard/focus sftp> # quick fix [adb] $ ln -s /system/xbin/sftp-server /usr/libexec/sftp-server http://www.chainfire.eu/projects/52/SuperSU/ https://play.google.com/store/apps/details?id=stericson.busybox https://github.com/yath/android_external_dropbear
  • 31.
  • 32.
  • 33.
  • 35. Testing Quick feedback Acceptance Tests ● CLI API ● Web API Physical testing devices
  • 36. Testing Scenario Outline: Get a list of cities based on the passed parameters Given I have an endpoint "http://api.pushmaster.focusonemotions.com/1.0/city/" And I pass an argument "id" "<id>" And I pass an argument "title" "<title>" When I make a "<method>" request to the endpoint Then I should get a valid response "<response>" Examples: | method | GET | GET | GET | GET | GET | id | title | | | 1 | | | Hobbiton | -1 | | | FOO | | | | | | response city/city-list.json city/city-get-by-id.json city/city-get-by-title.json null.json null.json | | | | | |
  • 39.
  • 41. Monitoring with Nagios $ php check-device-content.php 192.168.1.42 Up-to-date $ php check-device-content.php 192.168.1.42 Out of date http://nagios.sourceforge.net/docs/3_0/quickstart.html
  • 42. Monitoring with Nagios <?xml version="1.0" encoding="UTF-8"?> <nagios_status> <hosts> <host name="dev-001"> <status last_change="2013-10-08T16:27:37+02:00">0</status> <connectivity last_change="2013-10-08T16:27:37+02:00">0</connectivity> <content last_change="2013-10-08T16:27:37+02:00">0</content> <sftp last_change="2013-10-08T16:27:37+02:00">0</sftp> </host> [...]
  • 43. Thank you! Feedback orestes.ca@gmail.com Team Project Manager Juanra Posada Lead Developer Orestes Carracedo Developers Javier Morales Dimas López http://www.focusonemotions.com JavaScript Ninja Raúl Jiménez System Administrators Javier Domingo dev@focusonemotions Gonzalo Rodríguez
  • 44. Challenge Break out of the player app, win an Amazon gift card! ● ● ● ● Try to guess the unlock gesture Try to guess the unlock code No buttons No fastboot