Zeelogic android-training-2013
Upcoming SlideShare
Loading in...5
×
 

Like this? Share it with your network

Share

Zeelogic android-training-2013

on

  • 1,255 views

 

Statistics

Views

Total Views
1,255
Views on SlideShare
1,078
Embed Views
177

Actions

Likes
0
Downloads
46
Comments
0

1 Embed 177

http://www.zeelogic.com 177

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Zeelogic android-training-2013 Presentation Transcript

  • 1. Introduction to Android and its Subsystem © Copyright 2013, Zeelogic.com. Latest update: Janl 30, 2013, http://www.zeelogic.com/ Call us on : 91-9535072845 E-Mail : info@zeelogic.comE-mail: info@zeelogic.com; http://www.zeelogic.com Phone : 91-9535072845
  • 2. AndroidAndroid can best be described as a complete solutionstack, incorporating the OS, middle wear components, andapplications. In Android, the modified Linux 2.6 kernel acts as thehardware abstraction layer (HAL).To summarize, the Android operating environment can be labeled as: An open platform for mobile development A hardware reference design for mobile devices A system powered by a modified Linux 2.6 kernel A run time environment An application and user interface (UI) frameworkAndroid utilize a modified Linux 2.6 kernel that is incorporated into theAndroid operating environment. E-mail: info@zeelogic.com; http://www.zeelogic.com Phone : 91-9535072845
  • 3. Android Versions2 Version history by API level2.1 Android 1.0 (API level 1)2.2 Android 1.1 (API level 2)2.3 Android 1.5 Cupcake (API level 3)2.4 Android 1.6 Donut (API level 4)2.5 Android 2.0 Eclair (API level 5)2.6 Android 2.0.1 Eclair (API level 6)2.7 Android 2.1 Eclair (API level 7)2.8 Android 2.2–2.2.3 Froyo (API level 8)2.9 Android 2.3–2.3.2 Gingerbread (API level 9)2.10 Android 2.3.3–2.3.7 Gingerbread(API level 10)2.11 Android 3.0 Honeycomb (API level 11)2.12 Android 3.1 Honeycomb (API level 12)2.13 Android 3.2 Honeycomb (API level 13)2.14 Android 4.0–4.0.2 Ice Cream Sandwich(API level 14)2.15 Android 4.0.3–4.0.4 Ice Cream Sandwich(API level 15)2.16 Android 4.1 Jelly Bean (API level 16)2.17 Android 4.2 Jelly Bean (API level 17) E-mail: info@zeelogic.com; http://www.zeelogic.com Phone : 91-9535072845
  • 4. Linux KernelAndroid is built on the Linux kernel, but Android is not Linux No native windowing system No glibc support Does not include the full set of standard Linux utilities Patch of “kernel enhancements” to support Android Great memory and process management Permissions-based security model Proven driver model Support for shared libraries E-mail: info@zeelogic.com; http://www.zeelogic.com Phone : 91-9535072845
  • 5. Kernel EnhancementsUsed as the foundation of the Android system Numerous additions from the stock  AshmemLinux, including new IPC (Inter-Process  BinderCommunication) mechanisms, alternative power  Alarmmanagement mechanism, new drivers and various  Power Managementadditions across the kernel  Low Memory Killer These changes are beginning to go into the staging/  Kernel Debuggerarea of the kernel, as of 3.3, after being a complete  Loggerfork for a long time E-mail: info@zeelogic.com; http://www.zeelogic.com Phone : 91-9535072845
  • 6. Changes introduced in the Android KernelE-mail: info@zeelogic.com; http://www.zeelogic.com Phone : 91-9535072845
  • 7. Android Linux Kernel ModificationsAndroid is built on the Linux kernel, but Android is not Linux Kernel Enhancements No native windowing system No glibc support  Alarm Does not include the full set of standard Linux utilities  Ashmem Standard Linux 2.6.24 Kernel  Binder Patch of “kernel enhancements” to support Android  Power Management Great memory and process management  Low Memory Killer Permissions-based security model  Kernel Debugger Proven driver model  Logger Support for shared libraries It‟s a open source! E-mail: info@zeelogic.com; http://www.zeelogic.com Phone : 91-9535072845
  • 8. Android Linux Kernel ModificationsE-mail: info@zeelogic.com; http://www.zeelogic.com Phone : 91-9535072845
  • 9. A split view of the kernelE-mail: info@zeelogic.com; http://www.zeelogic.com Phone : 91-9535072845
  • 10. Android LibrariesE-mail: info@zeelogic.com; http://www.zeelogic.com Phone : 91-9535072845
  • 11. Android Libraries Gather a lot of Android-specifc libraries to interact at a low-level with thesystem, but third-parties libraries as well Bionic is the C library, SurfaceManager is used for drawing surfaces on thescreen, etc. But also WebKit, SQLite, OpenSSL coming from the free software world Android RuntimeHandles the execution of Android applications Almost entirely written from scratch by Google Contains Dalvik, the virtual machine that executes every application that you run on Android, and the core library for the Java runtime, coming from ApacheHarmony projectAlso contains system daemons, init executable, basic binaries, etc. E-mail: info@zeelogic.com; http://www.zeelogic.com Phone : 91-9535072845
  • 12. • Bionic Libc :- Custom libc implementation, optimized for embedded use.• Function Libraries• Native Servers• Hardware Abstraction LibrariesWebKit Based on open source WebKit browser: http://webkit.org Renders pages in full (desktop) view Full CSS, Javascript, DOM, AJAX support Support for single-column and adaptive view renderingMedia FrameworkBased on PacketVideo OpenCORE platformSupports standard video, audio, still-frame formatsSupport for hardware / software codec plug-ins E-mail: info@zeelogic.com; http://www.zeelogic.com Phone : 91-9535072845
  • 13. Android Source code organization Bionic/ Androids standard C library is stored contains code samples regarding the boot of an Android device. In this folder, protocol used by all Android bootloaders and a recovery image Bootable/ holds the core components of the build system. Build/ Holds the core components of the build system CTS/ The Compatibility Test Suite Dalvik/ Contains the source code of the Dalvik virtual machine.Development/ Holds the development tools, debug applications, API samples, etc device/ Contains the device-specifc components One of the largest folders in the source code, it contains all the external External/ projects used in the Android codeFrameworks/ Holds the source code of the various parts of the framework Hardware/ contains all the hardware abstraction layers E-mail: info@zeelogic.com; http://www.zeelogic.com Phone : 91-9535072845
  • 14. Android HALE-mail: info@zeelogic.com; http://www.zeelogic.com Phone : 91-9535072845
  • 15. Android HALE-mail: info@zeelogic.com; http://www.zeelogic.com Phone : 91-9535072845
  • 16. Android HALHardware Abstraction Layer which provides a layer to protect proprietary softwarefrom licensing point of view.Android applications communicate with the underlying hardware through Java API‟snot by system calls.The Hardware Abstraction Layer or HAL is the glue between any device (part of thekernel) and the corresponding JNI interface.HAL source code reside under the hardware folder/** Base path of the hal modules */#define HAL_LIBRARY_PATH1 "/system/lib/hw“#define HAL_LIBRARY_PATH2 "/vendor/lib/hw"User space C/C++ library layer Defines the interface that Android requires hardware “drivers” to implement Separates the Android platform logic from the hardware interface Libraries are loaded dynamically at runtime as needed E-mail: info@zeelogic.com; http://www.zeelogic.com Phone : 91-9535072845
  • 17. Audio Flinger Manages all audio output devices Processes multiple audio streams into PCM audio out paths Handles audio routing to various outputs E-mail: info@zeelogic.com; http://www.zeelogic.com Phone : 91-9535072845
  • 18. Android HALAbove figure provide a clear view on connections between the Kernel, HAL ( libhxxx.so ) , C++ headers, JNI binding and finally the JAVA API. Consider thecomplete audio subsystem in Android and in particular the OMAP 35xx applicationsprocessor. E-mail: info@zeelogic.com; http://www.zeelogic.com Phone : 91-9535072845
  • 19. Android Audio Native ServicesE-mail: info@zeelogic.com; http://www.zeelogic.com Phone : 91-9535072845
  • 20. Androids Camera Sub SystemE-mail: info@zeelogic.com; http://www.zeelogic.com Phone : 91-9535072845
  • 21. Androids Camera Sub SystemAndroids cameraapplication connect withandroid HAL throughcamera binding interface.HAL in turns connectphysical camera sensor andprovides control & datainterface betweenapplication and camerasensor.The diagram illustrates thestructure of the camerasubsystem. In the diagramproprietary camera librariesare nothing but cameraHAL E-mail: info@zeelogic.com; http://www.zeelogic.com Phone : 91-9535072845
  • 22. Android Camera HAL briefTo implement a camera HAL ( also consider as driver between androidcamera subsystem and V4L2 kernel driver) ; one need to create a sharedlibrary (named as libcamera.so) that implements the interface defined at“android/frameworks/base/include/camera/CameraHardwareInterface.h”.Location of the shared library should be at“android/hardware/<vendor>/<boardname>/camera”Create source files and implement interface defined atCameraHardwareInterface.h.android/hardware/ti/omap3/camera/CameraHardware.cppandroid/hardware/ti/omap3/camera/CameraHardware.h E-mail: info@zeelogic.com; http://www.zeelogic.com Phone : 91-9535072845
  • 23. Interface‟s defined under camera HAL/* constructor */ CameraHardware::CameraHardware(){}/* destructor */ CameraHardware::~CameraHardware(){}sp<IMemoryHeap> CameraHardware::getPreviewHeap() const{}void CameraHardware::setCallbacks(notify_callback notify_cb, data_callbackdata_cb, data_callback_timestamp data_cb_timestamp, void* user){/* store callback to localpointers, need to callback at the time of preview/image capture */}void CameraHardware::enableMsgType(int32_t msgType) {/* set local message flag.Application will give this notification to perform certain action while previewing. ex.startvideo, image caputure etc. */}void CameraHardware::disableMsgType(int32_t msgType){}bool CameraHardware::msgTypeEnabled(int32_t msgType){} Create and configurevoid CameraHardware::stopPreview() { /* stop preview */ } android.mk filestatus_t CameraHardware::startRecording() { /* configure device & start record thread */ Compile android system/* record thread - check message type - if message type contains - Go to module directory $cd /projects/my-CAMERA_MSG_VIDEO_FRAME then call mDataCbTimestamp with video frame android/hardware/ti/omap3/cameracaptured */ } $sourcevoid CameraHardware::stopRecording() { /* stop recording */ } <ANDROID_ROOT>/build/envsetup.shstatus_t CameraHardware::takePicture() $mm TARGET_PRODUCT={ /* - configure camera device - take a current frame - check message type - call callback */ <TARGET PRODUCT NAME>} e.g.$ mmstatus_t CameraHardware::setParameters(const CameraParameters& params) { /* - TARGET_PRODUCT=beagleboardconfigure device as per parameters */ } copy libcamera.so to out/target/product/<boardname>/system/l CameraParameters CameraHardware::getParameters() const ib{ /* - return current value of parameter set */ } E-mail: info@zeelogic.com; http://www.zeelogic.com Phone : 91-9535072845
  • 24. Android RuntimeE-mail: info@zeelogic.com; http://www.zeelogic.com Phone : 91-9535072845
  • 25. Android RuntimeE-mail: info@zeelogic.com; http://www.zeelogic.com Phone : 91-9535072845
  • 26. Dalvik Virtual MachineAndroid‟s custom clean-room implementation virtual machine Provides application portability and runtime consistency Runs optimized file format (.dex) and Dalvik bytecode Java .class / .jar files converted to .dex at build timeSupports multiple virtual machine processes per device Highly CPU-optimized bytecode interpreter Uses runtime memory very efficiently E-mail: info@zeelogic.com; http://www.zeelogic.com Phone : 91-9535072845
  • 27. Core LibrariesCore APIs for Java language provide apowerful, yetsimple and familiar development platform• Data structures• Utilities• File access• Network Access• Graphics•… E-mail: info@zeelogic.com; http://www.zeelogic.com Phone : 91-9535072845
  • 28. Android Power ManagementE-mail: info@zeelogic.com; http://www.zeelogic.com Phone : 91-9535072845
  • 29. Android Power Management Linux Power Management Android Power Management Design Wake Locks System Sleep (Suspend) Battery Service • Home Entertainment . • Security devicesDesigned for mobile devices • Multimedia Devices,Goal is to prolong battery life Build on top of Linux Power Management • Handheld Devices Not directly suitable for a mobile device • Tablets Designed for devices which have a default-off behavior The phone is not supposed to be on when we do not want to use it. Powered on only when requested to be run, off by default. • Multimedia Streaming Unlike PC, which has a default on behavior. • Connected Navigation • In-car Wi-Fi E-mail: info@zeelogic.com; http://www.zeelogic.com Phone : 91-9535072845
  • 30. Linux Power ManagementPower mode interface is on sysfs /sys/power/state sysfs is a virtual file system provided by Linux. •sysfs exports Home Entertainment . • Security devicesinformation about devices and drivers from the kernel device model to • Multimedia Devices,user space, and is also used for configuration • Handheld Devices Changing state done by • Tablets# echo mem > /sys/power/state# echo disk > /sys/power/state# echo standby > /sys/power/state • Multimedia Streaming • Connected Navigation • In-car Wi-Fi E-mail: info@zeelogic.com; http://www.zeelogic.com Phone : 91-9535072845
  • 31. Linux Power Management • Home Entertainment . • Security devices • Multimedia Devices, • Handheld Devices • Tablets • Multimedia Streaming • Connected Navigation • In-car Wi-FiE-mail: info@zeelogic.com; http://www.zeelogic.com Phone : 91-9535072845
  • 32. Android Power ManagementBuilt as a wrapper to Linux Power Management In the Kernel Added on state in the power state Added Early Suspend framework Added Partial Wake Lock mechanism • Home Entertainment . • Security devices Apps and services must request CPU resource with • Multimedia Devices, the „wake locks‟ throughAndroid application framework and native Linux libraries in order to keep poweron, otherwise Android will shut down the CPU. • Handheld Devices Android PM uses wake locks and time out mechanism to switch state of system • Tabletspower, so that system power consumption decreases • Multimedia StreamingAndroid demands that applications and services request CPU resources via • and native Linuxwake locks through the Android application frameworkConnected Navigation • shutdown thelibraries. If there are no active wake locks, Android willIn-car Wi-Fi processor. E-mail: info@zeelogic.com; http://www.zeelogic.com Phone : 91-9535072845
  • 33. Wake Locks By default, Android tries to put the system into a sleep or better a suspend mode as soon as possible  Applications running in the Dalvik VM can prevent the system from entering a sleep or suspend state, i.e. applications can assure that the screen stays on or the CPU stays awake to react quickly to interrupts  The means Android provides for this task is wake locks  If there are no active wake locks, CPU will be turned off Home Entertainment . •  If there are partial wake locks, screen and keyboard will• be turneddevices Security off • Multimedia Devices,Types of Wake Locks PARTIAL_WAKE_LOCK Ensures that the CPU is running • Handheld Devices The screen might not be on • Tablets SCREEN_DIM_WAKE_LOCK Wake lock that ensures that the screen is on, but the keyboard backlight will be allowed to gooff, and the screen backlight will be allowed to go dim SCREEN_BRIGHT_WAKE_LOCK Wake lock that ensures that the screen is on at full brightness; the keyboard backlight will beallowed to go off FULL_WAKE_LOCK Full device ON, including backlight and screen E-mail: info@zeelogic.com; http://www.zeelogic.com Phone : 91-9535072845
  • 34. Android PM DesignAndroid implements an application framework on top of the kernel called AndroidPower Management Applications Framework The Android PM Framework is like a driver. It is written in Java which connectsto Android power driver through JNI Currently Android only supports screen, keyboard, buttons backlight, and thebrightness of screen  Through the framework, user space applications can use „PowerManger‟ class to control the power state of the device E-mail: info@zeelogic.com; http://www.zeelogic.com Phone : 91-9535072845
  • 35. Android PM ImplementationAndroid PM Framework provides a service for user space applications through theclass PowerManger to achieve power savingThe flow of exploring Wake locks are :Acquire handle to the PowerManager service by calling Context.getSystemService()Create a wake lock and specify the power management flags for screen, timeout, etc.Acquire wake lock • Home Entertainment .Perform operation such as play MP3 • Security devicesRelease wake lock • Multimedia Devices,How are Wake Locks Managed • Handheld Devices Wake Locks are mainly managed in Java layer • Tablets When an android application takes a wake lock, a new instance of wake lock isregistered in the PowerManagerService PowerManagerService is running in the java layer • Multimedia Streaming Registered wake locks are put in a list • Connected Navigation • In-car Wi-Fi E-mail: info@zeelogic.com; http://www.zeelogic.com Phone : 91-9535072845
  • 36. Acquiring a Wake lockThe flow when a Wake Lock is acquiredRequest sent to PowerManager to acquire a wake lockPowerManagerService to take a wake lockAdd wake lock to the listSet the power state • Home Entertainment . • Security devices For a FULL_WAKE_LOCK, PowerState would be set to ON • Multimedia Devices,For taking Partial wake lock, if it is the first partial wake lock, a kernelwake lock is taken. This will protect all the partial wake locks. For • Handheld Devicessubsequent requests, kernel wake lock is not taken, but just added to the • Tabletslist • Multimedia Streaming • Connected Navigation • In-car Wi-Fi E-mail: info@zeelogic.com; http://www.zeelogic.com Phone : 91-9535072845
  • 37. Android power management architecture.E-mail: info@zeelogic.com; http://www.zeelogic.com Phone : 91-9535072845
  • 38. Battery Service The BatteryService monitors the battery status, level, temperature etc. A Battery Driver in the kernel interacts with the physical battery via ADC [to readbattery voltage] and I²C ( Inter-Integrated Circuit: a multi-master serial single-endedcomputer bus used to attach low-speed peripherals to an electronic device) Whenever BatteryService receives information from the BatteryDriver, it will actaccordingly • Home Entertainment .E.g. if battery level is low, it will ask system to shutdown • Security devices • Multimedia Devices,Using power supply class in Linux Kernel/sys/class/power_supply • Handheld Devices Utilize uevent mechanism to update battery status • Tablets uevent : An asynchronous communication channel for kernel Battery Service will monitor the battery status based on received uevent from thekernel • Multimedia Streaming • Connected Navigation • In-car Wi-Fi E-mail: info@zeelogic.com; http://www.zeelogic.com Phone : 91-9535072845
  • 39. Android Power Management • Home Entertainment . • Security devices • Multimedia Devices, • Handheld Devices • Tablets • Multimedia Streaming • Connected Navigation • In-car Wi-FiE-mail: info@zeelogic.com; http://www.zeelogic.com Phone : 91-9535072845
  • 40. • Home Entertainment . Sensors on Android • Security devices • Multimedia Devices, • Handheld Devices • Tablets • Multimedia Streaming • Connected Navigation • In-car Wi-FiE-mail: info@zeelogic.com; http://www.zeelogic.com Phone : 91-9535072845
  • 41. Sensors on AndroidA sensor(also called detector) is a device that measures a physical quantityand converts it into a signal which can be read by an observer or by aninstrument. • Handheld Devices • Tablets • Multimedia Streaming • Connected Navigation • In-car Wi-Fi E-mail: info@zeelogic.com; http://www.zeelogic.com Phone : 91-9535072845
  • 42. Android Sensor Framework OverviewE-mail: info@zeelogic.com; http://www.zeelogic.com Phone : 91-9535072845
  • 43. Android sensor sub system overviewApplication Framework Sensor Applications uses the Sensor application framework to get the sensor data. It communicates with C++ layer through sensor Java native interface (JNI)Sensor Libraries Sensor middle layer mainly consists of Sensor Manager, Sensor service and Sensor hardware • Home Entertainment . abstraction layer. • Security devicesInput Subsystem • Multimedia Devices, This is a generic Linux framework for all input devices like keyboard, mouse, touchscreen and defines a standard set of events. It interfaces to user space through /sys/class/input interface. • Handheld DevicesEvdev • Tablets Evdev provides a generic way for input device events to be accessible under /dev/input/eventX . LIS331DLH Accelerometer Driver • Multimedia Streaming This driver communicates with LIS331DLH • Connected Navigation accelerometer chip via GPIO and I2C bus. GPIO line is used for generating interrupts while I2C bus • In-car Wi-Fi for accessing and configuring accelerometer registers. Fig: Android subsystem overview E-mail: info@zeelogic.com; http://www.zeelogic.com Phone : 91-9535072845
  • 44. Android input event processEnable Accelerometer sensor. Testing Android Input TS and Keypad Driver#cat 1 > /sys/bus/i2c/drivers/lis331dlh/1-018/enable # cat /proc/bus/input/devices I: Bus=0000 Vendor=0000 Product=0000 Version=0000Use getevent command to see N: Name="MVT7 KEYPAD"accelerometer events P: Phys=#getevent add device 2: /dev/input/event2 S: Sysfs=/class/input/input0name: • Home Entertainment . U: Uniq= "Acceleromter" /dev/input/event2: 0001 • Security devices H: Handlers=kbd event0 evbug014a 00000001 /dev/input/event2: 0003 • Multimedia Devices, B: EV=f0000 0000089e /dev/input/event2: 0003 ...0001 000005fe I: Bus=0000 Vendor=0000 Product=0000 Version=0000# cat /proc/bus/input/handlers N: Name="TSC2007 Touchscreen"N: Number=0 Name=kbd P: Phys=0-0090/input0N: Number=1 Name=evdev Minor=64 S: Sysfs=/class/input/input1N: Number=2 Name=evbug U: Uniq= • Multimedia Streaming • Connected H: Handlers=event1 evbug Navigation B: EV=b • In-car Wi-Fi B: KEY=400 0 0 0 0 0 0 0 0 0 0 B: ABS=1000003 E-mail: info@zeelogic.com; http://www.zeelogic.com Phone : 91-9535072845
  • 45. Porting a sensor onto AndroidKernelDevice-driverBoard FileUserspaceAdding New HAL -OR- Modifying existing HALDevice-driverPoll/Interrupt? Hybrid-approach = WorkqueuesEarly-suspend hookinput_report_abs() / input_report_rel()Board FileInterrupt, GPIO, SPI/I2C-linesAxes-remap to device axes platform_data E-mail: info@zeelogic.com; http://www.zeelogic.com Phone : 91-9535072845
  • 46. Kernel Handling of Sensor EventsE-mail: info@zeelogic.com; http://www.zeelogic.com Phone : 91-9535072845
  • 47. Kernel Handling of Sensor EventsEarly-Suspend hookInputEvents E-mail: info@zeelogic.com; http://www.zeelogic.com Phone : 91-9535072845
  • 48. Android Boot SequenceE-mail: info@zeelogic.com; http://www.zeelogic.com Phone : 91-9535072845
  • 49. Android Boot SequenceE-mail: info@zeelogic.com; http://www.zeelogic.com Phone : 91-9535072845
  • 50. Android Boot SequenceE-mail: info@zeelogic.com; http://www.zeelogic.com Phone : 91-9535072845
  • 51. Linux boot processE-mail: info@zeelogic.com; http://www.zeelogic.com Phone : 91-9535072845
  • 52. Android Boot SequenceInit it very first process, we can say it is rootprocess or grandmother of all processes. initprocess has two responsibilities.1. mount directories like /sys, /dev, /proc and2. run init.rc script. Android has specific format and rules for init.rc files. In Android we call it as “Android Init Language” The Android Init Language consists of four broad classes of statements, which are 1. Actions, 2. Commands, 3. Services, 4. Options. E-mail: info@zeelogic.com; http://www.zeelogic.com Phone : 91-9535072845
  • 53. Action : Actions are named sequences of commands. Actions have a triggerwhich is used to determine when the action should occur.Syntaxon <trigger> <command> <command> <command>Service : Services are programs which init launches and (optionally) restartswhen they exit. Syntaxservice <name> <pathname> [ <argument> ]* <option> <option> ...Options : Options are modifiers to services. They affect how and when init runsthe service.Let‟s take a look of default init.rc file. Here I have listed only major events andservices. E-mail: info@zeelogic.com; http://www.zeelogic.com Phone : 91-9535072845
  • 54. Zygote Process Zygote is a VM process Action / Service Descriptionthat starts at system boot on early-init Set init and its forked childrens oom_adj.time. Set the security context for the init process. Zygote preloads and on init setup the global environmentinitialize core library Create cgroup mount point for cpuclasses. Normally there accountingcore classes are read-only and manyand part of Android SDK or on fs mount mtd partitionsCore frameworks. In Java change permissions of system directories on post-fsVM each instance has it‟sown copy of core library on post-fs-data change permission of /data folders and sub foldersclass files and heap objects. on boot basic network init ,Memory Management ,etc service start system manager to manage all native servicemanager services like location, audio, shared preference etc.. service zygote start zygote as app_process E-mail: info@zeelogic.com; http://www.zeelogic.com Phone : 91-9535072845
  • 55. Zygote Process StartupE-mail: info@zeelogic.com; http://www.zeelogic.com Phone : 91-9535072845
  • 56. Zygote loading process1. Load ZygoteInit class,Source Code :<Android Source>/frameworks/base/core/java/com/android/internal/os/ZygoteInit.java2. registerZygoteSocket() - Registers a server socket for zygote commandconnections3. preloadClasses() - “preloaded-classes” is simple text file contains list ofclasses that need to be preloaded, you cna find “preloaded-classes” file at<Android Source>/frameworks/base4. preloadResources() - preloadReaources means native themes andlayouts, everything that include android.R file will be load using thismethod.At this time you can see bootanimation E-mail: info@zeelogic.com; http://www.zeelogic.com Phone : 91-9535072845
  • 57. Android System Service or ServicesSystem Service or Services Core Services: 1. Starting Power ManagerAfter complete above steps, runtime request 2. Creating Activity ManagerZygote to launch system servers. System 3. Starting Telephony RegistryServers are written in native and java 4. Starting Package Managerboth, System servers we can consider as 5. Set Activity Manager Service asprocess, The same system server is available as System ProcessSystem Services in Android SDK. System 6. Starting Context Managerserver contain all system services. 7. Starting System Context Providers 8. Starting Battery Service 9. Starting Alarm ManagerZygote fork new process to launch system 10. Starting Sensor Serviceservices. You can find source code in 11. Starting Window ManagerZygoteInit class and “startSystemServer” 12. Starting Bluetooth Servicemethod. 13. Starting Mount ServiceBoot CompletedOnce System Services up and running in memory, Android has completedbooting process, At this time “ACTION_BOOT_COMPLETED” standardbroadcast action will fire. E-mail: info@zeelogic.com; http://www.zeelogic.com Phone : 91-9535072845
  • 58. Corporate And Custom TrainingFor IT Professionals and Graduates http://www.zeelogic.com
  • 59. Placement and Training Module http://www.zeelogic.com • Fully customized content and instruction to meet your specific needs • Qualified, experienced, industry experts and faculty as instructors • Proven track record with the area’s top organizations • Instructional materials, case studies and activities related to your company and industry • Cost savings for your training budgetCopyright © 2012 Zeelogic (P) Ltd. All rights reserved.
  • 60. Zeelogic will work individually with your company to understand your vision and identify your learning needs and objectives. Training Areas Services Offered Training in Programming Languages Programming Languages ( C, C++, JAVA)  Classroom, Instructor Lead Programs Linux/Unix  Personal and Professional Development, Microcontrollers and Processors  Professional Trainers for Mentoring RTOS ( Vxworks, QNX )  Instructional Design Android  Embedded Training Kits Embedded Systems  Hands on experience on Live Projects Linux Internals and Device Drivers  Video Courses and Tutorials Networking/Wireless SDLC We are specialize in designing programs to meet the specific content. We Provide comprehensive training in Embedded systems and different area of Programming . Copyright © 2012 Zeelogic (P) Ltd. All rights reserved.
  • 61. UNC Charlotte will work individually with your company tounderstand your vision and identify your learning needs and objectives.We specialize in designing programs to meet the specific content,location and scheduling requirements of your organization. For more information contact: Director of Corporate Training E-Mail: info@zeelogic.com #4247,14th Main , 19th Cross, Subramanian Nagar , Bangalore 560021. Phone : +91-80-23376639, web link: www.zeelogic.com Copyright © 2012 Zeelogic (P) Ltd. All rights reserved.