SlideShare uma empresa Scribd logo
1 de 14
Baixar para ler offline
Android Services Black Magic
by Aleksandar (Saša) Gargenta, Marakana Inc.


            Android Builders Summit
              February 14th, 2012
             Redwood Shores, CA

                  Screencast @
              http://mrkn.co/munz7
About
Aleksandar (Saša) Gargenta
 •   Developer and instructor of Android Internals and Security training at Marakana
 •   Founder and co-organizer of San Francisco Android User Group (sfandroid.org)
 •   Founder and co-organizer of San Francisco Java User Group (sfjava.org)
 •   Co-founder and co-organizer of San Francisco HTML5 User Group (sfhtml5.org)
 •   Speaker at AnDevCon, AndroidOpen, Android Builders Summit, etc.
 •   Server-side Java and Linux, since 1997
 •   Android/embedded Java and Linux, since 2009
 •   Worked on SMS, WAP Push, MMS, OTA provisioning in previous life
 •   @agargenta on Twitter
 •   aleksandar.gargenta@gmail.com on Google+




Marakana - Helping people get better at what they do
 •   Training on cutting edge open source software (like Android!)
 •   Rockstar team of experts, on staff
 •   Content is king
 •   http://marakana.com/
Android Stack
                               Applications

                                                                        Content
   Home         Contacts           Phone          Browser
                                                                       Providers


                           Application Framework

  Activity      Window             Vibrator            WiFi               Battery
  Service       Service            Service            Service             Service

 Package       Telephony          Resource            Location         Notification
 Service        Service           Manager             Service           Service


                               Native Layer
Surface        Media                                             Android Runtime
                              SQLite           SSL
Flinger      Framework

                                                                    Core Libs
OpenGL         vold            netd           WebKit

                                                                      Dalvik
 libwifi      libcamera         libgps          libc                    VM




   Display       Camera        Linux Kernel             GPS               Binder
   Driver         Driver                                Driver            Driver

   Keypad         WiFi                                  Audio             Power
    Driver        Driver                                Driver            Mgmt
Vibrator on Android
                                                                                               com.example.app (/data/app/ExampleApp.apk)                                                                                                                          system_server

                                                                                                                DalvikVM                                                                                                                                              DalvikVM

                                                                                                               classes.dex                                                                                                                              /system/framework/framework.jar

                                                                                                    com.example.app.ExampleActivity                                                                                                                      android.os.IVibratorService.Stub




                                                                                                                                                                                                                                                                                                          extends
                                                    calls




                                                                                                     /system/framework/framework.jar                                                                                                                      /system/framework/services.jar




                                                                                                                                                              registers "vibrator" service via ServiceManager
                                                                                                           android.os.Vibrator                                                                                                                           com.android.server.SystemServer




                                                                                                                                                                                                                 creates
                                                                                                                                              calls
                                                                                                  android.os.IVibratorService.Stub.Proxy                                                                                                                com.android.server.VibratorService
                                                          looks up "vibrator" service via SM




                                                                                                                                                                                                                                                                                                          calls/links to
gets a reference to the ServiceManager (handle=0)




                                                                                                                                                                                                                                                         /system/lib/libandroid_servers.so
                                                                                                     /system/lib/libandroid_runtime.so




                                                                                                                                                                                                                references
                                                                                                                                               uses (calls)
                                                                                                                                                                                                                                                    com_android_server_VibratorService.cpp
                                                                                                          /system/lib/libbinder.so




                                                                                                                                                                                                                                                                                                        calls
                                                                                                            /system/lib/lib*.so                                                                                                                         /system/lib/libhardware_legacy.so
                                                                                                                                                                                                                                                                      vibrator.c




                                                                                                                                                                                                                             invokes transaction




                                                                                                                                                                                                                                                                                                       uses (io write)
                                                                                                       /system/bin/servicemanager                                                                                                                        /system/lib/libandroid_runtime.so

                                                                                                            service_manager.c                                                                                                                                  /system/lib/libbinder.so
                                                    references




                                                                                                             /system/lib/lib*.so                                                                                                                                  /system/lib/lib*.so



                                                                                                                   /dev/binder                                                                                                                        /sys/class/timed_output/vibrator/enable
                                                                                                                                                              Kernel
                                                    registers as binder context manager
                                                                                                                                                                                                                                                   gets a reference to the ServiceManager (handle=0)
Power on Android
                                                                                            com.example.app (/data/app/ExampleApp.apk)                                                                                                                 system_server

                                                                                                             DalvikVM                                                                                                                                     DalvikVM
                                                                                                                                                                                                                                             /system/framework/framework.jar
                                                                                                            classes.dex
                                                                                                                                                                                                                                              android.os.IPowerManager.Stub
                                                                                                 com.example.app.ExampleActivity
                                                                                                                                                                                                                                                      android.os.Power
                                                    calls




                                                                                                                                                                                                                                                                                                                  calls
                                                                                                  /system/framework/framework.jar                                                                                                             /system/framework/services.jar




                                                                                                                                                                                                                                                                                     extends
                                                                                                                                              creates

                                                                                                                                                           registers "power" service via ServiceManager
                                                                                                    android.os.PowerManager                                                                                                                  com.android.server.SystemServer




                                                                                                                                                                                                           creates
                                                                                                android.os.PowerManager.WakeLock                                                                                                            com.android.server.PowerManagerService
                                                          looks up "power" service via SM




                                                                                                                                                                                                                                                                                               calls/links to
gets a reference to the ServiceManager (handle=0)




                                                                                               android.os.IPowerManager.Stub.Proxy        calls

                                                                                                                                                                                                                                             /system/lib/libandroid_runtime.so
                                                                                                  /system/lib/libandroid_runtime.so




                                                                                                                                                                                                          references
                                                                                                                                                                                                                                                  android_os_Power.cpp
                                                                                                       /system/lib/libbinder.so




                                                                                                                                                                                                                                                                                                 calls
                                                                                                         /system/lib/lib*.so                                                                                                                /system/lib/libhardware_legacy.so


                                                                                                                                            uses (calls)
                                                                                                                                                                                                                                                           power.c




                                                                                                                                                                                                                                                                                                uses (io write)
                                                                                                    /system/bin/servicemanager                                                                                                               /system/lib/libandroid_runtime.so

                                                                                                        service_manager.c                                                                                                                          /system/lib/libbinder.so
                                                                                                                                                                                                                       invokes
                                                    references




                                                                                                          /system/lib/lib*.so                                                                                                                         /system/lib/lib*.so



                                                                                                                /dev/binder                                                                                                                         /sys/power/wake_lock
                                                                                                                                                           Kernel
                                                    registers as binder context manager
                                                                                                                                                                                                                                 gets a reference to the ServiceManager (handle=0)
Alarm on Android
                                                                                                            com.android.deskclock                                                                                                                         system_server
                                                                                                        (/system/app/DeskClock.apk)
                                                                                                                                                                                                                                                             DalvikVM
                                                                                                                   DalvikVM
                                                                                                                                                                                                                                                /system/framework/framework.jar
                                                                                                                  classes.dex
                                                                                                                                                                                                                                                android.app.IAlarmManager.Stub
                                                                                      calls




                                                                                                     com.android.deskclock.AlarmClock

                                                                                                       com.android.deskclock.Alarms




                                                                                                                                                                                                                                                                                        extends
                                                                                                                                                                                                                                                 /system/framework/services.jar
                                                                                      uses




                                                                                                                                               calls
                                                                                                      /system/framework/framework.jar




                                                                                                                                                              registers "alarm" service via ServiceManager
                                                                                                                                                                                                                                                com.android.server.SystemServer




                                                                                                                                                                                                              creates
                                                                                                          android.app.ContextImpl

                                                                                                        android.app.AlarmManager                                                                                                                      .AlarmManagerService
                                                    looks up "alarm" service via SM




                                                                                                                                                 calls




                                                                                                                                                                                                                                                                                        calls/links to
