This work is licensed under the Creative Commons Attribution 4.0 International License. To view a copy of this license, visit

Slides:



Advertisements
Similar presentations
Introduction.  Professor  Adam Porter 
Advertisements

COMPUTER GRAPHICS CS 482 – FALL 2014 NOVEMBER 10, 2014 GRAPHICS HARDWARE GRAPHICS PROCESSING UNITS PARALLELISM.
Presentation by Amal Babu New OS of Google, initially designed for netbooks Released in second half of 2010 Google chrome browser on Linux kernel Inbuilt.
What is Android?.
Android architecture overview
 Android is a software platform and operating system for mobile devices, based on the Linux kernel, developed by Google. It allows developers to write.
Android Platform Overview (1)
So. . . According to the Global Developer Survey ’13 conducted by Telerik, over 5000 developers said that they developed apps using HTML5 in 2012 and 90%
This work is licensed under the Creative Commons Attribution 4.0 International License. To view a copy of this license, visit
UNDERSTANDING JAVA APIS FOR MOBILE DEVICES v0.01.
App Development on Android
DEPARTMENT OF COMPUTER ENGINEERING
© 2010 MindTree Limited CONFIDENTIAL: For limited circulation only Slide 1 CONFIDENTIAL: For limited circulation only An automaton that is created from.
Mobile Application Development
Embedded systems Lecture 25 February 2015.
This work is licensed under the Creative Commons Attribution 4.0 International License. To view a copy of this license, visit
Development of mobile applications using PhoneGap and HTML 5
Asst.Prof.Dr.Ahmet Ünveren SPRING Computer Engineering Department Asst.Prof.Dr.Ahmet Ünveren SPRING Computer Engineering Department.
Simple Web SQLite Manager/Form/Report
SQLite BY Jordan Smith Brian Wetzel Chris Hull William Anderson.
An Overview of Qt - asankar1. Agenda About Qt –A brief intro of Qt Qt development tools –Tools used for building Qt application Qt Architecture –The underlying.
OpenSSL acceleration using Graphics Processing Units
To be Presented by, T.Sathishkumar [11mw07] 1. Synopsis Introduction Version Features License An Application Development Demo Possibilities Advantages.
Web Design Basic Concepts.
Emerging Platform#4: Android Bina Ramamurthy.  Android is an Operating system.  Android is an emerging platform for mobile devices.  Initially developed.
This work is licensed under the Creative Commons Attribution 4.0 International License. To view a copy of this license, visit
Session: 11. © Aptech Ltd. 2HTML5 Audio and Video / Session 11  Describe the need for multimedia in HTML5  List the supported media types in HTML5 
Android Introduction Platform Overview.
Project Rickshaw SEARCH - FIND - GO. Project Rickshaw TEAM MEMBERS KEVIN AUGUSTINO – MATT FOX – DAVID MOORE SPONSORS KARASU TECHNOLOGIES - ERIK PAUL -
Mobile Application Development with ANDROID. Agenda Mobile Application Development (MAD) Intro to Android platform Platform architecture Application building.
Mobile Web Applications
EWD VistA Update 2010 Rob Tweed M/Gateway Developments Ltd.
HTML 5 New Standardization of HTML. I NTRODUCTION HTML5 is The New HTML Standard, New Elements New Attributes Full CSS3 Support Video and Audio 2D/3D.
Mobile Application Development using Android
Computer Concepts 2014 Chapter 7 The Web and .
Mobile App Support Jacob Poirier Geri Hengesbach Andrea Menke Erin Rossell.
PHP TUTORIAL. HISTORY OF PHP  PHP as it's known today is actually the successor to a product named PHP/FI.  Created in 1994 by Rasmus Lerdorf, the very.
This work is licensed under the Creative Commons Attribution 4.0 International License. To view a copy of this license, visit
Explain the purpose of an operating system
 Chapter 6 Architecture 1. What is Architecture?  Overall Structure of system  First Stage in Design process 2.
