Android 解压boot.img
其实解压、打包boot.img没什么难度一看就会咯!!
1.先下附件:工具。 点击打开链接 6.0 KB, 下载次数: 60) 解压到bin文件夹里,方便以后使用。
2.解压boot.img文件
去到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打包了!!下是代码:
命令中-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的更多相关文章
- Android 解压zip文件(支持中文)
过了n多天后,当再次使用原先博客上写的那篇: Android 压缩解压zip文件 去做zip包的解压的时候,出现了原来没有发现的很多问题.首先是中文汉字问题,使用java的zip包不能很好的解决解压问 ...
- Android 解压zip文件你知道多少?
对于Android常用的压缩格式ZIP,你了解多少? Android的有两种解压ZIP的方法,你知道吗? ZipFile和ZipInputStream的解压效率,你对比过吗? 带着以上问题,现在就开始 ...
- Android 解压zip文件
过了n多天后,当再次使用原先博客上写的那篇: Android 压缩解压zip文件 去做zip包的解压的时候,出现了原来没有发现的很多问题.首先是中文汉字问题,使用java的zip包不能很好的解决解压问 ...
- 解压 boot.img
./split_bootimg.pl boot.img Page size: 2048 (0x00000800) Kernel size: 7062084 (0x006bc244) Ramdisk s ...
- Android 解压html压缩数据
public static String unzipHTML(String s){ int endPos = s.indexOf("\r\n\r\n"); if(endPos< ...
- Android 打造自己的个性化应用(五):仿墨迹天气实现续--> 使用Ant实现zip/tar的压缩与解压
上一篇中提到对于Zip包的解压和压缩需要借助Ant 实现,我经过参考了其他的资料,整理后并加上了一些自己的看法: 这里就具体地讲下如何使用Ant进行解压缩及其原因: java中实际是提供了对 zip ...
- android压缩解压zip文件
网上各种方法的收集: 1.上次写了个解压缩功能,但有局限性,比如压缩文件xx.zip 里包括子目录的情况下,执行上次解压缩的功能就不能实现我们想要的效果,于是在网上参考了一下java的解压缩功能.对上 ...
- Android多种格式的异步解压/压缩解决方案
前言 最近由于项目需要,需要我谅解一下关于在移动平台的解压功能,在移动平台解压,我个人感觉是没有太大必要的,毕竟手机的性能有限.但是,不口否认,移动端的解压功能又是必备的,因为如果对于一些资源管理器类 ...
- 〖Linux〗联想K860/i Android 4.2及以上的Bootimg解压与打包工具
因为自己有需要,所以花了一点时间来写了一下. 1. 解压工具 #!/bin/bash - #====================================================== ...
随机推荐
- 如何进行正确的SQL性能优化
在SQL查询中,为了提高查询的效率,我们常常采取一些措施对查询语句进行SQL性能优化.本文我们总结了一些优化措施,接下来我们就一一介绍. 1.查询的模糊匹配 尽量避免在一个复杂查询里面使用 LIKE ...
- 生成树的个数——基尔霍夫定理(Matrix-Tree Theorem)
树有很多种形态,给定结点个数,求生成不同形态二叉树的个数,显然要用到Catalan数列. 那如果给定一个图(Graph)\(G=(V,E)\),要求其最小生成树G',最好的方法莫过于Prim或Krus ...
- Java 第三章 选择结构1
选择结构(一) 会使用基本的 if 选择结构 掌握逻辑运算符,掌握多重 if 选择结构 , 掌握嵌套 if 选择 结构 为什么需要 if 选择结构 例如: 如果张浩的 java 考试成绩大于 98分, ...
- MySQL使用小记
时间格式化: select date_format('2008-08-08 22:23:01', '%Y%m%d%H%i%s'); 去重复: use iksdb3; select distinct ` ...
- linux-4 虚拟机安装VMwareTOOls工具包
第一步:在虚拟机中选择“安装.重新安装VMwareTools(T)” 第2步: 安装VMwareTools包 1.用root登录 2. 创建 /media/cdrom [root@localhos ...
- 部分具有统计功能的TSQL语句(例如DBCC语句,全局函数,系统存储过程)
部分具有统计功能的TSQL语句(例如DBCC语句,全局函数,系统存储过程) 这些功能也能帮助用户了解和监控SQLSERVER的运行情况 DBCC语句,DBCC语句是SQL2005的数据库控制台命令 D ...
- 【转发】Cross-thread operation not valid: Control 'progressBar1' accessed from a thread other than the thread it was created on
当您试图从单独的线程更新一个win form时,您将得到如下错误信息: "Cross-thread operation not valid: Control 'progressBar1' ...
- 用c#开发微信 (15) 微活动 1 大转盘
微信营销是一种新型的营销模式,由于微信更重视用户之间的互动,故而这种营销推广不不能盲目地套用微博营销的单纯大量广告推送方式.这种方式在微信营销中的效果非常差,会令用户反感,继而取消去企业或商家的微信公 ...
- C++11 并发指南六(atomic 类型详解三 std::atomic (续))
C++11 并发指南六( <atomic> 类型详解二 std::atomic ) 介绍了基本的原子类型 std::atomic 的用法,本节我会给大家介绍C++11 标准库中的 std: ...
- SQL Server 重新初始化系统数据库中的单引号问题
在最近的数据库跨机房迁移中,由于硬件的限制,需要滚动式地将数据库一台台迁移到新机房,先在新机房搭建一个新环境,将数据迁移过去,再将旧机房的机器下架搬到新机房,重新配置后用于下一轮的升级,重新配置过程中 ...