SlideShare a Scribd company logo
1 of 33
Download to read offline
Cyanogen Inc. Proprietary & Confidential
Platform SDK
by Adnan Begovic
Cyanogen Inc. Proprietary & Confidential
Background
What is CyanogenMod?
CyanogenMod (pronounced /saɪ.ˈæn.oʊ.ˌdʒɛn.mɒd/),
usually abbreviated to CM, is an open-source operating
system for smartphones and tablet computers, based on
the Android mobile platform. It is developed as free and
open source software based on the official releases of
Android by Google, with added original and third-party
code. It is based on a rolling release development model.
Cyanogen Inc. Proprietary & Confidential
Background
CyanogenMod User Base:
● 50+ million users
● Users in 190+ different countries
● Localized to 50+ languages via automated crowdin
system
Cyanogen Inc. Proprietary & Confidential
Background
CyanogenMod Developer base:
● Numerous active core developers/maintainers
○ Maintain devices
○ Maintain documentation for features and device specs
○ Maintain and manage their own user bases
○ Maintain crowdin
○ File and resolve bugs reported by community users
● ~163 devices supported
● Receive a substantial amount of OSS contributions
from outside sources.
Cyanogen Inc. Proprietary & Confidential
Developer Base
Cyanogen Inc. Proprietary & Confidential
Crowdsourcing Android Development
Cyanogen Inc. Proprietary & Confidential
An Example Community Contribution
Cyanogen Inc. Proprietary & Confidential
Topics
● OS development is intimidating
● Treehacks Hackathon learnings
● Cyanogen Platform
○ Infrastructure
○ Framework library
○ SDK
○ Resource Package
● Using the SDK (QST examples)
● Contributing API’s
Cyanogen Inc. Proprietary & Confidential
Contributing to an OS
The Treehacks experience
Treehacks:
● 500+ person hackathon with students from all over the country.
● Workshops to get a meaningful contribution to the OSS project
CyanogenMod.
● Open to Stanford students, external students, and outside developers.
Cyanogen Inc. Proprietary & Confidential
Treehacks Experience
Winning Project: CyanTranslate
Using CyanogenMod, the winners modified the Android operating system and
created several new built-in features for manipulating text. By highlighting text
and hitting a button, the user can take advantage of these features. The new
features include:
Automatic translation between languages
● One-tap Google search
● UrbanDictionary definition lookup
● Book information lookup
Cyanogen Inc. Proprietary & Confidential
Treehacks Experience
Cyanogen Inc. Proprietary & Confidential
Treehacks Feedback
Positives Negatives
Open platform High ramp up time
Good infrastructure
● Gerrit Code Review
● Github mirroring
Massive code base
● ~1281 github repos
● 100+ android packages
● 25+ Gb repo size
Build environment documentation
● https://wiki.cyanogenmod.org
High barrier of entry in understanding
Android’s core implementations
Cyanogen Inc. Proprietary & Confidential
Treehacks Experience
- How to decrease the barrier to entry?
- How to extend the CM experience for 3rd party
developers?
Cyanogen Inc. Proprietary & Confidential
The Cyanogen Platform
Cyanogen Inc. Proprietary & Confidential
Cyanogen Platform
The new, more approachable, infrastructure:
● CyanogenMod Platform Library
● CyanogenMod Resource Package
● CyanogenMod Platform SDK
Application
Cyanogen
Platform SDK
Platform API
Core
Resource
Package
Android OS
Cyanogen Inc. Proprietary & Confidential
Cyanogen Platform Library
Framework library similar to Android’s Framework
JAR.
● Contains System Binder Services that get spun up and managed by
Android’s SystemServer.
● Contains the implementation, state management, and persisting of
data for a specific API feature.
● Leveraging Android’s powerful IPC framework for interaction between
an application and the system process.
Further information: Understanding the Structure
Cyanogen Inc. Proprietary & Confidential
Cyanogen Resource Package
Contains exported resources and CyanogenMod specific
permissions to be leveraged by the Application and
framework.
● ex:
○ cyanogenmod.permission.PUBLISH_CUSTOM_TILE
○ cyanogenmod_system_label
Cyanogen Inc. Proprietary & Confidential
Cyanogen Platform SDK
A library that can be included in your application to interact
with CM specific binder services to gain extra functionality.
● Provides objects, object builder’s, helper methods, and simple
interfaces to push or receive data from the platform library.
Cyanogen Inc. Proprietary & Confidential
Using the SDK
Custom Quick Tiles API Example:
● Allows your application to publish a Quick Tile to be hosted in the QS
Panel.
○ Patterns similar to Notification and NotificationManager
Cyanogen Inc. Proprietary & Confidential
Exploration for an API
Bike O’Clock
● Using Quick Settings Tiles to surface commonly
used actions.
Cyanogen Inc. Proprietary & Confidential
Bike O’Clock
Cyanogen Inc. Proprietary & Confidential
Using the SDK
Creating a CustomTile:
CustomTile customTile = new CustomTile.Builder(mContext)
.setLabel("custom label")
.setContentDescription("custom description")
.setOnClickIntent(pendingIntent)
.setOnSettingsClickIntent(intent)
.setOnClickUri(Uri.parse("custom uri"))
.setIcon(R.drawable.ic_launcher)
.build();
Cyanogen Inc. Proprietary & Confidential
Using the SDK
Cyanogen Inc. Proprietary & Confidential
Using the SDK
Publishing:
CMStatusBarManager.getInstance(this)
.publishTile(CUSTOM_TILE_ID, mCustomTile);
Removing:
CMStatusBarManager.getInstance(this)
.removeTile(CUSTOM_TILE_ID, mCustomTile);
Requires:
<uses-permission android:name="cyanogenmod.permission.PUBLISH_CUSTOM_TILE" />
Cyanogen Inc. Proprietary & Confidential
Contributing
Cyanogen Inc. Proprietary & Confidential
Making a change
repo init -u git://github.com/CyanogenMod/android.git -b cm-12.1
repo sync
repo start changes vendor/cmsdk
https://www.github.com/CyanogenMod/cm_platform_sdk
Cyanogen Inc. Proprietary & Confidential
Contributing
Application
Cyanogen
Platform SDK
Platform API
Core
Community
API Core
gerrit (code review, unit tests)
Interface Changes
Unit Tests
SDK Methods
CTS
SDK methods
added to Platform
SDK project
API added along
side core
Interfaces added to
nightly builds
API Council (Change Control Board)
API Check-API
Android OS
Cyanogen Inc. Proprietary & Confidential
Contributing
Documentation generation is automated!
● make org.cyanogenmod.platform.sdk-docs
● Published directly from gerrit merge to github pages
Docs: http://cyanogenmod.github.io/cm_platform_sdk/reference/packages.html
Cyanogen Inc. Proprietary & Confidential
Contribute New APIs & Write More Functional Apps
Cyanogen Inc. Proprietary & Confidential
Questions?
Join the G+ Community: http://bit.ly/1FC6lJI
Cyanogen Inc. Proprietary & Confidential
Appendix for QA
Cyanogen Inc. Proprietary & Confidential
Security
vendor/cm/overlay
<!-- Defines external services to be started by the SystemServer at boot. The service itself
should publish as a binder services in its onStart -->
<string-array name="config_externalCMServices">
<item>org.cyanogenmod.platform.internal.CMStatusBarManagerService</item>
</string-array>
vendor/cm/sepolicy/servicecontexts
cmstatusbar u:object_r:system_server_service:s0
Cyanogen Inc. Proprietary & Confidential
Security
Selinux service_contexts
● service_contexts is used for translating service names into selinux labels.
● MAC check to the svc_can_register function in
service_manager.
https://android.googlesource.com/platform/frameworks/native/+/69154df

