SlideShare una empresa de Scribd logo
1 de 64
Descargar para leer sin conexión
(Presentation)     (Training)     (Lab)
•            Jollen’s Consulting

    • http://www.jollen.org/consulting
•                  3G
      www.moko365.com

•
moko365.com
                        	
     	
                                            	
  	
 
                              	
  	
  	
 
          	
                  	
      	
 

                                                                               	
 
                	
 
                                                         	
     	
 




Android                       Copyright (c) 2009 Jollen’s Consulting          . www.jollen.org/consulting
•   Moko365.com


•
moko365.com
                                                         	
 
          	
 




Android         Copyright (c) 2009 Jollen’s Consulting         . www.jollen.org/consulting
moko365.com



                /&)*!-*'$)&&



                    !"#$%&'




                ()*+)!,&-.$)




Android   Copyright (c) 2009 Jollen’s Consulting         . www.jollen.org/consulting
moko365.com


            /+0*'"0!.--!"$.4"'+



            /+0*'"0!1*.2)3'*(



                     !"#$%&'




                 ()*+)!,&-.$)




Android   Copyright (c) 2009 Jollen’s Consulting   . www.jollen.org/consulting
moko365.com
          	
 
                	
 




Android                     Copyright (c) 2009 Jollen’s Consulting         . www.jollen.org/consulting
Every Android application runs in its own                         moko365.com
      process, with its own instance of the Dalvik
      virtual machine. Dalvik has been written so
      that a device can run multiple VMs
      efficiently. The Dalvik VM executes files in
      the Dalvik Executable (.dex) format which
      is optimized for minimal memory footprint.
      The VM is register-based, and runs classes
      compiled by a Java language compiler that
      have been transformed into the .dex format
      by the included "dx" tool.

                                    --Android Dev Guide

Android           Copyright (c) 2009 Jollen’s Consulting   . www.jollen.org/consulting
moko365.com

                   -*'$)&&



          "+&/.+$)!'0!1.!2"(!34



                    !"#$%&'




                ()*+)!,&-.$)




Android    Copyright (c) 2009 Jollen’s Consulting         . www.jollen.org/consulting
moko365.com
          '$()*)(+       &%"*)$%                  "%$%)*%"    !"#*),%"


          !"#$%&&        !"#$%&&                  !"#$%&&     !"#$%&&




Android              Copyright (c) 2009 Jollen’s Consulting   . www.jollen.org/consulting
moko365.com
          '$()*)(+         &%"*)$%                 "%$%)*%"     !"#*),%"


                                       !"#$%&&




Android              Copyright (c) 2009 Jollen’s Consulting   . www.jollen.org/consulting
moko365.com




                        $#'!#(%()


                       '*+(!),"%*-


                          !"#$%&&




Android         Copyright (c) 2009 Jollen’s Consulting         . www.jollen.org/consulting
moko365.com
          	
                	
                 	
 
                      	
          	
                 	
 




Android                      Copyright (c) 2009 Jollen’s Consulting           . www.jollen.org/consulting
Android   Copyright (c) 2009 Jollen’s Consulting         . www.jollen.org/consulting
moko365.com
          	
               	
          	
 




Android               Copyright (c) 2009 Jollen’s Consulting   . www.jollen.org/consulting
moko365.com

                	
 




Android               Copyright (c) 2009 Jollen’s Consulting     . www.jollen.org/consulting
moko365.com
           	
 
                                          	
                      	
          	
 
           	
                 	
 
                 	
 
                          	
 
          	
                        	
                	
                	
 




Android                Copyright (c) 2009 Jollen’s Consulting                             . www.jollen.org/consulting
moko365.com
              !"#$%&&


              '()"*"(%&                                    User-space driver


                    '()$                                   Standard C Libraries
                                                                                          System Calls
          +%,($%!+"(,%"                                    Linux kernel




          *    : Jollen’s Consulting, for update see jollen.org/consulting


Android                    Copyright (c) 2009 Jollen’s Consulting            . www.jollen.org/consulting
moko365.com
              $#'!#(%()                                      API


              '*+(!),"%*-                                    Java Thread
                                                                                             JNI
                !"#$%&&                                      Dalvik VM


               ./0!1)23                                      *.so


                   4+3$                                      Standard C Libraries
                                                                                             System Calls
              -%5+$%!-"+5%"                                  Linux kernel


          *      : Jollen’s Consulting, for update see jollen.org/consulting


Android                     Copyright (c) 2009 Jollen’s Consulting             . www.jollen.org/consulting
moko365.com
              !"#$%&&                                      3.          API


              '()"*"(%&                                    2.          API      library


                '()$                                       Standard C Libraries


          +%,($%!+"(,%"                                    1.



          *




          *    : Jollen’s Consulting, for update see jollen.org/consulting


Android                   Copyright (c) 2009 Jollen’s Consulting             . www.jollen.org/consulting
*
                                                                                              moko365.com
         $#'!#(%()                                 API                           !"#$%&'"(


      '*+(!),"%*-                                  Dalvik
                                                                                 )#*+,(!-.!/
                                                                                 0'"%!1,2"#"3
          !"#$%&&                                  Core Libraries


          ./0!1)23                                 *.so                           451!6782


            4+3$                                   Standard C Libraries                *,29


     -%5+$%!-"+5%"                                 Linux kernel                  :%+,9%!:",+%"


              *    : Jollen’s Consulting, for update see jollen.org/consulting


Android                       Copyright (c) 2009 Jollen’s Consulting             . www.jollen.org/consulting
moko365.com
      !"#$%&'"(                                    2.          API        native function


                                                   3.          JNI method table
     )#*+,(!-.!/
     0'"%!1,2"#"3
                                                   5.          core libraries


          451!6782                                 4.          callback functions         supporting API


            *,29                                   Standard C Libraries


     :%+,9%!:",+%"                                 1.


             *     : Jollen’s Consulting, for update see jollen.org/consulting


Android                       Copyright (c) 2009 Jollen’s Consulting                . www.jollen.org/consulting
Android   Copyright (c) 2009 Jollen’s Consulting   . www.jollen.org/consulting
moko365.com
                                     	
             	
                	
          	
 
          	
           	
 




Android                      Copyright (c) 2009 Jollen’s Consulting          . www.jollen.org/consulting
moko365.com
          	
                	
                 	
 
                                  	
     	
              	
 
                	
 




Android         Copyright (c) 2009 Jollen’s Consulting   . www.jollen.org/consulting
moko365.com

                      	
                                               	
           	
 

                	
          	
         	
            	
                      	
 
                      	
                                   	
 
                                             	
            	
 




Android                       Copyright (c) 2009 Jollen’s Consulting                      . www.jollen.org/consulting
moko365.com
                 	
                            	
        	
 
                       	
          	
                    	
      	
                      	
 
          	
                 	
                	
  	
              	
 
                	
                               	
            	
 




Android                             Copyright (c) 2009 Jollen’s Consulting               . www.jollen.org/consulting
moko365.com
          int hw_get_module(const char *id, const struct hw_module_t **module)




                	
       	
                  	
 
                               	
      	
               	
 




Android                  Copyright (c) 2009 Jollen’s Consulting   . www.jollen.org/consulting
moko365.com
                                 Java Stub

                 Service/JNI
          framework/base/services/jni




                     HAL
             hardware/libhardware

                                 HAL Stub

                         sysfs
                         /sys




                  Kernel Modules




