[心得]如何刷Nexus 5原生Android系统

原先用LG Nexus5从原来的5.0一路升级到6.0.1,工作需要越狱root却越来越难。索性找人帮忙刷了AOSP on hammerhead锤头4.4.4。”Android Open-Source Project”的缩写,中文意为”Android 开放源代码项目”。谷歌自己也参与这个项目。

在用Google原生android之前,我觉得Android系统好土,用了原生的觉得其实还行。刷到ASOP发现google服务不好用,被迫重新刷回原生rom。

原生rom下载地址
在:https://developers.google.com/android/nexus/images
需要访问谷歌网站。

实战刷原生rom
其实原来网站写得很详细,step by step就行。
(注:原来网站:https://developers.google.com/android/nexus/images)

第0步,装备原厂的刷机rom包:

"hammerhead" for Nexus 5 (GSM/LTE)
Version             Download    SHA-256 Checksum
4.4 (KRT16M)    Link fb4041cc77a51c2f8c93afcc06df4c50e029fef6441e1b794be495be9cf29efc
4.4.2 (KOT49H)  Link    3c5d358ba25ee32afc1b2fc9d7d7abbc8515f241f073a292da28e668c9ef6efb
4.4.3 (KTU84M)  Link    9c4610fb1964618685c099934784057bc13de4d3c1c34d70881b5fe7cd786382
4.4.4 (KTU84P)  Link    1f5f26b17be1bb63874d82cdb03a8dea70fcff5dd971f07e6aa6669123e4f8ce
4.4.4 Release 2 (For 2Degrees/NZ, Telstra/AUS and India ONLY) (KTU84Q)  Link    654c5471bbb866193e571b9ac74da25bf436e21a8ee1f0f4af8fd06ad01e2f61
5.0 (LRX21O)    Link    56a09d43d0dcc808d9dd9e2ed4c424af29bec2b5f343632d6ad0386b2dfcf854
5.0.1 (LRX22C)  Link    3b22f4819d718818a65582c5c904073847b66227608f7485719935105a7e5b69
5.1.0 (LMY47D)  Link    7df990ed37728f44f4c77d1c42c306df802f61497799bde73168b17d89c6b6fc
5.1.0 (LMY47I)  Link    f1734da163304f57b23f43d79755abec60e286ddfecacb95419ff5d642bcc7a1
5.1.1 (LMY48B)  Link    e90640d2c2b53f9cad26addbefa42ef54d48002f0a0f95bec3bc92b161d2ffe3
5.1.1 (LMY48I)  Link    67766277bfc9db722d8d7837ef205bda492476101d45160a37525b0b27af4352
5.1.1 (LMY48M)  Link    e01ca3b73688ee06e83d6a133369f8e254b3a64ce6fe85a491534d937b9848df
6.0.0 (MRA58K)  Link    ccbc4611deaa6e35a77b700843f7ad0e74a72fd197d3a974d51058d4bb0d31e3
6.0.0 (MRA58N)  Link    30da525dd8aa256a796aebd0aafb030cbef584ed90cb64fb383f8ce4b79054e6
6.0.1 (MMB29K)  Link    e5796b1407d0c3ee6b8c01468bed0f01ddaa6204db60cbce1a6c55ebd77434c4
6.0.1 (MMB29S)  Link    82c3474fc87298f160e0e512c6d32458568a3057c28caa333a97dbb773d6a6cf
6.0.1 (MMB29Q)  Link    27d8a4a55de5613b98985f71eeb85384d0a78aaf2ac372f56a2d08eef92fd8f5
6.0.1 (MMB29V)  Link    7f1b9c7ed1df6124b935ae1fd2543f814b182349e1852506e5bd5bdb417ecee7
6.0.1 (MMB29X)  Link    9ebfbf5473e00a25ec832b4e67c210f087aefe16b97b9b0f9d780e6d3131ab35
6.0.1 (MOB30D)  Link    43d1482d8771f5b5d97f54b19e84481651357b6e8f98a719a9b3d56a0026a5db
6.0.1 (MOB30H)  Link    2c178ff79014fd5703d423020d22df4618b192a9af9283c60105e88300c5aeb2
6.0.1 (MOB30M)  Link    af019693798dceac03879feb3f46ee5b63802081c649d8bee821277d204c1810
6.0.1 (MOB30P)  Link    8d36be0cfcc28da4986da0a211403b2586ab90078f995891eaea608891d98ddc
6.0.1 (MOB30Y)  Link    5bea645798a9584f6b06419537befbbb41d0578a96b5c889f7a6d8c02e9d0962
6.0.1 (MOB31E)  Link    9050451400a69d8cd6e2b559e87c052bb7e8d7482640da18c39f25f30dba7d7d

版本选择
为了越狱方便,我选了5.0之前的4.4.4,具体地址:
https://dl.google.com/dl/android/aosp/hammerhead-ktu84p-factory-1f5f26b1.zip

adb等工具准备
第1步,安装android studio,或者android sdk,有了android adb等工具,
然后是执行

adb reboot bootloader

返回类似:

* daemon not running. starting it now on port 5037 *
* daemon started successfully *

解锁
第2步,执行以下命令解锁

fastboot flashing unlock

通常之前解过锁之后,
返回是这样的:

...
FAILED (remote: unknown command)
finished. total time: 0.001s

刷机
第3步,刷image到手机:

./flash-all.sh

返回类似这样:

target reported max download size of 1073741824 bytes
sending 'bootloader' (2508 KB)...
OKAY [  0.285s]
writing 'bootloader'...
OKAY [  0.470s]
finished. total time: 0.755s
rebooting into bootloader...
OKAY [  0.108s]
finished. total time: 0.108s
sending 'radio' (45409 KB)...
OKAY [  1.606s]
writing 'radio'...
OKAY [  3.118s]
finished. total time: 4.724s
rebooting into bootloader...
OKAY [  0.099s]
finished. total time: 0.099s
archive does not contain 'boot.sig'
archive does not contain 'recovery.sig'
archive does not contain 'system.sig'
archive does not contain 'vendor.img'
Creating filesystem with parameters:
    Size: 13725835264
    Block size: 4096
    Blocks per group: 32768
    Inodes per group: 8144
    Inode size: 256
    Journal blocks: 32768
    Label:
    Blocks: 3351034
    Block groups: 103
    Reserved block group size: 823
Created filesystem with 11/838832 inodes and 93654/3351034 blocks
Creating filesystem with parameters:
    Size: 734003200
    Block size: 4096
    Blocks per group: 32768
    Inodes per group: 7472
    Inode size: 256
    Journal blocks: 2800
    Label:
    Blocks: 179200
    Block groups: 6
    Reserved block group size: 47
Created filesystem with 11/44832 inodes and 5813/179200 blocks
--------------------------------------------
Bootloader Version...: HHZ11k
Baseband Version.....: M8974A-2.0.50.1.16
Serial Number........: 032b3a52215ea39c
--------------------------------------------
checking product...
OKAY [  0.100s]
checking version-bootloader...
OKAY [  0.100s]
checking version-baseband...
OKAY [  0.100s]
sending 'boot' (8700 KB)...
OKAY [  0.490s]
writing 'boot'...
OKAY [  0.749s]
sending 'recovery' (9284 KB)...
OKAY [  0.542s]
writing 'recovery'...
OKAY [  0.776s]
erasing 'system'...
OKAY [  0.984s]
sending 'system' (721400 KB)...
OKAY [ 22.834s]
writing 'system'...
^@OKAY [ 50.490s]
erasing 'userdata'...
OKAY [ 13.881s]
sending 'userdata' (137318 KB)...
OKAY [  4.611s]
writing 'userdata'...
^@OKAY [  9.137s]
erasing 'cache'...
OKAY [  0.676s]
sending 'cache' (13348 KB)...
OKAY [  0.640s]
writing 'cache'...
OKAY [  1.071s]
rebooting...

finished. total time: 107.694s

据说安全起见,重新加锁:

fastboot flashing lock

你可能感兴趣的:(android技术)