已阅读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. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 雨课堂学堂在线学堂云《水质工程学-物理化学处理(湖北理工学院)》单元测试考核答案
- 2026届广东省佛山市超盈实验中学达标名校中考生物模拟试题含解析
- 山东省济宁市市中区2026届中考生物模试卷含解析
- 2026年进阶秘籍安全管理工作总结报告
- 2026年药房考核练习题(全优)附答案详解
- (2025年)比赛常识类题及答案解析
- 2026年家庭教育促进法知识竞赛试卷往年题考附答案详解
- 2026年消防职业技能鉴定考前冲刺测试卷附答案详解(模拟题)
- 2026年中国移动网上大学认证题库综合试卷及参考答案详解(培优B卷)
- 【2025年】社区工作者社会工作法规与政策真题库及参考答案
- QCT55-2023汽车座椅舒适性试验方法
- (高清版)TDT 1059-2020 全民所有土地资源资产核算技术规程
- 危大工程安全检查录表
- 玻璃纤维窗纱生产工艺流程
- 化妆品企业质量管理手册
- 少先队辅导员主题宣讲
- 劳动用工备案表
- 部编版五年级下册语文全册优质课件
- 一轮复习家长会课件
- 国家级重点学科申报书
- 实用中医护理知识学习题库-多选及简答题库
评论
0/150
提交评论