其实解压、打包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. Android之ListView——ArrayAdapter的学习与总结

    问题:当ListView选定的ListItem视图中存在一些UI组件,如CheckBox,希望保存状态,但实际上第一次完成时发现勾选后的选项在列表往下滑再滑回去后,状态没有保存 解决过程: 1)思考后 ...

  2. 利用RBAC模型实现一个通用的权限管理系统

    本文主要描述一个通用的权限系统实现思路与过程.也是对此次制作权限管理模块的总结. 制作此系统的初衷是为了让这个权限系统得以“通用”.就是生产一个web系统通过调用这个权限系统(生成的dll文件), 就 ...

  3. tomcat提供文件下载

    引用两篇博客:http://blog.csdn.net/yuan882696yan/article/details/26680253 http://www.cnblogs.com/shenliang1 ...

  4. alt属性

    也被称为alt text, 是当图片无法加载时显示的替代文本.alt属性对于盲人或视觉损伤的用户理解一幅图片中所描绘的内容非常重要,搜索引擎也会搜索alt属性. 简而言之,每一张图片都应该有一个alt ...

  5. Rhythmbox中文乱码

    今天在网络上找到了一个比较好的解决Rhythmbox中文乱码的问题的方法 进入你的音乐文件夹执行如下代码: mid3iconv -e GBK *.mp3 如果没有提示多试几次, 有可能系统会提示: p ...

  6. [转] Linux中启动和停止jar包的运行

    脚本一: startTest.sh内容如下:#!/bin/shjava -jar Test.jar &       #注意:必须有&让其后台执行,否则没有pid生成echo $! &g ...

  7. 分享一下SQLSERVER技术交流QQ群里的群共享资源

    分享一下SQLSERVER技术交流QQ群里的群共享资源 SQLSERVER技术交流QQ群已经开了一段时间了,人数已经有了100多号人, 而群里面很多SQLSERVER爱好者上传了他们宝贵的SQLSER ...

  8. EasyCriteria 3.0 发布

    EasyCriteria 3.0 发布了,这是一个全新的版本,进行了大量的重构.官方发行说明请看:http://uaihebert.com/?p=1898 EasyCriteria 是一个轻量级的框架 ...

  9. StarUML建模软件

    这星期本人进行了UML建模语言的初步学习,简单地将上学期所建立的数据库模型在该软件中实现了出来.

  10. 跟我一起学WCF(6)——深入解析服务契约[下篇]

    一.引言 在上一篇博文中,我们分析了如何在WCF中实现操作重载,其主要实现要点是服务端通过ServiceContract的Name属性来为操作定义一个别名来使操作名不一样,而在客户端是通过重写客户端代 ...