自己下载android源码编译的system.img镜像文件安装到手机中

2015年06月02日 Android 1条评论 阅读5146次

本文以谷歌亲儿子Nexus系列移动设备的Nexus6(shamu)为例来做说明。

在自己用各种途径下载得到android源码之后,我们便可以随便修改并且编译之,最后会生成手机设备的镜像文件。。这里一般是指system.img。

Image


自己下载android源码编译的system.img镜像文件安装到手机中的命令及执行步骤

主要就是下面四条命令

adb reboot bootloader

fastboot oem unlock

fastboot -w flash boot boot.img

fastboot -w flash system system.img


注意:要把boot.img和system.img两个镜像文件放到cmd目录下,或提前在cmd窗口中cd到这两个镜像文件的路径下。

下面是我在执行上述命令时的执行过程的复制。。。

Microsoft Windows [版本 6.1.7601]

版权所有 (c) 2009 Microsoft Corporation。保留所有权利。

C:\Users\jileniao.net>adb reboot bootloader

C:\Users\jileniao.net>fastboot oem unlock

...

(bootloader) Device already unlocked!

FAILED (remote failure)

finished. total time: 0.003s

C:\Users\jileniao.net>fastboot -w flash boot boot.img

target reported max download size of 536870912 bytes

sending 'boot' (7626 KB)...

OKAY [  0.245s]

writing 'boot'...

OKAY [  0.114s]

erasing 'userdata'...

OKAY [  1.226s]

formatting 'userdata' partition...

Creating filesystem with parameters:

    Size: 28474998784

    Block size: 4096

    Blocks per group: 32768

    Inodes per group: 8160

    Inode size: 256

    Journal blocks: 32768

    Label:

    Blocks: 6951904

    Block groups: 213

    Reserved block group size: 1024

Created filesystem with 11/1738080 inodes and 153124/6951904 blocks

sending 'userdata' (139061 KB)...

writing 'userdata'...

OKAY [  8.936s]

erasing 'cache'...

OKAY [  0.062s]

formatting 'cache' partition...

Creating filesystem with parameters:

    Size: 268435456

    Block size: 4096

    Blocks per group: 32768

    Inodes per group: 8192

    Inode size: 256

    Journal blocks: 1024

    Label:

    Blocks: 65536

    Block groups: 2

    Reserved block group size: 15

Created filesystem with 11/16384 inodes and 2089/65536 blocks

sending 'cache' (6248 KB)...

writing 'cache'...

OKAY [  0.405s]

finished. total time: 10.990s

C:\Users\jileniao.net>fastboot -w flash system system.img

target reported max download size of 536870912 bytes

sending sparse 'system' (520273 KB)...

OKAY [ 17.927s]

writing 'system'...

OKAY [  8.563s]

sending sparse 'system' (74374 KB)...

OKAY [  2.747s]

writing 'system'...

OKAY [  1.411s]

erasing 'userdata'...

OKAY [  1.298s]

formatting 'userdata' partition...

Creating filesystem with parameters:

    Size: 28474998784

    Block size: 4096

    Blocks per group: 32768

    Inodes per group: 8160

    Inode size: 256

    Journal blocks: 32768

    Label:

    Blocks: 6951904

    Block groups: 213

    Reserved block group size: 1024

Created filesystem with 11/1738080 inodes and 153124/6951904 blocks

sending 'userdata' (139061 KB)...

writing 'userdata'...

OKAY [  8.975s]

erasing 'cache'...

OKAY [  0.060s]

formatting 'cache' partition...

Creating filesystem with parameters:

    Size: 268435456

    Block size: 4096

    Blocks per group: 32768

    Inodes per group: 8192

    Inode size: 256

    Journal blocks: 1024

    Label:

    Blocks: 65536

    Block groups: 2

    Reserved block group size: 15

Created filesystem with 11/16384 inodes and 2089/65536 blocks

sending 'cache' (6248 KB)...

writing 'cache'...

OKAY [  0.404s]

finished. total time: 41.390s

C:\Users\jileniao.net>


其他手机暂时没有试过,不知道能否成功。

文末,欢迎拍砖。

分享本文至:

WRITTEN BY

avatar
本文标签:Nexussystemimg
看了本文是不是觉得很赞,那就赶紧点击下面按钮分享给身边的朋友吧!

1 条评论

  1. avatar 源码集中营

    博主太折腾了~

欢迎留言




用户登录

sitemap