SlideShare une entreprise Scribd logo
1  sur  66
Télécharger pour lire hors ligne
Applied Computer Science
     Concepts in Android



Jim Huang ( 黃敬群 )
Developer & Co-Founder, 0xlab
                                        jserv@0xlab.org

                                Dec 31, 2010 / CSIE, NTU
Applied Computer Science
       Concepts in Android



Android = A complete operating system
for mobile computing, open source'd
Rights to copy
                                                                    © Copyright 2010 0xlab
                                                                           http://0xlab.org/
                                                                            contact@0xlab.org
Attribution – ShareAlike 3.0
You are free                                                  Corrections, suggestions, contributions and
                                                                               translations are welcome!
   to copy, distribute, display, and perform the work
   to make derivative works                                                  Latest update:Dec 31, 2010
   to make commercial use of the work
Under the following conditions
      Attribution. You must give the original author credit.
      Share Alike. If you alter, transform, or build upon this work, you may distribute the
      resulting work only under a license identical to this one.
   For any reuse or distribution, you must make clear to others the license terms of this
   work.
   Any of these conditions can be waived if you get permission from the copyright holder.
Your fair use and other rights are in no way affected by the above.
License text: http://creativecommons.org/licenses/by-sa/3.0/legalcode
Agenda                    (1) Android Internals
                                (2) Compiler: 2D/3D Graphics
                                (3) OS: Telephony
                                (4) Virtual Machine: Database




In this presentation, the unaware or indirect applications of
In this presentation, the unaware or indirect applications of
essential computer science concepts are dicussed as showcase.
essential computer science concepts are dicussed as showcase.
Android Internals

… or, the low-level parts ...
Android Internals

• Android Low-Level system
  – Architecture View
  – Everything from “Zygote”
  – Key design concepts in Android
  – System components

• Hardware Abstraction Layer (HAL)
  – GPS, RIL, Graphics (2D/3D), ...
Android Low-level system



• Architecture
• Everything from “Zygote”
• Key design concepts in Android
Android Low-Level System
       [ Architecture ]
GNU/Linux vs. Android




   Linux          Android
Android =   (patched)   Linux Kernel + special user-space
Functional View
                                Applications
   Gallery         Phone         Web Browser    Google Maps   ・・・・・

                            Android Framework
   Activity       Window           Content                       Notification
                                                View System
   Manager        Manager          Manager                        Manager

   Package        Telephony        Resource       Location
   Manager         Manager         Manager        Manager


                            System Library          Android Runtime
SurfaceFlinger   OpenCORE          SQLite                Class Library

                                                    Dalvik Virtual Machine
OpenGL|ES        AudioFlinger      WebKit

    Skia         OpenSSL          bionic libc     Freetype


                                Linux Kernel
Android Low-Level System
   [ Everything from Zygote ]
Android Boot Sequence
Low level initialization         High level perspective (Android specific)

        ARM based                     Initialization process
         Target Board                        /etc/init.rc



   Android bootloader                 Start Android Service
      USB loader

                                 console
                                 adbd
                                 service manager
       Load Linux                mountd
                                 debuggerd
                                 zygote
                                 mediaserver
                                 installd
       Start kernel
                                 flash_recovery
       - /init/main.c
Process View
          User-space:: process


               Process



               PID : 1                                         PPID : 2
                                            1
               PPID : 0

                               spawn
 spawn                        (fork+exec)
(fork+exec)                                                    Process


    Process               Process                spawn
                                                (fork+exec)    PPID : 3
    PID : 2               PID : 3
    PPID : 1              PPID : 1



                                                       2
   Process                Process
  PID : 4                 PID : 5
  PPID : 2                PPID : 3
                                            3




                                                           4


 fork()                                 5
 Copy on Write
Role of Zygote
Everything spawn from Zygote
Android Low-Level System
    [ Key Design Concepts ]
System Interaction




IPC: Inter-Process Communication
Activities



window

 widget


 Activities


 view




view group
Activity state transition
                              Task 1

Home        Activity1         Activity2   Activity3




            1                  2          3
                                           Home
                        Back Key             Key
Home        Activity4         Activity5   Activity6




            4                  5          6
                              Task 2
Activity life cycle
• Entire lifetime
• Visible lifetime
• Foreground lifetime
Services



 Activity       Activity

                                               Service

                                     Invoking specific service
                                     (provided by Media server)




                              Home

                               or
Activity1                     Back


            Activity2
Broadcast Receivers



                                             Components
Components

                                               Receiver
Broadcast


                              SMS_RECEIVED
  Intent

               SMS_RECEIVED
Content Providers


       Components




    Content Providers                  Interface
                               Content Provider Class     Components   A

                                       Preferences
                                                        Content Resolver
                                          Files
                                                          Components   B

                                       SQLite(DB)
                                                        Content Resolver
                                        Network




Content Providers, Intents, Resolver
Components
                                               Intent                  Components




                       Activity
                                                                        Activity
Context.startActivity()
                                                   (Intents)
                                                                           or
Activity.startActivityForResult()


                                                                        Service
Context.startService()
Context.bindService()                                                      or


                      Broadcast                                         Broadcast

Context.sendBroadcast()
Context.sendOrderedBroadcast()                            System
Context.sendStickyBroadcast()              3
                                                manifest                        Components
                                    2          ActivityManager
                                                                                    Class A
      Components

      Service
        Intent                    Intent
                                                                   5
         to class A         1 To Class A
                                                 <class list>
                                                 …
                                                 class A
                                           4     …
Android Services in Action
Content     Telephony            Bluetooth     Connectivity                Location
Manager      Service              Service        Service                   Manager

Window       Activity            Package             Power
                                                                                 …
Manager      Manager             Manager            Manager
                        Add Service
                        Service                     Audio Flinger
                                      Add Service
                        Manager
daemons                                                  Surface
                        Service                          Flinger
  usbd                  Manager

  adbd                                                                            System
                        runtime                                                   Server
debuggerd

   rild                   Init                  Zygote                           Dalvik VM

                                                Kernel         Android Service
                   Linux Kernel
                                                Dalvik         Framework
IPC: Binder(1)
   Binder in Action




      A pool of threads is associated to each service application to process
       incoming IPC (Inter-Process Communication).
      Binder performs mapping of object between two processes.
      Binder uses an object reference as an address in a process’s memory
       space.
      Synchronous call, reference couting
IPC: Binder(2)
Understanding

• Essential components
   – Compiler: Java
  – Virtual Machine: Dalvik
  – OS: Linux Kernel                SSA form




• Anything else?
Compilers

Applied in 2D/3D Graphics
OpenGL Anywhere


  ARM®           PowerVR
Cortex™- A8        SGX
with NEON VFP    Graphics


C64x+      Other        Display
         Peripherals   Subsystem
 DSP
OpenGL Graphics Pipeline
State Variables                                                                         Front Buffer

                                    Geometry                            Fragment
                                     Pipeline                            Pipeline

Camera Position
 Light Sources                                          F
      Etc.                          C         G
                                                            E
                                                                D
                                                                                        Back Buffer
              A

                                                                C
     GL_TRIANGLES                             A
                            B                                       B

                                            GL_TRIANLE_FAN
                  A             C
                                              E
                                                    F



                        B
                                        D
                                                                         Texture Maps
                      GL_TRIANGLE_STRIP
Texturing Example




Before Texturing          After Texturing
Graphics Pipeline
                               LOD selection
                               Frustum Culling
               Application     Portal Culling
                               …

                                                         Clipping
                                   VERTEX SHADER
Programmable




                Geometry                                 Division by w
                Processing Assembly
                      Primitive                   Viewport transform
                               Backface culling

                               Scan Conversion
               Rasterization       FRAGMENT SHADER



                  Output       Output to Device
Vertex and Fragment Shaders
   ( x, y, z, w )               ( x’, y’, z’, w’ )
   ( nx, ny, nz )               ( nx’, ny’, nz’ )
   ( s, t, r, q )               ( s’, t’, r’, q’ )
   ( r, g, b, a )               ( r’, g’, b’, a’ )

                     VERTEX
                     SHADER




( x, y )                         ( x, y )
( r’, g’, b’, a’ )               ( r, g, b, a )
( depth’ )                       ( depth )


                     FRAGMENT
                      SHADER
Embedded code with no lighting




    OpenGL|ES
•   Added
     – Fixed-point and byte data