gets a reference to the ServiceManager (handle=0)




                                                                                                   android.app.IAlarmManager.Stub.Proxy

                                                                                                      /system/lib/libandroid_runtime.so




                                                                                                                                                                                                             references
                                                                                                                                                                                                                                                /system/lib/libandroid_servers.so
                                                                                                            /system/lib/libbinder.so



                                                                                                                                               uses (calls)
                                                                                                                                                                                                                                           com_android_server_AlarmManagerService.cpp

                                                                                                               /system/lib/lib*.so


                                                                                                        /system/bin/servicemanager                                                                                                              /system/lib/libandroid_runtime.so




                                                                                                                                                                                                                                                                                         uses (ioctl)
                                                                                                              service_manager.c                                                                                                                       /system/lib/libbinder.so
                                                                                                                                                                                                                          invokes
                                                                                      references




                                                                                                               /system/lib/lib*.so                                                                                                                       /system/lib/lib*.so



                                                                                                                      /dev/binder                                                                                                                            /dev/alarm
                                                                                                                                                              Kernel
                                                                                      registers as binder context manager
                                                                                                                                                                                                                                    gets a reference to the ServiceManager (handle=0)
Package Manager on Android
                                                                                                 com.android.packageinstaller                                                                                                     system_server
                                                                                              (/system/app/PackageInstaller.apk)
                                                                                                                                                                                                                                     DalvikVM
                                                                                                             DalvikVM
                                                                                                            classes.dex                                                                                                /system/framework/framework.jar
                                                                                                    .PackageInstallerActivity                                                                                         android.content.pm.IPackageManager.Stub
                                                     calls




                                                                                                        .InstallAppProgress




                                                                                                                                                                                                                                                                            extends
                                                                                                                                                    extends
                                                                                                                                                                                                                         /system/framework/services.jar
                                                                                               /system/framework/framework.jar
                                                    calls




                                                                                                                                                                                     creates
                                                                                             android.content.pm.PackageManager                                                                                          com.android.server.SystemServer

                                                                                             android.app.ApplicationPackageManager                                                                                    com.android.server.pm.PackageManagerService




                                                                                                                                                    calls




                                                                                                                                                                                                                                                                         calls
                                                         looks up "package" service via SM




                                                                                                                                                                             registers "package" service via SM
gets a reference to the ServiceManager (handle=0)




                                                                                             android.content.pm.IPackageManager.Stub.Proxy
                                                                                                                                                                                                                         com.android.server.pm.Installer

                                                                                                /system/lib/libandroid_runtime.so
                                                                                                                                                                                                                        /system/lib/libandroid_runtime.so




                                                                                                                                                                                       references
                                                                                                      /system/lib/libbinder.so



                                                                                                                                             uses (calls)
                                                                                                                                                                                                                              /system/lib/libbinder.so
                                                                                                         /system/lib/lib*.so




                                                                                                                                                                                                                                                                         send messages
                                                                                                                                                                                                                                 /system/lib/lib*.so




                                                                                                                                                               invokes transaction
                                                                                                   /system/bin/servicemanager

                                                                                                        service_manager.c                                                                                                              installd
                                                                                                                                                                                                                                      installd.c
                                                      references




                                                                                                         /system/lib/lib*.so
                                                                                                                                                                                                                                                          get messages


                                                                                                                 /dev/binder                                                                                                    /dev/socket/installd
                                                                                                                                                              Kernel
                                                     registers as binder context manager
                                                                                                                                                                                                                  gets a reference to the ServiceManager (handle=0)
WiFi Management on Android
                                                                                          com.example.app (/data/app/ExampleApp.apk)                                                                                                     system_server
                                                                                                                                                                                                                                            DalvikVM
                                                                                                           DalvikVM
                                                                                                                                                                                                                                /system/framework/framework.jar
                                                                                                          classes.dex
                                                                                                                                                                                                                                android.net.wifi.IWifiManager.Stub
                                                                                               com.example.app.ExampleActivity
                                                                                                                                                                                                                                android.net.wifi.WifiStateMachine




                                                                                                                                                                                                        calls
                                                    calls




                                                                                                /system/framework/framework.jar                                                                                                     android.net.wifi.WifiNative




                                                                                                                                                                                                                                                                                       extends
                                                                                                                                                                                          creates




                                                                                                                                                      calls
                                                                                                    android.net.wifi.WifiManager                                                                                                   /system/framework/services.jar




                                                                                                                                                                                                                                                                               calls
                                                                                                                                                                                                                                com.android.server.SystemServer
                                                                                            android.net.wifi.IWifiManager.Stub.Proxy




                                                                                                                                                                                                                                                                                                 calls/links to
gets a reference to the ServiceManager (handle=0)


                                                          looks up "wifi" service via SM




                                                                                                                                                                                                                                 com.android.server.WifiService




                                                                                                                                                         registers "wifi" service via SM
                                                                                                /system/lib/libandroid_runtime.so                                                                                               /system/lib/libandroid_servers.so
                                                                                                                                                                                                                                   android_net_wifi_Wifi.cpp




                                                                                                                                       uses (calls)
                                                                                                     /system/lib/libbinder.so




                                                                                                                                                                                                                                                                                       calls
                                                                                                                                                                                          references
                                                                                                                                                                                                                                /system/lib/libhardware_legacy.so
                                                                                                       /system/lib/lib*.so                                                                                                                    wifi.c




                                                                                                                                                                                                                                                                                                 calls
                                                                                                                                                                                                                                   /system/lib/libwpa_client.so
                                                                                                  /system/bin/servicemanager                                                                                                               wpa_ctrl.c




                                                                                                                                                                                                                                                                                               sends commands
                                                                                                      service_manager.c                                                                                                                /system/lib/lib*.so
                                                                                                                                                                                                  invokes
                                                    references




                                                                                                        /system/lib/lib*.so
                                                                                                                                                                                                                                        wpa_supplicant


                                                                                                              /dev/binder                                                                                                 bcmdhd               /dev/socket/wpa_wlan0
                                                                                                                                                                                      Kernel
                                                    registers as binder context manager
                                                                                                                                                                                                                calls (ioctl)                                       read commands
                                                                                                                                                                                                                as nl80211
Location on Android
                                                                                               com.example.app (/data/app/ExampleApp.apk)                                                                                         system_server

                                                                                                                DalvikVM                                                                                                            DalvikVM
                                                                                                                                                                                                                         /system/framework/framework.jar
                                                                                                               classes.dex
                                                                                                                                                                                                                              .LocationManager.Stub
                                                                                                    com.example.app.ExampleActivity




                                                                                                                                                                                                          creates




                                                                                                                                                                                                                                                                extends
                                                                                                                                                                                                                          /system/framework/services.jar
                                                    calls




                                                                                                     /system/framework/framework.jar                                                                                    com.android.server.SystemServer




                                                                                                                                               calls
                                                                                                    android.location.LocationManager                                                                                        .LocationManagerService




                                                                                                                                                                                                                                                             calls
                                                                                                                                                                                                                          .location.GpsLocationProvider




                                                                                                                                                           registers "location" service via SM
                                                          looks up "location" service via SM
gets a reference to the ServiceManager (handle=0)




                                                                                                       .LocationManager.Stub.Proxy




                                                                                                                                                                                                                                                             links to
                                                                                                                                                                                                                                                               calls
                                                                                                                                                                                                                         /system/lib/libandroid_servers.so
                                                                                                     /system/lib/libandroid_runtime.so                                                                                  _location_GpsLocationProvider.cpp




                                                                                                                                            uses (calls)



                                                                                                                                                                                                 references
                                                                                                          /system/lib/libbinder.so




                                                                                                                                                                                                                                                             loads
                                                                                                                                                                                                                                                              calls
                                                                                                                                                                                                                           /vendor/lib/hw/gps.omap4.so
                                                                                                            /system/lib/lib*.so                                                                                           impl of include/hardware/gps.h

                                                                                                                                                                                                                            /system/lib/libhardware.so
                                                                                                       /system/bin/servicemanager




                                                                                                                                                                                                                                                              uses (io)
                                                                                                                                                                                                                         /system/lib/libandroid_runtime.so
                                                                                                           service_manager.c                                                                                                  /system/lib/libbinder.so
                                                                                                                                                                                                              invokes
                                                    references




                                                                                                             /system/lib/lib*.so                                                                                                /system/lib/lib*.so



                                                                                                                   /dev/binder                                                                                                       /dev/ttyo0
                                                                                                                                                           Kernel
                                                    registers as binder context manager