More Related Content

What's hot

Android Things Internals
Android Things InternalsAndroid Things Internals
Android Things InternalsOpersys inc.
 
What to do after Rooting ?
What to do after Rooting ?What to do after Rooting ?
What to do after Rooting ?Arnav Gupta
 
Android Things Internals
Android Things InternalsAndroid Things Internals
Android Things InternalsOpersys inc.
 
Android OTA updates
Android OTA updatesAndroid OTA updates
Android OTA updatesGary Bisson
 
Android Things: Android for IoT
Android Things: Android for IoTAndroid Things: Android for IoT
Android Things: Android for IoTOpersys inc.
 
Android Things Latest News / Aug 25, 2017
Android Things Latest News / Aug 25, 2017Android Things Latest News / Aug 25, 2017
Android Things Latest News / Aug 25, 2017Masahiro Hidaka
 
Brillo / Weave Internals
Brillo / Weave InternalsBrillo / Weave Internals
Brillo / Weave InternalsOpersys inc.
 
Android Things, Alexey Rybakov, Technical Evangelist, DataArt
Android Things, Alexey Rybakov, Technical Evangelist, DataArtAndroid Things, Alexey Rybakov, Technical Evangelist, DataArt
Android Things, Alexey Rybakov, Technical Evangelist, DataArtAlina Vilk
 