•   Retained
     –   Vertex Transforms and Lighting (mostly)     Embedded code with lighting
     –   Multi-texturing (2D only)
     –   Full Scene Antialiasing via Multisampling   (Smooth Shaded)
     –   Alpha blending                                                  Surface Normal Vectors
OpenGL|ES 1.1 Example
// Enable fixed-function shading (smooth or flat)
   glShadeModel(GL_SMOOTH);

// Define the appearance of triangle surfaces
   glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT, fMaterialAmbient);
   glMaterialf(GL_FRONT_AND_BACK, GL_SHININESS, Shininess);

// Define the appearance and position of a light source
   glLightfv(GL_LIGHT0, GL_AMBIENT, fLightAmbient);
   glLightModelfv(GL_LIGHT_MODEL_AMBIENT, fAmbient);
   glLightfv(GL_LIGHT0, GL_POSITION, fLightPosition);

// Set pointers to geometry and other attributes and draw it
   glVertexPointer(3, GL_FLOAT, 0, Vertices);
   glTexCoordPointer(2, GL_FLOAT, 0, TexCoords);
   glNormalPointer(GL_FLOAT, 0, NormalsPerVertex);
   glDrawArrays(GL_TRIANGLES, 0, Count);


                                                                    38
OpenGL|ES 2.0 Example
// Create a vertex shader object, load source code and compile it
   hVertexShader = glCreateShader(GL_VERTEX_SHADER);
   glShaderSource(hVertexShader, 1, pVertexShaderSourceCode, NULL);
   glCompileShader(hVertexShader);

// Create a shader program and attach the fragment and vertex shaders to it
   hProgram = glCreateProgram();
   glAttachShader(hProgram, hFragmentShader);
   glAttachShader(hProgram, hVertexShader);

// Link and load the new shader programs into the PowerVR SGX
   glLinkProgram(hProgram);
   glUseProgram(hProgram);

// Set pointers to geometry and other attributes and send to the vertex shader
   glVertexAttribPointer(Index, 3, GL_FLOAT, GL_TRUE, Stride, pAttributes);
   glDrawArrays(GL_TRIANGLES, 0, Count);


                                                                                 39
GPU = Graphics Processing Unit
   Pipelining
                                                      1   2   3
     Number      of stages


   Parallelism                                           1

                                                          2
     Number      of parallel processes                   3



   Parallelism + pipelining
                                                      1   2   3
     Number      of parallel pipelines               1   2   3
   Operates on 4 tuples
                                                      1   2   3
     – Position     ( x, y, z, w )
     – Color( red, green, blue, alpha )
     – Texture Coordinates           ( s, t, r, q )
4 tuple ops, 1 clock cycle
         SIMD [ Single Instruction Multiple Data ]
Reyes(scanline,polygon)   Raytracing




  Optimized by SIMD




                          Hard to be optimized by SIMD
                            Computing dependency
                          Dynamic fast-paths required
Specialize         color space convertion takes lots of time.
                   BGRA 444R → RGBA 8888
Technique




 Speedup depends on src/dest format:
 – 5.4x speedup on average, 19.3x max
 speedup: (13.3MB/s to 257.7MB/s)
LLVM = Low Level Virtual Machine
Mandelbort is optimized through LLVM JIT up to 11x.
Android OpenGL|ES
Android SurfaceFlinger
   Properties
        Can combine 2D/3D surfaces and surfaces from multiple applications
        Surfaces passed as buffers via Binder IPC calls
        Can use OpenGL ES and 2D hardware accelerator for its compositions
             Double-buffering using page-flip
UI Element            GLSurfaceView                 javax .microedition .khronos .opengles

View and Canvas → Surface
View and Canvas → Surface

                              android. view. View                                          com.google.android.gles_jni



                             android. view. Surface          android graphics. Canvas
                                                                    .
   Java Graphics   JAVA
  is implemented Framework
       via JNI     Native
                 Framework           Surface JNI                    Graphic JNI                  OpenGL JNI




                             SurfaceFlinger                              skia                    OpenGL|ES
      Libui +
       Libui +
 SurfaceFlinger +
 SurfaceFlinger +
  libpixelflinger
   libpixelflinger           libui
                               Overlay     Camera       Surface     Key / Event   format         EglWindows




                                                                                           libpixelflinger
                             FrameBuffer                   Event Input
                                Driver                       Driver
PixelFlinger : software renderer
• Render functions: pointx, linex, recti, trianglex
• Texture and color buffer: activeTexture, bindTexture,
  colorBuffer, readBuffer, depthBuffer, BindTextureLod
• …
• Device framebuffer functions: copyPixels,
  rasterPos2x, rasterPos2i
• Optimizer: codeflinger (JIT assembler)



 I/SurfaceFlinger( 1931): OpenGL informations:

 I/SurfaceFlinger( 1931): vendor    : Android

 I/SurfaceFlinger( 1931): renderer : Android PixelFlinger 1.2

 I/SurfaceFlinger( 1931): version   : OpenGL ES­CM 1.0
GGLAssembler –
GGLAssembler –
codeflinger's JIT Assembler
codeflinger's JIT Assembler
commit 77cadd2ffada95bb3279552e1a29f4bcf4012228
                       commit 77cadd2ffada95bb3279552e1a29f4bcf4012228
                       Author: Jim Huang <jserv@0xlab.org>
                       Author: Jim Huang <jserv@0xlab.org>
                       Date:   Wed Jan 13 01:01:18 2010 +0800
                       Date:   Wed Jan 13 01:01:18 2010 +0800

                           [libpixelflinger] Adds UXTB16 support to Pixelflinger
                           [libpixelflinger] Adds UXTB16 support to Pixelflinger
                           ...
                           ...
                           Uses UXTB16 to extract channels for SIMD operations, rather than creating and
                           Uses UXTB16 to extract channels for SIMD operations, rather than creating and
                           ANDing with masks. Saves a register and is faster on A8, as UXTB16 result can
                           ANDing with masks. Saves a register and is faster on A8, as UXTB16 result can
                           feed into first stage of multiply, unlike AND.
                           feed into first stage of multiply, unlike AND.
                           
                           
                           Also, used SMULWB rather than SMULBB, which allows removal of MOVs used to
                           Also, used SMULWB rather than SMULBB, which allows removal of MOVs used to
                           rescale results.
                           rescale results.
                           
                           
                           Code has been scheduled for A8 pipeline, specifically aiming to allow
                           Code has been scheduled for A8 pipeline, specifically aiming to allow
                           multiplies to issue in pipeline 0, for efficient dual issue operation.
                           multiplies to issue in pipeline 0, for efficient dual issue operation.
                           
                           
                           Testing on SpriteMethodTest (http://code.google.com/p/apps­for­android/) gives
                           Testing on SpriteMethodTest (http://code.google.com/p/apps­for­android/) gives
                           8% improvement (12.7 vs. 13.7 fps.)
                           8% improvement (12.7 vs. 13.7 fps.)




libpixelflinger/codeflinger/ARMAssembler.cpp
libpixelflinger/codeflinger/ARMAssembler.cpp
@@ ­424,5 +424,15 @@ void ARMAssembler::SMLAW(int cc, int y,
@@ ­424,5 +424,15 @@ void ARMAssembler::SMLAW(int cc, int y,
     *mPC++ = (cc<<28) | 0x1200080 | (Rd<<16) | (Rn<<12) | (Rs<<8) | (y<<4) | Rm;
     *mPC++ = (cc<<28) | 0x1200080 | (Rd<<16) | (Rn<<12) | (Rs<<8) | (y<<4) | Rm;
 }
 }
 
 
+#if 0
+#if 0
+#pragma mark ­
+#pragma mark ­
+#pragma mark Byte/half word extract and extend (ARMv6+ only)...
+#pragma mark Byte/half word extract and extend (ARMv6+ only)...
+#endif
+#endif
+
+
+void ARMAssembler::UXTB16(int cc, int Rd, int Rm, int rotate)
+void ARMAssembler::UXTB16(int cc, int Rd, int Rm, int rotate)
+{
+{
+    *mPC++ = (cc<<28) | 0x6CF0070 | (Rd<<12) | ((rotate >> 3) << 10) | Rm;
+    *mPC++ = (cc<<28) | 0x6CF0070 | (Rd<<12) | ((rotate >> 3) << 10) | Rm;   opcode
+}
+}
+
+
 }; // namespace android
 }; // namespace android
 
 