Audio Policy on Android
                                                                                          com.example.app (/data/app/ExampleApp.apk)                                                                                                    system_server
                                                                                                                                                                                                                                          DalvikVM
                                                                                                            DalvikVM                                                                                                           /system/framework/framework.jar




                                                                                                                                                                                                                                                                                   extends
                                                                                                           classes.dex                                                                                                         android.media.IAudioService.Stub
                                                                                               com.example.app.ExampleActivity
                                                                                                                                                                                                                                   android.media.AudioService




                                                                                                                                                                                                                                                                                         calls
                                                     calls




                                                                                                                                                                                 creates
                                                                                                /system/framework/framework.jar                                                                                                    android.media.AudioSystem




                                                                                                                                                                                                                                                                                 links to/calls
                                                                                                 android.media.AudioManager                                                                                                     /system/framework/services.jar




                                                                                                                                                 calls
                                                                                                                                                                                                                               com.android.server.SystemServer
                                                                                              android.media.IAudioService.Stub.Proxy
                                                        looks up "audio" service via SM
gets a reference to the ServiceManager (handle=0)




                                                                                                                                                                                                                               /system/lib/libandroid_runtime.so




                                                                                                                                                                 registers "audio" service via SM
                                                                                                                                                                                                                               android_media_AudioSystem.cpp




                                                                                                                                                                                                                                                                                 calls
                                                                                                /system/lib/libandroid_runtime.so
                                                                                                                                                                                                                                    /system/lib/libmedia.so
                                                                                                                                                                                                                                     android.AudioSystem




                                                                                                                                                                                                                                                                                         calls
                                                                                                     /system/lib/libbinder.so                                                                                                    android.BpAudioPolicyService



                                                                                                                                                  uses (calls)
                                                                                                        /system/lib/lib*.so




                                                                                                                                                                                                    references
                                                                                                                                                                                                                                         mediaserver




                                                                                                                                                                                                                                                                                 calls
                                                                                                                                                                                                                                                                            extends
                                                                                                                                                                                                                                    /system/lib/libmedia.so
                                                                                                                                                                                                                                 android.BnAudioPolicyService
                                                                                                   /system/bin/servicemanager                                                                                                     /system/lib/libaudioflinger.so
                                                                                                                                                                                                                                   android.AudioPolicyService




                                                                                                                                                                                                                                                                                                  calls
                                                                                                       service_manager.c
                                                                                                                                                                                                                 invokes     /system/lib/hw/audio_policy.default.so
                                                                                                                                                                                                                           android_audio_legacy.AudioPolicyManagerDefault




                                                                                                                                                                                                                                                                                 calls
                                                                                                        /system/lib/lib*.so
                                                                                                                                                                                                                              /system/lib/hw/audio.primary.tuna.so
                                                                                                                                                                                                                                           audio_hw.c




                                                                                                                                                                                                                                                                                 uses (ioctl) calls
                                                                         references                                           looks up "media.audio_policy"
                                                                                                                                                                                                                                    /system/lib/libtinyalsa.so
                                                    registers as binder context manager                                                                                                                                                      mixer.c


                                                                                                               /dev/binder                                                                                                         /dev/snd/controlC0 (ALSA)
                                                                                                                                                                       Kernel
Audio Playback on Android
com.ex.app (/data/app/ExampleApp.apk)                                           mediaserver
               DalvikVM                                                                  /system/lib/libmediaplayerservice.so
                                               /system/lib/libmedia.so
              classes.dex
                                          android.BnMediaPlayerService                        android.MediaPlayerService
     com.ex.app.ExampleActivity
                                              android.BnMediaPlayer                       android.MediaPlayerService.Client
   /system/framework/framework.jar         .AudioTrack      .AudioSystem                       android.StagefrightPlayer
     android.media.MediaPlayer
                                                                                          .MediaPlayerService.AudioOutput
                                             /system/lib/libstagefright.so

      /system/lib/libmedia_jni.so        .AwesomePlayer          .AudioPlayer         /system/lib/libstagefright_soft_mp3dec.so
   android_media_MediaPlayer.cpp          .MediaSource           .MP3Source                         android.SoftMP3
                                           .OMXCodec          .MP3Extractor
       /system/lib/libmedia.so                                                                /system/lib/libaudioflinger.so
       android.BpMediaPlayer                                                            .AudioFlinger       .AudioPolicyService

    android.BpMediaPlayerService
                                         /system/lib/hw/audio.primary.tuna.so            /system/lib/              /system/lib/
                                                    audio_hw.c                       libstagefrighthw.so        libOMX_Core.so
          /system/lib/lib*.so
                                                                                      android.TIOMXPlugin           OMX_Core.c

                                               /system/lib/libtinyalsa.so               /system/lib/hw/audio_policy.default.so
     /system/bin/servicemanager
         service_manager.c                               pcm.c                        android_audio_legacy.AudioPolicyManagerDefault

          /system/lib/lib*.so




              /dev/binder                   /dev/snd/pcmC0D0p (ALSA)                          /dev/snd/controlC0 (ALSA)
                                                          Kernel
Telephony on Android
                       PhoneApp                                                                          system_server
                (/system/app/Phone.apk)
                                                                                                        DalvikVM
                          DalvikVM                                                           /system/framework/framework.jar
                          classes.dex                                                           android.media.AudioService
                                                                               uses
                      CallController


                      CallController


                          PhoneUtils

calls       /system/framework/framework.jar


        com.android.internal.telephony.CallManager
                                                          calls
             android.media.AudioManager

           com.android.internal.telephony.Phone
calls
                          implements                                                                           rild
        com.android.internal.telephony.gsm.GSMPhone
                                                                                                              rild.c




                                                                                                                                        calls
                    GsmCallTracker
                                                            Socket messages




                                                                                                       /system/lib/libril.so
                                                                                loads



                             RIL




                                                                                                                                        uses
                                                                                                /system/lib/libsecril-client.so
          RILSender                      RILReceiver
                                                                                                     /vendor/lib/libsec-ril.so

        Socket messages                 Socket messages                                               uses


                   /dev/socket/rild                                                     /dev/ttys0                      Audio drivers
                                                                              Kernel
DevicePolicy on Android
                                                                                                     com.example.enterpriseapp                                                                                                                            system_server
                                                                                                   (/data/app/EnterpriseApp.apk)
                                                                                                                                                                                                                                                          DalvikVM
                                                                                                               DalvikVM
                                                                                                                                                                                                                                               /system/framework/framework.jar
                                                                                                              classes.dex
                                                                                                                                                                                                                                              android.app.admin.DevicePolicyManager.Stub
                                                                                                           .ExampleActivity
                                                       calls




                                                                                                                                                                                                                                                  android.os.RecoverySystem




                                                                                                                                                                                                                                                                                                   calls
                                                                                                                                                                                                                                                                                                  calls
                                                                                                                                                                                                                                                   android.os.PowerManager




                                                                                                                                                                                                                                                                                                                  extends
                                                                                                 /system/framework/framework.jar




                                                                                                                                                                                  calls
                                                                                                                                                                                                                                              com.android.internal.app.ShutdownThread
                                                                                               android.app.admin.DevicePolicyManager
                                                                                                                                                                                                                                                        android.os.Power
                                                    looks up "device_policy" service via SM




                                                                                                                                                   calls




                                                                                                                                                                                                                                                                                                calls
                                                                                                                                                                registers "device_policy" service via SM

                                                                                                                                                                                                                 creates




                                                                                                                                                                                                                                                                                             calls
                                                                                                                                                                                                                                                /system/framework/services.jar