Android     Copyright (c) 2009 Jollen’s Consulting         . www.jollen.org/consulting
moko365.com




Android   Copyright (c) 2009 Jollen’s Consulting   . www.jollen.org/consulting
moko365.com
     class SensorService extends ISensorService.Stub {
         ...
         private static native int _sensors_control_init();
         private static native ParcelFileDescriptor _sensors_control_open();
         private static native boolean _sensors_control_activate(int sensor, boolean activate);
         private static native int _sensors_control_set_delay(int ms);
     }




at framework/base/services/java/SensorService.java

Android                 Copyright (c) 2009 Jollen’s Consulting         . www.jollen.org/consulting
moko365.com
    class SensorService extends ISensorService.Stub {
        ...
        public SensorService(Context context) {
            if (localLOGV) Log.d(TAG, "SensorService startup");
            _sensors_control_init();
            mNotificationManager = (NotificationManager)context.getSystemService
    (Context.NOTIFICATION_SERVICE);
            mContext = context;
        }
       ...
    }




at framework/base/services/java/SensorService.java

Android                Copyright (c) 2009 Jollen’s Consulting         . www.jollen.org/consulting
moko365.com
 static JNINativeMethod gMethods[] = {
     {"_sensors_control_init",     "()I",   (void*) android_init },
     {"_sensors_control_open",     "()Landroid/os/ParcelFileDescriptor;",
                                            (void*) android_open },
     {"_sensors_control_activate", "(IZ)Z", (void*) android_activate },
     {"_sensors_control_wake",     "()I", (void*) android_data_wake },
     {"_sensors_control_set_delay","(I)I", (void*) android_set_delay },
 };




at framework/base/services/jni/com_android_server_SensorService.cpp

Android               Copyright (c) 2009 Jollen’s Consulting   . www.jollen.org/consulting
moko365.com

static jint
android_init(JNIEnv *env, jclass clazz)
{
    sensors_module_t* module;
    if (hw_get_module(SENSORS_HARDWARE_MODULE_ID, (const hw_module_t**)&module) == 0) {
        if (sensors_control_open(&module->common, &sSensorDevice) == 0) {
            const struct sensor_t* list;
            int count = module->get_sensors_list(module, &list);
            return count;
        }
    }
    return 0;
}




 #define SENSORS_MODULE_ID “sensors”

Android                  Copyright (c) 2009 Jollen’s Consulting               . www.jollen.org/consulting
moko365.com

  /**
   * Every hardware module must have a data structure named HAL_MODULE_INFO_SYM
   * and the fields of this data structure must begin with hw_module_t
   * followed by module specific information.
   */
  struct sensors_module_t {
      struct hw_module_t common;

          /**
           * Enumerate all available sensors. The list is returned in "list".
           * @return number of sensors in the list
           */
          int (*get_sensors_list)(struct sensors_module_t* module,
                  struct sensor_t const** list);
  };

                                                              supporting API
                                                                HAL stub


Android                     Copyright (c) 2009 Jollen’s Consulting         . www.jollen.org/consulting
struct hw_module_t {
          /** tag must be initialized to HARDWARE_MODULE_TAG */
          uint32_t tag;

           /** major version number for the module */                          moko365.com
           uint16_t version_major;

           /** minor version number of the module */
           uint16_t version_minor;

           /** Identifier of module */
           const char *id;

           /** Name of this module */
           const char *name;

           /** Author/owner/implementor of the module */
           const char *author;

           /** Modules methods */
           struct hw_module_methods_t* methods;

           /** padding to 128 bytes, reserved for future use */
           uint32_t reserved[32-6];
      };




Android                 Copyright (c) 2009 Jollen’s Consulting    . www.jollen.org/consulting
moko365.com
  struct hw_module_methods_t {
      /** Open a specific device */
      int (*open)(const struct hw_module_t* module, const char* id,
              struct hw_device_t** device);
  };




Android                Copyright (c) 2009 Jollen’s Consulting               . www.jollen.org/consulting
moko365.com

    static inline int sensors_control_open(const struct hw_module_t* module,
            struct sensors_control_device_t** device) {
        return module->methods->open(module,
                SENSORS_HARDWARE_CONTROL, (struct hw_device_t**)device);
    }




at hardware/libhardware/include/hardware/sensors.h

Android                  Copyright (c) 2009 Jollen’s Consulting    . www.jollen.org/consulting
moko365.com




Android   Copyright (c) 2009 Jollen’s Consulting   . www.jollen.org/consulting
moko365.com


    static inline int sensors_control_open(const struct hw_module_t* module,
            struct sensors_control_device_t** device) {
        return module->methods->open(module,
                SENSORS_HARDWARE_CONTROL, (struct hw_device_t**)device);
    }




                      struct hw_module_methods_t {
                          /** Open a specific device */
                          int (*open)(const struct hw_module_t* module, const char* id,
                                  struct hw_device_t** device);
                      };




at hardware/libhardware/include/hardware/sensors.h

Android                    Copyright (c) 2009 Jollen’s Consulting      . www.jollen.org/consulting
moko365.com
 static JNINativeMethod gMethods[] = {
     {"_sensors_control_init",     "()I",   (void*) android_init },
     {"_sensors_control_open",     "()Landroid/os/ParcelFileDescriptor;",
                                            (void*) android_open },
     {"_sensors_control_activate", "(IZ)Z", (void*) android_activate },
     {"_sensors_control_wake",     "()I", (void*) android_data_wake },
     {"_sensors_control_set_delay","(I)I", (void*) android_set_delay },
 };




Android             Copyright (c) 2009 Jollen’s Consulting   . www.jollen.org/consulting
/**
     * Every device data structure must begin with hw_device_t
                                                                                 moko365.com
     * followed by module specific public methods and attributes.
     */
    struct sensors_control_device_t {
        struct hw_device_t common;

          /**
           * Returns the fd which will be the parameter to
           * sensors_data_device_t::open_data().
           * The caller takes ownership of this fd. This is intended to be
           * passed cross processes.
           *
           * @return a fd if successful, < 0 on error
           */
          int (*open_data_source)(struct sensors_control_device_t *dev);

          int (*activate)(struct sensors_control_device_t *dev,
                  int handle, int enabled);

          int (*set_delay)(struct sensors_control_device_t *dev, int32_t ms);

          int (*wake)(struct sensors_control_device_t *dev);
    };




Android                  Copyright (c) 2009 Jollen’s Consulting     . www.jollen.org/consulting
moko365.com




Android   Copyright (c) 2009 Jollen’s Consulting   . www.jollen.org/consulting
/**                                                                 moko365.com
           * Every device data structure must begin with hw_device_t
           * followed by module specific public methods and attributes.
           */
          struct hw_device_t {
              /** tag must be initialized to HARDWARE_DEVICE_TAG */
              uint32_t tag;

               /** version number for hw_device_t */
               uint32_t version;

               /** reference to the module this device belongs to */
               struct hw_module_t* module;

               /** padding reserved for future use */
               uint32_t reserved[12];

               /** Close this device */
               int (*close)(struct hw_device_t* device);
          };




Android                 Copyright (c) 2009 Jollen’s Consulting   . www.jollen.org/consulting
Android   Copyright (c) 2009 Jollen’s Consulting         . www.jollen.org/consulting
moko365.com




Android   Copyright (c) 2009 Jollen’s Consulting         . www.jollen.org/consulting
moko365.com

           	
 




