免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2872 | 回复: 0
打印 上一主题 下一主题

step by step modify android's ramdisk.img [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-06-12 15:43 |只看该作者 |倒序浏览

Step by step to create/modify ramdisk.img
Benno's blog has an article to
change the ramdisk image
, I tried it and give more details here.
ramdisk.img
is included in the google android sdk, it exists in folder
$SDK_ROOT/tools/lib/images/ramdisk.img. The ramdisk.img included in the
google android sdk is a gzipped ramdisk.cpio file.
Here is the steps:
  • Upload the ramdisk.img to your linux machine
  • Change the ramdisk.img name to ramdisk.cpio.gz, and extract it by: #  gzip -d ramdisk.cpio.gz
  • Create a temporary folder, say tmp, copy ramdisk.cpio to tmp folder
  • Extract the ramdisk.cpio in the tmp folder with command: #  cpio -i -F ramdisk.cpio
  • Remove the ramdisk.cpio in the tmp folder, and make any changes you want to the extracted ramdisk.cpio in tmp folder
  • Recreate the ramdisk.cpio with command: # cpio -i -t -F ../ramdisk.cpio | cpio -o -H newc -O ../ramdisk_new.cpioSome notes:
  • I
    change ramdisk.img to ramdisk.cpio.gz, and unzip it. It is because I
    find the -z parameter is not supported with my cpio. I tried the latest
    cpio (2.9), it doesn't work too.
  • Check cpio version by # cpio --version. I'm using cpio version 2.4.
  • Find the latest cpio (v 2.9) on site:
    gnu cpio
  • Notice that in step 6, the command includes two O's. First o is lower-case, second is up-case.
  • Notice in step 6, please remain ramdisk.cpio in up folder of tmp folder. The command need it there.
    Blog Archive







                   
                   
                   

    本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u1/35418/showart_973157.html
  • 您需要登录后才可以回帖 登录 | 注册

    本版积分规则 发表回复

      

    北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
    未成年举报专区
    中国互联网协会会员  联系我们:huangweiwei@itpub.net
    感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

    清除 Cookies - ChinaUnix - Archiver - WAP - TOP