gets a reference to the ServiceManager (handle=0)




                                                                                              android.app.admin.DevicePolicyManager.Stub.Proxy
                                                                                                                                                                                                                                               com.android.server.SystemServer
                                                                                                                                                                                                                                             com.android.server.DevicePolicyManagerService
                                                                                                 /system/lib/libandroid_runtime.so
                                                                                                                                                                                                                                              com.android.server.PowerManagerService
                                                                                                       /system/lib/libbinder.so




                                                                                                                                                                                                                                                                                              links to/calls
                                                                                                                                                                                                                       references
                                                                                                          /system/lib/lib*.so                                                                                                                  /system/lib/libandroid_runtime.so

                                                                                                                                                 uses (calls)



                                                                                                                                                                                                           invokes transaction
                                                                                                                                                                                                                                                     android_os_Power.cpp




                                                                                                                                                                                                                                    reboot
                                                                                                    /system/bin/servicemanager                                                                                                                          /system/lib/lib*.so

                                                                                                         service_manager.c                                                                                                                                   recovery




                                                                                                                                                                                                                                                                                                               writes
                                                                     references




                                                                                                                                                                                                                                                                                                  reads
                                                                                                           /system/lib/lib*.so                                                                                                                               recovery.c



                                                                                                                                                                                                                                                   /cache/recovery/command
                                                                                                                   /dev/binder
                                                                                                                                                                /dev/block/platform/omap/omap_hsmmc.0/by-name/userdata                                                                        erases
                                                                                                                                                                 Kernel                                                                                                                      formats
                                                                   registers as binder context manager
                                                                                                                                                                                                                                    gets a reference to the ServiceManager (handle=0)
Thank You




For the complete screencast of this presentation go to
                http://mrkn.co/munz7




                @agargenta on Twitter
        aleksandar.gargenta@gmail.com on G+

Mais conteúdo relacionado

Mais procurados

Dataplane programming with eBPF: architecture and tools
Dataplane programming with eBPF: architecture and toolsDataplane programming with eBPF: architecture and tools
Dataplane programming with eBPF: architecture and toolsStefano Salsano
 
Deep dive in container service discovery
Deep dive in container service discoveryDeep dive in container service discovery
Deep dive in container service discoveryDocker, Inc.
 
Linux Profiling at Netflix
Linux Profiling at NetflixLinux Profiling at Netflix
Linux Profiling at NetflixBrendan Gregg
 
OpenStack DRaaS - Freezer - 101
OpenStack DRaaS - Freezer - 101OpenStack DRaaS - Freezer - 101
OpenStack DRaaS - Freezer - 101Trinath Somanchi
 
Ovs dpdk hwoffload way to full offload
Ovs dpdk hwoffload way to full offloadOvs dpdk hwoffload way to full offload
Ovs dpdk hwoffload way to full offloadKevin Traynor
 
Ansible for beginners
Ansible for beginnersAnsible for beginners
Ansible for beginnersKuo-Le Mei
 
LoadBalancer using KeepAlived
LoadBalancer using KeepAlivedLoadBalancer using KeepAlived
LoadBalancer using KeepAlivedKhushalChandak1
 
RIL and Android Telephony
RIL and Android TelephonyRIL and Android Telephony
RIL and Android TelephonyLeaf Johnson
 
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
 
Containerd Internals: Building a Core Container Runtime
Containerd Internals: Building a Core Container RuntimeContainerd Internals: Building a Core Container Runtime
Containerd Internals: Building a Core Container RuntimePhil Estes
 
SDDC(software defined data center)에서 NFV의 역할과 관리도구 (세미나 발표 자료)
SDDC(software defined data center)에서 NFV의 역할과 관리도구 (세미나 발표 자료)SDDC(software defined data center)에서 NFV의 역할과 관리도구 (세미나 발표 자료)
SDDC(software defined data center)에서 NFV의 역할과 관리도구 (세미나 발표 자료)정명훈 Jerry Jeong
 
Cadence: Orchestration as Code
Cadence: Orchestration as CodeCadence: Orchestration as Code
Cadence: Orchestration as CodeMaxim Fateev
 
Introduction to kubernetes
Introduction to kubernetesIntroduction to kubernetes
Introduction to kubernetesRishabh Indoria
 
OptView2 - C++ on Sea 2022
OptView2 - C++ on Sea 2022OptView2 - C++ on Sea 2022
OptView2 - C++ on Sea 2022Ofek Shilon
 

Mais procurados (20)

Dataplane programming with eBPF: architecture and tools
Dataplane programming with eBPF: architecture and toolsDataplane programming with eBPF: architecture and tools
Dataplane programming with eBPF: architecture and tools
 
Deep dive in container service discovery
Deep dive in container service discoveryDeep dive in container service discovery
Deep dive in container service discovery
 
Linux Profiling at Netflix
Linux Profiling at NetflixLinux Profiling at Netflix
Linux Profiling at Netflix
 
OpenStack DRaaS - Freezer - 101
OpenStack DRaaS - Freezer - 101OpenStack DRaaS - Freezer - 101
OpenStack DRaaS - Freezer - 101
 
Ovs dpdk hwoffload way to full offload
Ovs dpdk hwoffload way to full offloadOvs dpdk hwoffload way to full offload
Ovs dpdk hwoffload way to full offload
 
Ansible for beginners
Ansible for beginnersAnsible for beginners
Ansible for beginners
 
LoadBalancer using KeepAlived
LoadBalancer using KeepAlivedLoadBalancer using KeepAlived
LoadBalancer using KeepAlived
 
RIL and Android Telephony
RIL and Android TelephonyRIL and Android Telephony
RIL and Android Telephony
 
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
 
Containerd Internals: Building a Core Container Runtime
Containerd Internals: Building a Core Container RuntimeContainerd Internals: Building a Core Container Runtime
Containerd Internals: Building a Core Container Runtime
 
SDDC(software defined data center)에서 NFV의 역할과 관리도구 (세미나 발표 자료)
SDDC(software defined data center)에서 NFV의 역할과 관리도구 (세미나 발표 자료)SDDC(software defined data center)에서 NFV의 역할과 관리도구 (세미나 발표 자료)
SDDC(software defined data center)에서 NFV의 역할과 관리도구 (세미나 발표 자료)
 
Cadence: Orchestration as Code
Cadence: Orchestration as CodeCadence: Orchestration as Code
Cadence: Orchestration as Code
 
ELF
ELFELF
ELF
 
Embedded Android : System Development - Part II (Linux device drivers)
Embedded Android : System Development - Part II (Linux device drivers)Embedded Android : System Development - Part II (Linux device drivers)
Embedded Android : System Development - Part II (Linux device drivers)
 
Introduction to kubernetes
Introduction to kubernetesIntroduction to kubernetes
Introduction to kubernetes
 
OptView2 - C++ on Sea 2022
OptView2 - C++ on Sea 2022OptView2 - C++ on Sea 2022
OptView2 - C++ on Sea 2022
 
Network Drivers
Network DriversNetwork Drivers
Network Drivers
 
Quick and Solid - Baremetal on OpenStack | Rico Lin
Quick and Solid - Baremetal on OpenStack | Rico LinQuick and Solid - Baremetal on OpenStack | Rico Lin
Quick and Solid - Baremetal on OpenStack | Rico Lin
 
Tail f - Why ConfD
Tail f - Why ConfDTail f - Why ConfD
Tail f - Why ConfD
 
Android Binder: Deep Dive
Android Binder: Deep DiveAndroid Binder: Deep Dive
Android Binder: Deep Dive
 

Destaque

Marakana Android Internals
Marakana Android InternalsMarakana Android Internals
Marakana Android InternalsMarko Gargenta
 
Permission enforcement s in android new (1)
Permission   enforcement s  in android new (1)Permission   enforcement s  in android new (1)
Permission enforcement s in android new (1)Siddhartha Kakarla
 
Android. behind the scenes_programatica 2012
Android. behind the scenes_programatica 2012Android. behind the scenes_programatica 2012
Android. behind the scenes_programatica 2012Agora Group
 
Hierarchy Viewer Internals
Hierarchy Viewer InternalsHierarchy Viewer Internals
Hierarchy Viewer InternalsKyungmin Lee
 
Debugging webOS applications
Debugging webOS applicationsDebugging webOS applications
Debugging webOS applicationsfpatton
 
