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 - #====================================================== ...
随机推荐
- css 常用样式
1. border-radius - 指定每个圆角 四个值: 第一个值为左上角,第二个值为右上角,第三个值为右下角,第四个值为左下角. 三个值: 第一个值为左上角, 第二个值为右上角和左下角,第三个值 ...
- 何时使用Swift Structs和Classes
Swift 圈中有一个被反复讨论的话题是:何时使用struct,何时使用class.我觉得今天我也要给出我的个人观点. 值 VS 引用 答案真的很简单了:当你需要用值语义的时候使用class,需要用引 ...
- Problem 2136 取糖果---FUOJ (线段树+维护)
http://acm.fzu.edu.cn/problem.php?pid=2136 题目大意: 给你n个袋子每个袋子里都装有糖果,然后呢你可以每次抽取一个连续的一个区间的袋子,然后带走里面最多糖果数 ...
- Java 第13章 带参数的方法
带参数的方法 无参方法有那几个组成部分? 调用无参方法的两种形式是什么? 第一种:同一个类中的方法调用 直接用方法名 show(): 第二种:不同类中的方法调用 -->对象实例化 -->对 ...
- Longest Valid Parentheses 每每一看到自己的这段没通过的辛酸代码
Longest Valid Parentheses My Submissions Question Solution Total Accepted: 47520 Total Submissions: ...
- Web大文件上传控件-asp.net-bug修复-Xproer.HttpUploader6.2
版权所有 2009-2016荆门泽优软件有限公司 保留所有权利 官方网站:http://www.ncmem.com/ 产品首页:http://www.ncmem.com/webapp/up6.2/in ...
- (最长公共子序列+推导)Love Calculator (lightOJ 1013)
http://www.lightoj.com/volume_showproblem.php?problem=1013 Yes, you are developing a 'Love calcula ...
- 【原创】-- tftp安装配置及使用
环境:Ubuntu 14.04 OK6410 环境搭建: (1) $ sudo apt-get install tftp tftpd openbsd-inetd 或者安装tftp的增强版本tftp- ...
- 求教——使用node做表单,刷新浏览器页面,浏览器为什么会重复提交上次所填的信息
最近在学些node,按照<nodejs实战>上的代码做练习,发现有表单重复提交的问题 第一次打开页面,显示如图是get请求 图1 现在我们提交aaa,显示如图,post请求 图2 刷新页面 ...
- 捉BUG记(To Catch a Bug)
大约有一年整没有写一篇博客了,由于各种原(jia)因(ban)导致闲暇时间要么拿着IPad看岛国奇怪的片(dong)子(hua).要么拿着kindle看各种各样的资(xiao)料(shuo).本来想写 ...