Hacking the third Smartphone OS and Some Mobile device in #COSCUP 2019  第三款智能...
Hacking the third Smartphone OS and Some Mobile device in #COSCUP 2019  第三款智能...Hacking the third Smartphone OS and Some Mobile device in #COSCUP 2019  第三款智能...
Hacking the third Smartphone OS and Some Mobile device in #COSCUP 2019  第三款智能...Netwalker lab kapper
 
Brillo / Weave Internals
Brillo / Weave InternalsBrillo / Weave Internals
Brillo / Weave InternalsOpersys inc.
 
Basics of the Google Glass programming
Basics of the Google Glass programmingBasics of the Google Glass programming
Basics of the Google Glass programmingMiki Yutani
 
Optimized Android N MR1 + 4.4 Kernel
Optimized Android N MR1 + 4.4 KernelOptimized Android N MR1 + 4.4 Kernel
Optimized Android N MR1 + 4.4 KernelLinaro
 
Koubei banquet 31
Koubei banquet 31Koubei banquet 31
Koubei banquet 31Koubei UED
 
BUD17-DF15 - Optimized Android N MR1 + 4.9 Kernel
BUD17-DF15 - Optimized Android N MR1 + 4.9 KernelBUD17-DF15 - Optimized Android N MR1 + 4.9 Kernel
BUD17-DF15 - Optimized Android N MR1 + 4.9 KernelLinaro
 

What's hot (16)

Android Things Internals
Android Things InternalsAndroid Things Internals
Android Things Internals
 
What to do after Rooting ?
What to do after Rooting ?What to do after Rooting ?
What to do after Rooting ?
 
Android Things Internals
Android Things InternalsAndroid Things Internals
Android Things Internals
 
Android OTA updates
Android OTA updatesAndroid OTA updates
Android OTA updates
 
Android Things: Android for IoT
Android Things: Android for IoTAndroid Things: Android for IoT
Android Things: Android for IoT
 
Android Things Latest News / Aug 25, 2017
Android Things Latest News / Aug 25, 2017Android Things Latest News / Aug 25, 2017
Android Things Latest News / Aug 25, 2017
 
Brillo / Weave Internals
Brillo / Weave InternalsBrillo / Weave Internals
Brillo / Weave Internals
 
Android Things, Alexey Rybakov, Technical Evangelist, DataArt
Android Things, Alexey Rybakov, Technical Evangelist, DataArtAndroid Things, Alexey Rybakov, Technical Evangelist, DataArt
Android Things, Alexey Rybakov, Technical Evangelist, DataArt
 
Hacking the third Smartphone OS and Some Mobile device in #COSCUP 2019  第三款智能...
Hacking the third Smartphone OS and Some Mobile device in #COSCUP 2019  第三款智能...Hacking the third Smartphone OS and Some Mobile device in #COSCUP 2019  第三款智能...
Hacking the third Smartphone OS and Some Mobile device in #COSCUP 2019  第三款智能...
 
Brillo / Weave Internals
Brillo / Weave InternalsBrillo / Weave Internals
Brillo / Weave Internals
 
Basics of the Google Glass programming
Basics of the Google Glass programmingBasics of the Google Glass programming
Basics of the Google Glass programming
 
Android.
Android.Android.
Android.
 
Optimized Android N MR1 + 4.4 Kernel
Optimized Android N MR1 + 4.4 KernelOptimized Android N MR1 + 4.4 Kernel
Optimized Android N MR1 + 4.4 Kernel
 