Internals - Exploring the webOS Browser and JavaScript
Internals - Exploring the webOS Browser and JavaScriptInternals - Exploring the webOS Browser and JavaScript
Internals - Exploring the webOS Browser and JavaScriptfpatton
 
Capable Web: Chrome Apps and Firefox Webapp
Capable Web: Chrome Apps and Firefox WebappCapable Web: Chrome Apps and Firefox Webapp
Capable Web: Chrome Apps and Firefox WebappFred Lin
 
Automated Historical Performance Analysis with kmemtracer
Automated Historical Performance Analysis with kmemtracerAutomated Historical Performance Analysis with kmemtracer
Automated Historical Performance Analysis with kmemtracerKyungmin Lee
 
Behavior Driven Development
Behavior Driven DevelopmentBehavior Driven Development
Behavior Driven DevelopmentMarakana Inc.
 
Introducing chrome apps (ogura)
Introducing chrome apps (ogura)Introducing chrome apps (ogura)
Introducing chrome apps (ogura)Kazuhiro Ogura
 
Introduction To Google Chrome Os
Introduction To Google Chrome OsIntroduction To Google Chrome Os
Introduction To Google Chrome OsSaurabh Jinturkar
 
Google Chrome Extensions
Google Chrome ExtensionsGoogle Chrome Extensions
Google Chrome ExtensionsSamantha Morra
 
Android security in depth
Android security in depthAndroid security in depth
Android security in depthSander Alberink
 
Intro To webOS
Intro To webOSIntro To webOS
Intro To webOSfpatton
 

Destaque (20)

Marakana Android Internals
Marakana Android InternalsMarakana Android Internals
Marakana Android Internals
 
Permission enforcement s in android new (1)
Permission   enforcement s  in android new (1)Permission   enforcement s  in android new (1)
Permission enforcement s in android new (1)
 
JRuby at Square
JRuby at SquareJRuby at Square
JRuby at Square
 
Android. behind the scenes_programatica 2012
Android. behind the scenes_programatica 2012Android. behind the scenes_programatica 2012
Android. behind the scenes_programatica 2012
 
Hierarchy Viewer Internals
Hierarchy Viewer InternalsHierarchy Viewer Internals
Hierarchy Viewer Internals
 
Debugging webOS applications
Debugging webOS applicationsDebugging webOS applications
Debugging webOS applications
 
Internals - Exploring the webOS Browser and JavaScript
Internals - Exploring the webOS Browser and JavaScriptInternals - Exploring the webOS Browser and JavaScript
Internals - Exploring the webOS Browser and JavaScript
 
Capable Web: Chrome Apps and Firefox Webapp
Capable Web: Chrome Apps and Firefox WebappCapable Web: Chrome Apps and Firefox Webapp
Capable Web: Chrome Apps and Firefox Webapp
 
Automated Historical Performance Analysis with kmemtracer
Automated Historical Performance Analysis with kmemtracerAutomated Historical Performance Analysis with kmemtracer
Automated Historical Performance Analysis with kmemtracer
 
Palm WebOS Overview
Palm WebOS OverviewPalm WebOS Overview
Palm WebOS Overview
 
What is a shell script
What is a shell scriptWhat is a shell script
What is a shell script
 
Chrome extensions
Chrome extensionsChrome extensions
Chrome extensions
 
Behavior Driven Development
Behavior Driven DevelopmentBehavior Driven Development
Behavior Driven Development
 
Introducing chrome apps (ogura)
Introducing chrome apps (ogura)Introducing chrome apps (ogura)
Introducing chrome apps (ogura)
 
Introduction To Google Chrome Os
Introduction To Google Chrome OsIntroduction To Google Chrome Os
Introduction To Google Chrome Os
 
Google Chrome Extensions
Google Chrome ExtensionsGoogle Chrome Extensions
Google Chrome Extensions
 
Web o sppt
Web o spptWeb o sppt
Web o sppt
 
Android security in depth
Android security in depthAndroid security in depth
Android security in depth
 
Intro To webOS
Intro To webOSIntro To webOS
Intro To webOS
 
Android Audio System
Android Audio SystemAndroid Audio System
Android Audio System
 

Semelhante a Android Services Black Magic by Aleksandar Gargenta

Deep Dive Into Android Security
Deep Dive Into Android SecurityDeep Dive Into Android Security
Deep Dive Into Android SecurityMarakana Inc.
 
Java one brazil_keynote_dochez
Java one brazil_keynote_dochezJava one brazil_keynote_dochez
Java one brazil_keynote_dochezJerome Dochez
 
vFabric - Ideal Platform for SaaS Apps
vFabric - Ideal Platform for SaaS AppsvFabric - Ideal Platform for SaaS Apps
vFabric - Ideal Platform for SaaS AppsVMware vFabric
 
Wakanda - apps.berlin.js - 2012-11-29
Wakanda - apps.berlin.js - 2012-11-29Wakanda - apps.berlin.js - 2012-11-29
Wakanda - apps.berlin.js - 2012-11-29Alexandre Morgaut
 
Android Introduction
Android IntroductionAndroid Introduction
Android Introductionaswapnal
 
Rails in the bowels
Rails in the bowelsRails in the bowels
Rails in the bowelsCreditas
 
SPEC INDIA Java Case Study
SPEC INDIA Java Case StudySPEC INDIA Java Case Study
SPEC INDIA Java Case StudySPEC INDIA
 
Eclipse & die Microsoft cloud
Eclipse & die Microsoft cloudEclipse & die Microsoft cloud
Eclipse & die Microsoft cloudPatric Boscolo
 
Java EE7: Developing for the Cloud
Java EE7: Developing for the CloudJava EE7: Developing for the Cloud
Java EE7: Developing for the CloudDmitry Buzdin
 
Polysource-IT Profile
Polysource-IT ProfilePolysource-IT Profile
Polysource-IT ProfileHelen
 
Polysource-IT Profile
Polysource-IT ProfilePolysource-IT Profile
Polysource-IT ProfileHelen
 
Dev ops for cross platform mobile modeveast 12
Dev ops for cross platform mobile   modeveast 12Dev ops for cross platform mobile   modeveast 12
Dev ops for cross platform mobile modeveast 12Sanjeev Sharma
 
Modern Architectures with Spring and JavaScript
Modern Architectures with Spring and JavaScriptModern Architectures with Spring and JavaScript
Modern Architectures with Spring and JavaScriptmartinlippert
 
Amdatu - ApacheCon NA 2011
Amdatu - ApacheCon NA 2011Amdatu - ApacheCon NA 2011
Amdatu - ApacheCon NA 2011Bram de Kruijff
 
Classloader leak detection in websphere application server
Classloader leak detection in websphere application serverClassloader leak detection in websphere application server
Classloader leak detection in websphere application serverRohit Kelapure
 
Poly Source It Profile
Poly Source It ProfilePoly Source It Profile
Poly Source It Profilemoseskhedi
 
Polysource It Profile
Polysource It ProfilePolysource It Profile
Polysource It Profileelenarys
 

Semelhante a Android Services Black Magic by Aleksandar Gargenta (20)

Deep Dive Into Android Security
Deep Dive Into Android SecurityDeep Dive Into Android Security
Deep Dive Into Android Security
 
Java one brazil_keynote_dochez
Java one brazil_keynote_dochezJava one brazil_keynote_dochez
Java one brazil_keynote_dochez
 
vFabric - Ideal Platform for SaaS Apps
vFabric - Ideal Platform for SaaS AppsvFabric - Ideal Platform for SaaS Apps
vFabric - Ideal Platform for SaaS Apps
 
V fabric overview
V fabric overviewV fabric overview
V fabric overview
 
T04f
T04fT04f
T04f
 
Wakanda - apps.berlin.js - 2012-11-29
Wakanda - apps.berlin.js - 2012-11-29Wakanda - apps.berlin.js - 2012-11-29
Wakanda - apps.berlin.js - 2012-11-29
 
Android Introduction
Android IntroductionAndroid Introduction
Android Introduction
 
Rails in the bowels
Rails in the bowelsRails in the bowels
Rails in the bowels
 