ANDROID 응용 프로그래밍 과정 – 목차 - 안드로이드란 - 안드로이드가 만들어지게 된배경 - 안드로이드의 철학 - 안드로이드 환경설정 ( SDK download, eclipse plug-in 설정, 간단한 프로그램 실행 ) - 안드로이드 동작원리 - 안드로이드 핵심.
INTRODUCTION TO JAVASCRIPT AND DOM Internet Engineering Spring 2012.
Chapter 18 Object Database Management Systems. McGraw-Hill/Irwin © 2004 The McGraw-Hill Companies, Inc. All rights reserved. Outline Motivation for object.
CE Operating Systems Lecture 3 Overview of OS functions and structure.
Session: 1. © Aptech Ltd. 2Introduction to the Web / Session 1  Explain the evolution of HTML  Explain the page structure used by HTML  List the drawbacks.
Created By. Jainik B Patel Prashant A Goswami Gujarat Vidyapith Computer Department Ahmedabad.
Android. Basic Architecture Linux Kernel Libraries Applications Android Runtime Application Framework.
Trunica Inc. 500 East Kennedy Blvd #300 Tampa, FL Cross Platform Mobile Apps With Cordova and Visual Studio 2015 © Copyright 2015.
BlackBerry Applications using Microsoft Visual Studio and Database Handling.
Reading Flash. Training target: Read the following reading materials and use the reading skills mentioned in the passages above. You may also choose some.
1 Android Workshop Platform Overview. 2 What is Android?  Android is a software stack for mobile devices that includes an operating system, middleware.
 Can access all API’s made available by OS vendor.  SDK’s are platform-specific.  Each mobile OS comes with its own unique tools and GUI toolkit.
Excel Services Displays all or parts of interactive Excel worksheets in the browser –Excel “publish” feature with optional parameters defined in worksheet.
By Adam Reimel. Outline Introduction Platform Architecture Future Conclusion.
CHAPTER 9 File Storage Shared Preferences SQLite.
丁建文 國立高雄應用科大資管系副教授 兼任計網中心軟體發展組組長 跨平台行動應用軟體開發技術 : HTML5 & Mobile JavaScript Framework 暨南大學.
COMP 175 | COMPUTER GRAPHICS Remco Chang1/XX13 – GLSL Lecture 13: OpenGL Shading Language (GLSL) COMP 175: Computer Graphics April 12, 2016.
Information and Communication Technology Lecture 6 Reference: Chapter 5.
Introduction to WebKit Girish Ramakrishnan. History
Computer System Structures
Android Mobile Application Development
COMPUTER GRAPHICS CHAPTER 38 CS 482 – Fall 2017 GRAPHICS HARDWARE
chapter 6- Android Introduction
WebGL The HTML5/JavaScript 3D Computer Graphics API
Android.
Contents: Introduction Different Mobile Operating Systems
CMPE419 Mobile Application Development
Survey Paper & Manuscript
12/5/2018 HCI SNS College of Engineering Department of Computer Science and Engineering Mobile Application Development Presented by S.Yamuna AP/CSE.
CMPE419 Mobile Application Development
Presentation transcript:

This work is licensed under the Creative Commons Attribution 4.0 International License. To view a copy of this license, visit or send a letter to Creative Commons, 444 Castro Street, Suite 900, Mountain View, California, 94041, USA. Lecture 4 – Native libraries

Laura Gheorghe, Petre Eftime Bionic  Custom C library  Replacement for glibc  Not POSIX compliant  Goals  BSD license  Avoid GPL and LGPL in userspace  Small size  glibc is very large  High speed  Designed for low CPU frequencies 2

Laura Gheorghe, Petre Eftime Bionic vs. glibc 3  Bionic routines do not throw, pass and handle C++ exceptions  Support for exceptions adds a great overhead  Exceptions can be used internally in C++ code, if they do not cross the libc routine  No C++ Standard Template Library  Native code developers can use gnustl or stlport  New pthread implementation  No wchar_t and no support for LOCALE

