[互联网]Android_Platform_Overview.ppt_第1页
[互联网]Android_Platform_Overview.ppt_第2页
[互联网]Android_Platform_Overview.ppt_第3页
[互联网]Android_Platform_Overview.ppt_第4页
[互联网]Android_Platform_Overview.ppt_第5页
已阅读5页,还剩32页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

Classification 06/13/11,Android Platform Overview,Classification 06/13/11,2,Agenda,Intro to Android History, Future Android Architecture High Level View, Basically Android Development Environment Src, Tools Questions,Classification 06/13/11,3,Intro to Android What is Android,Operating System optimized for Mobile Devices Open Source Maintained by AOSP Based on the Linux Kernel & OS project,Classification 06/13/11,4,Intro to Android History,Android Inc. founded 2003 Purchased by Google from initial developer in 2005 Version 1.0 released 2008 first release, smart phone war Version 2.0 released 2009 start to take hold in the smart phone market Version 3.0 released 2011 optimized for tablet,Classification 06/13/11,5,Intro to Android Important Features,Apps composed of application components Open Source Community everyone can learn from it Enhanced security platform sandbox based on linux permission Marktetplace copy from app store:),Classification 06/13/11,6,Intro to Android Relevant Devices,Phones Tablets Vehicle Navigation Ebook ,Classification 06/13/11,7,Android Architecture Architecture Overview,Classification 06/13/11,8,Android Architecture Kernel,Derived from Linux 2.6 kernel, with added enhancements not found in Linux Alarm driver (provides timers to wakeup devices) Ashmem (shared memory driver) Pmem (physically contiguous memory) Binder (inter-process communication) Logger (android kernel debugger and application debug) Android PM (ACPI vs Labled PM, which takes a more aggressive approach than the Linux PM solution) Low memory Killer,Classification 06/13/11,9,Android Architecture Software Architecture,Native Libraries Bionic, a super fast and small license-friendly libc library optimized for embedded use (not support full of GNU libraries, not 100% support POSIX) Surface manager, for composing window manager with off-screen buffering 2D and 3D graphics, hardware support or software simulation (SGL, OpenGL, FreeType) Media framework, media codecs offer support for major audio/video codecs (Opencore) SQLite, database WebKit library for fast HTML rendering (google oem),Classification 06/13/11,10,Android Architecture Software Architecture,Hardware Abstraction Libraries GPS, Radio, Camera, Bluetooth, other I/O Hardware drivers must implement in order for applicationss to use them Applications interact with the abstraction libraries, not the driver Promotes variety in hardware without breaking applications Gives OS tighter control over devices,Classification 06/13/11,11,Android Architecture Software Architecture,Android Runtime Dalvik VM Googles implementation of Java Optimized for mobile devices, based apache harmony Register-based versus stack-based VM Dex files Uncompressed .dex = 0.5 * Uncompressed .jar More efficient and compact implementation Different set of Java libraries than SDK Android Java = Java SE AWT/Swing + Android API,Classification 06/13/11,12,Android Architecture Software Architecture,Android Application Framework Activity manager controls the life cycle of the app Content providers encapsulate data that is shared (e.g. contacts) Resource manager manages everything that is not the code Location manager figures out the location of the phone (GPS, GSM,WiFi) Notification manager for events such as arriving messages, appointments, etc,Classification 06/13/11,13,Android Architecture Software Architecture,Android Environment vs Linux Environment,Classification 06/13/11,14,Android Architecture Software Architecture,Android Application Component Activities (needed to create a screen for a user application classes with a UI) Intents (used to transfer control from one activity to another) Services (classes without a UI, so they can be executed in the background) Content Providers (allows the application to share information with other applications),Classification 06/13/11,15,Android Architecture Software Architecture,Android Stock Apps,Classification 06/13/11,16,Android Architecture Software Architecture,Android Startup Walkthrough,Classification 06/13/11,17,Android Architecture Software Architecture,Android Runtime Overview,Classification 06/13/11,18,Android Architecture Software Architecture,Android 3 Layer Interactions There are three main scenarios for your app to talk to native library: Directly Via native service Via native daemon It will depend on the type of app and type of native library which method works best.,Classification 06/13/11,19,Android Architecture Software Architecture,Android 3 Layer Interactions,Classification 06/13/11,20,Android Architecture Software Architecture,Android NDK Tools to build and compile your native code for the device architecture (such as ARM) A way to package your library into the APK file so you can distribute your application easily A set of native system headers that will be supported for the future releases of Android platform (libc, libm, libz,liblog, JNI headers, some C+ headers, and OpenGL) Documentation, sample code and examples Useful doc in android src - Android JNI Tips,Classification 06/13/11,21,Android Architecture Software Architecture,Android NDK,Classification 06/13/11,22,Android Architecture Software Architecture,Android Security Each Android application runs inside its own Linux process. each application has its own sandbox file system with its own set of preferences and its own database Other applications cannot access any of its data, unless it is explicitly shared Each application assign a new user ID Access to each component is restricted by assigning it an access permission label; applications are assigned collections of permission labels,Classification 06/13/11,23,Android Architecture Software Architecture,Hacking Source: Cyanogenmod AOSP / xdadevelopers Tools: repo / git fastboot recovery Kernel privilege escalation exploits - “one-click root”,Classification 06/13/11,24,Android Architecture Software Architecture,Critical BUGS Reboot bug (2008), Android allowed a remote device to be controlled over serial port If device not attached, phone would execute ALL text input as shell commands SMS bug (2010), some people who used the default SMS application were sometimes having their messages sent to the wrong person.,Classification 06/13/11,25,Android Development Environment Source is Everything,Build system Core interesting stuff in build/envsetup.sh Useful cmd help choosecombo/lunch jgrep/cgrep godir showcommands sdk mm - Ccache is supported, export USE_CCACHE=1,Classification 06/13/11,26,Android Development Environment Source is Everything,How to adding your program to the build Mkdir directory under android_src_path/external Create your c/cpp files in it Copy other Android.mk to your directory, then change it Adding your directory in android_src_path/build/core/main.mk Make jx from top of src tree,Classification 06/13/11,27,Android Development Environment Work with Device,Fastboot It is a both tool and bootloader protocol Required by google for certified devices Maybe support fastboot in U-boot Flash kernel/recovery/new flash image/boot from host Http://fastboot/,Classification 06/13/11,28,Android Development Environment Work with Device,ADB Android Debug Bridge Brigde between device and host Handle of all kinds of target interactions shell push/pull logcat install/uninstall start activity /guide/developing/tools/adb.html,Classification 06/13/11,29,Android Development Environment Trace & Debug,Logging Dmesg PRINTK_TIMES CONFIG_LOG_BUF_SHIFT working with /dev/kmsg Logcat Support filter for event/tag/loglevel/ /archives/2936958.html /Improving_Android_Boot_Time#logdelta,Classification 06/13/11,30,Android Development Environment Trace & Debug,Logging,Classification 06/13/11,31,Android Development Environment Trace & Debug,Strace To trace interesting android component logic For example: edit init.rc to strace some service Debug system call,Classification 06/13/11,32,Android Development Environment Trace & Debug,Other tools Dexdump/apktool GDB remote debug Bootchart /

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论