SPEC INDIA Java Case Study
SPEC INDIA Java Case StudySPEC INDIA Java Case Study
SPEC INDIA Java Case Study
 
Core Android
Core AndroidCore Android
Core Android
 
Eclipse & die Microsoft cloud
Eclipse & die Microsoft cloudEclipse & die Microsoft cloud
Eclipse & die Microsoft cloud
 
Java EE7: Developing for the Cloud
Java EE7: Developing for the CloudJava EE7: Developing for the Cloud
Java EE7: Developing for the Cloud
 
Polysource-IT Profile
Polysource-IT ProfilePolysource-IT Profile
Polysource-IT Profile
 
Polysource-IT Profile
Polysource-IT ProfilePolysource-IT Profile
Polysource-IT Profile
 
Dev ops for cross platform mobile modeveast 12
Dev ops for cross platform mobile   modeveast 12Dev ops for cross platform mobile   modeveast 12
Dev ops for cross platform mobile modeveast 12
 
Modern Architectures with Spring and JavaScript
Modern Architectures with Spring and JavaScriptModern Architectures with Spring and JavaScript
Modern Architectures with Spring and JavaScript
 
Amdatu - ApacheCon NA 2011
Amdatu - ApacheCon NA 2011Amdatu - ApacheCon NA 2011
Amdatu - ApacheCon NA 2011
 
Classloader leak detection in websphere application server
Classloader leak detection in websphere application serverClassloader leak detection in websphere application server
Classloader leak detection in websphere application server
 
Poly Source It Profile
Poly Source It ProfilePoly Source It Profile
Poly Source It Profile
 
Polysource It Profile
Polysource It ProfilePolysource It Profile
Polysource It Profile
 

Mais de Marakana Inc.

Martin Odersky: What's next for Scala
Martin Odersky: What's next for ScalaMartin Odersky: What's next for Scala
Martin Odersky: What's next for ScalaMarakana Inc.
 
Why Java Needs Hierarchical Data
Why Java Needs Hierarchical DataWhy Java Needs Hierarchical Data
Why Java Needs Hierarchical DataMarakana Inc.
 
Pictures from "Learn about RenderScript" meetup at SF Android User Group
Pictures from "Learn about RenderScript" meetup at SF Android User GroupPictures from "Learn about RenderScript" meetup at SF Android User Group
Pictures from "Learn about RenderScript" meetup at SF Android User GroupMarakana Inc.
 
Android UI Tips, Tricks and Techniques
Android UI Tips, Tricks and TechniquesAndroid UI Tips, Tricks and Techniques
Android UI Tips, Tricks and TechniquesMarakana Inc.
 
2010 07-18.wa.rails tdd-6
2010 07-18.wa.rails tdd-62010 07-18.wa.rails tdd-6
2010 07-18.wa.rails tdd-6Marakana Inc.
 
Efficient Rails Test-Driven Development - Week 6
Efficient Rails Test-Driven Development - Week 6Efficient Rails Test-Driven Development - Week 6
Efficient Rails Test-Driven Development - Week 6Marakana Inc.
 
Graphicsand animations devoxx2010 (1)
Graphicsand animations devoxx2010 (1)Graphicsand animations devoxx2010 (1)
Graphicsand animations devoxx2010 (1)Marakana Inc.
 
What's this jQuery? Where it came from, and how it will drive innovation
What's this jQuery? Where it came from, and how it will drive innovationWhat's this jQuery? Where it came from, and how it will drive innovation
What's this jQuery? Where it came from, and how it will drive innovationMarakana Inc.
 
jQuery State of the Union - Yehuda Katz
jQuery State of the Union - Yehuda KatzjQuery State of the Union - Yehuda Katz
jQuery State of the Union - Yehuda KatzMarakana Inc.
 
Pics from: "James Gosling on Apple, Apache, Google, Oracle and the Future of ...
Pics from: "James Gosling on Apple, Apache, Google, Oracle and the Future of ...Pics from: "James Gosling on Apple, Apache, Google, Oracle and the Future of ...
Pics from: "James Gosling on Apple, Apache, Google, Oracle and the Future of ...Marakana Inc.
 
Efficient Rails Test Driven Development (class 4) by Wolfram Arnold
Efficient Rails Test Driven Development (class 4) by Wolfram ArnoldEfficient Rails Test Driven Development (class 4) by Wolfram Arnold
Efficient Rails Test Driven Development (class 4) by Wolfram ArnoldMarakana Inc.
 
Efficient Rails Test Driven Development (class 3) by Wolfram Arnold
Efficient Rails Test Driven Development (class 3) by Wolfram ArnoldEfficient Rails Test Driven Development (class 3) by Wolfram Arnold
Efficient Rails Test Driven Development (class 3) by Wolfram ArnoldMarakana Inc.
 
Learn about JRuby Internals from one of the JRuby Lead Developers, Thomas Enebo
Learn about JRuby Internals from one of the JRuby Lead Developers, Thomas EneboLearn about JRuby Internals from one of the JRuby Lead Developers, Thomas Enebo
Learn about JRuby Internals from one of the JRuby Lead Developers, Thomas EneboMarakana Inc.
 
Replacing Java Incrementally
Replacing Java IncrementallyReplacing Java Incrementally
Replacing Java IncrementallyMarakana Inc.
 
Learn to Build like you Code with Apache Buildr
Learn to Build like you Code with Apache BuildrLearn to Build like you Code with Apache Buildr
Learn to Build like you Code with Apache BuildrMarakana Inc.
 
Learn How to Unit Test Your Android Application (with Robolectric)
Learn How to Unit Test Your Android Application (with Robolectric)Learn How to Unit Test Your Android Application (with Robolectric)
Learn How to Unit Test Your Android Application (with Robolectric)Marakana Inc.
 
Learn Learn how to build your mobile back-end with MongoDB
Learn Learn how to build your mobile back-end with MongoDBLearn Learn how to build your mobile back-end with MongoDB
Learn Learn how to build your mobile back-end with MongoDBMarakana Inc.
 
A hands on overview of the semantic web
A hands on overview of the semantic webA hands on overview of the semantic web
A hands on overview of the semantic webMarakana Inc.
 

Mais de Marakana Inc. (20)

Martin Odersky: What's next for Scala
Martin Odersky: What's next for ScalaMartin Odersky: What's next for Scala
Martin Odersky: What's next for Scala
 
Why Java Needs Hierarchical Data
Why Java Needs Hierarchical DataWhy Java Needs Hierarchical Data
Why Java Needs Hierarchical Data
 
Securing Android
Securing AndroidSecuring Android
Securing Android
 
Pictures from "Learn about RenderScript" meetup at SF Android User Group
Pictures from "Learn about RenderScript" meetup at SF Android User GroupPictures from "Learn about RenderScript" meetup at SF Android User Group
Pictures from "Learn about RenderScript" meetup at SF Android User Group
 
Android UI Tips, Tricks and Techniques
Android UI Tips, Tricks and TechniquesAndroid UI Tips, Tricks and Techniques
Android UI Tips, Tricks and Techniques
 
2010 07-18.wa.rails tdd-6
2010 07-18.wa.rails tdd-62010 07-18.wa.rails tdd-6
2010 07-18.wa.rails tdd-6
 
Efficient Rails Test-Driven Development - Week 6
Efficient Rails Test-Driven Development - Week 6Efficient Rails Test-Driven Development - Week 6
Efficient Rails Test-Driven Development - Week 6
 
Graphicsand animations devoxx2010 (1)
Graphicsand animations devoxx2010 (1)Graphicsand animations devoxx2010 (1)
Graphicsand animations devoxx2010 (1)
 
What's this jQuery? Where it came from, and how it will drive innovation
What's this jQuery? Where it came from, and how it will drive innovationWhat's this jQuery? Where it came from, and how it will drive innovation
What's this jQuery? Where it came from, and how it will drive innovation
 
jQuery State of the Union - Yehuda Katz
jQuery State of the Union - Yehuda KatzjQuery State of the Union - Yehuda Katz
jQuery State of the Union - Yehuda Katz
 
