本文提供了在特定设备上运行构建的详细内容,同时也被设计扩充准备构建的信息。
如果你还没有fastboot和adb,你可以使用正规的构建系统构建他们。使用准备构建中的说明并使用下面命令来替换make命令:
$ make fastboot adb在冷启动设备期间,使用下面的组合键引导进入fastboot模式,这个模式是一个用来flash设备的引导装载程序模式。
DeviceKeyshikeyLink pins 1 - 2 and 5 - 6 of J15anglerPress and hold Volume Down, then press and hold PowerbullheadPress and hold Volume Down, then press and hold PowershamuPress and hold Volume Down, then press and hold PowerfuguPress and hold PowervolantisPress and hold Volume Down, then press and hold PowerhammerheadPress and hold both Volume Up and Volume Down, then press and hold PowerfloPress and hold Volume Down, then press and hold PowerdebPress and hold Volume Down, then press and hold PowermantaPress and hold both Volume Up and Volume Down, then press and hold PowermakoPress and hold Volume Down, then press and hold PowergrouperPress and hold Volume Down, then press and hold PowertilapiaPress and hold Volume Down, then press and hold PowerphantasmPower the device, cover it with one hand after the LEDs light up and until they turn redmaguroPress and hold both Volume Up and Volume Down, then press and hold PowertoroPress and hold both Volume Up and Volume Down, then press and hold PowertoroplusPress and hold both Volume Up and Volume Down, then press and hold PowerpandaPress and hold Input, then press PowerwingrayPress and hold Volume Down, then press and hold PowercrespoPress and hold Volume Up, then press and hold Powercrespo4gPress and hold Volume Up, then press and hold Power不用组合键你也可以使用命令adb reboot bootloader 来重启直接进入引导装载程序。
只有手机的bootloader允许才能flash一个定制的系统,而且bootloader默认是锁定的。你可以解锁bootloader,但是需要意识到这样做会删除用户的隐私数据(解锁操作只需要运行一次)。解锁后,设备上的所有数据都会被擦除,i.e.应用的私有数据以及通过USB共享的数据,包括图片和电影。在解锁bootloader前请确保已备份了珍贵的文件。
当设备在fastboot模式下,使用下面命令来解锁bootloader:
$ fastboot oem unlock在Nexus 10设备上,解锁bootloader后,内部存储是无格式的。你可以使用下面命令格式化设备:
$ fastboot format cache $ fastboot format userdata重新锁定bootloader,使用:
$ fastboot oem lockNote: 在Motoroal Xoom设备上重新锁定bootloader或擦除用户数据(包括USB共享的数据)。
当运行无参数的lunch命令时,建议通过lunch菜单中选择可用的build。你可以从developers.google.com为Nexus设备下载factory inages 和 二进制文件:
Preview binaries (blobs)Factory images for released devicesSupport binaries (drivers) for release devices参见获取专有二进制文件了解更详细的信息以及通过设备二进制文件要求了解其他资源。
DeviceCode nameBuild configurationHiKeyhikeyhikey-userdebugNexus 6Pangleraosp_angler-userdebugNexus 5Xbullheadaosp_bullhead-userdebugNexus 6shamuaosp_shamu-userdebugNexus Playerfuguaosp_fugu-userdebugNexus 9volantis (flounder)aosp_flounder-userdebugNexus 5 (GSM/LTE)hammerheadaosp_hammerhead-userdebugNexus 7 (Wi-Fi)razor (flo)aosp_flo-userdebugNexus 7 (Mobile)razorg (deb)aosp_deb-userdebugNexus 10mantaray (manta)full_manta-userdebugNexus 4occam (mako)full_mako-userdebugNexus 7 (Wi-Fi)nakasi (grouper)full_grouper-userdebugNexus 7 (Mobile)nakasig (tilapia)full_tilapia-userdebugGalaxy Nexus (GSM/HSPA+)yakju (maguro)full_maguro-userdebugGalaxy Nexus (Verizon)mysid (toro)aosp_toro-userdebugGalaxy Nexus (Experimental)mysidspr (toroplus)aosp_toroplus-userdebugPandaBoard (Archived)pandaaosp_panda-userdebugMotorola Xoom (U.S. Wi-Fi)wingrayfull_wingray-userdebugNexus Ssoju (crespo)full_crespo-userdebugNexus S 4Gsojus (crespo4g)full_crespo4g-userdebug\你可以使用单一的命令来flash一个完整的Android系统到设备;这样做可以确定flash的系统和已经初始化的bootlodaer以及radio是兼容的,然后写入boot,还原,系统分区,然后重启系统。Flashing同样也会擦除所有用户数据,类似于fastboot oem unlock.
然设备进入fastboot模式既可以手动通过在boot过程中按组合键也可以通过下面的shell命令:
$ adb reboot bootloader一旦设备处于fastboot模式,运行:
$ fastboot flashall -w-w选项擦除了设备上的/data分区;当你第一次flash特定设备的时候是有用的但不是必须的。
Note: 通过在Motorola Xoom设备上 fastboot来创建的文件系统没有进行函数优化。我们建议通过recovery来re-creating 文件系统,使用$ adb reboot recovery.当在recovery这段时间里,打开菜单(按住 Power + Volume Up),清楚缓存分区,然后清楚数据。
