Running Builds

来自: http://source.android.com/source/running.html

 

Running Builds 

 

This page provides details for running builds on specific devices and is designed to complement the information in Building the System.

Building fastboot and adb


If you don't already have fastboot and adb, you can build them with the regular build system. Use the instructions in Building a System and replace the main make command with:

$ make fastboot adb

Booting into fastboot mode


During a cold boot of a device, use the following key combinations to boot into fastboot mode, which is a mode in the bootloader that can be used to flash the device:

DeviceKeys
hikeyLink pins 1 - 2 and 5 - 6 of J15
anglerPress and hold Volume Down, then press and hold Power
bullheadPress and hold Volume Down, then press and hold Power
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

You can also use the command adb reboot bootloader to reboot from Android directly into the bootloader with no key combinations.

Unlocking the bootloader


It's possible to flash a custom system only if the bootloader allows it, and the bootloader is locked by default. You can unlock the bootloader, but be aware that doing so deletes the user data for privacy reasons (the unlock operation needs to run only once). After unlocking, all data on the device 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 back up any precious files before unlocking the bootloader.

With the device in fastboot mode, unlock the bootloader using:

$ fastboot oem unlock

The procedure must be confirmed on-screen.

On Nexus 10, after unlocking the bootloader, the internal storage remains unformatted. You can format the device using:

$ fastboot format cache
$ fastboot format userdata

To re-lock the bootloader, use:

$ fastboot oem lock

Note: Re-locking the bootloading on a Motoroal Xoom erases user data (including the shared USB data).

Obtaining proprietary binaries


AOSP cannot be used from pure source code only and requires additional hardware-related proprietary libraries to run, specifically for hardware graphics acceleration.

Downloading proprietary binaries

You can download official binaries for the supported devices running tagged AOSP release branches from Google's Nexus driver page. These binaries 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, use the binaries for the most recent numbered release or with the most recent date.

Extracting proprietary binaries

Each set of binaries comes as a self-extracting script in a compressed archive. Uncompress each archive, run the included self-extracting script from the root of the source tree, then confirm that you agree to the terms of the enclosed license agreement. The binaries and their matching makefiles will be installed in the vendor/ hierarchy of the source tree.

Cleaning up

To ensure the newly installed binaries are properly taken into account after being extracted, delete the existing output of any previous build using:

$ make clobber

Selecting a device build


The recommended builds for devices are available from the lunch menu, accessed when running the lunch command with no arguments. You can download factory images and binaries for Nexus devices from:

DeviceCode nameBuild configuration
HiKeyhikeyhikey-userdebug
Nexus 6Pangleraosp_angler-userdebug
Nexus 5Xbullheadaosp_bullhead-userdebug
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

Note: Do not use Android 4.1.1 on a Nexus 7 originally sold with Android 4.1.2 or newer.

Flashing a device


You can flash an entire Android system in a single command; doing so verifies the system being flashed is compatible with the installed bootloader and radio, writes the boot, recovery, and system partitions together, and then reboots the system. Flashing also erases all user data, similarly to fastboot oem unlock.

To flash a device, set the device in fastboot mode (if necessary) and run:

$ fastboot -w flashall

Note: Filesystems created via fastboot on Motorola Xoom do not function optimally. We recommend re-creating filesystems through recovery, using: $ adb reboot recovery. While in recovery, open the menu (press Power + Volume Up), wipe the cache partition, then wipe data.

Restoring devices to 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.

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Collecting spidev Downloading spidev-3.6.tar.gz (11 kB) Installing build dependencies ... done Getting requirements to build wheel ... done Installing backend dependencies ... done Preparing wheel metadata ... done Building wheels for collected packages: spidev Building wheel for spidev (PEP 517) ... error ERROR: Command errored out with exit status 1: command: 'C:\Users\Y\AppData\Local\Programs\Python\Python311-32\python.exe' 'C:\Users\Y\AppData\Local\Programs\Python\Python311-32\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py' build_wheel 'C:\Users\Y\AppData\Local\Temp\tmp_nif02uj' cwd: C:\Users\Y\AppData\Local\Temp\pip-install-1l6gbx2c\spidev_66aac4f6de92406b812e0ab010d35e91 Complete output (26 lines): C:\Users\Y\AppData\Local\Temp\pip-build-env-ehvsnss7\overlay\Lib\site-packages\setuptools\dist.py:745: SetuptoolsDeprecationWarning: Invalid dash-separated options !! ******************************************************************************** Usage of dash-separated 'description-file' will not be supported in future versions. Please use the underscore name 'description_file' instead. By 2023-Sep-26, you need to update your project and remove deprecated calls or your builds will no longer be supported. See https://setuptools.pypa.io/en/latest/userguide/declarative_config.html for details. ******************************************************************************** !! opt = self.warn_dash_deprecation(opt, section) running bdist_wheel running build running build_ext building 'spidev' extension creating build creating build\temp.win32-cpython-311 creating build\temp.win32-cpython-311\Release "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\HostX86\x86\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -IC:\Users\Y\AppData\Local\Programs\Python\Python311-32\include -IC:\Users\Y\AppData\Local\Programs\Python\Python311-32\Include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt" /Tcspidev_module.c /Fobuild\temp.win32-cpython-311\Release\spidev_module.obj spidev_module.c spidev_module.c(33): fatal error C1083: 无法打开包括文件: “linux/spi/spidev.h”: No such file or directory error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Tools\\MSVC\\14.29.30133\\bin\\HostX86\\x86\\cl.exe' failed with exit code 2 ---------------------------------------- ERROR: Failed building wheel for spidev Failed to build spidev ERROR: Could not build wheels for spidev which use PEP 517 and cannot be installed directly WARNING: You are using pip version 21.2.4; however, version 23.2 is available. You should consider upgrading via the 'C:\Users\Y\AppData\Local\Programs\Python\Python311-32\python.exe -m pip install --upgrade pip' command.
07-24

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值