Pics from: "James Gosling on Apple, Apache, Google, Oracle and the Future of ...
Pics from: "James Gosling on Apple, Apache, Google, Oracle and the Future of ...Pics from: "James Gosling on Apple, Apache, Google, Oracle and the Future of ...
Pics from: "James Gosling on Apple, Apache, Google, Oracle and the Future of ...
 
Efficient Rails Test Driven Development (class 4) by Wolfram Arnold
Efficient Rails Test Driven Development (class 4) by Wolfram ArnoldEfficient Rails Test Driven Development (class 4) by Wolfram Arnold
Efficient Rails Test Driven Development (class 4) by Wolfram Arnold
 
Efficient Rails Test Driven Development (class 3) by Wolfram Arnold
Efficient Rails Test Driven Development (class 3) by Wolfram ArnoldEfficient Rails Test Driven Development (class 3) by Wolfram Arnold
Efficient Rails Test Driven Development (class 3) by Wolfram Arnold
 
Learn about JRuby Internals from one of the JRuby Lead Developers, Thomas Enebo
Learn about JRuby Internals from one of the JRuby Lead Developers, Thomas EneboLearn about JRuby Internals from one of the JRuby Lead Developers, Thomas Enebo
Learn about JRuby Internals from one of the JRuby Lead Developers, Thomas Enebo
 
Replacing Java Incrementally
Replacing Java IncrementallyReplacing Java Incrementally
Replacing Java Incrementally
 
Learn to Build like you Code with Apache Buildr
Learn to Build like you Code with Apache BuildrLearn to Build like you Code with Apache Buildr
Learn to Build like you Code with Apache Buildr
 
Learn How to Unit Test Your Android Application (with Robolectric)
Learn How to Unit Test Your Android Application (with Robolectric)Learn How to Unit Test Your Android Application (with Robolectric)
Learn How to Unit Test Your Android Application (with Robolectric)
 
Learn Learn how to build your mobile back-end with MongoDB
Learn Learn how to build your mobile back-end with MongoDBLearn Learn how to build your mobile back-end with MongoDB
Learn Learn how to build your mobile back-end with MongoDB
 
A hands on overview of the semantic web
A hands on overview of the semantic webA hands on overview of the semantic web
A hands on overview of the semantic web
 
Jena framework
Jena frameworkJena framework
Jena framework
 

Último

Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpinRaunakKeshri1
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhikauryashika82
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...fonyou31
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...Sapna Thakur
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingTeacherCyreneCayanan
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfAyushMahapatra5
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room servicediscovermytutordmt
 

Último (20)

Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writing
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room service
 