Android   Copyright (c) 2009 Jollen’s Consulting   . www.jollen.org/consulting
moko365.com
          on boot
            setprop ro.product.board smdk6410
                                         varient key        prop




          /system/lib/hw/sensors.smdk6410.so
                                <MODULE_ID>.<prop>.so




           setprop <variant_key> <property>


Android            Copyright (c) 2009 Jollen’s Consulting          . www.jollen.org/consulting
!"#$%&


                                                                Manager
                                                                                moko365.com
                                                       framework/base/services/java


            Dalvik VM                                                 IStubService

                                                               Service/Java
                                                       framework/base/services/java

             register
                                               JNI Table
          Android server

                                                               Service/JNI
                                                        framework/base/services/jni




                                                                    HAL
                                                            hardware/libhardware

                                                                         HAL Stub

                                                                   sysfs
                                                                   /sys


                   VM Onload            App Onload

Android            Copyright (c) 2009 Jollen’s Consulting          . www.jollen.org/consulting
Android   Copyright (c) 2009 Jollen’s Consulting     . www.jollen.org/consulting
moko365.com




Android   Copyright (c) 2009 Jollen’s Consulting   . www.jollen.org/consulting
moko365.com




Android   Copyright (c) 2009 Jollen’s Consulting   . www.jollen.org/consulting
moko365.com




Android   Copyright (c) 2009 Jollen’s Consulting   . www.jollen.org/consulting
<?xml version="1.0" encoding="utf-8"?>
 <AbsoluteLayout
 android:id="@+id/widget0"
 android:layout_width="fill_parent"
 android:layout_height="fill_parent"
 xmlns:android="http://schemas.android.com/apk/res/android"              moko365 .com
 >
 <Button
 android:id="@+id/myButton1"
 android:layout_width="wrap_content"
 android:layout_height="wrap_content"
 android:textSize="18sp"
 android:text="   LED"
 android:layout_x="70px"
 android:layout_y="88px"
 >
 </Button>
 <Button
 android:id="@+id/myButton2"                 <Button
 android:layout_width="wrap_content"         android:id="@+id/myButton3"
 android:layout_height="wrap_content"        android:layout_width="wrap_content"
 android:text="   LED"                       android:layout_height="wrap_content"
 android:textSize="18sp"                     android:textSize="18sp"
 android:layout_x="184px"                    android:text="Exit"
 android:layout_y="88px"                     android:layout_x="130px"
 >                                           android:layout_y="150px"
 </Button>                                   >
                                             </Button>
                                             </AbsoluteLayout>




Android            Copyright (c) 2009 Jollen’s Consulting   . www.jollen.org/consulting
/*      setOnClickListener        */
                                                                      mButton1.setOnClickListener(new Button.OnClickListener()
package led.com.cn;                                                   {
import android.app.Activity;                                             @Override
import android.os.Bundle;                                               /*      onClick          */
import android.view.View;
                                                                         public void onClick(View v)

                                                                                                     moko365.com
import android.widget.Button;
                                                                         {
                                                                            // TODO Auto-generated method stub
public class Led_control extends Activity {
    /** Called when the activity is first created. */                           setTitle("LED     !");
      /*     3 Button       private    */                                  /*        4 LED             */
      private Button mButton1;                                              Linuxc.send(num, led_on);
      private Button mButton2;
      private Button mButton3;                                          }
                                                                      });
     /*           LED      */
                                                                      mButton2.setOnClickListener(new Button.OnClickListener()
     public   int num = 4;
                                                                      {
     /* 1       */                                                      @Override
     public   int led_on = 1;                                           public void onClick(View v)
     /* 2       */                                                      {
     public   int led_off = 2;                                             // TODO Auto-generated method stub
     public   int fd = 0;                                                     setTitle("LED     !");
                                                                        /*         4 LED             */
    @Override
                                                                          Linuxc.send(num, led_off);
    public void onCreate(Bundle savedInstanceState) {
                                                                           }
        super.onCreate(savedInstanceState);
                                                                      });
        setContentView(R.layout.main);
                                                                      mButton3.setOnClickListener(new Button.OnClickListener()
        mButton1 =(Button) findViewById(R.id.myButton1);
                                                                      {
        mButton2 =(Button) findViewById(R.id.myButton2);
                                                                        @Override
        mButton3 =(Button) findViewById(R.id.myButton3);
                                                                        public void onClick(View v)
                                                                        {
       /*       led                      fd */                             // TODO Auto-generated method stub
       fd = Linuxc.openled();                                             /*            */
       if (fd < 0){                                                           Linuxc.closeled();
            setTitle("             ");
                                                                        /*              */
            finish();
                                                                              finish();
         /*                         */                                     }
       }                                                              });
       else {
            setTitle("              ");                           }
       }}                                                     }




 Android                         Copyright (c) 2009 Jollen’s Consulting                . www.jollen.org/consulting
package led.com.cn;

  import android.util.Log;
                                                                               moko365.com
  public class Linuxc {
     static {
       try {
          Log.i("JNI", "Trying to load libled.so");
             /*      libled.so */
          System.loadLibrary("led");
       }
       catch (UnsatisfiedLinkError ule) {
          Log.e("JNI", "WARNING: Could not load libled.so");
       }}
     /*       openled()               */
     public static native int openled();
     /*       closeled ()              */
     public static native int closeled();
     /*       send()               */
     public static native int send(int led_num, int on_off);

  }




Android                  Copyright (c) 2009 Jollen’s Consulting   . www.jollen.org/consulting
将                                                贝                          moko365.com
                                    录                         个


                                                                 头
                                     数声
                                                          	
 头


    $ mkdir led_test
    $ cd led_test
    ...
    $ /javah -classpath ~/Led_Control/bin/ led.com.cn.Linuxc



Android              Copyright (c) 2009 Jollen’s Consulting          . www.jollen.org/consulting
#include <stdio.h>
  #include <stdlib.h>                                                                      moko365.com
  #include <fcntl.h>
  #include <errno.h>
  #include <unistd.h>
  #include <sys/ioctl.h>

  #include "led_com_cn_Linuxc.h"
  #include "led.h"

  #define LED_TEST 3

  #define DEVICE_BLTEST "/dev/led"

  int fd;

  JNIEXPORT jint JNICALL Java_led_com_cn_Linuxc_openled
   (JNIEnv *env, jclass mc)
  {
   fd= open(DEVICE_BLTEST,O_RDONLY);
   return fd;
  }

  JNIEXPORT jint JNICALL Java_led_com_cn_Linuxc_closeled
   (JNIEnv *env, jclass mc)
  {
   close(fd);
  }

  JNIEXPORT jint JNICALL Java_led_com_cn_Linuxc_send
  (JNIEnv *env, jclass mc, jint a, jint b)
  {
   ioctl(fd,b,&a);
  }




Android                              Copyright (c) 2009 Jollen’s Consulting   . www.jollen.org/consulting
moko365.com
        $ arm-none-linux-gnueabi-gcc -I/home/online/jdk1.6.0_14/include -I/home/online/jdk1.6.0_14/
        include/linux -fpic -c led_com_cn_linuxc.c

        $arm-none-linux-gnueabi-ld-T /home/online/CodeSourcery/Sourcery_G++_Lite/arm-none-linux-
        gnueabi/lib/ldscripts/armelf_linux_eabi.xsc -shared -o libled.so led_com_cn_linuxc.o




Android                   Copyright (c) 2009 Jollen’s Consulting       . www.jollen.org/consulting
www.moko365.com

Más contenido relacionado