Laura Gheorghe, Petre Eftime Bionic vs. glibc 4  A shared memory region is used for configuration  Also used by the applications through property_get() and property_set()  No openlog() or syslog()  libc __android_log_print() used for logging  Specific malloc implementation  A hash table used for tracking allocations to discover leaks  No pty support

Laura Gheorghe, Petre Eftime Bionic vs. glibc 5  No AIO ( aio_read(), aio_write() )  No crypt()  Includes MD5 and SHA1  Developers should use OpenSSL for crypto  Android has its own account management  Does not use /etc/passwd, no getpwent()  getpwnam() and getpwuid() wrappers that use Android ID service  getprotobyname() only prints ”FIX ME! Implement getprotobyname() ”  Bionic not finished

Laura Gheorghe, Petre Eftime Bionic pthreads 6  Mutexes, rwlocks, condvars implemented using kernel futexes  No pthread_cancel()  Threads cannot kill other threads  No pthread_atfork()  Thread local storage (TLS) implemented  Max 64 keys  Id and errno reserved  Mapped at 0xffff0ff0 in the process (on ARM)  pthread_attr_{set,get}inheritsched and pthread_attr_{set,get}scope not implemented

Laura Gheorghe, Petre Eftime SQLite 7  Developed for embedded systems  Used by Android, Apple iOS, Blackberry  Low memory consumption  Starts from 50 KB, reaches few hundred KB  Ease of use  No configuration files or complex commands  Free  Released under public domain  Supported by Google, Adobe, Mozilla  Active maintenance

Laura Gheorghe, Petre Eftime SQLite 8  Is serverless  No process  Access database through library  No port configuration, no user adding, no access levels  All data in a single file  Indices, triggers, metadata  Journal file added  Fewer datatypes  INTEGER, REAL, TEXT, BLOB  No datetime -> string  No boolean -> 0 and 1  Blob not recommended on Android -> files in the file system

Laura Gheorghe, Petre Eftime SQLite 9  Does not use static typing  Type depends on the inserted value  Not on the definition in CREATE TABLE  Create INTEGER column and insert TEXT  Manifest typing -> between static and dynamic typing  No fixed column length  No limit to the inserted value  Constraints in the code  Database files are cross-platform  Pull file from device, use it on laptop  Open file with GUI tools  Populate file on laptop, push on device

Laura Gheorghe, Petre Eftime SSL 10  Generated from OpenSSL external project  Includes libcrypto and libssl libraries  Libcrypto implements cryptographic algorithms  Symmetric ciphers  Public key crypto  Certificates  Authentication codes, hashes  Libssl implements SSL/TLS for secure communications  Cryptographic routines from libcrypto are used by libssl

Laura Gheorghe, Petre Eftime WebKit 11  Open source web browser engine  BSD license but WebCore and JavaScriptCore under LGPL  From 2013, WebKit is a trademark of Apple  Contributors: Apple, Nokia, Google, Samsung, Adobe, Intel, etc.  Ports: Safari, Chrome, Android, Blackberry, Tizen, etc.  Originally forked from KHTML and KJS libraries from KDE  Google forked WebCore (WebKit component) into Blink

Laura Gheorghe, Petre Eftime WebKit 12  Speed, power and versatility  Support for new features in CSS3, HTML5 and JavaScript  WebCore  LGPL license  C++ based  Layout, rendering, DOM library for HTML and SVG  Creates HTML visualizations based on DOM markup and CSS  JavaScriptCore  JavaScript engine  Derived from KJS library in KDE and PCRE regular expression library  High performance interaction engine

Laura Gheorghe, Petre Eftime Surface Manager 13  a.k.a. Surface Flinger  Part of System Server  System-wide surface composer  Handles surface rendering to frame buffer device  Combines 2D and 3D surfaces, surfaces from multiple apps  Each app generates 1 or more surfaces  The Surface Flinger composes these surfaces  The result is stored in the Frame Buffer

Laura Gheorghe, Petre Eftime Surface Manager 14

