其实解压、打包boot.img没什么难度一看就会咯!!
   1.先下附件:工具。 点击打开链接 6.0 KB, 下载次数: 60)      解压到bin文件夹里,方便以后使用。
   2.解压boot.img文件
     去到boot.img所在的文件夹,输入下面的命令:

split.pl boot.img         

Page size: 2048 (0x00000800)
        Kernel size: 2240184 (0x00222eb8)
        Ramdisk size: 221504 (0x00036140)
        Second size: 0 (0x00000000) 
        Board name:
        Command line:androidboot.hardware=blade console=null g_android.product_id=0x1354 g_android.serial_number=Blade-CM7
        Writing boot.img-kernel ... complete.
        Writing boot.img-ramdisk.gz ... complete.
        完了之后,你就会发现多了boot.img-kernel 和 boot.img-ramdisk.gz文件,这就是解压出来的boot.img,其中boot.img-kernel 就是内核,boot.img-ramdisk.gz就是ramdisk。
    
       3.打包boot.img文件

在替换和内核后,就要对boot.img打包了!!下是代码:

mkbootimg --cmdline 'androidboot.hardware=blade console=null g_android.product_id=0x1354 g_android.serial_number=Blade-CM7'  --kernel boot.img-kernel --ramdisk boot.img-ramdisk.gz -o new.img

命令中-cmdline‘xxx’,xxx就是解压boot.img是Command line:xxx

new.img文件就是你修改后的boot.img文件了。改个名字替换到ROM里面就可以了。!!

new.img文件就是你修改后的boot.img文件了。改个名字替换到ROM里面就可以了。!!

# ./split_bootimg.pl boot.img  Page size: 2048 (0x00000800) Kernel size: 1388548 (0x00153004) Ramdisk size: 141518 (0x000228ce) Second size: 0 (0x00000000) Board name:  Command line: no_console_suspend=1 Writing boot.img-kernel ... complete. Writing boot.img-ramdisk.gz ... complete.
Extract the ramdisk.
# mkdir ramdisk # cd ramdisk # gzip -dc ../*-ramdisk.gz | cpio -i # cd ..
Make any changes necessary (e.g., set ro.secure=0 in default.prop).
Recreate the cpio archive using the mkbootfs binary produced from building the Android source code (The cpio utility in OS X does not recognize the newc format, therefore mkbootfs is the best option for OS X users).
# mkbootfs ./ramdisk | gzip > ramdisk-new.gz
Recreate the image file using the mkbootimg binary produced from building the Android source code.
# mkbootimg --cmdline 'no_console_suspend=1 console=null' --kernel boot.img-kernel --ramdisk ramdisk-new.gz -o boot-new.img --base 0x20000000

=======================================================================

Make any changes necessary (e.g., set ro.secure=0 in default.prop).
Recreate the cpio archive using the mkbootfs binary produced from building the Android source code (The cpio utility in OS X does not recognize the newc format, therefore mkbootfs is the best option for OS X users).
# mkbootfs ./ramdisk | gzip > ramdisk-new.gz
Recreate the image file using the mkbootimg binary produced from building the Android source code.
# mkbootimg --cmdline 'no_console_suspend=1 console=null' --kernel boot.img-kernel --ramdisk ramdisk-new.gz -o boot-new.img --base 0x20000000

打包ramdisk.img :  find . |cpio -ov -H newc |gzip > ../ramdisk.img

http://blog.csdn.net/tody_guo/article/details/7515151