La actualidad más candente

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
 
Q4.11: Porting Android to new Platforms
Q4.11: Porting Android to new PlatformsQ4.11: Porting Android to new Platforms
Q4.11: Porting Android to new PlatformsLinaro
 
Understanding the Android System Server
Understanding the Android System ServerUnderstanding the Android System Server
Understanding the Android System ServerOpersys inc.
 
Embedded Android Workshop
Embedded Android WorkshopEmbedded Android Workshop
Embedded Android WorkshopOpersys inc.
 
Android media framework overview
Android media framework overviewAndroid media framework overview
Android media framework overviewJerrin George
 
Android's Multimedia Framework
Android's Multimedia FrameworkAndroid's Multimedia Framework
Android's Multimedia FrameworkOpersys inc.
 
Android audio system(audioflinger)
Android audio system(audioflinger)Android audio system(audioflinger)
Android audio system(audioflinger)fefe7270
 
The Android graphics path, in depth
The Android graphics path, in depthThe Android graphics path, in depth
The Android graphics path, in depthChris Simmonds
 

La actualidad más candente (20)

Project meeting: Android Graphics Architecture Overview
Project meeting: Android Graphics Architecture OverviewProject meeting: Android Graphics Architecture Overview
Project meeting: Android Graphics Architecture Overview
 
Embedded Android : System Development - Part IV (Android System Services)
Embedded Android : System Development - Part IV (Android System Services)Embedded Android : System Development - Part IV (Android System Services)
Embedded Android : System Development - Part IV (Android System Services)
 
Q4.11: Porting Android to new Platforms
Q4.11: Porting Android to new PlatformsQ4.11: Porting Android to new Platforms
Q4.11: Porting Android to new Platforms
 
Android IPC Mechanism
Android IPC MechanismAndroid IPC Mechanism
Android IPC Mechanism
 
Design and Concepts of Android Graphics
Design and Concepts of Android GraphicsDesign and Concepts of Android Graphics
Design and Concepts of Android Graphics
 
Android Internals
Android InternalsAndroid Internals
Android Internals
 
Understanding the Android System Server
Understanding the Android System ServerUnderstanding the Android System Server
Understanding the Android System Server
 
Embedded Android Workshop
Embedded Android WorkshopEmbedded Android Workshop
Embedded Android Workshop
 
Android Things : Building Embedded Devices
Android Things : Building Embedded DevicesAndroid Things : Building Embedded Devices
Android Things : Building Embedded Devices
 
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)
 
Android media framework overview
Android media framework overviewAndroid media framework overview
Android media framework overview
 
Android's Multimedia Framework
Android's Multimedia FrameworkAndroid's Multimedia Framework
Android's Multimedia Framework
 
Android audio system(audioflinger)
Android audio system(audioflinger)Android audio system(audioflinger)
Android audio system(audioflinger)
 
Embedded Android : System Development - Part III (Audio / Video HAL)
Embedded Android : System Development - Part III (Audio / Video HAL)Embedded Android : System Development - Part III (Audio / Video HAL)
Embedded Android : System Development - Part III (Audio / Video HAL)
 
Embedded Android : System Development - Part I
Embedded Android : System Development - Part IEmbedded Android : System Development - Part I
Embedded Android : System Development - Part I
 
Android internals
Android internalsAndroid internals
Android internals
 
Android Audio System
Android Audio SystemAndroid Audio System
Android Audio System
 
Binder: Android IPC
Binder: Android IPCBinder: Android IPC
Binder: Android IPC
 
Explore Android Internals
Explore Android InternalsExplore Android Internals
Explore Android Internals
 
The Android graphics path, in depth
The Android graphics path, in depthThe Android graphics path, in depth
The Android graphics path, in depth
 

Destacado

Accessing Hardware on Android
Accessing Hardware on AndroidAccessing Hardware on Android
Accessing Hardware on AndroidGary Bisson
 
Hardware Abstraction Layer
Hardware Abstraction LayerHardware Abstraction Layer
Hardware Abstraction LayerTeh Kian Cheng
 
Learning AOSP - Android Booting Process
Learning AOSP - Android Booting ProcessLearning AOSP - Android Booting Process
Learning AOSP - Android Booting ProcessNanik Tolaram
 
Booting Android: bootloaders, fastboot and boot images
Booting Android: bootloaders, fastboot and boot imagesBooting Android: bootloaders, fastboot and boot images
Booting Android: bootloaders, fastboot and boot imagesChris Simmonds
 
Diving inside Android Wifi
Diving inside Android WifiDiving inside Android Wifi
Diving inside Android WifiNanik Tolaram
 
Android Boot Time Optimization
Android Boot Time OptimizationAndroid Boot Time Optimization
Android Boot Time OptimizationKan-Ru Chen
 
Android booting sequece and setup and debugging
Android booting sequece and setup and debuggingAndroid booting sequece and setup and debugging
Android booting sequece and setup and debuggingUtkarsh Mankad
 
Native Android Userspace part of the Embedded Android Workshop at Linaro Conn...
Native Android Userspace part of the Embedded Android Workshop at Linaro Conn...Native Android Userspace part of the Embedded Android Workshop at Linaro Conn...
Native Android Userspace part of the Embedded Android Workshop at Linaro Conn...Opersys inc.
 
Android CTS training
Android CTS trainingAndroid CTS training
Android CTS trainingjtbuaa
 
ABI란 무엇인가요?
ABI란 무엇인가요?ABI란 무엇인가요?
ABI란 무엇인가요?진상 문
 
基礎から学ぶ組み込みAndroid
基礎から学ぶ組み込みAndroid基礎から学ぶ組み込みAndroid
基礎から学ぶ組み込みAndroiddemuyan
 
nl80211 and libnl
nl80211 and libnlnl80211 and libnl
nl80211 and libnlawkman
 
Debian & the BeagleBone Black
Debian & the BeagleBone BlackDebian & the BeagleBone Black
Debian & the BeagleBone BlackRaju Vindane
 
Kernel Recipes 2015 - The Dronecode Project – A step in open source drones
Kernel Recipes 2015 - The Dronecode Project – A step in open source dronesKernel Recipes 2015 - The Dronecode Project – A step in open source drones
Kernel Recipes 2015 - The Dronecode Project – A step in open source dronesAnne Nicolas
 

Destacado (20)

Accessing Hardware on Android
Accessing Hardware on AndroidAccessing Hardware on Android
Accessing Hardware on Android
 
Hardware Abstraction Layer
Hardware Abstraction LayerHardware Abstraction Layer
Hardware Abstraction Layer
 
Learning AOSP - Android Booting Process
Learning AOSP - Android Booting ProcessLearning AOSP - Android Booting Process
Learning AOSP - Android Booting Process
 
Booting Android: bootloaders, fastboot and boot images
Booting Android: bootloaders, fastboot and boot imagesBooting Android: bootloaders, fastboot and boot images
Booting Android: bootloaders, fastboot and boot images
 
Diving inside Android Wifi
Diving inside Android WifiDiving inside Android Wifi
Diving inside Android Wifi
 
Android Boot Time Optimization
Android Boot Time OptimizationAndroid Boot Time Optimization
Android Boot Time Optimization
 
Android Custom Kernel/ROM design
Android Custom Kernel/ROM designAndroid Custom Kernel/ROM design
Android Custom Kernel/ROM design
 
Android booting sequece and setup and debugging
Android booting sequece and setup and debuggingAndroid booting sequece and setup and debugging
Android booting sequece and setup and debugging
 
