Running Builds
cookqq ›博客列表 ›android

Running Builds

2016-01-05 16:35:14.0|分类: android|浏览量: 2746

摘要: 运行编译后的android系统

This page complements the main page about Building the Systemwith information that is specific to individual devices.

Nexus devices


It is possible to build for Nexus devices using the AOSP builds and the relevant hardware-specific binaries相关硬件的特定二进制文件. For a list of available Android builds 可以用的android编译 and the Nexus devices 设备 they can be installed on, see Source Code, Tags, and Builds.

Note: Due to hardware differences, do not use 4.1.1 on a Nexus 7 that was originally sold with 4.1.2 or newer.

Other devices


The Motorola Xoom can be used in the Wi-Fi configuration "wingray" sold in the USA, with Android 4.1.2. Graphics and audio are functional as well as Wi-Fi and Bluetooth and the orientation sensors.

In addition, PandaBoard a.k.a. "panda" can be used in the jb-mr1-dev-plus-aosp branch, but is considered experimental. The specific details to use a PandaBoard with the Android Open-Source Project are in the filedevice/ti/panda/README in the source tree.

Building fastboot and adb


If you don't already have those tools, fastboot and adb can be built with the regular build system. Follow the instructions on the page about Building a System, and replace the main make command with:

$ make fastboot adb

Booting into fastboot mode开机进入fastboot模式


During a cold boot 冷启动, the following key combinations 组合键 can be used to boot into fastboot mode, which is a mode in the bootloader that can be used to flash the devices:

DeviceKeys
shamuPress and hold Volume Down, then press and hold Power
fuguPress and hold Power
volantisPress and hold Volume Down, then press and hold Power
hammerheadPress and hold both Volume Up and Volume Down, then press and hold Power按住音量+和音量-,然后按住电源
floPress and hold Volume Down, then press and hold Power
debPress and hold Volume Down, then press and hold Power
mantaPress and hold both Volume Up and Volume Down, then press and hold Power
makoPress and hold Volume Down, then press and hold Power
grouperPress and hold Volume Down, then press and hold Power
tilapiaPress and hold Volume Down, then press and hold Power
phantasmPower the device, cover it with one hand after the LEDs light up and until they turn red
maguroPress and hold both Volume Up and Volume Down, then press and hold Power
toroPress and hold both Volume Up and Volume Down, then press and hold Power
toroplusPress and hold both Volume Up and Volume Down, then press and hold Power
pandaPress and hold Input, then press Power
wingrayPress and hold Volume Down, then press and hold Power
crespoPress and hold Volume Up, then press and hold Power
crespo4gPress and hold Volume Up, then press and hold Power

Also, the command adb reboot bootloader can be used to reboot from Android directly into the bootloader with no key combinations.

adb reboot bootloader 命令能直接进去reboot,也可以不适用组合键

Unlocking the bootloader解锁引导程序


It's only possible to flash a custom system if the bootloader allows it.

The bootloader is locked by default. With the device in fastboot mode, the bootloader is unlocked with

$ fastboot oem unlock

The procedure must be confirmed on-screen 程序必须在屏幕上确认,, and deletes the user data for privacy reasons 删除用户数据的隐私原因 . It only needs to be run once 只需要运行一次.

All data on the phone is erased 手机上的所有数据被删除 , i.e. both the applications' private data 程序的私有数据 and the shared data 共享数据that is accessible over USB, including photos and movies. Be sure to make a backup of any precious files 备份重要文件 you have before unlocking the bootloader.

On Nexus 10, after unlocking the bootloader, the internal storage is left unformatted and must be formatted with内部存储左格式化必须格式化

$ fastboot format cache
$ fastboot format userdata

The bootloader can be locked back with

$ fastboot oem lock

Note that this erases user data on Xoom (including the shared USB data).

Obtaining proprietary binaries获得私有二进制文件


The Android Open-Source Project can't be used from pure source code only 安卓开源项目不能只使用纯源代码, and requires additional hardware-related proprietary libraries to run 需要额外的硬件相关的专有库运行, specifically for hardware graphics acceleration 专为硬件图形加速 .

Official binaries for the supported devices running tagged AOSP release branches can be downloaded fromGoogle's Nexus driver page. These add access to additional hardware capabilities with non-open source code

这些添加到非开放源代码的附加硬件功能. To instead build the AOSP master branch, use the Binaries Preview for Nexus Devices.

When building the master branch for a device, the binaries for the most recent numbered release or with the most recent date are the ones that should be used.

Extracting the proprietary binaries提取专有二进制文件

Each set of binaries comes as a self-extracting script in a compressed archive自解压缩脚本. After uncompressing解压缩 each archive, run the included self-extracting script from the root of the source tree 运行包含源树根的自解压脚本,, confirm that you agree to the terms of the enclosed license agreement, and the binaries and their matching makefiles will get installed in thevendor/ hierarchy of the source tree.

Cleaning up when adding proprietary binaries

In order to make sure that the newly installed binaries are properly taken into account after being extracted, the existing output of any previous build needs to be deleted with

$ make clobber

Picking and building the configuration that matches a device


The recommended 推荐 builds for the various devices are available through the lunch menu, accessed when running the lunch command with no arguments. Factory images and binaries for Nexus devices can be downloaded from:

https://developers.google.com/android/nexus/images

https://developers.google.com/android/nexus/drivers

DeviceCode nameBuild configuration
Nexus 6shamuaosp_shamu-userdebug
Nexus Playerfuguaosp_fugu-userdebug
Nexus 9volantis (flounder)aosp_flounder-userdebug
Nexus 5 (GSM/LTE)hammerheadaosp_hammerhead-userdebug
Nexus 7 (Wi-Fi)razor (flo)aosp_flo-userdebug
Nexus 7 (Mobile)razorg (deb)aosp_deb-userdebug
Nexus 10mantaray (manta)full_manta-userdebug
Nexus 4occam (mako)full_mako-userdebug
Nexus 7 (Wi-Fi)nakasi (grouper)full_grouper-userdebug
Nexus 7 (Mobile)nakasig (tilapia)full_tilapia-userdebug
Galaxy Nexus (GSM/HSPA+)yakju (maguro)full_maguro-userdebug
Galaxy Nexus (Verizon)mysid (toro)aosp_toro-userdebug
Galaxy Nexus (Experimental)mysidspr (toroplus)aosp_toroplus-userdebug
PandaBoard (Archived)pandaaosp_panda-userdebug
Motorola Xoom (U.S. Wi-Fi)wingrayfull_wingray-userdebug
Nexus Ssoju (crespo)full_crespo-userdebug
Nexus S 4Gsojus (crespo4g)full_crespo4g-userdebug

Do not use 4.1.1 on a Nexus 7 that was originally sold with 4.1.2 or newer.

Flashing a device


Set the device in fastboot mode if necessary (see above).

An entire 整个 Android system can be flashed in a single command: this writes the boot, recovery and system partitions together after verifying that the system being flashed is compatible with the installed bootloader and radio, and reboots the system. This also erases all the user data, similarly to fastboot oem unlock mentioned earlier.

$ fastboot -w flashall

Note that filesystems created via fastboot on Motorola Xoom aren't working optimally, and it is strongly recommended to re-create them through recovery

$ adb reboot recovery

Once in recovery, open the menu (press Power + Volume Up), wipe the cache partition, then wipe data.

Restoring a device to its original factory state


Factory images for Nexus 5, Nexus 10, Nexus 4, Nexus Q, Nexus 7, Galaxy Nexus (GSM/HSPA+ "yakju" and "takju", and CDMA/LTE "mysid" and "mysidspr"), Nexus S, and Nexus S 4G are available from Google's factory image page.

Factory images for the Motorola Xoom are distributed directly by Motorola.


一键分享文章

分类列表

  • • struts源码分析
  • • flink
  • • struts
  • • redis
  • • kafka
  • • ubuntu
  • • zookeeper
  • • hadoop
  • • activiti
  • • linux
  • • 成长
  • • NIO
  • • 关键词提取
  • • mysql
  • • android studio
  • • zabbix
  • • 云计算
  • • mahout
  • • jmeter
  • • hive
  • • ActiveMQ
  • • lucene
  • • MongoDB
  • • netty
  • • flume
  • • 我遇到的问题
  • • GRUB
  • • nginx
  • • 大家好的文章
  • • android
  • • tomcat
  • • Python
  • • luke
  • • android源码编译
  • • 安全
  • • MPAndroidChart
  • • swing
  • • POI
  • • powerdesigner
  • • jquery
  • • html
  • • java
  • • eclipse
  • • shell
  • • jvm
  • • highcharts
  • • 设计模式
  • • 列式数据库
  • • spring cloud
  • • docker+node.js+zookeeper构建微服务
版权所有 cookqq 感谢访问 支持开源 京ICP备15030920号
CopyRight 2015-2018 cookqq.com All Right Reserved.