Android 解压boot.img的更多相关文章

  1. Android 解压zip文件(支持中文)

    过了n多天后,当再次使用原先博客上写的那篇: Android 压缩解压zip文件 去做zip包的解压的时候,出现了原来没有发现的很多问题.首先是中文汉字问题,使用java的zip包不能很好的解决解压问 ...

  2. Android 解压zip文件你知道多少?

    对于Android常用的压缩格式ZIP,你了解多少? Android的有两种解压ZIP的方法,你知道吗? ZipFile和ZipInputStream的解压效率,你对比过吗? 带着以上问题,现在就开始 ...

  3. Android 解压zip文件

    过了n多天后,当再次使用原先博客上写的那篇: Android 压缩解压zip文件 去做zip包的解压的时候,出现了原来没有发现的很多问题.首先是中文汉字问题,使用java的zip包不能很好的解决解压问 ...

  4. 解压 boot.img

    ./split_bootimg.pl boot.img Page size: 2048 (0x00000800) Kernel size: 7062084 (0x006bc244) Ramdisk s ...

  5. Android 解压html压缩数据

    public static String unzipHTML(String s){ int endPos = s.indexOf("\r\n\r\n"); if(endPos< ...

  6. Android 打造自己的个性化应用(五):仿墨迹天气实现续--> 使用Ant实现zip/tar的压缩与解压

    上一篇中提到对于Zip包的解压和压缩需要借助Ant 实现,我经过参考了其他的资料,整理后并加上了一些自己的看法: 这里就具体地讲下如何使用Ant进行解压缩及其原因: java中实际是提供了对  zip ...

  7. android压缩解压zip文件

    网上各种方法的收集: 1.上次写了个解压缩功能,但有局限性,比如压缩文件xx.zip 里包括子目录的情况下,执行上次解压缩的功能就不能实现我们想要的效果,于是在网上参考了一下java的解压缩功能.对上 ...

  8. Android多种格式的异步解压/压缩解决方案

    前言 最近由于项目需要,需要我谅解一下关于在移动平台的解压功能,在移动平台解压,我个人感觉是没有太大必要的,毕竟手机的性能有限.但是,不口否认,移动端的解压功能又是必备的,因为如果对于一些资源管理器类 ...

  9. 〖Linux〗联想K860/i Android 4.2及以上的Bootimg解压与打包工具

    因为自己有需要,所以花了一点时间来写了一下. 1. 解压工具 #!/bin/bash - #====================================================== ...

随机推荐

  1. 基本套接字编程(1) -- tcp篇

    1. Socket简介 Socket是进程通讯的一种方式,即调用这个网络库的一些API函数实现分布在不同主机的相关进程之间的数据交换. 几个定义: (1)IP地址:即依照TCP/IP协议分配给本地主机 ...

  2. 更改OneDrive同步文件夹

    很无奈,自己的硬盘出现了一些小情绪,不能愉快的玩耍了.所以,我需要将我的文件进行转移. 本地文件还好,但是有一个问题——自动同步的OneDrive.总不能说以后每次同步还是原来的文件夹吧? 在OneD ...

  3. 重启EBS

    http://www.cnblogs.com/toowang/archive/2012/03/28/2421275.html 概述步骤(此操作没有停止数据库): 1.登陆FTP,终止应用:cd $CO ...

  4. SQL Server并行死锁案例解析

    并行执行作为提升查询响应时间,提高用户体验的一种有效手段被大家所熟知,感兴趣的朋友可以看我以前的博客SQL Server优化技巧之SQL Server中的"MapReduce", ...

  5. 使用ODP.NET查询数据参数顺序问题及莫名ORA-01722错误提示

    最近由于项目需要,必须使用C#配合Oracle来进行开发,在开发的过程中,发现有些查询无法正确获取数据.例如: Select * From tabParam Where ParamCode = :Pa ...

  6. 真实世界:使用WCF扩展记录服务调用时间

    WCF 可扩展性 WCF 提供了许多扩展点供开发人员自定义运行时行为. WCF 在 Channel Layer 之上还提供了一个高级运行时,主要是针对应用程序开发人员.在 WCF 文档中,它常被称为服 ...

  7. [OpenCV] 2、边缘检测 canny

    >_<" 边缘检测代码:

  8. 最新最全的js判断移动设备及操作系统

    var navigator = window.navigator, userAgent = navigator.userAgent, android = userAgent.match(/(Andro ...

  9. nginx.conf文件说明

    #Nginx所有用户和组,window下不指定 #user nobody; #工作的子进程数量(通常等于CPU数量或者2倍于CPU) worker_processes 1; #错误日志存放路径 #er ...

  10. APP API如何维护多个版本的一些想法?

    1.第一种形式:api版本号放在url路径中 https://api.example.com/v1/user/ID https://api.example.com/v2/user/ID https:/ ...