Native Android Userspace part of the Embedded Android Workshop at Linaro Conn...
Native Android Userspace part of the Embedded Android Workshop at Linaro Conn...Native Android Userspace part of the Embedded Android Workshop at Linaro Conn...
Native Android Userspace part of the Embedded Android Workshop at Linaro Conn...
 
Operating system
Operating systemOperating system
Operating system
 
Peno sensor
Peno sensorPeno sensor
Peno sensor
 
Android のusb support
Android のusb supportAndroid のusb support
Android のusb support
 
Android CTS training
Android CTS trainingAndroid CTS training
Android CTS training
 
Android usbの基本
Android usbの基本Android usbの基本
Android usbの基本
 
ABI란 무엇인가요?
ABI란 무엇인가요?ABI란 무엇인가요?
ABI란 무엇인가요?
 
基礎から学ぶ組み込みAndroid
基礎から学ぶ組み込みAndroid基礎から学ぶ組み込みAndroid
基礎から学ぶ組み込みAndroid
 
nl80211 and libnl
nl80211 and libnlnl80211 and libnl
nl80211 and libnl
 
Android Anatomy
Android  AnatomyAndroid  Anatomy
Android Anatomy
 
Debian & the BeagleBone Black
Debian & the BeagleBone BlackDebian & the BeagleBone Black
Debian & the BeagleBone Black
 
Kernel Recipes 2015 - The Dronecode Project – A step in open source drones
Kernel Recipes 2015 - The Dronecode Project – A step in open source dronesKernel Recipes 2015 - The Dronecode Project – A step in open source drones
Kernel Recipes 2015 - The Dronecode Project – A step in open source drones
 

Más de Jollen Chen

Flowchain blockchain classroom at Taiwan Tech University
Flowchain blockchain classroom at Taiwan Tech UniversityFlowchain blockchain classroom at Taiwan Tech University
Flowchain blockchain classroom at Taiwan Tech UniversityJollen Chen
 
Bitmark and Hyperledger Workshop: the Digital Assets and Property
Bitmark and Hyperledger Workshop: the Digital Assets and PropertyBitmark and Hyperledger Workshop: the Digital Assets and Property
Bitmark and Hyperledger Workshop: the Digital Assets and PropertyJollen Chen
 
Introducing the Blockchain and Distributed Ledger Technology
Introducing the Blockchain and  Distributed Ledger TechnologyIntroducing the Blockchain and  Distributed Ledger Technology
Introducing the Blockchain and Distributed Ledger TechnologyJollen Chen
 
Maker of Things - the open IoT cloud for makers chapter.
Maker of Things - the open IoT cloud for makers chapter.Maker of Things - the open IoT cloud for makers chapter.
Maker of Things - the open IoT cloud for makers chapter.Jollen Chen
 
WoT.City and IoT Protocols Movement @ Taipei, Taiwan
WoT.City and IoT Protocols Movement @ Taipei, TaiwanWoT.City and IoT Protocols Movement @ Taipei, Taiwan
WoT.City and IoT Protocols Movement @ Taipei, TaiwanJollen Chen
 
IoT and Maker Crossover (IMCO) Conference 2015
IoT and Maker Crossover (IMCO) Conference 2015IoT and Maker Crossover (IMCO) Conference 2015
IoT and Maker Crossover (IMCO) Conference 2015Jollen Chen
 
Open IoT Cloud Architecture, Web of Things, Shenzhen, China.
Open IoT Cloud Architecture, Web of Things, Shenzhen, China.Open IoT Cloud Architecture, Web of Things, Shenzhen, China.
Open IoT Cloud Architecture, Web of Things, Shenzhen, China.Jollen Chen
 
Backbone.js and MVW 101
Backbone.js and MVW 101Backbone.js and MVW 101
Backbone.js and MVW 101Jollen Chen
 
Single-Page Application Design Principles 101
Single-Page Application Design Principles 101Single-Page Application Design Principles 101
Single-Page Application Design Principles 101Jollen Chen
 
MongoDB & NoSQL 101
 MongoDB & NoSQL 101 MongoDB & NoSQL 101
MongoDB & NoSQL 101Jollen Chen
 
Mokoversity Course: Apple Swift 101 - Introduction
Mokoversity Course: Apple Swift 101 - IntroductionMokoversity Course: Apple Swift 101 - Introduction
Mokoversity Course: Apple Swift 101 - IntroductionJollen Chen
 
Android Wear SDK: Level 101
Android Wear SDK: Level 101Android Wear SDK: Level 101
Android Wear SDK: Level 101Jollen Chen
 
Startup eng-camp 3
Startup eng-camp 3Startup eng-camp 3
Startup eng-camp 3Jollen Chen
 
讓 HTML5 走進 IPTV Framework
讓 HTML5 走進 IPTV Framework讓 HTML5 走進 IPTV Framework
讓 HTML5 走進 IPTV FrameworkJollen Chen
 
課程名稱:八屏一雲時代來臨 教你HTML5六小時打通(2)
課程名稱:八屏一雲時代來臨 教你HTML5六小時打通(2)課程名稱:八屏一雲時代來臨 教你HTML5六小時打通(2)
課程名稱:八屏一雲時代來臨 教你HTML5六小時打通(2)Jollen Chen
 
課程名稱:八屏一雲時代來臨 教你HTML5六小時打通(3)
課程名稱:八屏一雲時代來臨 教你HTML5六小時打通(3)課程名稱:八屏一雲時代來臨 教你HTML5六小時打通(3)
課程名稱:八屏一雲時代來臨 教你HTML5六小時打通(3)Jollen Chen
 
課程名稱:八屏一雲時代來臨 教你HTML5六小時打通(1)
課程名稱:八屏一雲時代來臨 教你HTML5六小時打通(1)課程名稱:八屏一雲時代來臨 教你HTML5六小時打通(1)
課程名稱:八屏一雲時代來臨 教你HTML5六小時打通(1)Jollen Chen
 
Jollen's Presentation: Introducing Android low-level
Jollen's Presentation: Introducing Android low-levelJollen's Presentation: Introducing Android low-level
Jollen's Presentation: Introducing Android low-levelJollen Chen
 
Embedded Linux: Introduction
Embedded Linux: IntroductionEmbedded Linux: Introduction
Embedded Linux: IntroductionJollen Chen
 
Android Application: Introduction
Android Application: IntroductionAndroid Application: Introduction
Android Application: IntroductionJollen Chen
 

Más de Jollen Chen (20)

Flowchain blockchain classroom at Taiwan Tech University
Flowchain blockchain classroom at Taiwan Tech UniversityFlowchain blockchain classroom at Taiwan Tech University
Flowchain blockchain classroom at Taiwan Tech University
 
Bitmark and Hyperledger Workshop: the Digital Assets and Property
Bitmark and Hyperledger Workshop: the Digital Assets and PropertyBitmark and Hyperledger Workshop: the Digital Assets and Property
Bitmark and Hyperledger Workshop: the Digital Assets and Property
 
Introducing the Blockchain and Distributed Ledger Technology
Introducing the Blockchain and  Distributed Ledger TechnologyIntroducing the Blockchain and  Distributed Ledger Technology
Introducing the Blockchain and Distributed Ledger Technology
 
Maker of Things - the open IoT cloud for makers chapter.
Maker of Things - the open IoT cloud for makers chapter.Maker of Things - the open IoT cloud for makers chapter.
Maker of Things - the open IoT cloud for makers chapter.
 
