您的位置:首页 > 移动开发 > Android开发

品尝棉花糖之Nexus5线刷Android6.0攻略

2015-08-21 16:47 561 查看
自从我的四太子带着刚刚升级不久的Android5.0辞世后,我就购置了性价比超高的五太子替代之。系统一直是4.4.4,没有得到升级推送,就懒得手动升级,一直到4个月的今天。

几天前看到Android M的第三个预览版推出,正式命名棉花糖(Marshmallow)和版本号6.0也都尘埃落定。看的我有些心动,看来搞机之事就是当前我最想做的事了。

准备工作

备份:做好个人信息的备份,通讯录、照片和短信等等。

工具:adb、fastboot、系统固件

手机:我的五太子

其他:我的笔记本是Ubuntu14.04系统,外加数据线一条

系统固件需要到developer.android.com去找,这个问题呢就八仙过海各显其能了,链接:http://storage.googleapis.com/androiddevelopers/shareables/preview/hammerhead-MPA44I-preview-2ebbc049.tgz

网上看到一个帖子说升级到6要先确认一下当前的bootloader版本和baseband版本,需要分别大于HHZ12h和M8974A-2.0.50.2.26。为了避免不必要的失败,我姑且相信这个说法,解决办法是将系统先升级到5.1.1,然后再刷6.0.

tgz文件解压到一个简单的路径中,等待使用。内容如下:

hammerhead-MPA44I$ ll
total 607868
drwxr-x--- 2 linc linc      4096  8月 19 03:17 ./
drwxrwxr-x 3 linc linc      4096  8月 21 09:05 ../
-rw-r----- 1 linc linc   3194452  8月 19 03:17 bootloader-hammerhead-HHZ12i.img
-rw-r----- 1 linc linc       974  8月 19 03:17 flash-all.bat
-rwxr-x--x 1 linc linc       845  8月 19 03:17 flash-all.sh*
-rwxr-x--x 1 linc linc       798  8月 19 03:17 flash-base.sh*
-rw-r----- 1 linc linc 572718099  8月 19 03:17 image-hammerhead-MPA44I.zip
-rw-r----- 1 linc linc  46515712  8月 19 03:17 radio-hammerhead-M8974A-2.0.50.2.27.img


刷机过程

1.进入fastboot模式

倾向于命令行的方式:

adb reboot bootloader




2.解锁

fastboot oem unlock


如果遇到等待设备的错误,

$ fastboot oem unlock
< waiting for device >


就先试试fastboot设备能否找到。

$ fastboot devices
no permissions  fastboot


如果是权限问题,那么可以直接用sudo或直接切换到root执行,也可以直接修改fastboot的所有者和权限。如下:

将fastboot的所有者改成root:

$ ll /opt/sdk/platform-tools/fastboot
-rwxrwxr-x 1 linc linc 556700  8月 18 22:19 /opt/sdk/platform-tools/fastboot*
$ sudo chown root:root /opt/sdk/platform-tools/fastboot
$ ll /opt/sdk/platform-tools/fastboot
-rwxrwxr-x 1 root root 556700  8月 18 22:19 /opt/sdk/platform-tools/fastboot*


修改权限:

$ sudo chmod +s /opt/sdk/platform-tools/fastboot
$ ll /opt/sdk/platform-tools/fastboot
-rwsrwsr-x 1 root root 556700  8月 18 22:19 /opt/sdk/platform-tools/fastboot*


再次尝试:

$ fastboot devices
0484c51a437cd6b9    fastboot


解锁操作为用音量键上下选择,电源键确认。如下图:



3.烧写5.1

$ ./flash-all.sh 
sending 'bootloader' (3119 KB)...
OKAY [  0.307s]
...
--------------------------------------------
Bootloader Version...: HHZ12h
Baseband Version.....: M8974A-2.0.50.2.26
Serial Number........: 0484c51a437cd6b9
--------------------------------------------
...
sending 'system' (1021840 KB)...
OKAY [ 32.204s]
writing 'system'...
OKAY [ 68.889s]
...
rebooting...

finished. total time: 134.852s


这样就提升了bootloader版本和baseband版本,为升级棉花糖做好了准备。




小绿人开始工作了,下面列出一些Android 5.1.1系统的图片,以供后续与6.0做对比。















4.烧写棉花糖

Android就这样做个过度吧,既然bootloader和baseband版本都满足要求,那就继续烧吧。

/hammerhead-MPA44I$ ./flash-all.sh 
target reported max download size of 1073741824 bytes
sending 'bootloader' (3119 KB)...
OKAY [  0.266s]
writing 'bootloader'...
OKAY [  0.527s]
finished. total time: 0.793s
rebooting into bootloader...
OKAY [  0.056s]
finished. total time: 0.107s
target reported max download size of 1073741824 bytes
sending 'radio' (45425 KB)...
OKAY [  1.533s]
writing 'radio'...
OKAY [  3.122s]
finished. total time: 4.655s
rebooting into bootloader...
OKAY [  0.039s]
finished. total time: 0.090s
target reported max download size of 1073741824 bytes
archive does not contain 'boot.sig'
archive does not contain 'recovery.sig'
archive does not contain 'system.sig'
archive does not contain 'vendor.img'
...
--------------------------------------------
Bootloader Version...: HHZ12i
Baseband Version.....: M8974A-2.0.50.2.27
Serial Number........: 0484c51a437cd6b9
--------------------------------------------
checking product...
OKAY [  0.100s]
checking version-bootloader...
OKAY [  0.100s]
checking version-baseband...
OKAY [  0.100s]
sending 'boot' (9156 KB)...
OKAY [  0.500s]
writing 'boot'...
OKAY [  0.780s]
sending 'recovery' (10016 KB)...
OKAY [  0.570s]
writing 'recovery'...
OKAY [  0.825s]
erasing 'system'...
OKAY [  1.045s]
sending 'system' (1018117 KB)...
OKAY [ 32.084s]
writing 'system'...
OKAY [ 68.703s]
erasing 'userdata'...
OKAY [ 14.520s]
sending 'userdata' (139109 KB)...
OKAY [  4.570s]
writing 'userdata'...
OKAY [  9.352s]
erasing 'cache'...
OKAY [  0.591s]
sending 'cache' (13348 KB)...
OKAY [  0.630s]
writing 'cache'...
OKAY [  1.071s]
rebooting...
finished. total time: 136.111s


5.bootloader上锁

fastboot oem lock


启动

烧写顺利完成,剩下焦急的等待,等待它顺利的启动。

启动界面又换了一个有爱的动画。大概等了10分钟之久吧,系统才启动。

Tips:我们连不上google服务器,将sim卸掉再启动,避免卡到检查连接界面,等正式进入系统后在插上卡。










系统风格与主界面等一些用户可以看到的,变化不大。应用列表从左右滑动变成了向下滑动,并且在第一栏留了4个最近使用的图标。

增加了一些动画,配合上系统的流畅,用起来让人赏心悦目。












无法使用的App

目前有些主流app对新系统不兼容,启动后闪退。比如:

微信;

工行app;

百度外卖;

12306;

新浪微博。

正常使用的App



小结

从看的见和看不见的地方去感受这个新系统,改动并不是很大。个人觉得将版本号定为5.2更为合适一些。(6.0这步子有点大)

吸引我的地方是操控感受更加细腻柔和,很多细节地方确实令我心动。用起来很舒服,很顺心。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: