2016-01-05 16:35:14.0|分类: android|浏览量: 2612
This page complements the main page about Building the Systemwith information that is specific to individual devices. Nexus devicesIt 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 devicesThe 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 file Building fastboot and adbIf 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
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:
Also, the command
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
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内部存储左格式化必须格式化
The bootloader can be locked back with
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 the Cleaning up when adding proprietary binariesIn 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
Picking and building the configuration that matches a deviceThe recommended 推荐 builds for the various devices are available through the lunch menu, accessed when running the https://developers.google.com/android/nexus/images https://developers.google.com/android/nexus/drivers
Do not use 4.1.1 on a Nexus 7 that was originally sold with 4.1.2 or newer. Flashing a deviceSet 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
Note that filesystems created via fastboot on Motorola Xoom aren't working optimally, and it is strongly recommended to re-create them through 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 stateFactory 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. |