android-2.3-cdd

合集下载

Broidmobi CTS 测试全解

Broidmobi CTS 测试全解

Broadmobi CTS 测试全解目录Android 软件兼容性测试简介 (1)CTS简介 (1)CTS在android软件兼容性测试的意义 (2)CTS在终端上的测试详解 (2)CTS 终端需求 (2)CTS组成 (2)摩尔实验室开展Android CTS认证测试服务 (3)1. 终端下载版本以及准备 (4)2. 编译 (6)源码编译 (6)SDK编译 (8)CTS编译 (8)3. USB连接 (9)4. 准备测试 (10)5. 开始测试 (12)6. 调试 (14)7. 测试结果 (15)Android 软件兼容性测试简介Android兼容性测试(CTS)和连带的兼容性定义文档(CDD),是一个确保终端设备与特定版本Android(比如Android2.2,2.3,3.0)兼容的自管理程序。

CTS测试集包含大约24,000个在Android设备上运行的测试用例,这些用例分别针对电话、图形、相机、GPS、触摸屏、无线网等功能。

Google针对每个主要Android版本公布了CDD文档,其中指出了对CTS中每类测试的具体要求。

CTS简介CTS拥有兼容性测试包。

CTS是一个自动化的测试工具,其中包括两个主要的软件组件:CTS测试工具可以运行在您的台式机和管理测试执行。

连接的移动设备或模拟器上执行个别测试案例。

作为JUnit测试,并打包为Android是用Java编写测试用例。

apk文件运行在实际设备上的目标。

手机设备需要通过Android的兼容性测试(CTS),以确保在android上开发的程序在手机设备上都能运行。

你的设备只有满足CDD的规定并且通过CTS,才有可能获得Android的商标和享受Android Market的权限。

这里有可能指的是需要你自己去向google申请的。

CTS在android软件兼容性测试的意义通过CTS测试之后便允许在设备上使用Android商标,它标志着该设备能够良好兼容软件市场中的数十万应用程序。

android兼容性测试CTS测试过程(实践测试验证通过)

android兼容性测试CTS测试过程(实践测试验证通过)

android兼容性测试CTS测试过程(实践测试验证通过)写这个博客的时候是为了记忆,建议⼤家还是看官⽅的说明,官⽅说的很清楚,不想把官⽅⼤段⼤段的拷贝到这⾥,官⽅的的确说的很清楚:⼀、Android的CTS测试,英⽂为Compatibility Test Suite,意为兼容性测试。

只有通过CTS测试的设备才有可能获得Android的商标和享受Android Market的权限;Android的CTS⽬的与意义:⽤户在android系统中有更好的⽤户体验,并且展⽰android应⽤的优越性,使得android开发者更容易编写⾼质量的andorid程序。

⼆、CTS是兼容性测试,Google为了防⽌⼚商对Android的改动影响其SDKAPI的兼容性,即第三⽅应⽤程序安装到该⼚商的机器上都能正常运⾏;这个差不多是⾃动跑的,会测试硬件(⽐如GPS,WIFI),还有其他⼀系列的东西,跑完之后会出⼀份详细的报告,告诉你哪些地⽅没通过。

三、我们实际使⽤CTS的过程中,很可能需要根据特定的要求,来定制⾃⼰的TestPlan。

这时就需要⾃⼰编译CTS官⽅说明Compatibility Test SuiteWhat is the purpose of the CTS?The Compatibility Test Suite is a tool used by device manufacturers to help ensure their devices are compatible, and to report test results for validations. The CTS is intended to be run frequently by OEMs throughout the engineering process to catch compatibility issues early. What kinds of things does the CTS test?The CTS currently tests that all of the supported Android strong-typed APIs are present and behave correctly. It also tests other non-API system behaviors such as application lifecycle and performance. We plan to add support in future CTS versions to test "soft" APIs such as Intents as well.CTS是⼀个免费的,商⽤级的测试套件,可供下载,CTS运⾏于台式机的直接连接的设备或仿真器,并执⾏测试⽤例。

Android2.3SD卡挂载流程浅析(三)

Android2.3SD卡挂载流程浅析(三)

Android2.3SD卡挂载流程浅析(三)这里只是简要的分析SD卡挂载过程中重要的代码调用,并没有深入分析代码,因为这一部分网上已有牛人比较详尽的分析了,后面我会贴出这些参考文章。

整个过程从Kernel检测到SD卡插入事件开始,之前的一些硬件中断的触发以及driver的加载这里并不叙述,一直到SD卡挂载消息更新到“Android——系统设置——存储”一项中。

1. Kernel发出SD卡插入uevent。

2. NetlinkHandler::onEvent()接收内核发出的uevent并进行解析。

3. VolumeManager::handlBlockEvent()处理经过第二步处理后的事件。

4. 接下来调用DirectVolume:: handleBlockEvent()。

在该方法中主要有两点需要注意:第一,程序首先会遍历mPath容器,寻找与event对应的sysfs_path是否存在与mPath容器中。

第二,针对event中的action有4种处理方式:Add,Removed,Change,Noaction 。

例如:在Add action中会有如下操作(因为我们这里所讲的是SD 卡的挂载流程,因此以Add来说明),首先创建设备节点,其次对disk 和partition两种格式的设备分别进行处理。

SD卡属于disk类型。

5. 经过上一步之后会调用DirectVolume::handleDiskAdded()方法,在该方法中会广播disk insert消息。

6. SocketListener::runListener会接收DirectVolume::handleDiskAdded()广播的消息。

该方法主要完成对event中数据的获取,通过Socket。

(PS:这里的SocketListener.cpp 位于Android源码/system/core/libsysutils/src/中,后文的FramworkListener.cpp也是,之前自己找了很久 T_T)7. 调用FrameworkListener::onDataAvailable()方法处理接收到的消息内容。

Android常用adb命令总结

Android常用adb命令总结

Android常⽤adb命令总结针对移动端 Android 的测试, adb 命令是很重要的⼀个点,必须将常⽤的 adb 命令熟记于⼼,将会为 Android 测试带来很⼤的⽅便,其中很多命令将会⽤于⾃动化测试的脚本当中。

Android Debug Bridgeadb 其实就是Android Debug Bridge, Android 调试桥的缩写,adb 是⼀个C/S架构的命令⾏⼯具,主要由 3 部分组成:运⾏在 PC 端的 Client : 可以通过它对 Android 应⽤进⾏安装、卸载及调试Eclipse 中的 ADT、SDK Tools ⽬录下的 DDMS、Monitor 等⼯具,都是同样地⽤到了 adb 的功能来与 Android 设备进⾏交互。

PC 端的⼿机助⼿,诸如 360 ⼿机助⼿、豌⾖荚、应⽤宝等,其除了安装第三⽅应⽤⽅便,其他的功能,基本上都可以通过 adb 命令去完成,这⾥建议测试⼈员尽量不要在电脑上安装这类⼿机助⼿,因为其⾃带的 adb 程序可能会与 Android SDK下的 adb 程序产⽣冲突,5037端⼝被占⽤,导致使⽤ adb 命令时⽆法连接到设备运⾏在 PC 端的 Service : 其管理客户端到 Android 设备上 adb 后台进程的连接adb 服务启动后,Windows 可以在任务管理器中找到 adb.exe 这个进程运⾏在 Android 设备上的 adb 后台进程执⾏adb shell ps | grep adbd,可以找到该后台进程,windows 请使⽤findstr替代 grep[xuxu:~]$ adb shell ps | grep adbdroot 23227 1 6672 832 ffffffff 00019bb4 S /sbin/adbd这⾥注意⼀个地⽅,就是 adb 使⽤的端⼝号,5037,有必要记⼀下接下来我将 adb 命令分为三部分进⾏介绍,adb 命令、adb shell 命令、linux 命令adb 命令在开发或者测试的过程中,我们可以通过 adb 来管理多台设备,其⼀般的格式为:adb [-e | -d | -s <设备序列号>] <⼦命令>在配好环境变量的前提下,在命令窗⼝当中输⼊ adb help 或者直接输⼊ adb ,将会列出所有的选项说明及⼦命令。

安卓2.3系统官方自带的程序列表

安卓2.3系统官方自带的程序列表

在此我只列出安卓2.3系统官方自带的程序列表,至于其余剩下的第三方如电信和华为绑定的程序就不列出来了.还是先免责声明下:此列表所给的建议纯粹只是以追求过度的纯净核心为目的而列出的建议,并不一定能保证稳定,想要纯净加稳定的话就把以下列表之外的程序全删了就好(包括data 和cust下的).而以下的建议我都是亲测过的,不信的可看这帖,但是如果有按我的建议造成不稳定现象及需要刷机的话,本人一概不负责.说明:/前面是软件名称,/后面是建议,要删的话要连同同名的odex文件一并删除,删前最好备份下,以备恢复.AccountAndSyncSettings.apk 【同步功能/不用可删】删除后点击设置中-帐户同步会出错ApplicationsProvider.apk【应用程序储存/保留】Bluetooth.apk【蓝牙/不用可删,换第三方可删】Browser.apk【谷歌浏览器/换第三方可删】Calculator.apk【计算器/可删】Calendar.apk【日历/换第三方可删】CalendarProvider.apk【日历储存/可删】Camera.apk【照相机/换第三方可删】CertInstaller.apk【证书安装/貌似没用选删】Contacts.apk【联系人/换第三方可删】ContactsProvider.apk【联系人服务/保留】cpwservice.apk【cdma+wlan网的服务/不建议删】DefaultContainerService.apk【默认通讯录服务/楼主惨剧证明必须保留不然无法安装apk包!/】DeskClock.apk【闹钟/不用可删】DownloadProviderUi.apk【啥玩意下载服务Ui/最好不删除】DownloadProvider.apk【啥玩意下载服务/最好不删除】Email.apk【电子邮件/可删】FileManager.apk【文件管理器可删/系统内还有RE呢】FMRadio.apk【收音机可删】Gallery3D.apk 【3d图库/卡得一B删除!!!】HTMLViewer.apk【HTML查看器/没用可删】HuaweiDRMService.apk【华为的受保护数据存储服务/保留】HWDrmApp.apk【华为的受保护数据存储程序/保留】HwWallpaperChooser.apk【华为壁纸选择器/选删】InConfig.apk【IN附加设置/最好不删除】LatinIME.apk【安卓键盘输入法/无中文删之】Launcher2.apk【启动器原生桌面/桌面类软件至少要保留一款,选删】LiveWallpapersPicker.apk【动态壁纸/最好不删除】LiveWallpapers.apk【动态壁纸/同删】MagicSmokeWallpapers.apk【魔幻烟雾壁纸/不用这个的可删之】MediaProvider.apk【媒体储存/这个是不可以删除的如果你删除了你的3D图库不能加载你卡上的图片音乐播放器不能加载卡上的音乐文件】MMITest_II.apk【工程模式中的测试软件/测手机用的,不想测的可删】Mms.apk【原装短信mms/删了会收不到短信。

安卓系统简介

安卓系统简介

年后,他们盖起了房子,有了各自的家庭、子女,有了自己建造的渔船,
过上了幸福安康的生活
启示:一个人只顾眼前的利益,得到的终将是短暂的欢 愉;一个人目标高远,但也要面对现实的生活。只有把 理想和现实有机结合起来,才有可能成为一个成功之人。 有时候,一个简单的道理,却足以给人意味深长的生命 启示。
Android是基于Linux内核的操作系统,是Google公司在2007年11月5日 公布的手机操作系统,早期由Google开发,后由开放手持设备联盟 (Open Handset Alliance)开发。它采用了软件堆层(software stack, 又名以软件叠层)的架构,主要分为三部分。底层Linux内核只提供基 本功能;其他的应用软件则由各公司自行开发,部分程序以Java编写。 2011年初数据显示,仅正式推出三年的操作系统Android已经超越称霸 十年的塞班系统,采用Android系统主要厂商包括美国摩托罗拉 (MOTOROLA)、英国索尼爱立信(Sony Ericsson)另外还有中国 厂商如:HTC、联想、华为等,使之跃居全球最受欢迎的智能手机平台, Android系统不但应用于智能手机,也在平板电脑市场急速扩张。
通讯方式:支持前置摄像头、SIP/VOIP和NFC(近场通讯)
简化界面、速度提升:
更快更直观的文字输入:
一键文字选择和复制/粘帖:
改进的电源管理系统:
原生支持前置前置摄像头、互联网通话和NFC(近场通讯):
增加下载管理器:
手机网络下载速度
上行速率一般是指从你的电脑上传的速度,也 就说别人从你的电脑进行通讯的速率!
下行速率一般是你从网络上的主机下载速度!
一般ADSL上网方式上行与下行速率是不对称的,一 般下行速率比较高!上行比较低!现在1M普通是上行: 386Kb,下行:1024Kb! 2M上行:386Kb,下 行:2048Kb

标准Action

标准Action

Android2.3发布,新特性一览Posted on 2010/12/07 by 繁星Android的新版本在经历了版本号变更(从3.0到2.3),新特性猜测,发布时间延期(从11.11到12.6)之后,终于真的来到了我们这些开发者面前了。

让我们迫不及待的看看Android2.3有哪些新特性吧。

首先,为游戏开发的增强:∙新的并发垃圾回收机制∙更多的读取系统信息的原生接口∙原生接口可以获取输入和访问传感器了∙EGL/OpenGL ES、OpenSL ES∙新的管理窗口和生命周期的框架。

其次,多媒体和更多的通讯方式:∙毫无疑问的支持了Google自家的VP8 and WebM∙支持AAC and AMR-wideband编码∙新的音频效果器,比如混响、均衡、虚拟耳机和低频提升∙支持前置摄像头(为视频电话准备的)∙SIP、VOIP支持(为Google voice准备的)∙NFC支持其他改进:∙优化用户界面:简化、提速(期待在真机上体验)∙输入界面改进:更快、更直观∙改进电源管理(需要跟进一步了解它是如何做的)∙新的应用管理方式∙新的下载管理器,似乎是个有趣的东西,号称会管理浏览器、email等所有应用中下载的文件。

截取自:Adroid2.3官方说明(/2010/12/android-23-platform-and-updated-sdk.html,需Fan墙)Posted in Uncategorized, 技术动态 | Tagged 技术动态 | Leave a comment Android 2.3在SDK和开发环境的改进Posted on 2010/12/07 by 繁星Android 2.3在SDKtools和开发环境的改进主要有:∙简化debug和build∙集成了ProGuard,以方便开发者保护自己的源代码∙改进了HierarchyViewer∙新的UI Builder的预览Android开发者们赶紧去体验吧。

Android SDK 2.3与Eclipse最新版开发环境搭建

Android SDK 2.3与Eclipse最新版开发环境搭建

no Pain no Gain no Gavin博客同步更新至:/deaboway /deaboway一、 背景和准备1. Android 简介 Android 是 Google 于 2007 年 11 月 5 日宣布的基于 Linux 平台的开源手机操 作系统的名称,该平台由操作系统、中间件、用户界面和应用软件组成,号称是 首个为移动终端打造的真正开放和完整的移动软件。

可以把它简单理解成 Linux 上套了一个 JAVA 的壳。

Android 的平台基本上是免费的,虽然有部份原生链接库会要求费用,但大 部份是免权利金。

Android 的程序可以采用 JAVA 开发, 因为它的虚拟机(Virtual Machine) Dalvik,只是它将 JAVA 的 bytecode 转成自己的格式,回避掉需要付 给 SUN 有关 JAVA 的授权费用。

因此,Android 开发环境是需要 JDK 的。

2. Android 网络资源 Android的网站是:/,目前还可以登陆,比较悲剧 的是:其Partners部分:/和Developers部分: /,大陆地区已经无法访问。

Android的系统要求请参考: /sdk/requirements.html 当前最新版本的Android SDK下载器(真正的SDK还是需要另外下载的),小 于是 生是无法直接到官网/sdk/index.html 下载的, 下载 另外找了一个地址/sdk/index.html, 链接和说明如下: Android SDK for Windows android-sdk_r08-windows.zip /android/android-sdk_r08-windows.zip installer_r08-windows.exe (Recommended) /android/installer_r08-windows.exe Android SDK for Mac OS X (intel) android-sdk_r08-mac_86.zip /android/android-sdk_r08-mac_86.zip Android SDK for Linux (i386) android-sdk_r08-linux_86.tgz /android/android-sdk_r08-linux_86.tgz Here's an overview of the steps you must follow to set up the Android SDK: 1. Prepare your development computer and ensure it meets the system requirements. 2. Install the SDK starter package from the table above. (If you're on Windows, download the installer for help with the initial setup.) 3. Install the ADT Plugin for Eclipse (if you'll be developing in Eclipse). 4. Add Android platforms and other components to your SDK. 5. Explore the contents of the Android SDK (optional).1no Pain no Gain no Gavin博客同步更新至:/deaboway /deaboway3. 软件包下载 a. JDK 1.6 下载网址: /technetwork/java/javase/downloads/index.html 当前最新版本为 Java SE 6 Update 23 小生机器上安装的是:jdk1.6.0_21,也一样用,其实只要你是 JDK1.5 以上 就可以了。

AndroidSDK目录具体结构及Android源码的具体结构

AndroidSDK目录具体结构及Android源码的具体结构

AndroidSDK⽬录具体结构及Android源码的具体结构Android SDK⽬录具体结构1. add-ons:这⾥⾯保存着附加库,⽐如Google Maps,当然你如果安装了OphoneSDK,这⾥也会有⼀些类库在⾥⾯。

2. docs:这⾥⾯是Android SDK API参考⽂档,所有的API都可以在这⾥查到。

3. market_licensing:作为AndroidMarket版权保护组件,⼀般发布付费应⽤到电⼦市场可以⽤它来反盗版。

4. platforms:是每个平台的SDK真正的⽂件,⾥⾯会根据API Level划分的SDK版本,这⾥就以Android 2.2来说,进⼊后有⼀个android-8的⽂件夹,android-8进⼊后是Android 2.2 SDK的主要⽂件,其中ant为ant编译脚本,data保存着⼀些系统资源,images是模拟器映像⽂件,skins则是Android模拟器的⽪肤,templates是⼯程创建的默认模板,android.jar则是该版本的主要framework⽂件,tools⽬录⾥⾯包含了重要的编译⼯具,⽐如aapt、aidl、逆向调试⼯具dexdump和编译脚本dx。

5. platform-tools:保存着⼀些通⽤⼯具,⽐如adb、和aapt、aidl、dx等⽂件,这⾥和platforms⽬录中tools⽂件夹有些重复,主要是从android 2.3开始这些⼯具被划分为通⽤了。

6. samples:是Android SDK⾃带的默认⽰例⼯程,⾥⾯的apidemos强烈推荐初学者运⾏学习,对于SQLite数据库操作可以查看NotePad这个例⼦,对于游戏开发Snake、LunarLander都是不错的例⼦,对于Android主题开发Home则是android m5时代的主题设计原理。

7. tools:作为SDK根⽬录下的tools⽂件夹,这⾥包含了重要的⼯具,⽐如ddms⽤于启动Android调试⼯具,⽐如logcat、屏=幕截图和⽂件管理器,⽽draw9patch则是绘制android平台的可缩放png图⽚的⼯具,sqlite3可以在PC上操作SQLite数据库,⽽monkeyrunner则是⼀个不错的压⼒测试应⽤,模拟⽤户随机按键,mksdcard则是模拟器SD映像的创建⼯具,emulator是android模拟器主程序,不过从android1.5开始,需要输⼊合适的参数才能启动模拟器,traceview作为android平台上重要的调试⼯具。

Android-Studio-2.3使用简易教程

Android-Studio-2.3使用简易教程

An droid Studio 2.3使用简易教程An droid Studio开发环境安装配置(IDE安装)1、An droid studio 安装可以在网站下载,进行安装就可以。

2、创建AVD (模拟器)为使An droid studio 应用程序可以在模拟器上运行,必须创建AVD1)在An droid studio 中。

选择Tools > An droid > AVD Ma nager,如下图:j\nd『o■汩IJL SDK ManagerSearUi Everywhere #"品"皿论尹—O Layout Inspccto『Go to File|O Firebase- dpp Indexing TestRecent FilesNavigation Bar Alt+HomeD「。

卩flip1; herp tn open2)点击下面图中的面板左下侧的Create Virtual Devices,就可以进入Vitual Device Con figuratio n 界面创建了。

3)在下图的Virtual Device Configuration 界面中选择合适的硬件形式,选定后点击Ardroid Studc 23 7:龙Sync Pr EJJS tt with FilersI 审11Android Device Monitor• FireboseGO App Links AssioamNext进入到选择System Image界面4)在System Image界面选择合适的模拟器基于的API结构类型与版本,点击Next进入到AVD一些具体参数配置与确认界面。

5)在AVD配置确认界面中,可以点击Hide Advaneed Settings 按钮对AVD进行更进步的配置,配置好后点击Finish按钮即完成AVD的创建。

二、使用刚安装好的AS 创建一个项目并运行 2.1 启动AS1、安装AS 成功后,可以在操作系统的程序中找到 An droid Studio 击下图的标识启动 AS:■ ■■■ ■■ !■ — . —-1MAndroid StudioAn-ar h-AT nil n n rl mi i4 瞌tnii 討;n2、启动后界面如下5、检验开发环境是否搭建成功:创建一个空的 APP 应用程序运行即可。

android adb命令

android adb命令

史上最强劲的android模拟器命令详解转/thread-23281-1-1.ht mlAndroid模拟器ndroid SDK自带一个移动设备模拟器—它是一个可以运行在你电脑上的虚拟设备. Android模拟器可以让你不需使用物理设备即可预览、开发和测试Android应用程序. Android模拟器能够模拟除了接听和拨打电话外的所有移动设备上的典型功能和行为. 如右图所示, Android模拟器提供了大量的导航和控制键,你可以通过鼠标或键盘点击这些按键来为你的应用程序产生事件. 同时它还有一个屏幕用于显示Android自带应用程序和你自己的应用程序.为了便于模拟和测试应用程序, Android模拟器允许你你的应用程序通过Android平台服务调用其他程序、访问网络、播放音频和视频、保存和**数据、通知用户、渲染图像过渡和场景. Android模拟器同样具有强大的调试能力,例如能够记录内核输出的控制台、模拟程序中断(比如接受短信或打入电话)、模拟数据通道中的延时效果和遗失。

下面的章节将提供关于模拟器的详细信息,以及如何在开发应用程序中使用模拟器。

启动和关闭模拟器要启动Android模拟器,首先进入SDK的tools/文件夹,然后输入emulator 或 ./emulator。

这个操作将初始化Android系统,你将会在屏幕上看到模拟器窗口。

要关闭模拟器,只需要关闭模拟器窗口即可。

操作模拟器你可以通过模拟器的启动选项和控制台命令来控制模拟环境的行为和特性。

一旦模拟器启动,你就可以通过键盘和鼠标来‖按‖ 模拟器的按键,从而操作模拟器。

下面的表格总结了模拟器按键可键盘按键之间的映射关系。

模拟器启动选项Android模拟器提供了很多启动选项,你可以在启动模拟器时指定,来控制其外观和行为。

下面是用命令行的方式启动模拟器并指定参数的语法:1.emulator [-option [value]] ... [-qemu args]下表总结了所有有效的选项。

Android-cmd命令

Android-cmd命令

1.5有了Android SDK和ADT后,需要创建虚拟机第一种方法:CMD进入Tools目录,输入android list target可显示虚拟机列表创建虚拟机实例android create avd --name MyAndroidVD1.5 --target 2--name 指定模拟器名称--target 目标模拟器序号Do you wish to create a custom hardware profile[no]是否要定制化手机硬件装置,直接回答no,采用默认值回答yes搭配指定想要仿真的手机硬件设置。

Camera support:是否要让手机支持照相机功能,默认为noMax VM application heap size内存容量Abstaracted LCD density:LCD屏设置Cache partition size:指定/cache分割区大小,默认66MSD Card support:是否要支持sdcard功能Cache partition support:是否支持额外的/cache分割区,这样放在/cache的暂存文件不会使用到Android系统空间Keyboard support:是否支持QWERTY键盘输入Audio playback support:是否支持音乐播放Audio recording support:是否支持录音DPad support:是否支持home,返回,电话,电源键等Maximum vertical camera pixels:最大垂直摄像头像素Accelerometer:是否支持加速器功能GPS support:是否支持GPS卫星导航功能Device ram size:是否更改手机内存容量,默认96Touch-screen support:是否支持触摸屏Battery support:是否要让手机支持电池功能GSM modem support:是否让手机支持GSM modem功能Track-ball support:是否让手机支持轨迹球功能Maximum horizontal camera pixels:摄像头最大水平像素查询创建的模拟器有哪些Tool路径>android list启动模拟器Tool路径>emulator -avd 模拟器名称更名Tool路径>android move avd -n 原模拟器名称-r 新模拟器名称删除Tool路径>android delete avd -n 模拟器名称生成应用实例CMDTools目录底下使用命令Android create project -k com.example.android.hello -a MyAcvitity -t 3 -p c:\HelloAndroid -k指定apk名称-a指定Activity名称-t指定模拟器-p指定生成目录准备工作创建模拟器android create avd -n 模拟器名称-t 21.mksdcard 1024MB sdcard.iso (建立存储镜像)2. emulator -avd 模拟器名称-sdcard sdcard.iso (启动模拟器)3.再打开一个cmd4.adb install *.apk (安装)adb(Android Debug Bridge)是Android提供的一个通用的调试工具,借助这个工具,我们可以管理设备或手机模拟器的状态。

安卓2.3系统刷机教程

安卓2.3系统刷机教程

一、下载刷机工具和ROM包下载必要的文件,为刷机过程做准备。

1.本教程需要在Windows操作系统环境下进行。

2.本教程只针对MOTO Milestone, 国行版XT720 XT702未经过测试,不推荐刷机。

3.刷机有风险,务必要小心;因刷机造成的任何问题,小米公司不承担任何责任。

4.本教程内容摘自互联网资源并经官方整理,如有版权问题可联系管理员。

更多内容详见免责声明。

下载刷机工具1.将 GOT底包解压后放在某个磁盘根目录下备用(路径不能有中文,SBF名字也不能有中文)。

2.在电脑上解压 RSD Lite 4.6 后安装。

3.在电脑上解压 milestone驱动后安装。

4.将 OpenRecovery 解压后得到的 update.zip 和 OpenRecovery 文件夹,都放到手机SD卡的根目录下,请不要删除或改名。

立即下载(大小:136MB,MD5:BC43DC2607183AE5D19C5B83BBA3D2E5)下载 MIUI ROM 最新安装包,无需解压直接放到手机SD卡/OpenRecovery/updates文件夹下。

立即下载( 大小:79M,MD5:B149B90D251D1A6DE56185D9E97F9F81 )二、恢复MOTO官方系统安装驱动,刷Got底包。

关闭手机,推开键盘,按住“方向上键”+“电源键”不放,保持约5秒,松开,手机屏幕显示进入bootloader界面。

Windows 7用USB连接手机和电脑(Windows XP可以参考下面临时解决办法),耐心等待驱动自动安装完毕。

打开之前下载的RSD软件,点“选择文件按钮”(如图所示)找到放置SBF文件的位置,选中,确定。

RSD界面显示信息后,点"START",耐心等待,手机可能会自动重启两次,一直到RSD界面显示"PASS"底包完成。

三、安装OpenRecovery选择Bootloader版本号,安装OpenRecovery。

android2.3

android2.3

共12项新功能特性!Android 2.3系统图文解析Google在美国山景城总部放置姜饼小人雕塑到现在已经过去了整整一个月时间,Android 2.3终于如期登场了,这次Android 2.3的正式发布犹如一剂强行针,给予了苹果iOS 4.2最强烈的打击。

现在就让我们一起揭开Android 2.3姜饼系统的十二项全新特性吧!1.全新的UI界面虽然是一个较为重大的更新,但是Android 2.3在界面方面的改变相对于之前的Android 2.2而言其变化并不算明显,其主要的变化来自于界面的配色方面。

Android 2.3在配色方面更多的使用了绿色配色,例如状态栏、通话图标以及其他的一些功能图标。

另外全新的系统在界面的反应速度方面相对于前作也有了一定程度的提 升,现在大家使用Android系统将会觉得使用起来更为流畅。

2.近场通信(NFC) 早在十月份就有消息称三星推出的Nexus S 手机将会支持万事达PayPass 支付功能,埃里克施密特也证实了该手机将支持NFC。

这项功能在诺基亚手机以及iPhone 5中都会得到支持。

NFC 是一种近距离高频无线通信技术,可以进行数据交换,这相当于一种电子识别方式,可以将信用卡、身份证明等信息绑定至手机,完整验证、支付等服务。

需要硬件添加NFC 芯片.3.新的运动控制APINexus S内置了来自InvenSense的运动控制解决方案,该公司推出的MEMS陀螺仪传感器在任天堂的Wii中得到支持。

目前陀螺仪传感器已经在一些Android设备中出现,而Android 2.3系统也增加了新的传感器API,包括四元数、旋转矩阵、线性加速度和重力感应。

这些新的API将更有利于增强现实应用、体感游戏、导航系统、相机防抖等软件的使用。

4.新的Android电子市场在Android 2.3系统公布之前,电子市场的更新已经提前提前进行。

虽然电子市场可以进行APK独立更新,但是加入大量新功能的菜市场预计会在姜饼系统中捆绑发布。

Android2.3开发环境搭建

Android2.3开发环境搭建

安卓巴士()Android开发者社区Android开发环境搭建(Win XP)----Kimly 主要软件软件版本:Android 2.3 SDK Realease 1Eclipse 3.4.2JRE 6 Update 13首先要下载Eclipse3.4.2。

地址是/downloads/。

我们下载的是Eclipse IDE for Java Developers,约85M。

然后下载Android 2.3 SDK,地址是/intl/zh-CN/android/。

如果机器上没有安装JRE的话,还要去下载一个JRE,下载地址是/javase/downloads/index.jsp。

我们下载的是JRE 6 Update 13下载完工具,开始安装 (安装好JDK6的可以跳过此部) (1)安装JDK6:运行下载回来的JSK安装包(jdk-6u14-windows-i586.exe)默认安装即可。

设置JDK环境变量:在path后 ;D:\java\binClasspath D:\java\jre\lib\rt.jar;.;home D:\java(2)安装Ecplise:下载回来Ecplise(eclipse-jee-galileo-win32.zip)解压到 D:\android路径下。

(3)安装Android(SDK):下载回来的SDK包(android-sdk-windows-1.5_r3.zip) 解压到D:\android 路径下。

在path后 ;D:\android-sdk\tools接下来,我么开始安装。

首先要安装的是JRE,按照提示一路Next就好了,这里我就不多说了。

现在安装和配置Eclipse,解压后,打开eclipse.exe会出现配置工作空间的窗口:接下来配置eclipse,安装Android tools,点Help|Software Update增加站点:https:///android/eclipse/。

android开发环境和工具(三)ADB命令详解

android开发环境和工具(三)ADB命令详解

ADB全称Android Debug Bridge,是Android SDK的DEBUG工具之一,可以直接操作管理Android模拟器或真实的Android设备。

ADB 是一个“客户端-服务器端”程序,其中客户端就是 用来操作的电脑,服务器端是Android设备、实体机器或虚拟机。

主要功能 :1.运行设备的shell命令行2.管理模拟或设备的端口映射3.计算机与设备之间上传和下载文件4.将本地APK软件安装至模拟器或设备上【ADB安装环境】在模拟环境中,ADB命令在“AndroidSDK根目录/platform-tools”目录下,你可以把此路径加到Window/Linux环境变量中,这样,可以任何路径下执行adb命令。

在命令行直接输入adb, 输出结果如下图所示:【常用命令详解】1. 查看设备情况格式 : adb devices说明 : 这个命令是查看当前连接的设备,连接到计算机的Android设备或模拟将会列出显示。

该命令返回的结果为Android设备或模拟器序列号及状态。

序列 号用于唯一标示一台Android设备,通常为<设备名称>-<端口号>;状态具有如下两种: Offline – 设备没有连接或无响应;Device – 设备已连接。

注意,该状态并不表示设备可用,当设备处于启动阶段时,若连接成功也会返回该状态。

adb是C/S结构,首先会启动Server,该serverw得到5037端口进行侦听,并尝试使用5555~5585端口连接Android设备/模拟器。

当多台Android设备连接至同一PC机时,需要使用-s<序列号>区分设备进行操作。

2. 安装软件格式 : adb install <apk 文件路径>说明 : 这个命令是将指定的apk文件安装到设备上。

如下图所示,我们可以进入apk所在文件夹,使用adb install命令来操作。

格式 : adb install -r <apk 文件路径>说明 : 这个命令是将重新安装指定的apk文件到设备上。

android4.3-cdd

android4.3-cdd
Android 4.3 Compatibility Definition
Revision 1 Last updated: Ju Google Inc. All rights reserved. compatibility@
7.2.2. Non-touch Navigation 7.2.3. Navigation keys 7.2.4. Touchscreen input 7.2.5. Fake touch input 7.2.6. Microphone 7.3. Sensors 7.3.1. Accelerometer 7.3.2. Magnetometer 7.3.3. GPS 7.3.4. Gyroscope 7.3.5. Barometer 7.3.6. Thermometer 7.3.7. Photometer 7.3.8. Proximity Sensor 7.4. Data Connectivity 7.4.1. Telephony 7.4.2. IEEE 802.11 (WiFi) 7.4.2.1. WiFi Direct 7.4.3. Bluetooth 7.4.4. Near-Field Communications 7.4.5. Minimum Network Capability 7.5. Cameras 7.5.1. Rear-Facing Camera 7.5.2. Front-Facing Camera 7.5.3. Camera API Behavior 7.5.4. Camera Orientation 7.6. Memory and Storage 7.6.1. Minimum Memory and Storage 7.6.2. Application Shared Storage 7.7. USB 8. Performance Compatibility 9. Security Model Compatibility 9.1. Permissions 9.2. UID and Process Isolation 9.3. Filesystem Permissions 9.4. Alternate Execution Environments 9.5. Multi-User Support 9.6. Premium SMS Warning 9.7. Kernel Security Features 10. Software Compatibility Testing 10.1. Compatibility Test Suite 10.2. CTS Verifier 10.3. Reference Applications 11. Updatable Software 12. Contact Us

Android 2.1 CDD-Android 2.1兼容性定义中文版

Android 2.1 CDD-Android 2.1兼容性定义中文版

Android 2.1 兼容性定义版权所有©2010, Google Inc. 保留所有权利.compatibility@原文链接:/compatibility/android-2.1-cdd.pdf中文翻译:Jack Yu (yjmjack@)1.简介此文档列举了对于手机兼容Android 2.1版所必须依次符合的要求。

词汇“必须”、“绝不可以”、“要求的”、“应该”、“不应该”、“建议”、“可以”、“可选的”的含义依照RFC2119 [参考, 1]中定义的IETF标准。

正如本文档中所使用的,“设备实现者”或者“实现者”是指开发运行Android 2.1的硬件/软件解决方案的一个人或者一个组织。

“设备实现”或者“实现”是指所开发的硬件/软件解决方案。

设备实现如要与Android 2.1兼容:必须符合本兼容性定义中所列的各项要求,包含任何通过参考所引用的文档。

必须通过该设备实现的软件完成时可用的最新版本“Android兼容性测试套件(CTS)”测试。

(CTS作为Android开源项目[Resources, 2]的一部分提供。

)许多CTS测试组件,但不是所有的,在此文档中有概述。

因为此兼容性定义或者CTS未提及,存在歧义,或者未完成,设备实现者有责任保证与现有实现的兼容性。

因为这个原因,Android开源项目[参考, 3]提供一种参考,同时也是一种首选的Android实现。

强烈鼓励设备实现者将他们的实现基于来自Android开源项目“从下往上”的源代码。

一些组件有可能用其他实现所替代,这种做法是强烈不推荐的,因为通过CTS测试将会变得相当困难。

实现者有责任保证与标准Android实现在行为上的完全兼容,包括但不限于CTS。

最后,要注意某些组件的替代和变更是本文档所明确禁止的。

2.参考1.IETF RFC2119 Requirement Levels: /rfc/rfc2119.txt2.Android Compatibility Program Overview:/compatibility/index.html3.Android Open Source Project: /4.API definitions and documentation: /reference/packages.html5.Android Permissions reference:/reference/android/Manifest.permission.html6.android.os.Build reference: /reference/android/os/Build.html7.Android 2.1 allowed version strings:/compatibility/2.1/versions.xhtml8.android.webkit.WebView class:/reference/android/webkit/WebView.html9.HTML5: /specs/web-apps/current-work/multipage/10.Dalvik Virtual Machine specification: available in the Android source code, atdalvik/docs11.AppWidgets:/guide/practices/ui_guidelines/widget_design.html12.Notifications: /guide/topics/ui/notifiers/notifications.html13.Application Resources: /android/reference/available-resources.html14.Status Bar icon style guide: /guide/practices/ui_guideline/icon_design.html#statusbarstructure15.Search Manager: /reference/android/app/SearchManager.html16.Toasts: /reference/android/widget/Toast.html17.Live Wallpapers: /resources/articles/live-wallpapers.html18.Apps for Android: /p/apps-for-android19.Reference tool documentation (for adb, aapt,ddms):/guide/developing/tools/index.html20.Android apk file description: /guide/topics/fundamentals.html21.Manifest files: /guide/topics/manifest/manifest-intro.html22.Monkey testing tool: /guide/developing/tools/monkey.html23.Supporting Multiple Screens:/guide/practices/screens_support.html24.android.content.res.Configuration:/reference/android/content/res/Configuration.html25.android.util.DisplayMetrics:/reference/android/util/DisplayMetrics.html26.android.hardware.Camera:/reference/android/hardware/Camera.html27.Sensor coordinate space:/reference/android/hardware/SensorEvent.html28.Android Security and Permissions reference:/guide/topics/security/security.html29.Bluetooth API:/reference/android/bluetooth/package-summary.html这些参考中许多是直接或间接来自Android 2.1 SDK的,并且在信息上与SDK中的文档功能对等。

Android 2.3 CTS测试修改测试结果和调试方法

Android 2.3 CTS测试修改测试结果和调试方法

Android 2.3 CTS测试修改测试结果和调试方法1. CTS 测试用USB 连接开发板和办公电脑,就可以开始进行cts 测试了。

测试步骤如下:1)进入cts 目录,启动cts。

localhost bin # pwd/work/android_src/out/host/linux-x86/bin (cts 可执行程序放在android 源代码/work/android_src 中的/out/host/linux-x86/bin 路径下。

) localhost bin # ./cts (启动cts)启动开发板会在屏幕上显示下面信息。

Android CTS version 2.2_r1Device(0123456789ABCDEF) connected (开发板已经连接,说明USB 已经连接好,可以进行CTS 测试了)cts_host > start --plan VM (启动cts 的VM 测试计划) start test plan VM============================================== ================Test package: android.core.vm-testsdot.junit.opcodes.add_double_2addr.JUnit_Test_add_double_2addr#test B1....(pass)dot.junit.opcodes.add_double_2addr.JUnit_Test_add_double_2addr#test B2...(pass)dot.junit.opcodes.add_double_2addr.JUnit_Test_add_double_2addr#test B3....(pass) ........................(略)如果以前跑过VM 测试,或由于某种原因导致VM 测试暂停,在下次cts 测试,会显示如下信息:localhost bin # ./ctsAndroid CTS version 2.2_r1Device(0123456789ABCDEF) connectedcts_host > start --plan VMcts_host > There are 1 existing session(s) for plan VM.Create a new session or choose an existing one?(表示对VM 重新进行测试)Create a new session [0](表示从上次中断的地方开始继续进行测试)Choose a session [1](输入1,从上次中断处继续进行测试)(VM 如果重新测试过两次及以上,会出现下面的信息,session 值越小,表示上次测试时间离目前时间越远)Please choose a session from the existed session(s):1 [0]7 [1](从最早一次开始进行测试)resume test plan VM (session id = 1)============================================== ================Test package: android.core.vm-testsdot.junit.opcodes.add_float_2addr.JUnit_Test_add_float_2addr#testN5...( pass)........................(略)测试中存在着很多意想不到的情况,会导致cts 测试中断,可见cts 功能做得很贴心。

android 2

android 2

android 2.3 教程Android 2.3,也被称为Gingerbread(姜饼)是谷歌公司于2010年12月发布的一款移动操作系统。

它是Android平台的第七个主要版本,被广泛应用于手机和平板电脑设备。

Android 2.3带来了一系列的改进和功能增强,以提供更流畅、更高效的用户体验。

以下是Android 2.3的一些主要特性和功能:1. 用户界面改进:Android2.3引入了新的黑色主题,使整个用户界面看起来更加现代和时尚。

此外,Android 2.3还增加了新的图标和可定制的主屏幕,使用户能够更好地个性化他们的设备。

2. 键盘和输入改进:Android 2.3改进了虚拟键盘的精确性和响应速度,使用户在输入时更容易和更准确。

此外,Android 2.3还引入了新的复制和粘贴功能,使用户能够更方便地编辑文本。

3. 新的通信工具:Android 2.3增加了新的通信工具,例如SIP (会话初始协议),使用户能够通过互联网进行低成本的语音通话。

此外,Android 2.3提供了更好的网络通信性能,包括更快的数据传输速度和更好的数据保护。

4. 高效能和低能耗:Android 2.3改进了操作系统的性能和能效。

它引入了新的内存管理工具,以减少应用程序占用的内存量,并改进了应用程序的启动速度。

此外,Android 2.3还引入了更好的电池管理功能,使设备的续航时间得到了显著改善。

5. 新的应用程序和功能:Android 2.3增加了一些新的内置应用程序和功能,例如下载管理器和字典应用程序。

此外,Android 2.3还改进了浏览器的性能和稳定性,并提供了支持多媒体格式的新的音频和视频编解码器。

6. 开发者工具:Android 2.3提供了一系列的开发者工具,以帮助开发者更轻松地构建和测试Android应用程序。

这些工具包括新的调试工具、性能分析工具和应用程序监控工具,使开发者能够更好地优化应用程序的性能。

相关主题
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