Android things intro
Android things introAndroid things intro
Android things intro
 
Koubei banquet 31
Koubei banquet 31Koubei banquet 31
Koubei banquet 31
 
BUD17-DF15 - Optimized Android N MR1 + 4.9 Kernel
BUD17-DF15 - Optimized Android N MR1 + 4.9 KernelBUD17-DF15 - Optimized Android N MR1 + 4.9 Kernel
BUD17-DF15 - Optimized Android N MR1 + 4.9 Kernel
 

Similar to Cyanogen Platform SDK

Delivery Pipelines as a First Class Citizen @deliverAgile2019
Delivery Pipelines as a First Class Citizen @deliverAgile2019Delivery Pipelines as a First Class Citizen @deliverAgile2019
Delivery Pipelines as a First Class Citizen @deliverAgile2019ciberkleid
 
Build Smart Service on GCP - Google DevFest 2018 Taiwan
Build Smart Service on GCP - Google DevFest 2018 TaiwanBuild Smart Service on GCP - Google DevFest 2018 Taiwan
Build Smart Service on GCP - Google DevFest 2018 TaiwanDavid Chen
 
Building Kick Ass Video Games for the Cloud
Building Kick Ass Video Games for the CloudBuilding Kick Ass Video Games for the Cloud
Building Kick Ass Video Games for the CloudChris Schalk
 
Java Meetup - 12-03-15 - Android Development Workshop
Java Meetup - 12-03-15 - Android Development WorkshopJava Meetup - 12-03-15 - Android Development Workshop
Java Meetup - 12-03-15 - Android Development WorkshopKasun Dananjaya Delgolla
 
A Love Story with Kubevirt and Backstage from Cloud Native NoVA meetup Feb 2024
A Love Story with Kubevirt and Backstage from Cloud Native NoVA meetup Feb 2024A Love Story with Kubevirt and Backstage from Cloud Native NoVA meetup Feb 2024
A Love Story with Kubevirt and Backstage from Cloud Native NoVA meetup Feb 2024Cloud Native NoVA
 
Webinar: Extend The Power of The ForgeRock Identity Platform Through Scripting
Webinar: Extend The Power of The ForgeRock Identity Platform Through ScriptingWebinar: Extend The Power of The ForgeRock Identity Platform Through Scripting
Webinar: Extend The Power of The ForgeRock Identity Platform Through ScriptingForgeRock
 
CIP Developing Curator Tool Wizards
CIP Developing Curator Tool WizardsCIP Developing Curator Tool Wizards
CIP Developing Curator Tool WizardsEdwin Rojas
 
Why Pay for Open Source Linux? Avoid the Hidden Cost of DIY
Why Pay for Open Source Linux? Avoid the Hidden Cost of DIYWhy Pay for Open Source Linux? Avoid the Hidden Cost of DIY
Why Pay for Open Source Linux? Avoid the Hidden Cost of DIYEnterprise Management Associates
 
Is Android the New King of Embedded OSes at Embedded World 2014
Is Android the New King of Embedded OSes at Embedded World 2014Is Android the New King of Embedded OSes at Embedded World 2014
Is Android the New King of Embedded OSes at Embedded World 2014Opersys inc.
 
The Ultimate Android Security Checklist (Mdevcon 2014)
The Ultimate Android Security Checklist (Mdevcon 2014)The Ultimate Android Security Checklist (Mdevcon 2014)
The Ultimate Android Security Checklist (Mdevcon 2014)Ron Munitz
 
#Interactive Session by Kirti Ranjan Satapathy and Nandini K, "Elements of Qu...
#Interactive Session by Kirti Ranjan Satapathy and Nandini K, "Elements of Qu...#Interactive Session by Kirti Ranjan Satapathy and Nandini K, "Elements of Qu...
#Interactive Session by Kirti Ranjan Satapathy and Nandini K, "Elements of Qu...Agile Testing Alliance
 
Room 2 - 4 - Juncheng Anthony Lin - Redhat - A Practical Approach to Traditio...
Room 2 - 4 - Juncheng Anthony Lin - Redhat - A Practical Approach to Traditio...Room 2 - 4 - Juncheng Anthony Lin - Redhat - A Practical Approach to Traditio...
Room 2 - 4 - Juncheng Anthony Lin - Redhat - A Practical Approach to Traditio...Vietnam Open Infrastructure User Group
 