Android Services Black Magic by Aleksandar Gargenta

  • 1. Android Services Black Magic by Aleksandar (Saša) Gargenta, Marakana Inc. Android Builders Summit February 14th, 2012 Redwood Shores, CA Screencast @ http://mrkn.co/munz7
  • 2. About Aleksandar (Saša) Gargenta • Developer and instructor of Android Internals and Security training at Marakana • Founder and co-organizer of San Francisco Android User Group (sfandroid.org) • Founder and co-organizer of San Francisco Java User Group (sfjava.org) • Co-founder and co-organizer of San Francisco HTML5 User Group (sfhtml5.org) • Speaker at AnDevCon, AndroidOpen, Android Builders Summit, etc. • Server-side Java and Linux, since 1997 • Android/embedded Java and Linux, since 2009 • Worked on SMS, WAP Push, MMS, OTA provisioning in previous life • @agargenta on Twitter • aleksandar.gargenta@gmail.com on Google+ Marakana - Helping people get better at what they do • Training on cutting edge open source software (like Android!) • Rockstar team of experts, on staff • Content is king • http://marakana.com/
  • 3. Android Stack Applications Content Home Contacts Phone Browser Providers Application Framework Activity Window Vibrator WiFi Battery Service Service Service Service Service Package Telephony Resource Location Notification Service Service Manager Service Service Native Layer Surface Media Android Runtime SQLite SSL Flinger Framework Core Libs OpenGL vold netd WebKit Dalvik libwifi libcamera libgps libc VM Display Camera Linux Kernel GPS Binder Driver Driver Driver Driver Keypad WiFi Audio Power Driver Driver Driver Mgmt
  • 4. Vibrator on Android com.example.app (/data/app/ExampleApp.apk) system_server DalvikVM DalvikVM classes.dex /system/framework/framework.jar com.example.app.ExampleActivity android.os.IVibratorService.Stub extends calls /system/framework/framework.jar /system/framework/services.jar registers "vibrator" service via ServiceManager android.os.Vibrator com.android.server.SystemServer creates calls android.os.IVibratorService.Stub.Proxy com.android.server.VibratorService looks up "vibrator" service via SM calls/links to gets a reference to the ServiceManager (handle=0) /system/lib/libandroid_servers.so /system/lib/libandroid_runtime.so references uses (calls) com_android_server_VibratorService.cpp /system/lib/libbinder.so calls /system/lib/lib*.so /system/lib/libhardware_legacy.so vibrator.c invokes transaction uses (io write) /system/bin/servicemanager /system/lib/libandroid_runtime.so service_manager.c /system/lib/libbinder.so references /system/lib/lib*.so /system/lib/lib*.so /dev/binder /sys/class/timed_output/vibrator/enable Kernel registers as binder context manager gets a reference to the ServiceManager (handle=0)
  • 5. Power on Android com.example.app (/data/app/ExampleApp.apk) system_server DalvikVM DalvikVM /system/framework/framework.jar classes.dex android.os.IPowerManager.Stub com.example.app.ExampleActivity android.os.Power calls calls /system/framework/framework.jar /system/framework/services.jar extends creates registers "power" service via ServiceManager android.os.PowerManager com.android.server.SystemServer creates android.os.PowerManager.WakeLock com.android.server.PowerManagerService looks up "power" service via SM calls/links to gets a reference to the ServiceManager (handle=0) android.os.IPowerManager.Stub.Proxy calls /system/lib/libandroid_runtime.so /system/lib/libandroid_runtime.so references android_os_Power.cpp /system/lib/libbinder.so calls /system/lib/lib*.so /system/lib/libhardware_legacy.so uses (calls) power.c uses (io write) /system/bin/servicemanager /system/lib/libandroid_runtime.so service_manager.c /system/lib/libbinder.so invokes references /system/lib/lib*.so /system/lib/lib*.so /dev/binder /sys/power/wake_lock Kernel registers as binder context manager gets a reference to the ServiceManager (handle=0)
  • 6. Alarm on Android com.android.deskclock system_server (/system/app/DeskClock.apk) DalvikVM DalvikVM /system/framework/framework.jar classes.dex android.app.IAlarmManager.Stub calls com.android.deskclock.AlarmClock com.android.deskclock.Alarms extends /system/framework/services.jar uses calls /system/framework/framework.jar registers "alarm" service via ServiceManager com.android.server.SystemServer creates android.app.ContextImpl android.app.AlarmManager .AlarmManagerService looks up "alarm" service via SM calls calls/links to gets a reference to the ServiceManager (handle=0) android.app.IAlarmManager.Stub.Proxy /system/lib/libandroid_runtime.so references /system/lib/libandroid_servers.so /system/lib/libbinder.so uses (calls) com_android_server_AlarmManagerService.cpp /system/lib/lib*.so /system/bin/servicemanager /system/lib/libandroid_runtime.so uses (ioctl) service_manager.c /system/lib/libbinder.so invokes references /system/lib/lib*.so /system/lib/lib*.so /dev/binder /dev/alarm Kernel registers as binder context manager gets a reference to the ServiceManager (handle=0)
  • 7. Package Manager on Android com.android.packageinstaller system_server (/system/app/PackageInstaller.apk) DalvikVM DalvikVM classes.dex /system/framework/framework.jar .PackageInstallerActivity android.content.pm.IPackageManager.Stub calls .InstallAppProgress extends extends /system/framework/services.jar /system/framework/framework.jar calls creates android.content.pm.PackageManager com.android.server.SystemServer android.app.ApplicationPackageManager com.android.server.pm.PackageManagerService calls calls looks up "package" service via SM registers "package" service via SM gets a reference to the ServiceManager (handle=0) android.content.pm.IPackageManager.Stub.Proxy com.android.server.pm.Installer /system/lib/libandroid_runtime.so /system/lib/libandroid_runtime.so references /system/lib/libbinder.so uses (calls) /system/lib/libbinder.so /system/lib/lib*.so send messages /system/lib/lib*.so invokes transaction /system/bin/servicemanager service_manager.c installd installd.c references /system/lib/lib*.so get messages /dev/binder /dev/socket/installd Kernel registers as binder context manager gets a reference to the ServiceManager (handle=0)
  • 8. WiFi Management on Android com.example.app (/data/app/ExampleApp.apk) system_server DalvikVM DalvikVM /system/framework/framework.jar classes.dex android.net.wifi.IWifiManager.Stub com.example.app.ExampleActivity android.net.wifi.WifiStateMachine calls calls /system/framework/framework.jar android.net.wifi.WifiNative extends creates calls android.net.wifi.WifiManager /system/framework/services.jar calls com.android.server.SystemServer android.net.wifi.IWifiManager.Stub.Proxy calls/links to gets a reference to the ServiceManager (handle=0) looks up "wifi" service via SM com.android.server.WifiService registers "wifi" service via SM /system/lib/libandroid_runtime.so /system/lib/libandroid_servers.so android_net_wifi_Wifi.cpp uses (calls) /system/lib/libbinder.so calls references /system/lib/libhardware_legacy.so /system/lib/lib*.so wifi.c calls /system/lib/libwpa_client.so /system/bin/servicemanager wpa_ctrl.c sends commands service_manager.c /system/lib/lib*.so invokes references /system/lib/lib*.so wpa_supplicant /dev/binder bcmdhd /dev/socket/wpa_wlan0 Kernel registers as binder context manager calls (ioctl) read commands as nl80211
  • 9. Location on Android com.example.app (/data/app/ExampleApp.apk) system_server DalvikVM DalvikVM /system/framework/framework.jar classes.dex .LocationManager.Stub com.example.app.ExampleActivity creates extends /system/framework/services.jar calls /system/framework/framework.jar com.android.server.SystemServer calls android.location.LocationManager .LocationManagerService calls .location.GpsLocationProvider registers "location" service via SM looks up "location" service via SM gets a reference to the ServiceManager (handle=0) .LocationManager.Stub.Proxy links to calls /system/lib/libandroid_servers.so /system/lib/libandroid_runtime.so _location_GpsLocationProvider.cpp uses (calls) references /system/lib/libbinder.so loads calls /vendor/lib/hw/gps.omap4.so /system/lib/lib*.so impl of include/hardware/gps.h /system/lib/libhardware.so /system/bin/servicemanager uses (io) /system/lib/libandroid_runtime.so service_manager.c /system/lib/libbinder.so invokes references /system/lib/lib*.so /system/lib/lib*.so /dev/binder /dev/ttyo0 Kernel registers as binder context manager
  • 10. Audio Policy on Android com.example.app (/data/app/ExampleApp.apk) system_server DalvikVM DalvikVM /system/framework/framework.jar extends classes.dex android.media.IAudioService.Stub com.example.app.ExampleActivity android.media.AudioService calls calls creates /system/framework/framework.jar android.media.AudioSystem links to/calls android.media.AudioManager /system/framework/services.jar calls com.android.server.SystemServer android.media.IAudioService.Stub.Proxy looks up "audio" service via SM gets a reference to the ServiceManager (handle=0) /system/lib/libandroid_runtime.so registers "audio" service via SM android_media_AudioSystem.cpp calls /system/lib/libandroid_runtime.so /system/lib/libmedia.so android.AudioSystem calls /system/lib/libbinder.so android.BpAudioPolicyService uses (calls) /system/lib/lib*.so references mediaserver calls extends /system/lib/libmedia.so android.BnAudioPolicyService /system/bin/servicemanager /system/lib/libaudioflinger.so android.AudioPolicyService calls service_manager.c invokes /system/lib/hw/audio_policy.default.so android_audio_legacy.AudioPolicyManagerDefault calls /system/lib/lib*.so /system/lib/hw/audio.primary.tuna.so audio_hw.c uses (ioctl) calls references looks up "media.audio_policy" /system/lib/libtinyalsa.so registers as binder context manager mixer.c /dev/binder /dev/snd/controlC0 (ALSA) Kernel
  • 11. Audio Playback on Android com.ex.app (/data/app/ExampleApp.apk) mediaserver DalvikVM /system/lib/libmediaplayerservice.so /system/lib/libmedia.so classes.dex android.BnMediaPlayerService android.MediaPlayerService com.ex.app.ExampleActivity android.BnMediaPlayer android.MediaPlayerService.Client /system/framework/framework.jar .AudioTrack .AudioSystem android.StagefrightPlayer android.media.MediaPlayer .MediaPlayerService.AudioOutput /system/lib/libstagefright.so /system/lib/libmedia_jni.so .AwesomePlayer .AudioPlayer /system/lib/libstagefright_soft_mp3dec.so android_media_MediaPlayer.cpp .MediaSource .MP3Source android.SoftMP3 .OMXCodec .MP3Extractor /system/lib/libmedia.so /system/lib/libaudioflinger.so android.BpMediaPlayer .AudioFlinger .AudioPolicyService android.BpMediaPlayerService /system/lib/hw/audio.primary.tuna.so /system/lib/ /system/lib/ audio_hw.c libstagefrighthw.so libOMX_Core.so /system/lib/lib*.so android.TIOMXPlugin OMX_Core.c /system/lib/libtinyalsa.so /system/lib/hw/audio_policy.default.so /system/bin/servicemanager service_manager.c pcm.c android_audio_legacy.AudioPolicyManagerDefault /system/lib/lib*.so /dev/binder /dev/snd/pcmC0D0p (ALSA) /dev/snd/controlC0 (ALSA) Kernel
  • 12. Telephony on Android PhoneApp system_server (/system/app/Phone.apk) DalvikVM DalvikVM /system/framework/framework.jar classes.dex android.media.AudioService uses CallController CallController PhoneUtils calls /system/framework/framework.jar com.android.internal.telephony.CallManager calls android.media.AudioManager com.android.internal.telephony.Phone calls implements rild com.android.internal.telephony.gsm.GSMPhone rild.c calls GsmCallTracker Socket messages /system/lib/libril.so loads RIL uses /system/lib/libsecril-client.so RILSender RILReceiver /vendor/lib/libsec-ril.so Socket messages Socket messages uses /dev/socket/rild /dev/ttys0 Audio drivers Kernel
  • 13. DevicePolicy on Android com.example.enterpriseapp system_server (/data/app/EnterpriseApp.apk) DalvikVM DalvikVM /system/framework/framework.jar classes.dex android.app.admin.DevicePolicyManager.Stub .ExampleActivity calls android.os.RecoverySystem calls calls android.os.PowerManager extends /system/framework/framework.jar calls com.android.internal.app.ShutdownThread android.app.admin.DevicePolicyManager android.os.Power looks up "device_policy" service via SM calls calls registers "device_policy" service via SM creates calls /system/framework/services.jar gets a reference to the ServiceManager (handle=0) android.app.admin.DevicePolicyManager.Stub.Proxy com.android.server.SystemServer com.android.server.DevicePolicyManagerService /system/lib/libandroid_runtime.so com.android.server.PowerManagerService /system/lib/libbinder.so links to/calls references /system/lib/lib*.so /system/lib/libandroid_runtime.so uses (calls) invokes transaction android_os_Power.cpp reboot /system/bin/servicemanager /system/lib/lib*.so service_manager.c recovery writes references reads /system/lib/lib*.so recovery.c /cache/recovery/command /dev/binder /dev/block/platform/omap/omap_hsmmc.0/by-name/userdata erases Kernel formats registers as binder context manager gets a reference to the ServiceManager (handle=0)
  • 14. Thank You For the complete screencast of this presentation go to http://mrkn.co/munz7 @agargenta on Twitter aleksandar.gargenta@gmail.com on G+