Laura Gheorghe, Petre Eftime Surface Manager 15  Surfaces passed as buffers using Binder IPC calls  Surface instances written to or restored from Parcels  Use OpenGL ES or 2D hardware accelerator for the composition  Double buffering using page flip  Front buffer (primary surface) and back buffer  Change primary surface pointer and back buffer pointer  Screen never flickers or displays artifacts

Laura Gheorghe, Petre Eftime Audio Manager 16  a.k.a. Audio Flinger  Part of Media Server  Manages the audio output devices  Receives and combines multiple audio streams (tone, media player, games)  Directs audio to various outputs (Headphones, Speaker)

Laura Gheorghe, Petre Eftime Audio Manager 17

Laura Gheorghe, Petre Eftime Media Framework 18  Uses StageFright engine for audio/video recording and playback  Default software codecs  Implement your own hardware codec  Using OpenMAX Integration Layer (IL)  OpenMAX IL  Standardized way for Stagefright to recognize and use hardware codecs  OpenMAX plugin - shared library  Implemented according to the standard  Accessed through android.media API

Laura Gheorghe, Petre Eftime OpenGL ES 19  Manage 2D and 3D graphics on embedded systems  Interface between software and graphics acceleration hardware  Low-level, lightweight API  Subset of OpenGL  Display complex 3D graphics on mobile  Easy porting

Laura Gheorghe, Petre Eftime OpenGL ES 20  Industry standard  Open, vendor-neutral, multi-platform  Anyone can implement OpenGL ES based on the specification  Small footprint, low power consumption  Minimum data storage requirements  Small binary  Works with both hardware and software rendering  Calls to hardware, to software routines or combination of both

Laura Gheorghe, Petre Eftime OpenGL ES 1.x vs  NDK includes both OpenGL ES 1.x and 2.0 libraries (eventually 3.0)  Differ significantly  Different Graphics Rendering Pipelines  Processing stages taken by the graphics hardware to produce graphics  Accepts object description (vertices, primitives, color values)  1.x fixed function pipeline  Input primitive, texture data, lightning  2.0 programmable pipeline  Write vertex and fragment shaders using the Shading Language (GLSL)

Laura Gheorghe, Petre Eftime OpenGL ES 1.x vs x2.0 PerformanceFast 2D and 3D graphicsFaster 2D and 3D graphics CompatibilityAlmost all Android devicesMany Android devices Ease of coding Fixed pipeline with convenient functions, easy to use for simple 3D apps No built-in basic functions, more effort to use for simple 3D apps Graphics control Difficult or impossible to create some effects (fixed pipeline) More direct control of the graphics processing pipeline (programmable pipeline)

Laura Gheorghe, Petre Eftime OpenGL ES in Android app 23  Use OpenGL ES directly from Android app  Create a view container  Implement a GLSurfaceView and GLSurfaceView.Renderer  GLSurfaceView  View container for the graphics  Draw and manipulate objects using OpenGL API  GLSurfaceView.Renderer  Controls what is drawn in the view  Defines methods required for drawing  Attach it to the GLSurfaceView instance  GLSurfaceView.setRenderer()

Laura Gheorghe, Petre Eftime OpenGL ES in Android app 24  Call OpenGL API  OpenGL ES 1.0/1.1 API  android.opengl (static interface, better performance)  javax.microedition.khronos.opengles (standard implementation)  OpenGL ES 2.0 API  android.opengl.GLES20 (starting with Android 2.2, API level 8)  OpenGL ES 3.0 API  android.opengl.GLES30 (starting with Android 4.3, API level 18)  Requires an implementation of the pipeline provided by the manufacturer  Not all 4.3 devices support 3.0 API  Declare version requirement in the manifest 

Laura Gheorghe, Petre Eftime Bibliography 25  Karim Yaghmour, Embedded Android: Porting, Extending, and Customizing, Chapter 1  dollar-libc.html    Physiology-of-an-Android.pdf  ngl.html

Laura Gheorghe, Petre Eftime Keywords 26  Bionic  SQLite  SSL  WebKit  Surface Manager  Audio Manager  Media Framework  OpenGL ES