Accelerating Enterprise Software Engineering with Platformless
Accelerating Enterprise Software Engineering with PlatformlessAccelerating Enterprise Software Engineering with Platformless
Accelerating Enterprise Software Engineering with PlatformlessWSO2
 
GCP - Continuous Integration and Delivery into Kubernetes with GitHub, Travis...
GCP - Continuous Integration and Delivery into Kubernetes with GitHub, Travis...GCP - Continuous Integration and Delivery into Kubernetes with GitHub, Travis...
GCP - Continuous Integration and Delivery into Kubernetes with GitHub, Travis...Oleg Shalygin
 
Cassandra on Google Cloud Platform (Ravi Madasu, Google / Ben Lackey, DataSta...
Cassandra on Google Cloud Platform (Ravi Madasu, Google / Ben Lackey, DataSta...Cassandra on Google Cloud Platform (Ravi Madasu, Google / Ben Lackey, DataSta...
Cassandra on Google Cloud Platform (Ravi Madasu, Google / Ben Lackey, DataSta...DataStax
 
#MBLTdev: Разработка backend для мобильного приложения с использованием Googl...
#MBLTdev: Разработка backend для мобильного приложения с использованием Googl...#MBLTdev: Разработка backend для мобильного приложения с использованием Googl...
#MBLTdev: Разработка backend для мобильного приложения с использованием Googl...e-Legion
 
The Ultimate Android Security Checklist (AnDevCon Boston 2014)
The Ultimate Android Security Checklist (AnDevCon Boston 2014)The Ultimate Android Security Checklist (AnDevCon Boston 2014)
The Ultimate Android Security Checklist (AnDevCon Boston 2014)Ron Munitz
 
Android App Development 01 : Getting Start
Android App Development 01 : Getting StartAndroid App Development 01 : Getting Start
Android App Development 01 : Getting StartAnuchit Chalothorn
 
OSMC 2009 | NConf - Enterprise Nagios configurator by Angelo Gargiulo
OSMC 2009 | NConf - Enterprise Nagios configurator by Angelo GargiuloOSMC 2009 | NConf - Enterprise Nagios configurator by Angelo Gargiulo
OSMC 2009 | NConf - Enterprise Nagios configurator by Angelo GargiuloNETWAYS
 

Similar to Cyanogen Platform SDK (20)

Platform SDK Update
Platform SDK UpdatePlatform SDK Update
Platform SDK Update
 
Delivery Pipelines as a First Class Citizen @deliverAgile2019
Delivery Pipelines as a First Class Citizen @deliverAgile2019Delivery Pipelines as a First Class Citizen @deliverAgile2019
Delivery Pipelines as a First Class Citizen @deliverAgile2019
 
Build Smart Service on GCP - Google DevFest 2018 Taiwan
Build Smart Service on GCP - Google DevFest 2018 TaiwanBuild Smart Service on GCP - Google DevFest 2018 Taiwan
Build Smart Service on GCP - Google DevFest 2018 Taiwan
 
Building Kick Ass Video Games for the Cloud
Building Kick Ass Video Games for the CloudBuilding Kick Ass Video Games for the Cloud
Building Kick Ass Video Games for the Cloud
 
Java Meetup - 12-03-15 - Android Development Workshop
Java Meetup - 12-03-15 - Android Development WorkshopJava Meetup - 12-03-15 - Android Development Workshop
Java Meetup - 12-03-15 - Android Development Workshop
 
A Love Story with Kubevirt and Backstage from Cloud Native NoVA meetup Feb 2024
A Love Story with Kubevirt and Backstage from Cloud Native NoVA meetup Feb 2024A Love Story with Kubevirt and Backstage from Cloud Native NoVA meetup Feb 2024
A Love Story with Kubevirt and Backstage from Cloud Native NoVA meetup Feb 2024
 
Webinar: Extend The Power of The ForgeRock Identity Platform Through Scripting
Webinar: Extend The Power of The ForgeRock Identity Platform Through ScriptingWebinar: Extend The Power of The ForgeRock Identity Platform Through Scripting
Webinar: Extend The Power of The ForgeRock Identity Platform Through Scripting
 
CIP Developing Curator Tool Wizards
CIP Developing Curator Tool WizardsCIP Developing Curator Tool Wizards
CIP Developing Curator Tool Wizards
 
Why Pay for Open Source Linux? Avoid the Hidden Cost of DIY
Why Pay for Open Source Linux? Avoid the Hidden Cost of DIYWhy Pay for Open Source Linux? Avoid the Hidden Cost of DIY
Why Pay for Open Source Linux? Avoid the Hidden Cost of DIY
 
Is Android the New King of Embedded OSes at Embedded World 2014
Is Android the New King of Embedded OSes at Embedded World 2014Is Android the New King of Embedded OSes at Embedded World 2014
Is Android the New King of Embedded OSes at Embedded World 2014
 
The Ultimate Android Security Checklist (Mdevcon 2014)
The Ultimate Android Security Checklist (Mdevcon 2014)The Ultimate Android Security Checklist (Mdevcon 2014)
The Ultimate Android Security Checklist (Mdevcon 2014)
 
#Interactive Session by Kirti Ranjan Satapathy and Nandini K, "Elements of Qu...
#Interactive Session by Kirti Ranjan Satapathy and Nandini K, "Elements of Qu...#Interactive Session by Kirti Ranjan Satapathy and Nandini K, "Elements of Qu...
#Interactive Session by Kirti Ranjan Satapathy and Nandini K, "Elements of Qu...
 
Room 2 - 4 - Juncheng Anthony Lin - Redhat - A Practical Approach to Traditio...
Room 2 - 4 - Juncheng Anthony Lin - Redhat - A Practical Approach to Traditio...Room 2 - 4 - Juncheng Anthony Lin - Redhat - A Practical Approach to Traditio...
Room 2 - 4 - Juncheng Anthony Lin - Redhat - A Practical Approach to Traditio...
 
Accelerating Enterprise Software Engineering with Platformless
Accelerating Enterprise Software Engineering with PlatformlessAccelerating Enterprise Software Engineering with Platformless
Accelerating Enterprise Software Engineering with Platformless
 
GCP - Continuous Integration and Delivery into Kubernetes with GitHub, Travis...
GCP - Continuous Integration and Delivery into Kubernetes with GitHub, Travis...GCP - Continuous Integration and Delivery into Kubernetes with GitHub, Travis...
GCP - Continuous Integration and Delivery into Kubernetes with GitHub, Travis...
 
Cassandra on Google Cloud Platform (Ravi Madasu, Google / Ben Lackey, DataSta...
Cassandra on Google Cloud Platform (Ravi Madasu, Google / Ben Lackey, DataSta...Cassandra on Google Cloud Platform (Ravi Madasu, Google / Ben Lackey, DataSta...
Cassandra on Google Cloud Platform (Ravi Madasu, Google / Ben Lackey, DataSta...
 
#MBLTdev: Разработка backend для мобильного приложения с использованием Googl...
#MBLTdev: Разработка backend для мобильного приложения с использованием Googl...#MBLTdev: Разработка backend для мобильного приложения с использованием Googl...
#MBLTdev: Разработка backend для мобильного приложения с использованием Googl...
 
The Ultimate Android Security Checklist (AnDevCon Boston 2014)
The Ultimate Android Security Checklist (AnDevCon Boston 2014)The Ultimate Android Security Checklist (AnDevCon Boston 2014)
The Ultimate Android Security Checklist (AnDevCon Boston 2014)
 
Android App Development 01 : Getting Start
Android App Development 01 : Getting StartAndroid App Development 01 : Getting Start
Android App Development 01 : Getting Start
 
OSMC 2009 | NConf - Enterprise Nagios configurator by Angelo Gargiulo
OSMC 2009 | NConf - Enterprise Nagios configurator by Angelo GargiuloOSMC 2009 | NConf - Enterprise Nagios configurator by Angelo Gargiulo
OSMC 2009 | NConf - Enterprise Nagios configurator by Angelo Gargiulo
 

Recently uploaded

Xen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfXen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfStefano Stabellini
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesŁukasz Chruściel
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanyChristoph Pohl
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtimeandrehoraa
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Matt Ray
 
What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....kzayra69
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...Technogeeks
 
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)jennyeacort
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfFerryKemperman
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEEVICTOR MAESTRE RAMIREZ
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesPhilip Schwarz
 
Buds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in NoidaBuds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in Noidabntitsolutionsrishis
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaHanief Utama
 

Recently uploaded (20)

Xen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfXen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdf
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New Features
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtime
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
 
What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...
 
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdf
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEE
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a series
 
Buds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in NoidaBuds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in Noida
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief Utama
 

Cyanogen Platform SDK

  • 1. Cyanogen Inc. Proprietary & Confidential Platform SDK by Adnan Begovic
  • 2. Cyanogen Inc. Proprietary & Confidential Background What is CyanogenMod? CyanogenMod (pronounced /saɪ.ˈæn.oʊ.ˌdʒɛn.mɒd/), usually abbreviated to CM, is an open-source operating system for smartphones and tablet computers, based on the Android mobile platform. It is developed as free and open source software based on the official releases of Android by Google, with added original and third-party code. It is based on a rolling release development model.
  • 3. Cyanogen Inc. Proprietary & Confidential Background CyanogenMod User Base: ● 50+ million users ● Users in 190+ different countries ● Localized to 50+ languages via automated crowdin system
  • 4. Cyanogen Inc. Proprietary & Confidential Background CyanogenMod Developer base: ● Numerous active core developers/maintainers ○ Maintain devices ○ Maintain documentation for features and device specs ○ Maintain and manage their own user bases ○ Maintain crowdin ○ File and resolve bugs reported by community users ● ~163 devices supported ● Receive a substantial amount of OSS contributions from outside sources.
  • 5. Cyanogen Inc. Proprietary & Confidential Developer Base
  • 6. Cyanogen Inc. Proprietary & Confidential Crowdsourcing Android Development
  • 7. Cyanogen Inc. Proprietary & Confidential An Example Community Contribution
  • 8. Cyanogen Inc. Proprietary & Confidential Topics ● OS development is intimidating ● Treehacks Hackathon learnings ● Cyanogen Platform ○ Infrastructure ○ Framework library ○ SDK ○ Resource Package ● Using the SDK (QST examples) ● Contributing API’s
  • 9. Cyanogen Inc. Proprietary & Confidential Contributing to an OS The Treehacks experience Treehacks: ● 500+ person hackathon with students from all over the country. ● Workshops to get a meaningful contribution to the OSS project CyanogenMod. ● Open to Stanford students, external students, and outside developers.
  • 10. Cyanogen Inc. Proprietary & Confidential Treehacks Experience Winning Project: CyanTranslate Using CyanogenMod, the winners modified the Android operating system and created several new built-in features for manipulating text. By highlighting text and hitting a button, the user can take advantage of these features. The new features include: Automatic translation between languages ● One-tap Google search ● UrbanDictionary definition lookup ● Book information lookup
  • 11. Cyanogen Inc. Proprietary & Confidential Treehacks Experience
  • 12. Cyanogen Inc. Proprietary & Confidential Treehacks Feedback Positives Negatives Open platform High ramp up time Good infrastructure ● Gerrit Code Review ● Github mirroring Massive code base ● ~1281 github repos ● 100+ android packages ● 25+ Gb repo size Build environment documentation ● https://wiki.cyanogenmod.org High barrier of entry in understanding Android’s core implementations
  • 13. Cyanogen Inc. Proprietary & Confidential Treehacks Experience - How to decrease the barrier to entry? - How to extend the CM experience for 3rd party developers?
  • 14. Cyanogen Inc. Proprietary & Confidential The Cyanogen Platform
  • 15. Cyanogen Inc. Proprietary & Confidential Cyanogen Platform The new, more approachable, infrastructure: ● CyanogenMod Platform Library ● CyanogenMod Resource Package ● CyanogenMod Platform SDK Application Cyanogen Platform SDK Platform API Core Resource Package Android OS
  • 16. Cyanogen Inc. Proprietary & Confidential Cyanogen Platform Library Framework library similar to Android’s Framework JAR. ● Contains System Binder Services that get spun up and managed by Android’s SystemServer. ● Contains the implementation, state management, and persisting of data for a specific API feature. ● Leveraging Android’s powerful IPC framework for interaction between an application and the system process. Further information: Understanding the Structure
  • 17. Cyanogen Inc. Proprietary & Confidential Cyanogen Resource Package Contains exported resources and CyanogenMod specific permissions to be leveraged by the Application and framework. ● ex: ○ cyanogenmod.permission.PUBLISH_CUSTOM_TILE ○ cyanogenmod_system_label
  • 18. Cyanogen Inc. Proprietary & Confidential Cyanogen Platform SDK A library that can be included in your application to interact with CM specific binder services to gain extra functionality. ● Provides objects, object builder’s, helper methods, and simple interfaces to push or receive data from the platform library.
  • 19. Cyanogen Inc. Proprietary & Confidential Using the SDK Custom Quick Tiles API Example: ● Allows your application to publish a Quick Tile to be hosted in the QS Panel. ○ Patterns similar to Notification and NotificationManager
  • 20. Cyanogen Inc. Proprietary & Confidential Exploration for an API Bike O’Clock ● Using Quick Settings Tiles to surface commonly used actions.
  • 21. Cyanogen Inc. Proprietary & Confidential Bike O’Clock
  • 22. Cyanogen Inc. Proprietary & Confidential Using the SDK Creating a CustomTile: CustomTile customTile = new CustomTile.Builder(mContext) .setLabel("custom label") .setContentDescription("custom description") .setOnClickIntent(pendingIntent) .setOnSettingsClickIntent(intent) .setOnClickUri(Uri.parse("custom uri")) .setIcon(R.drawable.ic_launcher) .build();
  • 23. Cyanogen Inc. Proprietary & Confidential Using the SDK
  • 24. Cyanogen Inc. Proprietary & Confidential Using the SDK Publishing: CMStatusBarManager.getInstance(this) .publishTile(CUSTOM_TILE_ID, mCustomTile); Removing: CMStatusBarManager.getInstance(this) .removeTile(CUSTOM_TILE_ID, mCustomTile); Requires: <uses-permission android:name="cyanogenmod.permission.PUBLISH_CUSTOM_TILE" />
  • 25. Cyanogen Inc. Proprietary & Confidential Contributing
  • 26. Cyanogen Inc. Proprietary & Confidential Making a change repo init -u git://github.com/CyanogenMod/android.git -b cm-12.1 repo sync repo start changes vendor/cmsdk https://www.github.com/CyanogenMod/cm_platform_sdk
  • 27. Cyanogen Inc. Proprietary & Confidential Contributing Application Cyanogen Platform SDK Platform API Core Community API Core gerrit (code review, unit tests) Interface Changes Unit Tests SDK Methods CTS SDK methods added to Platform SDK project API added along side core Interfaces added to nightly builds API Council (Change Control Board) API Check-API Android OS
  • 28. Cyanogen Inc. Proprietary & Confidential Contributing Documentation generation is automated! ● make org.cyanogenmod.platform.sdk-docs ● Published directly from gerrit merge to github pages Docs: http://cyanogenmod.github.io/cm_platform_sdk/reference/packages.html
  • 29. Cyanogen Inc. Proprietary & Confidential Contribute New APIs & Write More Functional Apps
  • 30. Cyanogen Inc. Proprietary & Confidential Questions? Join the G+ Community: http://bit.ly/1FC6lJI
  • 31. Cyanogen Inc. Proprietary & Confidential Appendix for QA
  • 32. Cyanogen Inc. Proprietary & Confidential Security vendor/cm/overlay <!-- Defines external services to be started by the SystemServer at boot. The service itself should publish as a binder services in its onStart --> <string-array name="config_externalCMServices"> <item>org.cyanogenmod.platform.internal.CMStatusBarManagerService</item> </string-array> vendor/cm/sepolicy/servicecontexts cmstatusbar u:object_r:system_server_service:s0
  • 33. Cyanogen Inc. Proprietary & Confidential Security Selinux service_contexts ● service_contexts is used for translating service names into selinux labels. ● MAC check to the svc_can_register function in service_manager. https://android.googlesource.com/platform/frameworks/native/+/69154df