WoT.City and IoT Protocols Movement @ Taipei, Taiwan
WoT.City and IoT Protocols Movement @ Taipei, TaiwanWoT.City and IoT Protocols Movement @ Taipei, Taiwan
WoT.City and IoT Protocols Movement @ Taipei, Taiwan
 
IoT and Maker Crossover (IMCO) Conference 2015
IoT and Maker Crossover (IMCO) Conference 2015IoT and Maker Crossover (IMCO) Conference 2015
IoT and Maker Crossover (IMCO) Conference 2015
 
Open IoT Cloud Architecture, Web of Things, Shenzhen, China.
Open IoT Cloud Architecture, Web of Things, Shenzhen, China.Open IoT Cloud Architecture, Web of Things, Shenzhen, China.
Open IoT Cloud Architecture, Web of Things, Shenzhen, China.
 
Backbone.js and MVW 101
Backbone.js and MVW 101Backbone.js and MVW 101
Backbone.js and MVW 101
 
Single-Page Application Design Principles 101
Single-Page Application Design Principles 101Single-Page Application Design Principles 101
Single-Page Application Design Principles 101
 
MongoDB & NoSQL 101
 MongoDB & NoSQL 101 MongoDB & NoSQL 101
MongoDB & NoSQL 101
 
Mokoversity Course: Apple Swift 101 - Introduction
Mokoversity Course: Apple Swift 101 - IntroductionMokoversity Course: Apple Swift 101 - Introduction
Mokoversity Course: Apple Swift 101 - Introduction
 
Android Wear SDK: Level 101
Android Wear SDK: Level 101Android Wear SDK: Level 101
Android Wear SDK: Level 101
 
Startup eng-camp 3
Startup eng-camp 3Startup eng-camp 3
Startup eng-camp 3
 
讓 HTML5 走進 IPTV Framework
讓 HTML5 走進 IPTV Framework讓 HTML5 走進 IPTV Framework
讓 HTML5 走進 IPTV Framework
 
課程名稱:八屏一雲時代來臨 教你HTML5六小時打通(2)
課程名稱:八屏一雲時代來臨 教你HTML5六小時打通(2)課程名稱:八屏一雲時代來臨 教你HTML5六小時打通(2)
課程名稱:八屏一雲時代來臨 教你HTML5六小時打通(2)
 
課程名稱:八屏一雲時代來臨 教你HTML5六小時打通(3)
課程名稱:八屏一雲時代來臨 教你HTML5六小時打通(3)課程名稱:八屏一雲時代來臨 教你HTML5六小時打通(3)
課程名稱:八屏一雲時代來臨 教你HTML5六小時打通(3)
 
課程名稱:八屏一雲時代來臨 教你HTML5六小時打通(1)
課程名稱:八屏一雲時代來臨 教你HTML5六小時打通(1)課程名稱:八屏一雲時代來臨 教你HTML5六小時打通(1)
課程名稱:八屏一雲時代來臨 教你HTML5六小時打通(1)
 
Jollen's Presentation: Introducing Android low-level
Jollen's Presentation: Introducing Android low-levelJollen's Presentation: Introducing Android low-level
Jollen's Presentation: Introducing Android low-level
 
Embedded Linux: Introduction
Embedded Linux: IntroductionEmbedded Linux: Introduction
Embedded Linux: Introduction
 
Android Application: Introduction
Android Application: IntroductionAndroid Application: Introduction
Android Application: Introduction
 

Último

Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DaySri Ambati
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
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
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
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
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
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
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
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
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
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
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 

Último (20)

Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
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.
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
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
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
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
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
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
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 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!
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 