libpixelflinger/codeflinger/ARMAssemblerProxy.cpp
libpixelflinger/codeflinger/ARMAssemblerProxy.cpp
@@ ­195,6 +195,10 @@ void ARMAssemblerProxy::SMLAW(int cc, int y, int Rd, int Rm, int Rs, int Rn) {
@@ ­195,6 +195,10 @@ void ARMAssemblerProxy::SMLAW(int cc, int y, int Rd, int Rm, int Rs, int Rn) {
     mTarget­>SMLAW(cc, y, Rd, Rm, Rs, Rn);
     mTarget­>SMLAW(cc, y, Rd, Rm, Rs, Rn);
 }
 }
 
 
+void ARMAssemblerProxy::UXTB16(int cc, int Rd, int Rm, int rotate) {
+void ARMAssemblerProxy::UXTB16(int cc, int Rd, int Rm, int rotate) {
+    mTarget­>UXTB16(cc, Rd, Rm, rotate);
+    mTarget­>UXTB16(cc, Rd, Rm, rotate);
+}
+}
+
+
 
 
 }; // namespace android
 }; // namespace android
 
 




                        libpixelflinger/codeflinger/texturing.cpp
                        libpixelflinger/codeflinger/texturing.cpp

                        @@ ­868,6 +869,106 @@ void GGLAssembler::filter24(
                        @@ ­868,6 +869,106 @@ void GGLAssembler::filter24(
                             load(txPtr, texel, 0);
                             load(txPtr, texel, 0);
                         }
                         }
                         
                         
                        +#if __ARM_ARCH__ >= 6
                        +#if __ARM_ARCH__ >= 6
                        +// ARMv6 version, using UXTB16, and scheduled for Cortex­A8 pipeline
                        +// ARMv6 version, using UXTB16, and scheduled for Cortex­A8 pipeline
                        +void GGLAssembler::filter32(
                        +void GGLAssembler::filter32(
                        +        const fragment_parts_t& parts,
                        +        const fragment_parts_t& parts,
                        +        pixel_t& texel, const texture_unit_t& tmu,
                        +        pixel_t& texel, const texture_unit_t& tmu,
                        +        int U, int V, pointer_t& txPtr,
                        +        int U, int V, pointer_t& txPtr,
                        +        int FRAC_BITS)
                        +        int FRAC_BITS)
                        +{
                        +{
                        ...
                        ...

                        +    UXTB16(AL, temp, pixel, 0);
                        +    UXTB16(AL, temp, pixel, 0);
                                                                           Reimplement filter32()
                        +    if (round) {
                        +    if (round) {
                        +        ADD(AL, 0, u, u, imm(1<<(adjust­1)));
                        +        ADD(AL, 0, u, u, imm(1<<(adjust­1)));
                        +        MOV(AL, 0, u, reg_imm(u, LSR, adjust));
                        +        MOV(AL, 0, u, reg_imm(u, LSR, adjust));
                        +    }
                                                                           In optimized ASM
                        +    }
                        +    LDR(AL, pixellb, txPtr.reg, reg_scale_pre(offsetlb));
                        +    LDR(AL, pixellb, txPtr.reg, reg_scale_pre(offsetlb));
                        +    MUL(AL, 0, dh, temp, u);
                        +    MUL(AL, 0, dh, temp, u);
                        +    UXTB16(AL, temp, pixel, 8);
                        +    UXTB16(AL, temp, pixel, 8);
                        +    MUL(AL, 0, dl, temp, u);
                        +    MUL(AL, 0, dl, temp, u);
                        +    RSB(AL, 0, k, u, imm(0x100));
                        +    RSB(AL, 0, k, u, imm(0x100));
                        ...
                        ...
                        +#else
                        +#else
                         void GGLAssembler::filter32(
                         void GGLAssembler::filter32(
                                 const fragment_parts_t& parts,
                                 const fragment_parts_t& parts,
                                 pixel_t& texel, const texture_unit_t& tmu,
                                 pixel_t& texel, const texture_unit_t& tmu,
Operating System

Applied in Telephony
RIL → Telephony
 Radio   Interface Layer(RIL)
     HAL  Android TelephonyManager  baseband modem
     Voice, Data, SMS, SIM, SIMToolkit
     Android RIL  AT command
 RIL   API
     Android follows GSM TS 27.007 standard
 RIL   implementation
     Qualcomm supports CDMA &
      CDMA-GSM Multi-mode
OS Kernels




    Monolithic Kernel                        Micro Kernel
Traditional UNIX, Linux, …               Mach, L4, Symbian OS




                             Exokernel
L4 Microkernel

• Developed by Jochen Liedtke in 1995.
  – German National Research Center for IT
• Developed from scratch
• 2nd generation microkernel
• Small and Fast Kernel
   – 7 system calls
   – 12KB
• In November 2005, NICTA announced that
  Qualcomm was deploying NICTA's L4 version
  on their Mobile Station Modem chipsets.
Pipes and RPC
Communications
                             Processor
                                               L4 Interrupt Handler
                                                -> Send Message

                           L4 microkernel


                                                    RPC
                                System-
                  Server          call
                                Handler

                                         RPC                          Interrupt
            RPC
                                                           RT task
                      Requests from
Shared Memory      Application Processor
                         to Modem
Virtual Machine

Applied in Database
sqlite3_prepare()
/*
** Compile the UTF­8 encoded SQL statement zSql into a statement handle.
*/
int sqlite3_prepare(
  sqlite3 *db,            /* Database handle. */
  const char *zSql,       /* UTF­8 encoded SQL statement. */
  int nBytes,             /* Length of zSql in bytes. */
  sqlite3_stmt **ppStmt,  /* OUT: A pointer to the prepared                         
        statement */
  const char** pzTail     /* OUT: End of parsed string */
)
{
...
      sqlite3VdbeSetNumCols(sParse.pVdbe, 5);
      sqlite3VdbeSetColName(sParse.pVdbe, 0, COLNAME_NAME, "addr", P3_STATIC);
      sqlite3VdbeSetColName(sParse.pVdbe, 1, COLNAME_NAME, "opcode", P3_STATIC);
      sqlite3VdbeSetColName(sParse.pVdbe, 2, COLNAME_NAME, "p1", P3_STATIC);
      sqlite3VdbeSetColName(sParse.pVdbe, 3, COLNAME_NAME, "p2", P3_STATIC);
      sqlite3VdbeSetColName(sParse.pVdbe, 4, COLNAME_NAME, "p3", P3_STATIC);
…
                                                              Opcode!


                 SQLite Virtual Machine (VDBE)                                     61
…And what about other platforms?

The concept can be applied to all VM platforms

Application virtual machines (short list)
  .NET (CLR)
  Java Virtual Machine (JVM)
  Dalvik virtual machine (Google Android)
  PHP (Zend Engine)
  Flash Player / AIR - ActionScript Virtual Machine (AVM)
  SQLite virtual machine (VDBE; Virtual DataBase Engine)
  Perl virtual machine
Inspiration
Inspiration

• Computer science concepts are applied
  everywhere in Android software stack.
• Essential system software brings the further
  optimizations and feasibility of new technologies.
• Advanced compiler techniques are already
  applied in every domain
• Best Practice in Android
http://0xlab.org

Contenu connexe

Tendances

Project meeting: Android Graphics Architecture Overview
Project meeting: Android Graphics Architecture OverviewProject meeting: Android Graphics Architecture Overview
Project meeting: Android Graphics Architecture OverviewYu-Hsin Hung
 
Inside Android's UI
Inside Android's UIInside Android's UI
Inside Android's UIOpersys inc.
 
The Android graphics path, in depth
The Android graphics path, in depthThe Android graphics path, in depth
The Android graphics path, in depthChris Simmonds
 
Understaing Android EGL
Understaing Android EGLUnderstaing Android EGL
Understaing Android EGLSuhan Lee
 
Understanding the Android System Server
Understanding the Android System ServerUnderstanding the Android System Server
Understanding the Android System ServerOpersys inc.
 
Learning AOSP - Android Booting Process
Learning AOSP - Android Booting ProcessLearning AOSP - Android Booting Process
Learning AOSP - Android Booting ProcessNanik Tolaram
 
Using and Customizing the Android Framework / part 4 of Embedded Android Work...
Using and Customizing the Android Framework / part 4 of Embedded Android Work...Using and Customizing the Android Framework / part 4 of Embedded Android Work...
Using and Customizing the Android Framework / part 4 of Embedded Android Work...Opersys inc.
 
BKK16-315 Graphics Stack Update
BKK16-315 Graphics Stack UpdateBKK16-315 Graphics Stack Update
BKK16-315 Graphics Stack UpdateLinaro
 
Inter-process communication of Android
Inter-process communication of AndroidInter-process communication of Android
Inter-process communication of AndroidTetsuyuki Kobayashi
 
Android Camera Architecture
Android Camera ArchitectureAndroid Camera Architecture
Android Camera ArchitecturePicker Weng
 
Android's HIDL: Treble in the HAL
Android's HIDL: Treble in the HALAndroid's HIDL: Treble in the HAL
Android's HIDL: Treble in the HALOpersys inc.
 
Android device driver structure introduction
Android device driver structure introductionAndroid device driver structure introduction
Android device driver structure introductionWilliam Liang
 
Android Booting Sequence
Android Booting SequenceAndroid Booting Sequence
Android Booting SequenceJayanta Ghoshal
 
Android Boot Time Optimization
Android Boot Time OptimizationAndroid Boot Time Optimization
Android Boot Time OptimizationKan-Ru Chen
 
Android internals 07 - Android graphics (rev_1.1)
Android internals 07 - Android graphics (rev_1.1)Android internals 07 - Android graphics (rev_1.1)
Android internals 07 - Android graphics (rev_1.1)Egor Elizarov
 

Tendances (20)

Project meeting: Android Graphics Architecture Overview
Project meeting: Android Graphics Architecture OverviewProject meeting: Android Graphics Architecture Overview
Project meeting: Android Graphics Architecture Overview
 
Inside Android's UI
Inside Android's UIInside Android's UI
Inside Android's UI
 
Design and Concepts of Android Graphics
Design and Concepts of Android GraphicsDesign and Concepts of Android Graphics
Design and Concepts of Android Graphics
 
The Android graphics path, in depth
The Android graphics path, in depthThe Android graphics path, in depth
The Android graphics path, in depth
 
Explore Android Internals
Explore Android InternalsExplore Android Internals
Explore Android Internals
 
Understaing Android EGL
Understaing Android EGLUnderstaing Android EGL
Understaing Android EGL
 
Understanding the Android System Server
Understanding the Android System ServerUnderstanding the Android System Server
Understanding the Android System Server
 
Learning AOSP - Android Booting Process
Learning AOSP - Android Booting ProcessLearning AOSP - Android Booting Process
Learning AOSP - Android Booting Process
 
Binder: Android IPC
Binder: Android IPCBinder: Android IPC
Binder: Android IPC
 
Using and Customizing the Android Framework / part 4 of Embedded Android Work...
Using and Customizing the Android Framework / part 4 of Embedded Android Work...Using and Customizing the Android Framework / part 4 of Embedded Android Work...
Using and Customizing the Android Framework / part 4 of Embedded Android Work...
 
Embedded Android : System Development - Part II (HAL)
Embedded Android : System Development - Part II (HAL)Embedded Android : System Development - Part II (HAL)
Embedded Android : System Development - Part II (HAL)
 
BKK16-315 Graphics Stack Update
BKK16-315 Graphics Stack UpdateBKK16-315 Graphics Stack Update
BKK16-315 Graphics Stack Update
 
Inter-process communication of Android
Inter-process communication of AndroidInter-process communication of Android
Inter-process communication of Android
 
Android Camera Architecture
Android Camera ArchitectureAndroid Camera Architecture
Android Camera Architecture
 
Practice of Android Reverse Engineering
Practice of Android Reverse EngineeringPractice of Android Reverse Engineering
Practice of Android Reverse Engineering
 
Android's HIDL: Treble in the HAL
Android's HIDL: Treble in the HALAndroid's HIDL: Treble in the HAL
Android's HIDL: Treble in the HAL
 
Android device driver structure introduction
Android device driver structure introductionAndroid device driver structure introduction
Android device driver structure introduction
 
Android Booting Sequence
Android Booting SequenceAndroid Booting Sequence
Android Booting Sequence
 
Android Boot Time Optimization
Android Boot Time OptimizationAndroid Boot Time Optimization
Android Boot Time Optimization
 
Android internals 07 - Android graphics (rev_1.1)
Android internals 07 - Android graphics (rev_1.1)Android internals 07 - Android graphics (rev_1.1)
Android internals 07 - Android graphics (rev_1.1)
 

En vedette

Yet Another Android Rootkit
Yet Another Android RootkitYet Another Android Rootkit
Yet Another Android RootkitFFRI, Inc.
 
Computer Graphics
Computer GraphicsComputer Graphics
Computer GraphicsKodai Takao
 
An HCI Principles based Framework to Support Deaf Community
An HCI Principles based Framework to Support Deaf CommunityAn HCI Principles based Framework to Support Deaf Community
An HCI Principles based Framework to Support Deaf CommunityIJEACS
 
Inside Android's Dalvik VM - NEJUG Nov 2011
Inside Android's Dalvik VM - NEJUG Nov 2011Inside Android's Dalvik VM - NEJUG Nov 2011
Inside Android's Dalvik VM - NEJUG Nov 2011Doug Hawkins
 
OpenGL Introduction
OpenGL IntroductionOpenGL Introduction
OpenGL IntroductionYi-Lung Tsai
 
Computer science ppt
Computer science pptComputer science ppt
Computer science pptbrijesh kumar
 
Computer Science Engineering - Better Career Opportunities
Computer Science Engineering - Better Career OpportunitiesComputer Science Engineering - Better Career Opportunities
Computer Science Engineering - Better Career Opportunitiesachaljain11
 
Basics of computer science
Basics of computer scienceBasics of computer science
Basics of computer sciencePaul Schmidt
 
Computer Science & Information Systems
Computer Science & Information SystemsComputer Science & Information Systems
Computer Science & Information SystemsLuis Borges Gouveia
 
Uses of computer in various fields
Uses of computer in various fieldsUses of computer in various fields
Uses of computer in various fieldsDivyanshu Gupta
 
Application Of Computers
Application Of ComputersApplication Of Computers
Application Of ComputersLUZ PINGOL
 
Introduction to computer science
Introduction to computer scienceIntroduction to computer science
Introduction to computer sciencederekoei
 

En vedette (15)

Yet Another Android Rootkit
Yet Another Android RootkitYet Another Android Rootkit
Yet Another Android Rootkit
 
Computer Graphics
Computer GraphicsComputer Graphics
Computer Graphics
 
An HCI Principles based Framework to Support Deaf Community
An HCI Principles based Framework to Support Deaf CommunityAn HCI Principles based Framework to Support Deaf Community
An HCI Principles based Framework to Support Deaf Community
 
Inside Android's Dalvik VM - NEJUG Nov 2011
Inside Android's Dalvik VM - NEJUG Nov 2011Inside Android's Dalvik VM - NEJUG Nov 2011
Inside Android's Dalvik VM - NEJUG Nov 2011
 
OpenGL Introduction
OpenGL IntroductionOpenGL Introduction
OpenGL Introduction
 
Computer science
Computer scienceComputer science
Computer science
 
Computer science ppt
Computer science pptComputer science ppt
Computer science ppt
 
Computer Science Engineering - Better Career Opportunities
Computer Science Engineering - Better Career OpportunitiesComputer Science Engineering - Better Career Opportunities
Computer Science Engineering - Better Career Opportunities
 
Basics of computer science
Basics of computer scienceBasics of computer science
Basics of computer science
 
10 Myths for Computer Science
10 Myths for Computer Science10 Myths for Computer Science
10 Myths for Computer Science
 
Computer Science & Information Systems
Computer Science & Information SystemsComputer Science & Information Systems
Computer Science & Information Systems
 
Uses of computer in various fields
Uses of computer in various fieldsUses of computer in various fields
Uses of computer in various fields
 
Making Linux do Hard Real-time
Making Linux do Hard Real-timeMaking Linux do Hard Real-time
Making Linux do Hard Real-time
 
Application Of Computers
Application Of ComputersApplication Of Computers
Application Of Computers
 
Introduction to computer science
Introduction to computer scienceIntroduction to computer science
Introduction to computer science
 

Similaire à Applied Computer Science Concepts in Android

Develop Community-based Android Distribution and Upstreaming Experience
Develop Community-based Android Distribution and Upstreaming Experience Develop Community-based Android Distribution and Upstreaming Experience
Develop Community-based Android Distribution and Upstreaming Experience National Cheng Kung University
 
Introduction to Android App Development
Introduction to Android App DevelopmentIntroduction to Android App Development
Introduction to Android App DevelopmentAndri Yadi
 
Build Community Android Distribution and Ensure the Quality
Build Community Android Distribution and Ensure the QualityBuild Community Android Distribution and Ensure the Quality
Build Community Android Distribution and Ensure the QualityNational Cheng Kung University
 
Eclispe daytoulouse combining the power of eclipse with android_fr_1024_768_s...
Eclispe daytoulouse combining the power of eclipse with android_fr_1024_768_s...Eclispe daytoulouse combining the power of eclipse with android_fr_1024_768_s...
Eclispe daytoulouse combining the power of eclipse with android_fr_1024_768_s...Mathias Seguy
 
Linux on System z Update: Current & Future Linux on System z Technology
Linux on System z Update: Current & Future Linux on System z TechnologyLinux on System z Update: Current & Future Linux on System z Technology
Linux on System z Update: Current & Future Linux on System z TechnologyIBM India Smarter Computing
 
Deep Dive Into Android Security
Deep Dive Into Android SecurityDeep Dive Into Android Security
Deep Dive Into Android SecurityMarakana Inc.
 
Android. behind the scenes_programatica 2012
Android. behind the scenes_programatica 2012Android. behind the scenes_programatica 2012
Android. behind the scenes_programatica 2012Agora Group
 
Profiling Multicore Systems to Maximize Core Utilization
Profiling Multicore Systems to Maximize Core Utilization Profiling Multicore Systems to Maximize Core Utilization
Profiling Multicore Systems to Maximize Core Utilization mentoresd
 
Android containerization in brief
Android containerization in briefAndroid containerization in brief
Android containerization in briefPo-wen Cheng
 
Droidcon 2011: Gingerbread and honeycomb, Markus Junginger, Greenrobot
Droidcon 2011: Gingerbread and honeycomb, Markus Junginger,  GreenrobotDroidcon 2011: Gingerbread and honeycomb, Markus Junginger,  Greenrobot
Droidcon 2011: Gingerbread and honeycomb, Markus Junginger, GreenrobotDroidcon Berlin
 
Introduction to Android- A session by Sagar Das
Introduction to Android-  A session by Sagar DasIntroduction to Android-  A session by Sagar Das
Introduction to Android- A session by Sagar Dasdscfetju
 

Similaire à Applied Computer Science Concepts in Android (20)

Improve Android System Component Performance
Improve Android System Component PerformanceImprove Android System Component Performance
Improve Android System Component Performance
 
Android Optimization: Myth and Reality
Android Optimization: Myth and RealityAndroid Optimization: Myth and Reality
Android Optimization: Myth and Reality
 
Develop Community-based Android Distribution and Upstreaming Experience
Develop Community-based Android Distribution and Upstreaming Experience Develop Community-based Android Distribution and Upstreaming Experience
Develop Community-based Android Distribution and Upstreaming Experience
 
Introduction to Android App Development
Introduction to Android App DevelopmentIntroduction to Android App Development
Introduction to Android App Development
 
Build Community Android Distribution and Ensure the Quality
Build Community Android Distribution and Ensure the QualityBuild Community Android Distribution and Ensure the Quality
Build Community Android Distribution and Ensure the Quality
 
Eclispe daytoulouse combining the power of eclipse with android_fr_1024_768_s...
Eclispe daytoulouse combining the power of eclipse with android_fr_1024_768_s...Eclispe daytoulouse combining the power of eclipse with android_fr_1024_768_s...
Eclispe daytoulouse combining the power of eclipse with android_fr_1024_768_s...
 
Efficient Android Threading
Efficient Android ThreadingEfficient Android Threading
Efficient Android Threading
 
What’s New ?Linux on System z
What’s New ?Linux on System zWhat’s New ?Linux on System z
What’s New ?Linux on System z
 
Linux on System z Update: Current & Future Linux on System z Technology
Linux on System z Update: Current & Future Linux on System z TechnologyLinux on System z Update: Current & Future Linux on System z Technology
Linux on System z Update: Current & Future Linux on System z Technology
 
Deep Dive Into Android Security
Deep Dive Into Android SecurityDeep Dive Into Android Security
Deep Dive Into Android Security
 
Guides To Analyzing WebKit Performance
Guides To Analyzing WebKit PerformanceGuides To Analyzing WebKit Performance
Guides To Analyzing WebKit Performance
 
Android. behind the scenes_programatica 2012
Android. behind the scenes_programatica 2012Android. behind the scenes_programatica 2012
Android. behind the scenes_programatica 2012
 
Android session-1-sajib
Android session-1-sajibAndroid session-1-sajib
Android session-1-sajib
 
Profiling Multicore Systems to Maximize Core Utilization
Profiling Multicore Systems to Maximize Core Utilization Profiling Multicore Systems to Maximize Core Utilization
Profiling Multicore Systems to Maximize Core Utilization
 
Android containerization in brief
Android containerization in briefAndroid containerization in brief
Android containerization in brief
 
Android ppt
Android pptAndroid ppt
Android ppt
 
Droidcon 2011: Gingerbread and honeycomb, Markus Junginger, Greenrobot
Droidcon 2011: Gingerbread and honeycomb, Markus Junginger,  GreenrobotDroidcon 2011: Gingerbread and honeycomb, Markus Junginger,  Greenrobot
Droidcon 2011: Gingerbread and honeycomb, Markus Junginger, Greenrobot
 
Android101
Android101Android101
Android101
 
Android Internals
Android InternalsAndroid Internals
Android Internals
 
Introduction to Android- A session by Sagar Das
Introduction to Android-  A session by Sagar DasIntroduction to Android-  A session by Sagar Das
Introduction to Android- A session by Sagar Das
 

Plus de National Cheng Kung University

PyPy's approach to construct domain-specific language runtime
PyPy's approach to construct domain-specific language runtimePyPy's approach to construct domain-specific language runtime
PyPy's approach to construct domain-specific language runtimeNational Cheng Kung University
 
進階嵌入式作業系統設計與實做 (2015 年秋季 ) 課程說明
進階嵌入式作業系統設計與實做 (2015 年秋季 ) 課程說明進階嵌入式作業系統設計與實做 (2015 年秋季 ) 課程說明
進階嵌入式作業系統設計與實做 (2015 年秋季 ) 課程說明National Cheng Kung University
 
給自己更好未來的 3 個練習:嵌入式作業系統設計、實做,與移植 (2015 年春季 ) 課程說明
給自己更好未來的 3 個練習:嵌入式作業系統設計、實做,與移植 (2015 年春季 ) 課程說明給自己更好未來的 3 個練習:嵌入式作業系統設計、實做,與移植 (2015 年春季 ) 課程說明
給自己更好未來的 3 個練習:嵌入式作業系統設計、實做,與移植 (2015 年春季 ) 課程說明National Cheng Kung University
 
進階嵌入式系統開發與實做 (2014 年秋季 ) 課程說明
進階嵌入式系統開發與實做 (2014 年秋季 ) 課程說明進階嵌入式系統開發與實做 (2014 年秋季 ) 課程說明
進階嵌入式系統開發與實做 (2014 年秋季 ) 課程說明National Cheng Kung University
 
Develop Your Own Operating Systems using Cheap ARM Boards
Develop Your Own Operating Systems using Cheap ARM BoardsDevelop Your Own Operating Systems using Cheap ARM Boards
Develop Your Own Operating Systems using Cheap ARM BoardsNational Cheng Kung University
 
Lecture notice about Embedded Operating System Design and Implementation
Lecture notice about Embedded Operating System Design and ImplementationLecture notice about Embedded Operating System Design and Implementation
Lecture notice about Embedded Operating System Design and ImplementationNational Cheng Kung University
 
中輟生談教育: 完全用開放原始碼軟體進行 嵌入式系統教學
中輟生談教育: 完全用開放原始碼軟體進行 嵌入式系統教學中輟生談教育: 完全用開放原始碼軟體進行 嵌入式系統教學
中輟生談教育: 完全用開放原始碼軟體進行 嵌入式系統教學National Cheng Kung University
 
F9: A Secure and Efficient Microkernel Built for Deeply Embedded Systems
F9: A Secure and Efficient Microkernel Built for Deeply Embedded SystemsF9: A Secure and Efficient Microkernel Built for Deeply Embedded Systems
F9: A Secure and Efficient Microkernel Built for Deeply Embedded SystemsNational Cheng Kung University
 

Plus de National Cheng Kung University (20)

PyPy's approach to construct domain-specific language runtime
PyPy's approach to construct domain-specific language runtimePyPy's approach to construct domain-specific language runtime
PyPy's approach to construct domain-specific language runtime
 
Making Linux do Hard Real-time
Making Linux do Hard Real-timeMaking Linux do Hard Real-time
Making Linux do Hard Real-time
 
2016 年春季嵌入式作業系統課程說明
2016 年春季嵌入式作業系統課程說明2016 年春季嵌入式作業系統課程說明
2016 年春季嵌入式作業系統課程說明
 
Interpreter, Compiler, JIT from scratch
Interpreter, Compiler, JIT from scratchInterpreter, Compiler, JIT from scratch
Interpreter, Compiler, JIT from scratch
 
進階嵌入式作業系統設計與實做 (2015 年秋季 ) 課程說明
進階嵌入式作業系統設計與實做 (2015 年秋季 ) 課程說明進階嵌入式作業系統設計與實做 (2015 年秋季 ) 課程說明
進階嵌入式作業系統設計與實做 (2015 年秋季 ) 課程說明
 
Construct an Efficient and Secure Microkernel for IoT
Construct an Efficient and Secure Microkernel for IoTConstruct an Efficient and Secure Microkernel for IoT
Construct an Efficient and Secure Microkernel for IoT
 
The Internals of "Hello World" Program
The Internals of "Hello World" ProgramThe Internals of "Hello World" Program
The Internals of "Hello World" Program
 
How A Compiler Works: GNU Toolchain
How A Compiler Works: GNU ToolchainHow A Compiler Works: GNU Toolchain
How A Compiler Works: GNU Toolchain
 
Virtual Machine Constructions for Dummies
Virtual Machine Constructions for DummiesVirtual Machine Constructions for Dummies
Virtual Machine Constructions for Dummies
 
給自己更好未來的 3 個練習:嵌入式作業系統設計、實做,與移植 (2015 年春季 ) 課程說明
給自己更好未來的 3 個練習:嵌入式作業系統設計、實做,與移植 (2015 年春季 ) 課程說明給自己更好未來的 3 個練習:嵌入式作業系統設計、實做,與移植 (2015 年春季 ) 課程說明
給自己更好未來的 3 個練習:嵌入式作業系統設計、實做,與移植 (2015 年春季 ) 課程說明
 
從線上售票看作業系統設計議題
從線上售票看作業系統設計議題從線上售票看作業系統設計議題
從線上售票看作業系統設計議題
 
進階嵌入式系統開發與實做 (2014 年秋季 ) 課程說明
進階嵌入式系統開發與實做 (2014 年秋季 ) 課程說明進階嵌入式系統開發與實做 (2014 年秋季 ) 課程說明
進階嵌入式系統開發與實做 (2014 年秋季 ) 課程說明
 
Xvisor: embedded and lightweight hypervisor
Xvisor: embedded and lightweight hypervisorXvisor: embedded and lightweight hypervisor
Xvisor: embedded and lightweight hypervisor
 
Implement Runtime Environments for HSA using LLVM
Implement Runtime Environments for HSA using LLVMImplement Runtime Environments for HSA using LLVM
Implement Runtime Environments for HSA using LLVM
 
Priority Inversion on Mars
Priority Inversion on MarsPriority Inversion on Mars
Priority Inversion on Mars
 
Develop Your Own Operating Systems using Cheap ARM Boards
Develop Your Own Operating Systems using Cheap ARM BoardsDevelop Your Own Operating Systems using Cheap ARM Boards
Develop Your Own Operating Systems using Cheap ARM Boards
 
Lecture notice about Embedded Operating System Design and Implementation
Lecture notice about Embedded Operating System Design and ImplementationLecture notice about Embedded Operating System Design and Implementation
Lecture notice about Embedded Operating System Design and Implementation
 
中輟生談教育: 完全用開放原始碼軟體進行 嵌入式系統教學
中輟生談教育: 完全用開放原始碼軟體進行 嵌入式系統教學中輟生談教育: 完全用開放原始碼軟體進行 嵌入式系統教學
中輟生談教育: 完全用開放原始碼軟體進行 嵌入式系統教學
 
F9: A Secure and Efficient Microkernel Built for Deeply Embedded Systems
F9: A Secure and Efficient Microkernel Built for Deeply Embedded SystemsF9: A Secure and Efficient Microkernel Built for Deeply Embedded Systems
F9: A Secure and Efficient Microkernel Built for Deeply Embedded Systems
 
Open Source from Legend, Business, to Ecosystem
Open Source from Legend, Business, to EcosystemOpen Source from Legend, Business, to Ecosystem
Open Source from Legend, Business, to Ecosystem
 

Dernier

The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 

Dernier (20)

The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 

Applied Computer Science Concepts in Android

  • 1. Applied Computer Science Concepts in Android Jim Huang ( 黃敬群 ) Developer & Co-Founder, 0xlab jserv@0xlab.org Dec 31, 2010 / CSIE, NTU
  • 2. Applied Computer Science Concepts in Android Android = A complete operating system for mobile computing, open source'd
  • 3. Rights to copy © Copyright 2010 0xlab http://0xlab.org/ contact@0xlab.org Attribution – ShareAlike 3.0 You are free Corrections, suggestions, contributions and translations are welcome! to copy, distribute, display, and perform the work to make derivative works Latest update:Dec 31, 2010 to make commercial use of the work Under the following conditions Attribution. You must give the original author credit. Share Alike. If you alter, transform, or build upon this work, you may distribute the resulting work only under a license identical to this one. For any reuse or distribution, you must make clear to others the license terms of this work. Any of these conditions can be waived if you get permission from the copyright holder. Your fair use and other rights are in no way affected by the above. License text: http://creativecommons.org/licenses/by-sa/3.0/legalcode
  • 4. Agenda (1) Android Internals (2) Compiler: 2D/3D Graphics (3) OS: Telephony (4) Virtual Machine: Database In this presentation, the unaware or indirect applications of In this presentation, the unaware or indirect applications of essential computer science concepts are dicussed as showcase. essential computer science concepts are dicussed as showcase.
  • 5. Android Internals … or, the low-level parts ...
  • 6. Android Internals • Android Low-Level system – Architecture View – Everything from “Zygote” – Key design concepts in Android – System components • Hardware Abstraction Layer (HAL) – GPS, RIL, Graphics (2D/3D), ...
  • 7. Android Low-level system • Architecture • Everything from “Zygote” • Key design concepts in Android
  • 8. Android Low-Level System [ Architecture ]
  • 9. GNU/Linux vs. Android Linux Android
  • 10. Android = (patched) Linux Kernel + special user-space
  • 11. Functional View Applications Gallery Phone Web Browser Google Maps ・・・・・ Android Framework Activity Window Content Notification View System Manager Manager Manager Manager Package Telephony Resource Location Manager Manager Manager Manager System Library Android Runtime SurfaceFlinger OpenCORE SQLite Class Library Dalvik Virtual Machine OpenGL|ES AudioFlinger WebKit Skia OpenSSL bionic libc Freetype Linux Kernel
  • 12. Android Low-Level System [ Everything from Zygote ]
  • 13. Android Boot Sequence Low level initialization High level perspective (Android specific) ARM based Initialization process Target Board /etc/init.rc Android bootloader Start Android Service USB loader console adbd service manager Load Linux mountd debuggerd zygote mediaserver installd Start kernel flash_recovery - /init/main.c
  • 14. Process View User-space:: process Process PID : 1 PPID : 2 1 PPID : 0 spawn spawn (fork+exec) (fork+exec) Process Process Process spawn (fork+exec) PPID : 3 PID : 2 PID : 3 PPID : 1 PPID : 1 2 Process Process PID : 4 PID : 5 PPID : 2 PPID : 3 3 4 fork() 5 Copy on Write
  • 17. Android Low-Level System [ Key Design Concepts ]
  • 20. Activity state transition Task 1 Home Activity1 Activity2 Activity3 1 2 3 Home Back Key Key Home Activity4 Activity5 Activity6 4 5 6 Task 2
  • 21. Activity life cycle • Entire lifetime • Visible lifetime • Foreground lifetime
  • 22. Services Activity Activity Service Invoking specific service (provided by Media server) Home or Activity1 Back Activity2
  • 23. Broadcast Receivers Components Components Receiver Broadcast SMS_RECEIVED Intent SMS_RECEIVED
  • 24. Content Providers Components Content Providers Interface Content Provider Class Components   A Preferences Content Resolver Files Components   B SQLite(DB) Content Resolver Network Content Providers, Intents, Resolver
  • 25. Components Intent Components Activity Activity Context.startActivity() (Intents) or Activity.startActivityForResult() Service Context.startService() Context.bindService() or Broadcast Broadcast Context.sendBroadcast() Context.sendOrderedBroadcast() System Context.sendStickyBroadcast() 3 manifest Components 2 ActivityManager Class A Components Service Intent Intent 5 to class A 1 To Class A <class list> … class A 4 …
  • 26. Android Services in Action Content Telephony Bluetooth Connectivity Location Manager Service Service Service Manager Window Activity Package Power … Manager Manager Manager Manager Add Service Service Audio Flinger Add Service Manager daemons Surface Service Flinger usbd Manager adbd System runtime Server debuggerd rild Init Zygote Dalvik VM Kernel Android Service Linux Kernel Dalvik Framework
  • 27. IPC: Binder(1)  Binder in Action  A pool of threads is associated to each service application to process incoming IPC (Inter-Process Communication).  Binder performs mapping of object between two processes.  Binder uses an object reference as an address in a process’s memory space.  Synchronous call, reference couting
  • 29. Understanding • Essential components – Compiler: Java – Virtual Machine: Dalvik – OS: Linux Kernel SSA form • Anything else?
  • 30.
  • 32. OpenGL Anywhere ARM® PowerVR Cortex™- A8 SGX with NEON VFP Graphics C64x+ Other Display Peripherals Subsystem DSP
  • 33. OpenGL Graphics Pipeline State Variables Front Buffer Geometry Fragment Pipeline Pipeline Camera Position Light Sources F Etc. C G E D Back Buffer A C GL_TRIANGLES A B B GL_TRIANLE_FAN A C E F B D Texture Maps GL_TRIANGLE_STRIP
  • 35. Graphics Pipeline LOD selection Frustum Culling Application Portal Culling … Clipping VERTEX SHADER Programmable Geometry Division by w Processing Assembly Primitive Viewport transform Backface culling Scan Conversion Rasterization FRAGMENT SHADER Output Output to Device
  • 36. Vertex and Fragment Shaders ( x, y, z, w ) ( x’, y’, z’, w’ ) ( nx, ny, nz ) ( nx’, ny’, nz’ ) ( s, t, r, q ) ( s’, t’, r’, q’ ) ( r, g, b, a ) ( r’, g’, b’, a’ ) VERTEX SHADER ( x, y ) ( x, y ) ( r’, g’, b’, a’ ) ( r, g, b, a ) ( depth’ ) ( depth ) FRAGMENT SHADER
  • 37. Embedded code with no lighting OpenGL|ES • Added – Fixed-point and byte data • Retained – Vertex Transforms and Lighting (mostly) Embedded code with lighting – Multi-texturing (2D only) – Full Scene Antialiasing via Multisampling (Smooth Shaded) – Alpha blending Surface Normal Vectors
  • 38. OpenGL|ES 1.1 Example // Enable fixed-function shading (smooth or flat) glShadeModel(GL_SMOOTH); // Define the appearance of triangle surfaces glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT, fMaterialAmbient); glMaterialf(GL_FRONT_AND_BACK, GL_SHININESS, Shininess); // Define the appearance and position of a light source glLightfv(GL_LIGHT0, GL_AMBIENT, fLightAmbient); glLightModelfv(GL_LIGHT_MODEL_AMBIENT, fAmbient); glLightfv(GL_LIGHT0, GL_POSITION, fLightPosition); // Set pointers to geometry and other attributes and draw it glVertexPointer(3, GL_FLOAT, 0, Vertices); glTexCoordPointer(2, GL_FLOAT, 0, TexCoords); glNormalPointer(GL_FLOAT, 0, NormalsPerVertex); glDrawArrays(GL_TRIANGLES, 0, Count); 38
  • 39. OpenGL|ES 2.0 Example // Create a vertex shader object, load source code and compile it hVertexShader = glCreateShader(GL_VERTEX_SHADER); glShaderSource(hVertexShader, 1, pVertexShaderSourceCode, NULL); glCompileShader(hVertexShader); // Create a shader program and attach the fragment and vertex shaders to it hProgram = glCreateProgram(); glAttachShader(hProgram, hFragmentShader); glAttachShader(hProgram, hVertexShader); // Link and load the new shader programs into the PowerVR SGX glLinkProgram(hProgram); glUseProgram(hProgram); // Set pointers to geometry and other attributes and send to the vertex shader glVertexAttribPointer(Index, 3, GL_FLOAT, GL_TRUE, Stride, pAttributes); glDrawArrays(GL_TRIANGLES, 0, Count); 39
  • 40. GPU = Graphics Processing Unit  Pipelining 1 2 3  Number of stages  Parallelism 1 2  Number of parallel processes 3  Parallelism + pipelining 1 2 3  Number of parallel pipelines 1 2 3  Operates on 4 tuples 1 2 3 – Position ( x, y, z, w ) – Color( red, green, blue, alpha ) – Texture Coordinates ( s, t, r, q ) 4 tuple ops, 1 clock cycle  SIMD [ Single Instruction Multiple Data ]
  • 41. Reyes(scanline,polygon) Raytracing Optimized by SIMD Hard to be optimized by SIMD Computing dependency Dynamic fast-paths required
  • 42. Specialize color space convertion takes lots of time. BGRA 444R → RGBA 8888 Technique Speedup depends on src/dest format: – 5.4x speedup on average, 19.3x max speedup: (13.3MB/s to 257.7MB/s)
  • 43. LLVM = Low Level Virtual Machine
  • 44. Mandelbort is optimized through LLVM JIT up to 11x.
  • 46. Android SurfaceFlinger  Properties  Can combine 2D/3D surfaces and surfaces from multiple applications  Surfaces passed as buffers via Binder IPC calls  Can use OpenGL ES and 2D hardware accelerator for its compositions  Double-buffering using page-flip
  • 47.
  • 48. UI Element GLSurfaceView javax .microedition .khronos .opengles View and Canvas → Surface View and Canvas → Surface android. view. View com.google.android.gles_jni android. view. Surface android graphics. Canvas . Java Graphics JAVA is implemented Framework via JNI Native Framework Surface JNI Graphic JNI OpenGL JNI SurfaceFlinger skia OpenGL|ES Libui + Libui + SurfaceFlinger + SurfaceFlinger + libpixelflinger libpixelflinger libui Overlay Camera Surface Key / Event format EglWindows libpixelflinger FrameBuffer Event Input Driver Driver
  • 49.
  • 50. PixelFlinger : software renderer • Render functions: pointx, linex, recti, trianglex • Texture and color buffer: activeTexture, bindTexture, colorBuffer, readBuffer, depthBuffer, BindTextureLod • … • Device framebuffer functions: copyPixels, rasterPos2x, rasterPos2i • Optimizer: codeflinger (JIT assembler) I/SurfaceFlinger( 1931): OpenGL informations: I/SurfaceFlinger( 1931): vendor    : Android I/SurfaceFlinger( 1931): renderer : Android PixelFlinger 1.2 I/SurfaceFlinger( 1931): version   : OpenGL ES­CM 1.0
  • 51. GGLAssembler – GGLAssembler – codeflinger's JIT Assembler codeflinger's JIT Assembler
  • 52. commit 77cadd2ffada95bb3279552e1a29f4bcf4012228 commit 77cadd2ffada95bb3279552e1a29f4bcf4012228 Author: Jim Huang <jserv@0xlab.org> Author: Jim Huang <jserv@0xlab.org> Date:   Wed Jan 13 01:01:18 2010 +0800 Date:   Wed Jan 13 01:01:18 2010 +0800     [libpixelflinger] Adds UXTB16 support to Pixelflinger     [libpixelflinger] Adds UXTB16 support to Pixelflinger     ...     ...     Uses UXTB16 to extract channels for SIMD operations, rather than creating and     Uses UXTB16 to extract channels for SIMD operations, rather than creating and     ANDing with masks. Saves a register and is faster on A8, as UXTB16 result can     ANDing with masks. Saves a register and is faster on A8, as UXTB16 result can     feed into first stage of multiply, unlike AND.     feed into first stage of multiply, unlike AND.               Also, used SMULWB rather than SMULBB, which allows removal of MOVs used to     Also, used SMULWB rather than SMULBB, which allows removal of MOVs used to     rescale results.     rescale results.               Code has been scheduled for A8 pipeline, specifically aiming to allow     Code has been scheduled for A8 pipeline, specifically aiming to allow     multiplies to issue in pipeline 0, for efficient dual issue operation.     multiplies to issue in pipeline 0, for efficient dual issue operation.               Testing on SpriteMethodTest (http://code.google.com/p/apps­for­android/) gives     Testing on SpriteMethodTest (http://code.google.com/p/apps­for­android/) gives     8% improvement (12.7 vs. 13.7 fps.)     8% improvement (12.7 vs. 13.7 fps.) libpixelflinger/codeflinger/ARMAssembler.cpp libpixelflinger/codeflinger/ARMAssembler.cpp @@ ­424,5 +424,15 @@ void ARMAssembler::SMLAW(int cc, int y, @@ ­424,5 +424,15 @@ void ARMAssembler::SMLAW(int cc, int y,      *mPC++ = (cc<<28) | 0x1200080 | (Rd<<16) | (Rn<<12) | (Rs<<8) | (y<<4) | Rm;      *mPC++ = (cc<<28) | 0x1200080 | (Rd<<16) | (Rn<<12) | (Rs<<8) | (y<<4) | Rm;  }  }     +#if 0 +#if 0 +#pragma mark ­ +#pragma mark ­ +#pragma mark Byte/half word extract and extend (ARMv6+ only)... +#pragma mark Byte/half word extract and extend (ARMv6+ only)... +#endif +#endif + + +void ARMAssembler::UXTB16(int cc, int Rd, int Rm, int rotate) +void ARMAssembler::UXTB16(int cc, int Rd, int Rm, int rotate) +{ +{ +    *mPC++ = (cc<<28) | 0x6CF0070 | (Rd<<12) | ((rotate >> 3) << 10) | Rm; +    *mPC++ = (cc<<28) | 0x6CF0070 | (Rd<<12) | ((rotate >> 3) << 10) | Rm; opcode +} +} + +  }; // namespace android  }; // namespace android    
  • 53. libpixelflinger/codeflinger/ARMAssemblerProxy.cpp libpixelflinger/codeflinger/ARMAssemblerProxy.cpp @@ ­195,6 +195,10 @@ void ARMAssemblerProxy::SMLAW(int cc, int y, int Rd, int Rm, int Rs, int Rn) { @@ ­195,6 +195,10 @@ void ARMAssemblerProxy::SMLAW(int cc, int y, int Rd, int Rm, int Rs, int Rn) {      mTarget­>SMLAW(cc, y, Rd, Rm, Rs, Rn);      mTarget­>SMLAW(cc, y, Rd, Rm, Rs, Rn);  }  }     +void ARMAssemblerProxy::UXTB16(int cc, int Rd, int Rm, int rotate) { +void ARMAssemblerProxy::UXTB16(int cc, int Rd, int Rm, int rotate) { +    mTarget­>UXTB16(cc, Rd, Rm, rotate); +    mTarget­>UXTB16(cc, Rd, Rm, rotate); +} +} + +      }; // namespace android  }; // namespace android     libpixelflinger/codeflinger/texturing.cpp libpixelflinger/codeflinger/texturing.cpp @@ ­868,6 +869,106 @@ void GGLAssembler::filter24( @@ ­868,6 +869,106 @@ void GGLAssembler::filter24(      load(txPtr, texel, 0);      load(txPtr, texel, 0);  }  }     +#if __ARM_ARCH__ >= 6 +#if __ARM_ARCH__ >= 6 +// ARMv6 version, using UXTB16, and scheduled for Cortex­A8 pipeline +// ARMv6 version, using UXTB16, and scheduled for Cortex­A8 pipeline +void GGLAssembler::filter32( +void GGLAssembler::filter32( +        const fragment_parts_t& parts, +        const fragment_parts_t& parts, +        pixel_t& texel, const texture_unit_t& tmu, +        pixel_t& texel, const texture_unit_t& tmu, +        int U, int V, pointer_t& txPtr, +        int U, int V, pointer_t& txPtr, +        int FRAC_BITS) +        int FRAC_BITS) +{ +{ ... ... +    UXTB16(AL, temp, pixel, 0); +    UXTB16(AL, temp, pixel, 0); Reimplement filter32() +    if (round) { +    if (round) { +        ADD(AL, 0, u, u, imm(1<<(adjust­1))); +        ADD(AL, 0, u, u, imm(1<<(adjust­1))); +        MOV(AL, 0, u, reg_imm(u, LSR, adjust)); +        MOV(AL, 0, u, reg_imm(u, LSR, adjust)); +    } In optimized ASM +    } +    LDR(AL, pixellb, txPtr.reg, reg_scale_pre(offsetlb)); +    LDR(AL, pixellb, txPtr.reg, reg_scale_pre(offsetlb)); +    MUL(AL, 0, dh, temp, u); +    MUL(AL, 0, dh, temp, u); +    UXTB16(AL, temp, pixel, 8); +    UXTB16(AL, temp, pixel, 8); +    MUL(AL, 0, dl, temp, u); +    MUL(AL, 0, dl, temp, u); +    RSB(AL, 0, k, u, imm(0x100)); +    RSB(AL, 0, k, u, imm(0x100)); ... ... +#else +#else  void GGLAssembler::filter32(  void GGLAssembler::filter32(          const fragment_parts_t& parts,          const fragment_parts_t& parts,          pixel_t& texel, const texture_unit_t& tmu,          pixel_t& texel, const texture_unit_t& tmu,
  • 55. RIL → Telephony  Radio Interface Layer(RIL)  HAL  Android TelephonyManager  baseband modem  Voice, Data, SMS, SIM, SIMToolkit  Android RIL  AT command  RIL API  Android follows GSM TS 27.007 standard  RIL implementation  Qualcomm supports CDMA & CDMA-GSM Multi-mode
  • 56. OS Kernels Monolithic Kernel Micro Kernel Traditional UNIX, Linux, … Mach, L4, Symbian OS Exokernel
  • 57. L4 Microkernel • Developed by Jochen Liedtke in 1995. – German National Research Center for IT • Developed from scratch • 2nd generation microkernel • Small and Fast Kernel – 7 system calls – 12KB • In November 2005, NICTA announced that Qualcomm was deploying NICTA's L4 version on their Mobile Station Modem chipsets.
  • 59. Communications Processor L4 Interrupt Handler -> Send Message L4 microkernel RPC System- Server call Handler RPC Interrupt RPC RT task Requests from Shared Memory Application Processor to Modem
  • 61. sqlite3_prepare() /* ** Compile the UTF­8 encoded SQL statement zSql into a statement handle. */ int sqlite3_prepare(   sqlite3 *db,            /* Database handle. */   const char *zSql,       /* UTF­8 encoded SQL statement. */   int nBytes,             /* Length of zSql in bytes. */   sqlite3_stmt **ppStmt,  /* OUT: A pointer to the prepared                               statement */   const char** pzTail     /* OUT: End of parsed string */ ) { ...       sqlite3VdbeSetNumCols(sParse.pVdbe, 5);       sqlite3VdbeSetColName(sParse.pVdbe, 0, COLNAME_NAME, "addr", P3_STATIC);       sqlite3VdbeSetColName(sParse.pVdbe, 1, COLNAME_NAME, "opcode", P3_STATIC);       sqlite3VdbeSetColName(sParse.pVdbe, 2, COLNAME_NAME, "p1", P3_STATIC);       sqlite3VdbeSetColName(sParse.pVdbe, 3, COLNAME_NAME, "p2", P3_STATIC);       sqlite3VdbeSetColName(sParse.pVdbe, 4, COLNAME_NAME, "p3", P3_STATIC); … Opcode! SQLite Virtual Machine (VDBE) 61
  • 62. …And what about other platforms? The concept can be applied to all VM platforms Application virtual machines (short list) .NET (CLR) Java Virtual Machine (JVM) Dalvik virtual machine (Google Android) PHP (Zend Engine) Flash Player / AIR - ActionScript Virtual Machine (AVM) SQLite virtual machine (VDBE; Virtual DataBase Engine) Perl virtual machine
  • 64.
  • 65. Inspiration • Computer science concepts are applied everywhere in Android software stack. • Essential system software brings the further optimizations and feasibility of new technologies. • Advanced compiler techniques are already applied in every domain • Best Practice in Android