The document provides an overview of embedded Android, including its basics, history, ecosystem, legal framework, development tools, and system architecture. It summarizes key concepts such as components, intents, lifecycles and processes. It also outlines the main stages of the Android system startup process.
This game development platform is not popular - despite it is very powerful. The cost of entry is a bit higher in comparison with Corona, Marmalade, Cocos etc (in the reality it is not so high if you familiar with C/C++ / Java and you are not afraid of low-level at all) but finally the developer gets much freedom and expressive power. BTW, it's a rare case you can develop mobile games under Linux (not Windows or OS X).
The slides maybe useful for professional programmers as well as for novices.
Content
* Objectives and constraints
* Development priorities
* Requirements for game framework
* Planned abstraction layers
* Selection of game engine and tools
* Implementation: game model, model controller, UI
* Actual abstraction layers
* Benefits and problems encountered
* Conclusion: Is the game worth the candle?
I developed these slides for basic android training. I know some of you will laugh looing at them but if you are a beginner and want to have a rough idea on android development you can have a look at them. :)
This game development platform is not popular - despite it is very powerful. The cost of entry is a bit higher in comparison with Corona, Marmalade, Cocos etc (in the reality it is not so high if you familiar with C/C++ / Java and you are not afraid of low-level at all) but finally the developer gets much freedom and expressive power. BTW, it's a rare case you can develop mobile games under Linux (not Windows or OS X).
The slides maybe useful for professional programmers as well as for novices.
Content
* Objectives and constraints
* Development priorities
* Requirements for game framework
* Planned abstraction layers
* Selection of game engine and tools
* Implementation: game model, model controller, UI
* Actual abstraction layers
* Benefits and problems encountered
* Conclusion: Is the game worth the candle?
I developed these slides for basic android training. I know some of you will laugh looing at them but if you are a beginner and want to have a rough idea on android development you can have a look at them. :)
Android is beginning to take off as an embedded operating system alongside Windows Embedded and traditional embedded Linux. What are the motivations for using Android? What are the potential problems? This presentation addresses these points, with use-cases based on real-world applications of Embedded Android
Experience our free, in-depth three-part Tendenci Platform Corporate Membership Management workshop series! In Session 1 on May 14th, 2024, we began with an Introduction and Setup, mastering the configuration of your Corporate Membership Module settings to establish membership types, applications, and more. Then, on May 16th, 2024, in Session 2, we focused on binding individual members to a Corporate Membership and Corporate Reps, teaching you how to add individual members and assign Corporate Representatives to manage dues, renewals, and associated members. Finally, on May 28th, 2024, in Session 3, we covered questions and concerns, addressing any queries or issues you may have.
For more Tendenci AMS events, check out www.tendenci.com/events
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns
Unlocking Business Potential: Tailored Technology Solutions by Prosigns
Discover how Prosigns, a leading technology solutions provider, partners with businesses to drive innovation and success. Our presentation showcases our comprehensive range of services, including custom software development, web and mobile app development, AI & ML solutions, blockchain integration, DevOps services, and Microsoft Dynamics 365 support.
Custom Software Development: Prosigns specializes in creating bespoke software solutions that cater to your unique business needs. Our team of experts works closely with you to understand your requirements and deliver tailor-made software that enhances efficiency and drives growth.
Web and Mobile App Development: From responsive websites to intuitive mobile applications, Prosigns develops cutting-edge solutions that engage users and deliver seamless experiences across devices.
AI & ML Solutions: Harnessing the power of Artificial Intelligence and Machine Learning, Prosigns provides smart solutions that automate processes, provide valuable insights, and drive informed decision-making.
Blockchain Integration: Prosigns offers comprehensive blockchain solutions, including development, integration, and consulting services, enabling businesses to leverage blockchain technology for enhanced security, transparency, and efficiency.
DevOps Services: Prosigns' DevOps services streamline development and operations processes, ensuring faster and more reliable software delivery through automation and continuous integration.
Microsoft Dynamics 365 Support: Prosigns provides comprehensive support and maintenance services for Microsoft Dynamics 365, ensuring your system is always up-to-date, secure, and running smoothly.
Learn how our collaborative approach and dedication to excellence help businesses achieve their goals and stay ahead in today's digital landscape. From concept to deployment, Prosigns is your trusted partner for transforming ideas into reality and unlocking the full potential of your business.
Join us on a journey of innovation and growth. Let's partner for success with Prosigns.
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus
As part of the DOE Integrated Research Infrastructure (IRI) program, NERSC at Lawrence Berkeley National Lab and ALCF at Argonne National Lab are working closely with General Atomics on accelerating the computing requirements of the DIII-D experiment. As part of the work the team is investigating ways to speedup the time to solution for many different parts of the DIII-D workflow including how they run jobs on HPC systems. One of these routes is looking at Globus Compute as a way to replace the current method for managing tasks and we describe a brief proof of concept showing how Globus Compute could help to schedule jobs and be a tool to connect compute at different facilities.
Understanding Globus Data Transfers with NetSageGlobus
NetSage is an open privacy-aware network measurement, analysis, and visualization service designed to help end-users visualize and reason about large data transfers. NetSage traditionally has used a combination of passive measurements, including SNMP and flow data, as well as active measurements, mainly perfSONAR, to provide longitudinal network performance data visualization. It has been deployed by dozens of networks world wide, and is supported domestically by the Engagement and Performance Operations Center (EPOC), NSF #2328479. We have recently expanded the NetSage data sources to include logs for Globus data transfers, following the same privacy-preserving approach as for Flow data. Using the logs for the Texas Advanced Computing Center (TACC) as an example, this talk will walk through several different example use cases that NetSage can answer, including: Who is using Globus to share data with my institution, and what kind of performance are they able to achieve? How many transfers has Globus supported for us? Which sites are we sharing the most data with, and how is that changing over time? How is my site using Globus to move data internally, and what kind of performance do we see for those transfers? What percentage of data transfers at my institution used Globus, and how did the overall data transfer performance compare to the Globus users?
Enhancing Research Orchestration Capabilities at ORNL.pdfGlobus
Cross-facility research orchestration comes with ever-changing constraints regarding the availability and suitability of various compute and data resources. In short, a flexible data and processing fabric is needed to enable the dynamic redirection of data and compute tasks throughout the lifecycle of an experiment. In this talk, we illustrate how we easily leveraged Globus services to instrument the ACE research testbed at the Oak Ridge Leadership Computing Facility with flexible data and task orchestration capabilities.
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?XfilesPro
Worried about document security while sharing them in Salesforce? Fret no more! Here are the top-notch security standards XfilesPro upholds to ensure strong security for your Salesforce documents while sharing with internal or external people.
To learn more, read the blog: https://www.xfilespro.com/how-does-xfilespro-make-document-sharing-secure-and-seamless-in-salesforce/
In software engineering, the right architecture is essential for robust, scalable platforms. Wix has undergone a pivotal shift from event sourcing to a CRUD-based model for its microservices. This talk will chart the course of this pivotal journey.
Event sourcing, which records state changes as immutable events, provided robust auditing and "time travel" debugging for Wix Stores' microservices. Despite its benefits, the complexity it introduced in state management slowed development. Wix responded by adopting a simpler, unified CRUD model. This talk will explore the challenges of event sourcing and the advantages of Wix's new "CRUD on steroids" approach, which streamlines API integration and domain event management while preserving data integrity and system resilience.
Participants will gain valuable insights into Wix's strategies for ensuring atomicity in database updates and event production, as well as caching, materialization, and performance optimization techniques within a distributed system.
Join us to discover how Wix has mastered the art of balancing simplicity and extensibility, and learn how the re-adoption of the modest CRUD has turbocharged their development velocity, resilience, and scalability in a high-growth environment.
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisGlobus
JASMIN is the UK’s high-performance data analysis platform for environmental science, operated by STFC on behalf of the UK Natural Environment Research Council (NERC). In addition to its role in hosting the CEDA Archive (NERC’s long-term repository for climate, atmospheric science & Earth observation data in the UK), JASMIN provides a collaborative platform to a community of around 2,000 scientists in the UK and beyond, providing nearly 400 environmental science projects with working space, compute resources and tools to facilitate their work. High-performance data transfer into and out of JASMIN has always been a key feature, with many scientists bringing model outputs from supercomputers elsewhere in the UK, to analyse against observational or other model data in the CEDA Archive. A growing number of JASMIN users are now realising the benefits of using the Globus service to provide reliable and efficient data movement and other tasks in this and other contexts. Further use cases involve long-distance (intercontinental) transfers to and from JASMIN, and collecting results from a mobile atmospheric radar system, pushing data to JASMIN via a lightweight Globus deployment. We provide details of how Globus fits into our current infrastructure, our experience of the recent migration to GCSv5.4, and of our interest in developing use of the wider ecosystem of Globus services for the benefit of our user community.
Developing Distributed High-performance Computing Capabilities of an Open Sci...Globus
COVID-19 had an unprecedented impact on scientific collaboration. The pandemic and its broad response from the scientific community has forged new relationships among public health practitioners, mathematical modelers, and scientific computing specialists, while revealing critical gaps in exploiting advanced computing systems to support urgent decision making. Informed by our team’s work in applying high-performance computing in support of public health decision makers during the COVID-19 pandemic, we present how Globus technologies are enabling the development of an open science platform for robust epidemic analysis, with the goal of collaborative, secure, distributed, on-demand, and fast time-to-solution analyses to support public health.
Why React Native as a Strategic Advantage for Startup Innovation.pdfayushiqss
Do you know that React Native is being increasingly adopted by startups as well as big companies in the mobile app development industry? Big names like Facebook, Instagram, and Pinterest have already integrated this robust open-source framework.
In fact, according to a report by Statista, the number of React Native developers has been steadily increasing over the years, reaching an estimated 1.9 million by the end of 2024. This means that the demand for this framework in the job market has been growing making it a valuable skill.
But what makes React Native so popular for mobile application development? It offers excellent cross-platform capabilities among other benefits. This way, with React Native, developers can write code once and run it on both iOS and Android devices thus saving time and resources leading to shorter development cycles hence faster time-to-market for your app.
Let’s take the example of a startup, which wanted to release their app on both iOS and Android at once. Through the use of React Native they managed to create an app and bring it into the market within a very short period. This helped them gain an advantage over their competitors because they had access to a large user base who were able to generate revenue quickly for them.
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Globus
The Earth System Grid Federation (ESGF) is a global network of data servers that archives and distributes the planet’s largest collection of Earth system model output for thousands of climate and environmental scientists worldwide. Many of these petabyte-scale data archives are located in proximity to large high-performance computing (HPC) or cloud computing resources, but the primary workflow for data users consists of transferring data, and applying computations on a different system. As a part of the ESGF 2.0 US project (funded by the United States Department of Energy Office of Science), we developed pre-defined data workflows, which can be run on-demand, capable of applying many data reduction and data analysis to the large ESGF data archives, transferring only the resultant analysis (ex. visualizations, smaller data files). In this talk, we will showcase a few of these workflows, highlighting how Globus Flows can be used for petabyte-scale climate analysis.
Modern design is crucial in today's digital environment, and this is especially true for SharePoint intranets. The design of these digital hubs is critical to user engagement and productivity enhancement. They are the cornerstone of internal collaboration and interaction within enterprises.
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTier1 app
Even though at surface level ‘java.lang.OutOfMemoryError’ appears as one single error; underlyingly there are 9 types of OutOfMemoryError. Each type of OutOfMemoryError has different causes, diagnosis approaches and solutions. This session equips you with the knowledge, tools, and techniques needed to troubleshoot and conquer OutOfMemoryError in all its forms, ensuring smoother, more efficient Java applications.
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Anthony Dahanne
Les Buildpacks existent depuis plus de 10 ans ! D’abord, ils étaient utilisés pour détecter et construire une application avant de la déployer sur certains PaaS. Ensuite, nous avons pu créer des images Docker (OCI) avec leur dernière génération, les Cloud Native Buildpacks (CNCF en incubation). Sont-ils une bonne alternative au Dockerfile ? Que sont les buildpacks Paketo ? Quelles communautés les soutiennent et comment ?
Venez le découvrir lors de cette session ignite
Strategies for Successful Data Migration Tools.pptxvarshanayak241
Data migration is a complex but essential task for organizations aiming to modernize their IT infrastructure and leverage new technologies. By understanding common challenges and implementing these strategies, businesses can achieve a successful migration with minimal disruption. Data Migration Tool like Ask On Data play a pivotal role in this journey, offering features that streamline the process, ensure data integrity, and maintain security. With the right approach and tools, organizations can turn the challenge of data migration into an opportunity for growth and innovation.
Your Digital Assistant.
Making complex approach simple. Straightforward process saves time. No more waiting to connect with people that matter to you. Safety first is not a cliché - Securely protect information in cloud storage to prevent any third party from accessing data.
Would you rather make your visitors feel burdened by making them wait? Or choose VizMan for a stress-free experience? VizMan is an automated visitor management system that works for any industries not limited to factories, societies, government institutes, and warehouses. A new age contactless way of logging information of visitors, employees, packages, and vehicles. VizMan is a digital logbook so it deters unnecessary use of paper or space since there is no requirement of bundles of registers that is left to collect dust in a corner of a room. Visitor’s essential details, helps in scheduling meetings for visitors and employees, and assists in supervising the attendance of the employees. With VizMan, visitors don’t need to wait for hours in long queues. VizMan handles visitors with the value they deserve because we know time is important to you.
Feasible Features
One Subscription, Four Modules – Admin, Employee, Receptionist, and Gatekeeper ensures confidentiality and prevents data from being manipulated
User Friendly – can be easily used on Android, iOS, and Web Interface
Multiple Accessibility – Log in through any device from any place at any time
One app for all industries – a Visitor Management System that works for any organisation.
Stress-free Sign-up
Visitor is registered and checked-in by the Receptionist
Host gets a notification, where they opt to Approve the meeting
Host notifies the Receptionist of the end of the meeting
Visitor is checked-out by the Receptionist
Host enters notes and remarks of the meeting
Customizable Components
Scheduling Meetings – Host can invite visitors for meetings and also approve, reject and reschedule meetings
Single/Bulk invites – Invitations can be sent individually to a visitor or collectively to many visitors
VIP Visitors – Additional security of data for VIP visitors to avoid misuse of information
Courier Management – Keeps a check on deliveries like commodities being delivered in and out of establishments
Alerts & Notifications – Get notified on SMS, email, and application
Parking Management – Manage availability of parking space
Individual log-in – Every user has their own log-in id
Visitor/Meeting Analytics – Evaluate notes and remarks of the meeting stored in the system
Visitor Management System is a secure and user friendly database manager that records, filters, tracks the visitors to your organization.
"Secure Your Premises with VizMan (VMS) – Get It Now"
SOCRadar Research Team: Latest Activities of IntelBrokerSOCRadar
The European Union Agency for Law Enforcement Cooperation (Europol) has suffered an alleged data breach after a notorious threat actor claimed to have exfiltrated data from its systems. Infamous data leaker IntelBroker posted on the even more infamous BreachForums hacking forum, saying that Europol suffered a data breach this month.
The alleged breach affected Europol agencies CCSE, EC3, Europol Platform for Experts, Law Enforcement Forum, and SIRIUS. Infiltration of these entities can disrupt ongoing investigations and compromise sensitive intelligence shared among international law enforcement agencies.
However, this is neither the first nor the last activity of IntekBroker. We have compiled for you what happened in the last few days. To track such hacker activities on dark web sources like hacker forums, private Telegram channels, and other hidden platforms where cyber threats often originate, you can check SOCRadar’s Dark Web News.
Stay Informed on Threat Actors’ Activity on the Dark Web with SOCRadar!
2. 2
These slides are made available to you under a Creative Commons
Share-Alike 3.0 license. The full terms of this license are here:
https://creativecommons.org/licenses/by-sa/3.0/
Attribution requirements and misc., PLEASE READ:
● This slide must remain as-is in this specific location (slide #2),
everything else you are free to change; including the logo :-)
●
Use of figures in other documents must feature the below
“Originals at” URL immediately under that figure and the below
copyright notice where appropriate.
●
You are free to fill in the “Delivered and/or customized by” space
on the right as you see fit.
● You are FORBIDEN from using the default “About” slide as-is or
any of its contents.
(C) Copyright 2010-2014, Opersys inc.
These slides created by: Karim Yaghmour
Originals at: www.opersys.com/community/docs
Delivered and/or customized by
3. 3
About
● Author of:
● Introduced Linux Trace Toolkit in 1999
● Originated Adeos and relayfs (kernel/relay.c)
● Training, Custom Dev, Consulting, ...
7. 7
1.1. Features (old snapshot)
● Application framework enabling reuse and replacement of components
● Dalvik virtual machine optimized for mobile devices
● Integrated browser based on the open source WebKit engine
● Optimized graphics powered by a custom 2D graphics library; 3D graphics based
on the OpenGL ES 1.0 specification (hardware acceleration optional)
● SQLite for structured data storage
● Media support for common audio, video, and still image formats (MPEG4, H.264,
MP3, AAC, AMR, JPG, PNG, GIF)
● GSM Telephony (hardware dependent)
● Bluetooth, EDGE, 3G, and WiFi (hardware dependent)
● Camera, GPS, compass, and accelerometer (hardware dependent)
● Rich development environment including a device emulator, tools for debugging,
memory and performance profiling, and a plugin for the Eclipse IDE
8. 8
1.2. UX Concepts
● Browser-like
● iPhone-ish
● No user-concept of “task”
● Main keys:
● HOME
● SEARCH
● BACK
● MENU
● App-model allows users to safely install/test almost
anything
10. 10
1.3. App Concepts
● No single entry point (No main() !?!?)
● Unlike Windows or Unix API/semantics in many
ways
● Processes and apps will be killed at random:
developer must code accordingly
● UI disintermediated from app “brains”
● Apps are isolated, very
● Behavior predicated on low-memory conditions
11. 11
2. History
● 2002:
● Sergey Brin and Larry Page started using Sidekick smartphone
● Sidekick one of 1st smartphones integrating web, IM, mail, etc.
● Sidekick was made by Danger inc., co-founded by Andy Rubin (CEO)
● Brin/Page met Rubin at Stanford talk he gave on Sidekick’s development
● Google was default search engine on Sidekick
● 2004:
● Despite cult following, Sidekick wasn’t making $
● Danger inc. board decided to replace Rubin
● Rubin left. Got seed $. Started Android inc. Started looking for VCs.
● Goal: Open mobile hand-set platform
● 2005 - July:
● Got bought by Google for undisclosed sum :)
● 2007 - November:
● Open Handset Alliance announced along with Android
13. 13
3. Ecosystem
● More than a Billion devices activated
● 1.3M apps (vs. 1.2M for Apple's app store)
● 85% global smartphone marketshare (iOS is 12%)
14. 14
3.1. Who's playing?
● Leading IP:
● Google
● Semiconductor manufacturers:
● ARM, Intel, Freescale, TI, Qualcomm, NVIDIA, ...
● Handset manufacturers:
● Motorola, Samsung, HTC, LG, Sony-Ericsson, ...
● Tablet manufacturers:
● Motorola, Samsung, Archos, DELL, ASUS, ...
● Special-purpose devices:
● Nook, Joint Battle Command-Platform, ...
● App stores:
● Android Market, Amazon App Store, V CAST Apps, B&N NOOK Apps, ...
E
V
E
R
Y
B
O
D
Y
15. 15
3.2. Open Handset Alliance
● “... a group of 80 technology and mobile companies who have come together to
accelerate innovation in mobile and offer consumers a richer, less expensive, and
better mobile experience. Together we have developed Android™, the first
complete, open, and free mobile platform.”
● Unclear what OHA does or what benefits, if any, members derive
● Not an organization with board members, staff, etc. ... just an “Alliance”
● Google's Android team are the lead on all bleeding edge dev, all else tag along
● OHA is largely inactive / absent
● Comprised of:
● Mobile Operators: Sprint, T-Mobile, Vodafone, NTT Docomo, ...
● Handset Manufacturers: HTC, Motorola, LG, Samsung, Sony Ericsson, ...
● Semiconductor Companies: ARM, Freescale, Intel, NVIDIA, Qualcomm, TI, ...
● Software Companies: Google, ...
● Commercialization Companies: ...
16. 16
4. Legal Framework
● Code access
● Code licenses
● Branding use
● Google's own Android Apps
● Alternative App stores
● Oracle v. Google
17. 17
4.1. Code Access
● Parts:
● Kernel
● Android Open Source Project (AOSP)
● Kernel:
● Should have access to latest shipped version => GPL requirement
● Google-maintained forks at android.googlesource.com
● AOSP:
● Usually Code-drops every 6 months
● Official AOSP branches at android.googlesource.com
● Managed by “repo” tool, an overlay to “git”
● Honeycomb (3.0) code required talking to Google
● ... which hasn't precluded moders from lifting binaries off the SDK and putting
Honeycomb on all sorts of devices, including B&N's Nook ...
18. 18
4.2. Code Licenses
● Kernel:
● GNU General Public License (a.k.a. GPL)
● AOSP:
● Mostly Apache License 2.0 (a.k.a. ASL)
● Having GPL-free user-space was a design goal
● A few GPL and LGPL parts: mainly BlueZ and DBUS
● Some key components in BSD: Bionic and Toolbox
● “external/” directory contains a mixed bag of licenses, incl. lots of GPL
● May be desirable to add GPL/LGPL components:
● BusyBox
● uClibc / eglibc / glibc
19. 19
4.3. Branding Use
● Android Robot:
● Very much like the Linux penguin
● Android Logo (A-N-D-R-O-I-D w/ typeface):
● Cannot be used
● Android Custom Typeface:
● Cannot be used
● Android in Official Names:
● As descriptor only: “for Android”
● Most other uses require approval
● Android in Messaging:
● Allowed if followed by a generic: “Android Application”
● Compliance through CDD/CTS involved in “approval”
20. 20
4.4. Google's own Android Apps
● The non-AOSP apps:
● Android Market
● YouTube
● Maps and Navigation
● Gmail
● Voice
● SkyMap
● ...
● Require:
● CTS/CDD Compliance
● Signed agreement w/ Google
● Inquiries: android-partnerships@google.com
21. 21
4.5. Alternative “App Stores”
● A couple of stores are already public:
● Android Market
● Amazon App Store
● V CAST Apps
● B&N NOOK Apps
● ...
● Nothing precluding you from having your own
22. 22
4.6. Oracle v. Google
● Filed August 2010
● Patent infringement:
● 6,125,447; 6,192,476; 5,966,702; 7,426,720; RE38,104; 6,910,205; and 6,061,520
● Copyright infringement:
● Android does not use any Oracle Java libraries or JVM in the final product.
● Android relies on Apache Harmony and Dalvik instead.
● In October 2010, IBM left Apache Harmony to join work on Oracle's
OpenJDK, leaving the project practically orphaned.
● ...
● In Spring of 2012 Oracle lost both on Copyright and Patent fronts
23. 23
5. Platform and Hardware requirements
● In principle:
● Android runs on top of Linux
● Therefore: if it runs Linux, it can run Android
● Known to have been made to work on:
● ARM
● x86
● MIPS
● SuperH
● Put in all sort of devices:
● Washers, micro-wave ovens, car systems, etc.
24. 24
5.1. Compliance Definition Document
● Software: MUST conform to AOSP
● Application Packaging Compatibility: support “.apk” files
● Multimedia Compatibility: decoders, encoders, recording, ...
● Developer Tool Compatibility: adb, ddms, Monkey
● Hardware compatibility:
●
Display and Graphics
●
Input Devices
● Data Connectivity
●
Cameras
●
Memory and Storage
● USB
● Performance Compatibility
● Security Model Compatibility
● Software Compatibility Testing
● Updatable Software: MUST include mechanism to update
27. 27
6.1. Requirements
● App development and debugging:
● Windows / Mac / Linux workstation
● JDK
● Eclipse w/ ADT plugin
● Highly recommended: real device(S)
● Platform development:
● GNU cross-dev toolchain
● JTAG debugger
● ... more on this later
28. 28
6.2. App dev tools and resources
● SDK:
● android – manage AVDs and SDK components
● apkbuilder – creating .apk packages
● dx – converting .jar to .dex
● adb – debug bridge
● ...
● Emulator – QEMU-based ARM emulator
● Use KVM for x86 instead
● NDK: GNU toolchain for native binaries
● Documentation: developer.android.com
34. 34
1.1. Components
● 1 App = N Components
● Apps can use components of other applications
● App processes are automagically started whenever any
part is needed
● Ergo: N entry points, !1, and !main()
● Components:
● Activities
● Services
● Broadcast Receivers
● Content Providers
35. 35
1.2. Intents
● Intent = asynchronous message w/ or w/o
designated target
● Like a polymorphic Unix signal, but w/o
required target
● Intents “payload” held in Intent Object
● Intent Filters specified in Manifest file
36. 36
1.3. Component lifecycle
● System automagically starts/stops/kills
processes:
● Entire system behaviour predicated on low memory
● System triggers Lifecycle callbacks when
relevant
● Ergo: Must manage Component Lifecycle
● Some Components are more complex to
manage than others
38. 38
1.4. Manifest file
● Informs system about app’s components
● XML format
● Always called AndroidManifest.xml
● Activity = <activity> ... static
● Service = <service> ... static
● Broadcast Receiver:
● Static = <receiver>
● Dynamic = Context.registerReceiver()
● Content Provider = <provider> ... static
39. 39
1.5. Processes and threads
● Processes
● Default: all callbacks to any app Component are issued to the main process thread
● <activity>—<service>—<recipient>—<provider> have process attribute to override
default
● Do NOT perform blocking/long operations in main process thread:
– Spawn threads instead
● Process termination/restart is at system’s discretion
● Therefore:
– Must manage Component Lifecycle
● Threads:
● Create using the regular Java Thread Object
● Android API provides thread helper classes:
– Looper: for running a message loop with a thread
– Handler: for processing messages
– HandlerThread: for setting up a thread with a message loop
40. 40
1.6. Remote procedure calls
● Android RPCs = Binder mechanism
● No Sys V IPC due to in-kernel resource leakage
● Binder is a low-level functionality, not used as-is
● Instead: must define interface using Interface
Definition Language (IDL)
● IDL fed to aidl Tool to generate Java interface
definitions
41. 41
2. Framework Introduction
● UI
● Data storage
● Security/Permissions
● ... and much more ... :
● Graphics
● Audio and Video
● Location and Maps
● Bluetooth
● NFC
42. 42
2.1. UI
● Everything based on hierarchy of Views and
ViewGroups (layouts)
● Declared in XML or dynamically through Java
● UI components:
● Widgets
● Event handlers
● Menus
● Dialogs
● Notifications
● ...
43. 43
2.2. Data storage
● Shared preferences
● Private primitive key-pair values
● Internal storage
● Private data on device memory
● External storage
● Public data on shared external device (SD)
● SQLite DB
● Private DB
● Network connection
● Web-based storage (REST)
44. 44
2.3. Security/Permissions
● Most security enforced at process level: UID, GID
● Permissions enforce restrictions on:
● Per-process operations
● Per-URI access
● Applications are sandboxed
● Specific permissions required to “exit” sandbox
● Decision to grant access based on:
● Certificates
● User prompts
● All permissions must be declared statically
45. 45
2.4. Native development
● Useful for:
● Porting existing body of code to Android
● Developing optimized native apps, especially for gaming
● Provides:
● Tools and build files to generate native code libraries from C/C++
● Way to embed native libs into .apk
● Set of stable (forward-compatible) native libs
● Documentation, samples and tutorials
● Enables:
● Calling native code from Java using JNI
● Implementing fully native apps (since 2.3)
● Doesn't allow you to:
● Compile traditional Linux/Unix apps as-is
55. 55
4.2. Kernel
● Early startup code is very hardware dependent
● Initializes environment for the running of C code
● Jumps to the architecture-independent
start_kernel() function.
● Initializes high-level kernel subsystems
● Mounts root filesystem
● Starts the init process
56. 56
4.3. Android Init
● Open, parses, and runs /init.rc:
● Create mountpoints and mount filesystems
● Set up filesystem permissions
● Set OOM adjustments properties
● Start daemons:
– adbd
– servicemanager (binder context manager)
– vold
– netd
– rild
– app_process -Xzygote (Zygote)
– mediaserver
– ...
61. 61
6. Hardware support
GPS
Display
Lights
Keyboard
Buttons
Battery
Notifications
Attention
Audio
Camera
Power Management
Sensors
Accelerometer
Magnetic Field
Orientation
Gyroscope
Light
Pressure
Temperature
Proximity
Radio Layer Interface
Bluetooth BlueZ through D-BUS IPC (to avoid GPL contamination it seems)
Manufacturer-provided libgps.so
Wifi wpa_supplicant
Std framebuffer driver (/dev/fb0)
Keymaps and Keyboards Std input event (/dev/event0)
Manufacturer-provided liblights.so
Backlight
Manufacturer-provided libaudio.so (could use ALSA underneath ... at least as illustrated in their porting guide)
Manufacturer-provided libcamera.so (could use V4L2 kernel driver underneath ... as illustrated in porting guide)
“Wakelocks” kernel patch
Manufacturer-provided libsensors.so
Manufacturer-provided libril-<companyname>-<RIL version>.so
62. 62
7. Native User-Space
● Mainly
● /data => User data
● /system => System components
● Also found:
● /dev
● /proc
● /sys
● /sbin
● /mnt
● /cache
● Etc.
64. 64
8. Dalvik
● Sun-Java =
Java language + JVM + JDK libs
● Android Java =
Java language + Dalvik + Apache Harmony
● Target:
● Slow CPU
● Relatively low RAM
● OS without swap space
● Battery powered
● Has had JIT since 2010
65. 65
8.1. ART
● “Android RunTime”
● 64 bit
● Multi-core
● AOT instead of JIT
● Better debugging capabilities
(profiling/stack/crashes)
● Introduced as alternative to Dalvik
● Has now replaced Dalvik
66. 66
9. JNI – Java Native Interface
● Call gate for other languages, such as C, C++
● Equivalent to .NET's pinvoke
● Usage: include and call native code from App
● Tools = NDK ... samples included
● Check out “JNI Programmer's Guide and
Specification” - freely available PDF
67. 67
10. System Services
Entropy Service Device Policy Audio Service
Power Manager Status Bar Headset Observer
Activity Manager Clipboard Service Dock Observer
Telephone Registry Input Method Service UI Mode Manager Service
Package Manager Backup Service
Account Manager
Content Manager Connectivity Service Recognition Service
System Content Providers Throttle Service Status Bar Icons
Battery Service Accessibility Manager
Lights Service Mount Service ADB Settings Observer
Vibrator Service Notification Manager
Alarm Manager Device Storage Monitor
Location Manager
Sensor Service Search Service
Window Manager
Wallpaper Service
NetStat Service
NetworkManagement Service AppWidget Service
DiskStats Service
Init Watchdog
DropBox Service
Bluetooth Service
72. 72
13. Binder
● CORBA/COM-like IPC
● Data sent through “parcels” in “transactions”
● Kernel-supported mechanism
● /dev/binder
● Check /proc/binder/*
● android.* API connected to System Server
through binder.
76. 76
Working with the
Android Open Source Project
● Tools and location
● Content
● Building
● Build tricks
● Build system architecture
● Output images
● Using adb
● Custom toolchains and dev kits
● Compatibility Test Suite
● Basic hacks
77. 77
1. Tools and location
● Location:
● http://android.googlesource.com/
● Get “repo”:
$ curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
$ chmod a+x ~/bin/repo
● Fetch the AOSP:
● Make sure you fetch a tagged release
● Gingerbread:
$ repo init -u https://android.googlesource.com/platform/manifest
-b android-2.3.7_r1
$ repo sync
78. 78
2. Content
bionic C library replacement
build Build system
Compatibility Test Suite
development Development tools
device Device-specific files and components
external Copy of external projects used by AOSP
frameworks
hardware
Apache Harmony
The NDK
packages Stock Android apps, providers, etc.
The SDK
system
bootable Reference bootloader
cts
dalvik Dalvik VM
System services, android.*, Android-related cmds, etc.
Hardware support libs
libcore
ndk
prebuilt Prebuilt binaries
sdk
pieces of the world that are the core of the embedded linux platform at
the heart of Android.
81. 81
● Set up build environment:
$ .⌴build/envsetup.sh
$ lunch
● Launch build and go watch tonight's hockey game:
$ make -j2
● ... though you should check your screen at breaks ...
● Just launch emulator when it's done:
$ emulator &
● Need to reuse envsetup.sh and lunch on every new shell
82. 82
4. Build Tricks
● Commands (from build/envsetup.sh):
● godir
● croot
● mm
● m
● Speeding up the Build:
● CPU
● RAM
● SSD
● CCACHE
– $ export USE_CCACHE=1
83. 83
5. Build System Architecture
● Non-Recursive
● “Modules” build predicated on Android.mk
84. 84
6. Output Images
● All output and build in [aosp]/out/
● Images at [aosp]/out/target/product/generic/:
● ramdisk.img
● system.img
● userdata-qemu.img
● Kernel is in:
● prebuilt/android-arm/kernel/kernel-qemu
● Emulator overrides:
● -kernel
● -initrd
85. 85
7. Using adb
● Can use to control/interface w/ running AOSP,
including emulator.
● Shell:
$ adb shell
#
● Dumping the log:
$ adb logcat
● Copying files to/from target:
$ adb push foo /data/local
$ adb pull /proc/config.gz
Host
Target
87. 87
8.1. Rationale
● SDK:
● Providing other internal teams or external developers
access to your modified/custom Android APIs.
● NDK:
● Same as SDK rationale
● Custom cross-dev toolchain:
●
To avoid having to use a binary toolchain from 3rd
party.
● To control the build parameters used to create the
toolchain. Ex.: use uClibc instead of glibc.
88. 88
8.2. SDK generation
● Building the SDK:
$ . build/envsetup.sh
$ lunch sdk-eng
$ make sdk
● If API modified, do this before make:
$ make update-api
● Location: [aosp]/out/host/linux-x86/sdk/
● Using a custom SDK:
● Eclipse->Window->Preferences->Android->”SDK Location”
● Eclipse->Window->"Android SDK and AVD Manager"-
>"Installed Packages"->"Update All..."
89. 89
8.3. NDK generation
● Build
$ cd ndk/build/tools
$ export ANDROID_NDK_ROOT=[aosp]/ndk
$ ./make-release --help
$ ./make-release
IMPORTANT WARNING !!
This script is used to generate an NDK release package from scratch
for the following host platforms: linux-x86
This process is EXTREMELY LONG and may take SEVERAL HOURS on a dual-core
machine. If you plan to do that often, please read docs/DEVELOPMENT.TXT
that provides instructions on how to do that more easily.
Are you sure you want to do that [y/N]
90. 90
9. Compatibility Test Suite
● Android Compatibility Program:
● Source code to Android stack
● Compatibility Definition Document (CDD) – Policy
● Compatibility Test Suite (CTS) – Mechanism
● Each Android version has own CDD & CTS
● CTS:
● Part of AOSP
● Run from host using USB over to attached device
● Based on JUnit
● Runs various test apps on target
● Relies on ADB
● Provides report to be be analyzed and/or sent back to Google
92. 92
● Report:
● .zip file containing XML files and screen-shots
● Sent to: cts@android.com
● Building the CTS:
$ . build/envsetup.sh
$ make cts
● Launching the CTS:
$ cd out/host/linux-x86/bin/
$ ./cts
$ cts_host >
$ cts_host > help
...
93. 93
● Using the CTS:
$ cts_host > ls --plan
List of plans (8 in total):
Signature
RefApp
VM
Performance
AppSecurity
Android
Java
CTS
$ ./cts start --plan CTS
94. 94
● Areas covered:
● Signature tests
● Platform API tests
● Dalvik VM tests
● Platform Data Model
● Platform Intents
● Platform Permissions
● Platform Resources
103. 103
10.2. Adding new applications
● Can use Eclipse to create initial version
● Copy Eclipse project to packages/apps
● Local:
● Add app to device/acme/coyotepad/
● Add Android.mk to app
● Add to PRODUCT_PACKAGES in full_coyotepad.mk
● Global:
● Add application in [aosp]/packages/apps
● Add an appropriate Android.mk file to project
● Add project to PRODUCT_PACKAGES in
[aosp]/build/target/product/core.mk
110. 110
Kernel Selection
● Google:
● http://android.googlesource.com
● Vanilla:
● http://www.kernel.org
● Either way ... you're screwed:
● Android kernel is a fork
● No resolution in sight
● Cannot use vanilla kernel as-is ... androidisms
● Recent kernel have most Androidisms
● Android team continues to add stuff in their fork
● Talk to your SoC vendor
111. 111
Native Android User-Space
● Filesystem layout
● Architecture vs. filesystem
● Build system and filesystem
● adb
● Command line
● Init
● ueventd
119. 119
4.1. What adb can do
● See online help for full details
● Managing device connections
● Remote commands:
● shell
● log dumping
● bug reports
● port forwarding
● dalvik debugging
120. 120
● Filesystem commands
● push
● pull
● sync
● install / uninstall
● State-altering commands
● reboot
● run as root
● switching connection type
● controlling the emulator
● Tunneling PPP
121. 121
5. Command line
● Shell:
● NetBSD shell up to 2.3/GB
● MirBSD Korn shell since 4.0/ICS
● Toolbox:
● Traditional Linux commands
● Global properties
● Input events
● Services control
● Logging
● ioctl
● Device wiping
● etc.
122. 122
● In aosp:
● /system/core/toolbox
● In filesystem:
●
/system/bin/toolbox
● Provides
alarm date getevent insmod ls mv powerd renice schedtop
smd top dd getprop ioctl lsmod nandread printenv rm
sendevent start umount cat hd ionice lsof netstat ps rmdir
setconsole stop uptime chmod df id kill mkdir newfs_msdos r
rmmod setkey sync vmstat chown dmesg ifconfig ln readtty
rotatefb setprop syren watchprops cmp exists iftop log mount
notify reboot route sleep wipe
140. 140
3.1. servicemanager
● In aosp:
● /frameworks/base/cmds/servicemanager/
● In filesystem:
● /system/bin/
● Provides:
● Context management for binder
● Service index for entire system
141. 141
3.2. installd
● In aosp:
● /frameworks/base/cmds/installd
● In filesystem:
● /system/bin/
● Provides:
● Package install/uninstall
● Sanity checks and verifications
● Interfaces with Package Manager service
143. 143
3.4. netd
● In aosp:
● /system/netd/
● In filesystem:
● /system/bin/
● Provides:
● Management of aspects of networking
● Interfaces with Network Management service
144. 144
3.5. rild
● In aosp:
● /hardware/ril/mock-ril/
● In filesystem:
● /system/bin/
● Provides:
● “Radio Interface Layer” to phone hardware
145. 145
3.6. keystore
● In aosp:
● frameworks/base/cmds/keystore/
● In filesystem:
● /system/bin
● Provides:
● Store key-value pairs
● Security keys for connecting to network infrastructure
146. 146
4. System Services Internals
● Services run by System Server
● Observing the System Server
● Calling on system services
● Inside a few system services
● Creating your own system service
147. 147
4.1. Services run by the System
Server
Entropy Service Device Policy Audio Service
Power Manager Status Bar Headset Observer
Activity Manager Clipboard Service Dock Observer
Telephone Registry Input Method Service UI Mode Manager Service
Package Manager Backup Service
Account Manager
Content Manager Connectivity Service Recognition Service
System Content Providers Throttle Service Status Bar Icons
Battery Service Accessibility Manager
Lights Service Mount Service ADB Settings Observer
Vibrator Service Notification Manager
Alarm Manager Device Storage Monitor
Location Manager
Sensor Service Search Service
Window Manager
Wallpaper Service
NetStat Service
NetworkManagement Service AppWidget Service
DiskStats Service
Init Watchdog
DropBox Service
Bluetooth Service
152. 152
4.3. Calling on System Services
● Use getSystemService
● Ex: NotificationManager Object reference:
String ns = Context.NOTIFICATION_SERVICE;
NotificationManager mNotificationManager = (NotificationManager)
getSystemService(ns);
● Prepare your content
● Call on the object:
mNotificationManager.notify(HELLO_ID, notification);
153. 153
4.4. Inside a few System Services
● Get the AOSP ... repo, etc.
● Tricks:
● Import into Eclipse and collapse methods
● Use reverse-engineering tools:
– Imagix
– Rationale
– Lattix
– Scitools
– ...
● Be patient, this isn't documented anywhere ...
165. 165
4.5. Creating your own System
Service
● Add your code to:
frameworks/base/services/java/com/android/server/
● Have the SystemServer.java init+reg. your service
● Define hardware API for apps
● Expose through:
● frameworks/base/core/java/android/os/[server].aidl
● Call on native “driver” code through JNI
● Implement or connect to appropriate driver
● Create an app that calls on service
● May need to create new SDK ...
190. 190
Acknowledgements:
● Some figures and snippets taken from Google's
Android “Dev Guide” at developer.android.com
distributed under the Apache 2.0 license.