Android HAL Introduction: libhardware and its legacy

  • 1.
  • 2. (Presentation) (Training) (Lab)
  • 3. Jollen’s Consulting • http://www.jollen.org/consulting • 3G www.moko365.com •
  • 4. moko365.com Android Copyright (c) 2009 Jollen’s Consulting . www.jollen.org/consulting
  • 5. Moko365.com •
  • 6. moko365.com Android Copyright (c) 2009 Jollen’s Consulting . www.jollen.org/consulting
  • 7.
  • 8. moko365.com /&)*!-*'$)&& !"#$%&' ()*+)!,&-.$) Android Copyright (c) 2009 Jollen’s Consulting . www.jollen.org/consulting
  • 9. moko365.com /+0*'"0!.--!"$.4"'+ /+0*'"0!1*.2)3'*( !"#$%&' ()*+)!,&-.$) Android Copyright (c) 2009 Jollen’s Consulting . www.jollen.org/consulting
  • 10. moko365.com Android Copyright (c) 2009 Jollen’s Consulting . www.jollen.org/consulting
  • 11. Every Android application runs in its own moko365.com process, with its own instance of the Dalvik virtual machine. Dalvik has been written so that a device can run multiple VMs efficiently. The Dalvik VM executes files in the Dalvik Executable (.dex) format which is optimized for minimal memory footprint. The VM is register-based, and runs classes compiled by a Java language compiler that have been transformed into the .dex format by the included "dx" tool. --Android Dev Guide Android Copyright (c) 2009 Jollen’s Consulting . www.jollen.org/consulting
  • 12. moko365.com -*'$)&& "+&/.+$)!'0!1.!2"(!34 !"#$%&' ()*+)!,&-.$) Android Copyright (c) 2009 Jollen’s Consulting . www.jollen.org/consulting
  • 13. moko365.com '$()*)(+ &%"*)$% "%$%)*%" !"#*),%" !"#$%&& !"#$%&& !"#$%&& !"#$%&& Android Copyright (c) 2009 Jollen’s Consulting . www.jollen.org/consulting
  • 14. moko365.com '$()*)(+ &%"*)$% "%$%)*%" !"#*),%" !"#$%&& Android Copyright (c) 2009 Jollen’s Consulting . www.jollen.org/consulting
  • 15. moko365.com $#'!#(%() '*+(!),"%*- !"#$%&& Android Copyright (c) 2009 Jollen’s Consulting . www.jollen.org/consulting
  • 16. moko365.com Android Copyright (c) 2009 Jollen’s Consulting . www.jollen.org/consulting
  • 17. Android Copyright (c) 2009 Jollen’s Consulting . www.jollen.org/consulting
  • 18. moko365.com Android Copyright (c) 2009 Jollen’s Consulting . www.jollen.org/consulting
  • 19. moko365.com Android Copyright (c) 2009 Jollen’s Consulting . www.jollen.org/consulting
  • 20. moko365.com Android Copyright (c) 2009 Jollen’s Consulting . www.jollen.org/consulting
  • 21. moko365.com !"#$%&& '()"*"(%& User-space driver '()$ Standard C Libraries System Calls +%,($%!+"(,%" Linux kernel * : Jollen’s Consulting, for update see jollen.org/consulting Android Copyright (c) 2009 Jollen’s Consulting . www.jollen.org/consulting
  • 22. moko365.com $#'!#(%() API '*+(!),"%*- Java Thread JNI !"#$%&& Dalvik VM ./0!1)23 *.so 4+3$ Standard C Libraries System Calls -%5+$%!-"+5%" Linux kernel * : Jollen’s Consulting, for update see jollen.org/consulting Android Copyright (c) 2009 Jollen’s Consulting . www.jollen.org/consulting
  • 23. moko365.com !"#$%&& 3. API '()"*"(%& 2. API library '()$ Standard C Libraries +%,($%!+"(,%" 1. * * : Jollen’s Consulting, for update see jollen.org/consulting Android Copyright (c) 2009 Jollen’s Consulting . www.jollen.org/consulting
  • 24. * moko365.com $#'!#(%() API !"#$%&'"( '*+(!),"%*- Dalvik )#*+,(!-.!/ 0'"%!1,2"#"3 !"#$%&& Core Libraries ./0!1)23 *.so 451!6782 4+3$ Standard C Libraries *,29 -%5+$%!-"+5%" Linux kernel :%+,9%!:",+%" * : Jollen’s Consulting, for update see jollen.org/consulting Android Copyright (c) 2009 Jollen’s Consulting . www.jollen.org/consulting
  • 25. moko365.com !"#$%&'"( 2. API native function 3. JNI method table )#*+,(!-.!/ 0'"%!1,2"#"3 5. core libraries 451!6782 4. callback functions supporting API *,29 Standard C Libraries :%+,9%!:",+%" 1. * : Jollen’s Consulting, for update see jollen.org/consulting Android Copyright (c) 2009 Jollen’s Consulting . www.jollen.org/consulting
  • 26. Android Copyright (c) 2009 Jollen’s Consulting . www.jollen.org/consulting
  • 27. moko365.com Android Copyright (c) 2009 Jollen’s Consulting . www.jollen.org/consulting
  • 28. moko365.com Android Copyright (c) 2009 Jollen’s Consulting . www.jollen.org/consulting
  • 29. moko365.com Android Copyright (c) 2009 Jollen’s Consulting . www.jollen.org/consulting
  • 30.
  • 31. moko365.com Android Copyright (c) 2009 Jollen’s Consulting . www.jollen.org/consulting
  • 32. moko365.com int hw_get_module(const char *id, const struct hw_module_t **module) Android Copyright (c) 2009 Jollen’s Consulting . www.jollen.org/consulting
  • 33. moko365.com Java Stub Service/JNI framework/base/services/jni HAL hardware/libhardware HAL Stub sysfs /sys Kernel Modules Android Copyright (c) 2009 Jollen’s Consulting . www.jollen.org/consulting
  • 34. moko365.com Android Copyright (c) 2009 Jollen’s Consulting . www.jollen.org/consulting
  • 35. moko365.com class SensorService extends ISensorService.Stub { ... private static native int _sensors_control_init(); private static native ParcelFileDescriptor _sensors_control_open(); private static native boolean _sensors_control_activate(int sensor, boolean activate); private static native int _sensors_control_set_delay(int ms); } at framework/base/services/java/SensorService.java Android Copyright (c) 2009 Jollen’s Consulting . www.jollen.org/consulting
  • 36. moko365.com class SensorService extends ISensorService.Stub { ... public SensorService(Context context) { if (localLOGV) Log.d(TAG, "SensorService startup"); _sensors_control_init(); mNotificationManager = (NotificationManager)context.getSystemService (Context.NOTIFICATION_SERVICE); mContext = context; } ... } at framework/base/services/java/SensorService.java Android Copyright (c) 2009 Jollen’s Consulting . www.jollen.org/consulting
  • 37. moko365.com static JNINativeMethod gMethods[] = { {"_sensors_control_init", "()I", (void*) android_init }, {"_sensors_control_open", "()Landroid/os/ParcelFileDescriptor;", (void*) android_open }, {"_sensors_control_activate", "(IZ)Z", (void*) android_activate }, {"_sensors_control_wake", "()I", (void*) android_data_wake }, {"_sensors_control_set_delay","(I)I", (void*) android_set_delay }, }; at framework/base/services/jni/com_android_server_SensorService.cpp Android Copyright (c) 2009 Jollen’s Consulting . www.jollen.org/consulting
  • 38. moko365.com static jint android_init(JNIEnv *env, jclass clazz) { sensors_module_t* module; if (hw_get_module(SENSORS_HARDWARE_MODULE_ID, (const hw_module_t**)&module) == 0) { if (sensors_control_open(&module->common, &sSensorDevice) == 0) { const struct sensor_t* list; int count = module->get_sensors_list(module, &list); return count; } } return 0; } #define SENSORS_MODULE_ID “sensors” Android Copyright (c) 2009 Jollen’s Consulting . www.jollen.org/consulting
  • 39. moko365.com /** * Every hardware module must have a data structure named HAL_MODULE_INFO_SYM * and the fields of this data structure must begin with hw_module_t * followed by module specific information. */ struct sensors_module_t { struct hw_module_t common; /** * Enumerate all available sensors. The list is returned in "list". * @return number of sensors in the list */ int (*get_sensors_list)(struct sensors_module_t* module, struct sensor_t const** list); }; supporting API HAL stub Android Copyright (c) 2009 Jollen’s Consulting . www.jollen.org/consulting
  • 40. struct hw_module_t { /** tag must be initialized to HARDWARE_MODULE_TAG */ uint32_t tag; /** major version number for the module */ moko365.com uint16_t version_major; /** minor version number of the module */ uint16_t version_minor; /** Identifier of module */ const char *id; /** Name of this module */ const char *name; /** Author/owner/implementor of the module */ const char *author; /** Modules methods */ struct hw_module_methods_t* methods; /** padding to 128 bytes, reserved for future use */ uint32_t reserved[32-6]; }; Android Copyright (c) 2009 Jollen’s Consulting . www.jollen.org/consulting
  • 41. moko365.com struct hw_module_methods_t { /** Open a specific device */ int (*open)(const struct hw_module_t* module, const char* id, struct hw_device_t** device); }; Android Copyright (c) 2009 Jollen’s Consulting . www.jollen.org/consulting
  • 42. moko365.com static inline int sensors_control_open(const struct hw_module_t* module, struct sensors_control_device_t** device) { return module->methods->open(module, SENSORS_HARDWARE_CONTROL, (struct hw_device_t**)device); } at hardware/libhardware/include/hardware/sensors.h Android Copyright (c) 2009 Jollen’s Consulting . www.jollen.org/consulting
  • 43. moko365.com Android Copyright (c) 2009 Jollen’s Consulting . www.jollen.org/consulting
  • 44. moko365.com static inline int sensors_control_open(const struct hw_module_t* module, struct sensors_control_device_t** device) { return module->methods->open(module, SENSORS_HARDWARE_CONTROL, (struct hw_device_t**)device); } struct hw_module_methods_t { /** Open a specific device */ int (*open)(const struct hw_module_t* module, const char* id, struct hw_device_t** device); }; at hardware/libhardware/include/hardware/sensors.h Android Copyright (c) 2009 Jollen’s Consulting . www.jollen.org/consulting
  • 45. moko365.com static JNINativeMethod gMethods[] = { {"_sensors_control_init", "()I", (void*) android_init }, {"_sensors_control_open", "()Landroid/os/ParcelFileDescriptor;", (void*) android_open }, {"_sensors_control_activate", "(IZ)Z", (void*) android_activate }, {"_sensors_control_wake", "()I", (void*) android_data_wake }, {"_sensors_control_set_delay","(I)I", (void*) android_set_delay }, }; Android Copyright (c) 2009 Jollen’s Consulting . www.jollen.org/consulting
  • 46. /** * Every device data structure must begin with hw_device_t moko365.com * followed by module specific public methods and attributes. */ struct sensors_control_device_t { struct hw_device_t common; /** * Returns the fd which will be the parameter to * sensors_data_device_t::open_data(). * The caller takes ownership of this fd. This is intended to be * passed cross processes. * * @return a fd if successful, < 0 on error */ int (*open_data_source)(struct sensors_control_device_t *dev); int (*activate)(struct sensors_control_device_t *dev, int handle, int enabled); int (*set_delay)(struct sensors_control_device_t *dev, int32_t ms); int (*wake)(struct sensors_control_device_t *dev); }; Android Copyright (c) 2009 Jollen’s Consulting . www.jollen.org/consulting
  • 47. moko365.com Android Copyright (c) 2009 Jollen’s Consulting . www.jollen.org/consulting
  • 48. /** moko365.com * Every device data structure must begin with hw_device_t * followed by module specific public methods and attributes. */ struct hw_device_t { /** tag must be initialized to HARDWARE_DEVICE_TAG */ uint32_t tag; /** version number for hw_device_t */ uint32_t version; /** reference to the module this device belongs to */ struct hw_module_t* module; /** padding reserved for future use */ uint32_t reserved[12]; /** Close this device */ int (*close)(struct hw_device_t* device); }; Android Copyright (c) 2009 Jollen’s Consulting . www.jollen.org/consulting
  • 49. Android Copyright (c) 2009 Jollen’s Consulting . www.jollen.org/consulting
  • 50. moko365.com Android Copyright (c) 2009 Jollen’s Consulting . www.jollen.org/consulting
  • 51. moko365.com Android Copyright (c) 2009 Jollen’s Consulting . www.jollen.org/consulting
  • 52. moko365.com on boot setprop ro.product.board smdk6410 varient key prop /system/lib/hw/sensors.smdk6410.so <MODULE_ID>.<prop>.so setprop <variant_key> <property> Android Copyright (c) 2009 Jollen’s Consulting . www.jollen.org/consulting
  • 53. !"#$%& Manager moko365.com framework/base/services/java Dalvik VM IStubService Service/Java framework/base/services/java register JNI Table Android server Service/JNI framework/base/services/jni HAL hardware/libhardware HAL Stub sysfs /sys VM Onload App Onload Android Copyright (c) 2009 Jollen’s Consulting . www.jollen.org/consulting
  • 54. Android Copyright (c) 2009 Jollen’s Consulting . www.jollen.org/consulting
  • 55. moko365.com Android Copyright (c) 2009 Jollen’s Consulting . www.jollen.org/consulting
  • 56. moko365.com Android Copyright (c) 2009 Jollen’s Consulting . www.jollen.org/consulting
  • 57. moko365.com Android Copyright (c) 2009 Jollen’s Consulting . www.jollen.org/consulting
  • 58. <?xml version="1.0" encoding="utf-8"?> <AbsoluteLayout android:id="@+id/widget0" android:layout_width="fill_parent" android:layout_height="fill_parent" xmlns:android="http://schemas.android.com/apk/res/android" moko365 .com > <Button android:id="@+id/myButton1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textSize="18sp" android:text=" LED" android:layout_x="70px" android:layout_y="88px" > </Button> <Button android:id="@+id/myButton2" <Button android:layout_width="wrap_content" android:id="@+id/myButton3" android:layout_height="wrap_content" android:layout_width="wrap_content" android:text=" LED" android:layout_height="wrap_content" android:textSize="18sp" android:textSize="18sp" android:layout_x="184px" android:text="Exit" android:layout_y="88px" android:layout_x="130px" > android:layout_y="150px" </Button> > </Button> </AbsoluteLayout> Android Copyright (c) 2009 Jollen’s Consulting . www.jollen.org/consulting
  • 59. /* setOnClickListener */ mButton1.setOnClickListener(new Button.OnClickListener() package led.com.cn; { import android.app.Activity; @Override import android.os.Bundle; /* onClick */ import android.view.View; public void onClick(View v) moko365.com import android.widget.Button; { // TODO Auto-generated method stub public class Led_control extends Activity { /** Called when the activity is first created. */ setTitle("LED !"); /* 3 Button private */ /* 4 LED */ private Button mButton1; Linuxc.send(num, led_on); private Button mButton2; private Button mButton3; } }); /* LED */ mButton2.setOnClickListener(new Button.OnClickListener() public int num = 4; { /* 1 */ @Override public int led_on = 1; public void onClick(View v) /* 2 */ { public int led_off = 2; // TODO Auto-generated method stub public int fd = 0; setTitle("LED !"); /* 4 LED */ @Override Linuxc.send(num, led_off); public void onCreate(Bundle savedInstanceState) { } super.onCreate(savedInstanceState); }); setContentView(R.layout.main); mButton3.setOnClickListener(new Button.OnClickListener() mButton1 =(Button) findViewById(R.id.myButton1); { mButton2 =(Button) findViewById(R.id.myButton2); @Override mButton3 =(Button) findViewById(R.id.myButton3); public void onClick(View v) { /* led fd */ // TODO Auto-generated method stub fd = Linuxc.openled(); /* */ if (fd < 0){ Linuxc.closeled(); setTitle(" "); /* */ finish(); finish(); /* */ } } }); else { setTitle(" "); } }} } Android Copyright (c) 2009 Jollen’s Consulting . www.jollen.org/consulting
  • 60. package led.com.cn; import android.util.Log; moko365.com public class Linuxc { static { try { Log.i("JNI", "Trying to load libled.so"); /* libled.so */ System.loadLibrary("led"); } catch (UnsatisfiedLinkError ule) { Log.e("JNI", "WARNING: Could not load libled.so"); }} /* openled() */ public static native int openled(); /* closeled () */ public static native int closeled(); /* send() */ public static native int send(int led_num, int on_off); } Android Copyright (c) 2009 Jollen’s Consulting . www.jollen.org/consulting
  • 61. 贝 moko365.com 录 个 头 数声 头 $ mkdir led_test $ cd led_test ... $ /javah -classpath ~/Led_Control/bin/ led.com.cn.Linuxc Android Copyright (c) 2009 Jollen’s Consulting . www.jollen.org/consulting
  • 62. #include <stdio.h> #include <stdlib.h> moko365.com #include <fcntl.h> #include <errno.h> #include <unistd.h> #include <sys/ioctl.h> #include "led_com_cn_Linuxc.h" #include "led.h" #define LED_TEST 3 #define DEVICE_BLTEST "/dev/led" int fd; JNIEXPORT jint JNICALL Java_led_com_cn_Linuxc_openled (JNIEnv *env, jclass mc) { fd= open(DEVICE_BLTEST,O_RDONLY); return fd; } JNIEXPORT jint JNICALL Java_led_com_cn_Linuxc_closeled (JNIEnv *env, jclass mc) { close(fd); } JNIEXPORT jint JNICALL Java_led_com_cn_Linuxc_send (JNIEnv *env, jclass mc, jint a, jint b) { ioctl(fd,b,&a); } Android Copyright (c) 2009 Jollen’s Consulting . www.jollen.org/consulting
  • 63. moko365.com $ arm-none-linux-gnueabi-gcc -I/home/online/jdk1.6.0_14/include -I/home/online/jdk1.6.0_14/ include/linux -fpic -c led_com_cn_linuxc.c $arm-none-linux-gnueabi-ld-T /home/online/CodeSourcery/Sourcery_G++_Lite/arm-none-linux- gnueabi/lib/ldscripts/armelf_linux_eabi.xsc -shared -o libled.so led_com_cn_linuxc.o Android Copyright (c) 2009 Jollen’s Consulting . www.jollen.org/consulting