Android 2.3 Compatibility DefinitionCopyright © 2010, Google Inc. All rights reserved.compatibility@Table of Contents1. Introduction2. Resources3. Software3.1. Managed API Compatibility3.2. Soft API Compatibility3.2.1. Permissions3.2.2. Build Parameters3.2.3. Intent Compatibility3.2.3.1. Core Application Intents3.2.3.2. Intent Overrides3.2.3.3. Intent Namespaces3.2.3.4. Broadcast Intents3.3. Native API Compatibility3.4. Web Compatibility3.4.1. WebView Compatibility3.4.2. Browser Compatibility3.5. API Behavioral Compatibility3.6. API Namespaces3.7. Virtual Machine Compatibility3.8. User Interface Compatibility3.8.1. Widgets3.8.2. Notifications3.8.3. Search3.8.4. Toasts3.8.5. Live Wallpapers4. Application Packaging Compatibility5. Multimedia Compatibility5.1. Media Codecs5.1.1. Media Decoders5.1.2. Media Encoders5.2. Audio Recording5.3. Audio Latency6. Developer Tool Compatibility7. Hardware Compatibility7.1. Display and Graphics7.1.1. Screen Configurations7.1.2. Display Metrics7.1.3. Declared Screen Support7.1.4. Screen Orientation7.1.5. 3D Graphics Accleration7.2. Input Devices7.2.1. Keyboard7.2.2. Non-touch Navigation7.2.3. Navigation keys7.2.4. Touchscreen input7.3. Sensors7.3.1. Accelerometer7.3.2. Magnetometer7.3.3. GPS7.3.4. Gyroscope7.3.5. Barometer7.3.6. Thermometer7.3.7. Photometer7.3.8. Proximity Sensor7.4. Data Connectivity7.4.1. Telephony7.4.2. IEEE 802.11 (WiFi)7.4.3. Bluetooth7.4.4. Near-Field Communications7.4.5. Minimum Network Capability7.5. Cameras7.5.1. Rear-Facing Camera7.5.2. Front-Facing Camera7.5.3. Camera API Behavior7.5.4. Camera Orientation7.6. Memory and Storage7.6.1. Minimum Memory and Storage7.6.2. Application Shared Storage7.7. USB8. Performance Compatibility9. Security Model Compatibility9.1. Permissions9.2. UID and Process Isolation9.3. Filesystem Permissions9.4. Alternate Execution Environments10. Software Compatibility Testing10.1. Compatibility Test Suite10.2. CTS Verifier10.3. Reference Applications11. Updatable Software12. Contact UsAppendix A - Bluetooth Test Procedure1. IntroductionThis document enumerates the requirements that must be met in order for mobile phones to be compatible with Android 2.3.The use of "must", "must not", "required", "shall", "shall not", "should", "should not", "recommended", "may" and "optional" is per the IETF standard defined in RFC2119 [Resources, 1].As used in this document, a "device implementer" or "implementer" is a person or organization developing a hardware/software solution running Android 2.3. A "device implementation" or "implementation" is the hardware/software solution so developed.To be considered compatible with Android 2.3, device implementations MUST meet the requirements presented in this Compatibility Definition, including any documents incorporated via reference.Where this definition or the software tests described in Section 10 is silent, ambiguous, or incomplete, it is the responsibility of the device implementer to ensure compatibility with existing implementations. For this reason, the Android Open Source Project [Resources, 3] is both the reference and preferred implementation of Android. Device implementers are strongly encouraged to base their implementations to the greatest extent possible on the "upstream" source code available from the Android Open Source Project. While some components can hypothetically be replaced with alternate implementations this practice is strongly discouraged, as passing the software tests will become substantially more difficult. It is the implementer's responsibility to ensure full behavioral compatibility with the standard Android implementation, including and beyond the Compatibility Test Suite. Finally, note that certain component substitutions and modifications are explicitly forbidden by this document.2. Resources1.IETF RFC2119 Requirement Levels: /rfc/rfc2119.txt2.Android Compatibility Program Overview: /compatibility/index.html3.Android Open Source Project: /4.API definitions and documentation: /reference/packages.html5.Android Permissions reference: /reference/android/Manifest.permission.html6.android.os.Build reference: /reference/android/os/Build.html7.Android 2.3 allowed version strings: /compatibility/2.3/versions.html8.android.webkit.WebView class: /reference/android/webkit/WebView.html9.HTML5: /specs/web-apps/current-work/multipage/10.HTML5 offline capabilities: /html5/spec/Overview.html#offline11.HTML5 video tag: /html5/spec/Overview.html#video12.HTML5/W3C geolocation API: /TR/geolocation-API/13.HTML5/W3C webdatabase API: /TR/webdatabase/14.HTML5/W3C IndexedDB API: /TR/IndexedDB/15.Dalvik Virtual Machine specification: available in the Android source code, at dalvik/docs16.AppWidgets: /guide/practices/ui_guidelines/widget_design.html17.Notifications: /guide/topics/ui/notifiers/notifications.html18.Application Resources: /android/reference/available-resources.html19.Status Bar icon style guide: /guide/practices/ui_guideline /icon_design.html#statusbarstructure20.Search Manager: /reference/android/app/SearchManager.html21.Toasts: /reference/android/widget/Toast.html22.Live Wallpapers: /resources/articles/live-wallpapers.html23.Reference tool documentation (for adb, aapt, ddms): /guide/developing/tools/index.html24.Android apk file description: /guide/topics/fundamentals.html25.Manifest files: /guide/topics/manifest/manifest-intro.html26.Monkey testing tool: /guide/developing/tools/monkey.html27.Android Hardware Features List: /reference/android/content/pm/PackageManager.html28.Supporting Multiple Screens: /guide/practices/screens_support.html29.android.util.DisplayMetrics: /reference/android/util/DisplayMetrics.html30.android.content.res.Configuration: /reference/android/content/res/Configuration.html31.Sensor coordinate space: /reference/android/hardware/SensorEvent.html32.Bluetooth API: /reference/android/bluetooth/package-summary.html33.Camera orientation API: /reference/android/hardware/Camera.html#setDisplayOrientation(int)34.android.hardware.Camera: /reference/android/hardware/Camera.html35.Android Security and Permissions reference: /guide/topics/security/security.html36.Apps for Android: /p/apps-for-androidMany of these resources are derived directly or indirectly from the Android 2.3 SDK, and will be functionally identical to the information in that SDK's documentation. In any cases where this Compatibility Definition or the Compatibility Test Suite disagrees with the SDK documentation, the SDK documentation is considered authoritative. Any technical details provided in the references included above are considered by inclusion to be part of this Compatibility Definition.3. SoftwareThe Android platform includes a set of managed APIs, a set of native APIs, and a body of so-called "soft" APIs such as the Intent system andweb-application APIs. This section details the hard and soft APIs that are integral to compatibility, as well as certain other relevant technical and user interface behaviors. Device implementations MUST comply with all the requirements in this section.3.1. Managed API CompatibilityThe managed (Dalvik-based) execution environment is the primary vehicle for Android applications. The Android application programming interface (API) is the set of Android platform interfaces exposed to applications running in the managed VM environment. Device implementations MUST provide complete implementations, including all documented behaviors, of any documented API exposed by the Android 2.3 SDK [Resources, 4].Device implementations MUST NOT omit any managed APIs, alter API interfaces or signatures, deviate from the documented behavior, or includeno-ops, except where specifically allowed by this Compatibility Definition.This Compatibility Definition permits some types of hardware for which Android includes APIs to be omitted by device implementations. In such cases, the APIs MUST still be present and behave in a reasonable way. See Section 7 for specific requirements for this scenario.3.2. Soft API CompatibilityIn addition to the managed APIs from Section 3.1, Android also includes a significant runtime-only "soft" API, in the form of such things such as Intents, permissions, and similar aspects of Android applications that cannot be enforced at application compile time. This section details the "soft" APIs and system behaviors required for compatibility with Android 2.3. Device implementations MUST meet all the requirements presented in this section.3.2.1. PermissionsDevice implementers MUST support and enforce all permission constants as documented by the Permission reference page [Resources, 5]. Note that Section 10 lists additional requirements related to the Android security model.3.2.2. Build ParametersThe Android APIs include a number of constants on the android.os.Build class [Resources, 6] that are intended to describe the current device. To provide consistent, meaningful values across device implementations, the table below includes additional restrictions on the formats of these values to which device implementations MUST conform.Parameter Commentsandroid.os.Build.VERSION.RELEASE The version of the currently-executing Android system, inhuman-readable format. This field MUST have one of the string values defined in [Resources, 7].android.os.Build.VERSION.SDK The version of the currently-executing Android system, in a format accessible to third-party application code. For Android 2.3, this field MUST have the integer value 9.android.os.Build.VERSION.INCREMENTAL A value chosen by the device implementer designating the specific build of the currently-executing Android system, in human-readable format. This value MUST NOT be re-used for different builds made available to end users. A typical use of this field is to indicate which build number or source-control change identifier was used to generate the build. There are no requirements on the specific format of this field, except that it MUST NOT be null or the empty string ("").android.os.Build.BOARD A value chosen by the device implementer identifying the specific internal hardware used by the device, in human-readable format. A possible use of this field is to indicate the specific revision of the board powering the device. The value of this field MUST be encodable as7-bit ASCII and match the regular expression"^[a-zA-Z0-9.,_-]+$".android.os.Build.BRAND A value chosen by the device implementer identifying the name of the company, organization, individual, etc. who produced the device, in human-readable format. A possible use of this field is to indicate the OEM and/or carrier who sold the device. The value of this field MUST be encodable as 7-bit ASCII and match the regular expression"^[a-zA-Z0-9.,_-]+$".android.os.Build.DEVICE A value chosen by the device implementer identifying the specific configuration or revision of the body (sometimes called "industrial design") of the device. The value of this field MUST be encodable as 7-bit ASCII and match the regular expression"^[a-zA-Z0-9.,_-]+$".android.os.Build.FINGERPRINT A string that uniquely identifies this build. It SHOULD be reasonably human-readable. It MUST follow this template:$(BRAND)/$(PRODUCT)/$(DEVICE)/$(BOARD):$(VERSION.RELEASE)/$(ID)/$(VERSION.INCREMENTAL):$(TYPE)/$(TAGS) For example:acme/mydevice/generic/generic:2.3/ERC77/3359:userdebug/test-keysThe fingerprint MUST NOT include whitespace characters. If other fields included in the template above have whitespace characters, they MUST be replaced in the build fingerprint with another character, such as the underscore ("_") character. The value of this field MUST be encodable as 7-bit ASCII.android.os.Build.HOST A string that uniquely identifies the host the build was built on, in human readable format. There are no requirements on the specific format of this field, except that it MUST NOT be null or the empty string ("").android.os.Build.ID An identifier chosen by the device implementer to refer to a specific release, in human readable format. This field can be the same as android.os.Build.VERSION.INCREMENTAL, but SHOULD be a value sufficiently meaningful for end users to distinguish between software builds. The value of this field MUST be encodable as 7-bit ASCII and match the regular expression "^[a-zA-Z0-9.,_-]+$".android.os.Build.MODEL A value chosen by the device implementer containing the name of the device as known to the end user. This SHOULD be the same name under which the device is marketed and sold to end users. There are no requirements on the specific format of this field, except that it MUST NOT be null or the empty string ("").android.os.Build.PRODUCT A value chosen by the device implementer containing the development name or code name of the device. MUST be human-readable, but is not necessarily intended for view by end users. The value of this field MUST be encodable as 7-bit ASCII and match the regular expression "^[a-zA-Z0-9.,_-]+$".android.os.Build.TAGS A comma-separated list of tags chosen by the device implementer that further distinguish the build. For example, "unsigned,debug". The value of this field MUST be encodable as 7-bit ASCII and match the regular expression "^[a-zA-Z0-9.,_-]+$".android.os.Build.TIME A value representing the timestamp of when the build occurred.android.os.Build.TYPE A value chosen by the device implementer specifying the runtime configuration of the build. This field SHOULD have one of the values corresponding to the three typical Android runtime configurations: "user", "userdebug", or "eng". The value of this field MUST be encodable as 7-bit ASCII and match the regular expression"^[a-zA-Z0-9.,_-]+$".ER A name or user ID of the user (or automated user) that generated the build. There are no requirements on the specific format of this field, except that it MUST NOT be null or the empty string ("").3.2.3. Intent CompatibilityAndroid uses Intents to achieve loosely-coupled integration between applications. This section describes requirements related to the Intent patterns that MUST be honored by device implementations. By "honored", it is meant that the device implementer MUST provide an Android Activity or Service that specifies a matching Intent filter and binds to and implements correct behavior for each specified Intent pattern.3.2.3.1. Core Application IntentsThe Android upstream project defines a number of core applications, such as a phone dialer, calendar, contacts book, music player, and so on. Device implementers MAY replace these applications with alternative versions.However, any such alternative versions MUST honor the same Intent patterns provided by the upstream project. For example, if a device contains an alternative music player, it must still honor the Intent pattern issued by third-party applications to pick a song.The following applications are considered core Android system applications:•Desk Clock•Browser•Calendar•Calculator•Contacts•Email•Gallery•GlobalSearch•Launcher•Music•SettingsThe core Android system applications include various Activity, or Service components that are considered "public". That is, the attribute"android:exported" may be absent, or may have the value "true".For every Activity or Service defined in one of the core Android system apps that is not marked as non-public via an android:exported attribute with the value "false", device implementations MUST include a compontent of the same type implementing the same Intent filter patterns as the core Android system app.In other words, a device implementation MAY replace core Android system apps; however, if it does, the device implementation MUST support all Intent patterns defined by each core Android system app being replaced.3.2.3.2. Intent OverridesAs Android is an extensible platform, device implementers MUST allow each Intent pattern referenced in Section 3.2.3.1 to be overridden by third-party applications. The upstream Android open source project allows this by default; device implementers MUST NOT attach special privileges to system applications' use of these Intent patterns, or prevent third-party applications from binding to and assuming control of these patterns. This prohibition specifically includes but is not limited to disabling the "Chooser" user interface which allows the user to select between multiple applications which all handle the same Intent pattern.3.2.3.3. Intent NamespacesDevice implementers MUST NOT include any Android component that honors any new Intent or Broadcast Intent patterns using an ACTION, CATEGORY, or other key string in the android.* namespace. Device implementers MUST NOT include any Android components that honor any new Intent or Broadcast Intent patterns using an ACTION, CATEGORY, or other key string in a package space belonging to another organization. Device implementers MUST NOT alter or extend any of the Intent patterns used by the core apps listed in Section 3.2.3.1.This prohibition is analogous to that specified for Java language classes in Section 3.6.3.2.3.4. Broadcast IntentsThird-party applications rely on the platform to broadcast certain Intents to notify them of changes in the hardware or software environment.Android-compatible devices MUST broadcast the public broadcast Intents in response to appropriate system events. Broadcast Intents are described in the SDK documentation.3.3. Native API CompatibilityManaged code running in Dalvik can call into native code provided in the application .apk file as an ELF .so file compiled for the appropriate device hardware architecture. As native code is highly dependent on the underlying processor technology, Android defines a number of Application Binary Interfaces (ABIs) in the Android NDK, in the file docs/CPU-ARCH-ABIS.txt. If a device implementation is compatible with one or more defined ABIs, it SHOULD implement compatibility with the Android NDK, as below.If a device implementation includes support for an Android ABI, it:•MUST include support for code running in the managed environment to call into native code, using the standard Java Native Interface (JNI) semantics.•MUST be source-compatible (i.e. header compatible) and binary-compatible (for the ABI) with each required library in the list below•MUST accurately report the native Application Binary Interface (ABI) supported by the device, via the android.os.Build.CPU_ABI API •MUST report only those ABIs documented in the latest version of the Android NDK, in the file docs/CPU-ARCH-ABIS.txt•SHOULD be built using the source code and header files available in the upstream Android open-source projectThe following native code APIs MUST be available to apps that include native code:•libc (C library)•libm (math library)•Minimal support for C++•JNI interface•liblog (Android logging)•libz (Zlib compression)•libdl (dynamic linker)•libGLESv1_CM.so (OpenGL ES 1.0)•libGLESv2.so (OpenGL ES 2.0)•libEGL.so (native OpenGL surface management)•libjnigraphics.so•libOpenSLES.so (Open Sound Library audio support)•libandroid.so (native Android activity support)•Support for OpenGL, as described belowNote that future releases of the Android NDK may introduce support for additional ABIs. If a device implementation is not compatible with an existing predefined ABI, it MUST NOT report support for any ABI at all.Native code compatibility is challenging. For this reason, it should be repeated that device implementers are VERY strongly encouraged to use the upstream implementations of the libraries listed above to help ensure compatibility.3.4. Web CompatibilityMany developers and applications rely on the behavior of the android.webkit.WebView class [Resources, 8] for their user interfaces, so the WebView implementation must be compatible across Android implementations. Similarly, a complete, modern web broswer is central to the Android user experience. Device implementations MUST include a version of android.webkit.WebView consistent with the upstream Android software, and MUST include a modern HTML5-capable browser, as described below.3.4.1. WebView CompatibilityThe Android Open Source implementation uses the WebKit rendering engine to implement the android.webkit.WebView. Because it is not feasible to develop a comprehensive test suite for a web rendering system, device implementers MUST use the specific upstream build of WebKit in the WebView implementation. Specifically:•Device implementations' android.webkit.WebView implementations MUST be based on the 533.1 WebKit build from the upstream Android Open Source tree for Android 2.3. This build includes a specific set of functionality and security fixes for the WebView. Device implementers MAY include customizations to the WebKit implementation; however, any such customizations MUST NOT alter the behavior of the WebView, including rendering behavior.The user agent string reported by the WebView MUST be in this format:Mozilla/5.0 (Linux; U; Android $(VERSION); $(LOCALE); $(MODEL) Build/$(BUILD)) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1•The value of the $(VERSION) string MUST be the same as the value for android.os.Build.VERSION.RELEASE•The value of the $(LOCALE) string SHOULD follow the ISO conventions for country code and language, and SHOULD refer to the current configured locale of the device•The value of the $(MODEL) string MUST be the same as the value for android.os.Build.MODEL•The value of the $(BUILD) string MUST be the same as the value for android.os.Build.IDThe WebView component SHOULD include support for as much of HTML5 [Resources, 9] as possible. Minimally, device implementations MUST support each of these APIs associated with HTML5 in the WebView:•application cache/offline operation [Resources, 10]•the <video> tag [Resources, 11]•geolocation [Resources, 12]Additionally, device implementations MUST support the HTML5/W3C webstorage API [Resources, 13], and SHOULD support the HTML5/W3C IndexedDB API [Resources, 14]. Note that as the web development standards bodies are transitioning to favor IndexedDB over webstorage, IndexedDB is expected to become a required component in a future version of Android.HTML5 APIs, like all JavaScript APIs, MUST be disabled by default in a WebView, unless the developer explicitly enables them via the usual Android APIs.3.4.2. Browser CompatibilityDevice implementations MUST include a standalone Browser application for general user web browsing. The standalone Browser MAY be based on a browser technology other than WebKit. However, even if an alternate Browser application is used, the android.webkit.WebView component provided to third-party applications MUST be based on WebKit, as described in Section 3.4.1.Implementations MAY ship a custom user agent string in the standalone Browser application.The standalone Browser application (whether based on the upstream WebKit Browser application or a third-party replacement) SHOULD include support for as much of HTML5 [Resources, 9] as possible. Minimally, device implementations MUST support each of these APIs associated with HTML5:•application cache/offline operation [Resources, 10]•the <video> tag [Resources, 11]•geolocation [Resources, 12]Additionally, device implementations MUST support the HTML5/W3C webstorage API [Resources, 13], and SHOULD support the HTML5/W3C IndexedDB API [Resources, 14]. Note that as the web development standards bodies are transitioning to favor IndexedDB over webstorage, IndexedDB is expected to become a required component in a future version of Android.3.5. API Behavioral CompatibilityThe behaviors of each of the API types (managed, soft, native, and web) must be consistent with the preferred implementation of the upstream Android open-source project [Resources, 3]. Some specific areas of compatibility are:•Devices MUST NOT change the behavior or semantics of a standard Intent•Devices MUST NOT alter the lifecycle or lifecycle semantics of a particular type of system component (such as Service, Activity, ContentProvider, etc.)•Devices MUST NOT change the semantics of a standard permissionThe above list is not comprehensive. The Compatibility Test Suite (CTS) tests significant portions of the platform for behavioral compatibility, but not all. It is the responsibility of the implementer to ensure behavioral compatibility with the Android Open Source Project. For this reason, device implementers SHOULD use the source code available via the Android Open Source Project where possible, rather than re-implement significant parts of the system.3.6. API NamespacesAndroid follows the package and class namespace conventions defined by the Java programming language. To ensure compatibility with third-party applications, device implementers MUST NOT make any prohibited modifications (see below) to these package namespaces:•java.*•javax.*•sun.*•android.*•com.android.*Prohibited modifications include:•Device implementations MUST NOT modify the publicly exposed APIs on the Android platform by changing any method or class signatures, or by removing classes or class fields.•Device implementers MAY modify the underlying implementation of the APIs, but such modifications MUST NOT impact the stated behavior and Java-language signature of any publicly exposed APIs.•Device implementers MUST NOT add any publicly exposed elements (such as classes or interfaces, or fields or methods to existing classes or interfaces) to the APIs above.A "publicly exposed element" is any construct which is not decorated with the "@hide" marker as used in the upstream Android source code. In other words, device implementers MUST NOT expose new APIs or alter existing APIs in the namespaces noted above. Device implementers MAY make internal-only modifications, but those modifications MUST NOT be advertised or otherwise exposed to developers.Device implementers MAY add custom APIs, but any such APIs MUST NOT be in a namespace owned by or referring to another organization. For instance, device implementers MUST NOT add APIs to the com.google.* or similar namespace; only Google may do so. Similarly, Google MUST NOT add APIs to other companies' namespaces. Additionally, if a device implementation includes custom APIs outside the standard Android namespace, those APIs MUST be packaged in an Android shared library so that only apps that explicitly use them (via the <uses-library> mechanism) are affected by the increased memory usage of such APIs.If a device implementer proposes to improve one of the package namespaces above (such as by adding useful new functionality to an existing API, or adding a new API), the implementer SHOULD visit and begin the process for contributing changes and code, according to the information on that site.Note that the restrictions above correspond to standard conventions for naming APIs in the Java programming language; this section simply aims to reinforce those conventions and make them binding through inclusion in this compatibility definition.3.7. Virtual Machine CompatibilityDevice implementations MUST support the full Dalvik Executable (DEX) bytecode specification and Dalvik Virtual Machine semantics [Resources, 15].Device implementations with screens classified as medium- or low-density MUST configure Dalvik to allocate at least 16MB of memory to each application. Device implementations with screens classified as high-density or extra-high-density MUST configure Dalvik to allocate at least 24MB of memory to each application. Note that device implementations MAY allocate more memory than these figures.3.8. User Interface Compatibility。

相关文档
最新文档