Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Android Platform Architecture


Published on

Android Mobile Platform Architecture

Published in: Technology, Education
  • Be the first to comment

Android Platform Architecture

  1. 1. Android Platform Architecture By Naresh Chintalcheru
  2. 2. What is Android ? Android is an open source End-to-End mobile device platform.
  3. 3. End-to-End Android Platform Android is an open source End-to-End mobile device platform.
  4. 4. Open Handset Alliance Project ● Android platform is part of OHA Project ● Consortium of 80 companies led by Google ● OHA members include ○ Mobile Operators (Sprint, T-Mobile, Vodafone) ○ Semiconductor companies (Intel, Qualcomm, TI) ○ Software Companies (eBay, Accenture, Wipro) ○ Handset Manufacturers (Samsung, HTC, Sony, LG)
  5. 5. Android Devices Although Android usage is primarily focused on smartphones and tablets, there are many devices use the platform. ● GPS (Holux) ● Televisions (Sony Internet TV) ● DVD/Blue-Ray Player (Sony) ● Gaming Devices (OUYA Console) ● Vehicles (Chevy Volt) ● Robotics (iRobot Vacuum Cleaner) ● Fitness (Nike+ FuelBand)
  6. 6. Android Platform Architecture
  7. 7. Android Platform Architecture
  8. 8. Android Linux Kernel ● Android is designed to be compatible with wide array of hardware. This is achieved, in large part though Linux Kernel, which over the years evolved. ● Standard Linux 2.6.24 Kernel ● Every application in Android runs in its own Linux Process with new UserId UID and GroupId GIU. ● Patch of “kernel enhancements” to support
  9. 9. Why Linux Kernel • Great memory and process management • Permissions-based security model • Proven driver model • Support for shared libraries • Itʼs already open source!
  10. 10. Kernel Enhancements ● Power Management ● Low Memory Management ● Kernel Debugger ● Logger ● Alarm ● Binder
  11. 11. Android Platform Architecture
  12. 12. Android Libraries ● C/C++ libraries ● Interface through Java ● Surface manager – Handling UI Windows ● 2D and 3D graphics ● Media codecs, SQLite, Browser engine
  13. 13. Android Runtime Cheating Java & JVM ?
  14. 14. Android Runtime Android only uses Java Programming Language syntax. Does not use JVM, uses custom built virtual machine called Dalvik VM. Uses Apache Harmony for Java Core Library.
  15. 15. Android Runtime Does not use J2ME
  16. 16. J2ME Vs Android Android's JVM implementation, called Dalvik VM, uses a different instruction set from Sun's JVM. Substantial transformation has to be applied to the compiled Java byte-code. The result is a 'DEX' file, which can contain the transformed versions of multiple compiled .class files. Android applications may be allowed access to files, hardware, and network connections, while J2ME almost always prohibits resource access.
  17. 17. J2ME Vs Android J2ME Android Hello.class Hello.dex Hello.jar Hello.apk MIDLet Screen Activity Screen JVM DVM
  18. 18. J2ME Vs Android J2ME is platform independent. Android based Java programs are NOT platform independent and works only Android Platform.
  19. 19. J2ME Vs Android An uncompressed .dex file is typically a few percent smaller in size than a compressed .jar (Java Archive) derived from the same .class files Multiple classes are included in a single .dex file. Duplicate strings and other constants used in multiple class files are included only once in the . dex output to conserve space. Java bytecode is also converted into an alternative instruction set used by the Dalvik VM
  20. 20. DVM
  21. 21. Dalvik Virtual Machine ● Unlike Java VMs, which are stack machines, the Dalvik VM is a register-based architecture ● Supports multiple virtual machine processes per device ● Highly CPU-optimized bytecode interpreter ● Uses runtime memory very efficiently ● Runs optimized file format (.dex) and Dalvik bytecode ● Java .class / .jar files converted to .dex at build time
  22. 22. Dalvik Virtual Machine Every Android Application get its own copy of Dalvik VM
  23. 23. Android Platform Architecture
  24. 24. Application Frameworks API interface • Activity Manager • Package Manager • Window Manager • Resource Manager • Content Providers • View System
  25. 25. Android Platform Architecture
  26. 26. Built-in Applications •Built in and user apps •Can replace built in apps
  27. 27. Android Apps No Java main() method in Android platform.
  28. 28. Android Apps The four Application building blocks called components in Android are ... 1. Activity 2. Service 3. ContentProvider 4. Broadcast Receiver
  29. 29. Activities •Typically correspond to one UI screen •But, they can: –Be faceless –Be in a floating window –Return a value
  30. 30. Services •Faceless components that run in the background –E.g. music player, network download etc…
  31. 31. Content Providers •Enables sharing of data across applications –E.g. address book, photo gallery •Provides uniform APIs for: –querying –delete, update and insert. •Content is represented by URI and MIME type
  32. 32. Broadcast Receiver Platform Notification System A broadcast receiver is a component that responds to system-wide broadcast announcements. Many broadcasts originate from the system—for example, a broadcast announcing that the screen has turned off, the battery is low.
  33. 33. Intents Intents are objects used as Inter-Component signaling and Screen Navigations ‣ Starting the user interface for an application ‣ Sending a message between components ‣ Starting a background service
  34. 34. Android Security Model Permission-based Security Model
  35. 35. Android Security Model Android is a privilege-separated operating system, in which each application runs with a distinct system identity (Linux user ID and group ID) Protect the App code using code Obfuscation. Now ProGuard is included as part of Android development tool.
  36. 36. Android Security Model User Permissions in the AndroidManifest.xml <manifest xmlns:android=" com/apk/res/android" package="" > <uses-permission android:name="android.permission. RECEIVE_SMS" /> ... </manifest>
  37. 37. Android Security Model User Permissions in the AndroidManifest.xml android.permission.SEND_SMS android.permission.INTERNET android.permission.READ_CONTACTS
  38. 38. Thank You and Your Feedback is appreciated