2025年4月8日 星期二 乙巳(蛇)年 正月初九 设为首页 加入收藏
rss

模拟器中ramdisk.img或者recovery.img重新解压打包步骤

时间:02-13来源:作者:点击数:58

1、首先删除img后缀

# gunzip -S .img ramdisk.img

2、查看文件类型

# file ramdisk

ramdisk: ASCII cpio archive (SVR4 with no CRC)

是一个cpio格式的文件

3、解压cpio文件

# mkdir ramdisk_ok

# cd ramdisk_ok/

# cpio -i -F ../ramdisk

# ls -la

  • drwxrwxr-x 8 yonghe yonghe 4096 119 15:04 .
  • drwxr-x--- 4 yonghe yonghe 4096 1月 19 15:10 ..
  • drwxrwx--x 2 yonghe yonghe 4096 1月 19 15:04 data
  • -rw-r--r-- 1 yonghe yonghe 116 1月 19 15:04 default.prop
  • drwxr-xr-x 2 yonghe yonghe 4096 119 15:04 dev
  • -rw-r--r-- 1 yonghe yonghe 8870 1月 19 15:04 file_contexts
  • -rw-r----- 1 yonghe yonghe 953 1月 19 15:04 fstab.goldfish
  • -rwxr-x--- 1 yonghe yonghe 175260 1月 19 15:04 init
  • -rwxr-x--- 1 yonghe yonghe 919 1月 19 15:04 init.environ.rc
  • -rwxr-x--- 1 yonghe yonghe 2979 1月 19 15:04 init.goldfish.rc
  • -rwxr-x--- 1 yonghe yonghe 19970 1月 19 15:06 init.rc
  • -rwxr-x--- 1 yonghe yonghe 1795 1月 19 15:04 init.trace.rc
  • -rwxr-x--- 1 yonghe yonghe 3915 1月 19 15:04 init.usb.rc
  • drwxr-xr-x 2 yonghe yonghe 4096 119 15:04 proc
  • -rw-r--r-- 1 yonghe yonghe 2161 1月 19 15:04 property_contexts
  • drwxr-x--- 2 yonghe yonghe 4096 1月 19 15:04 sbin
  • -rw-r--r-- 1 yonghe yonghe 656 1月 19 15:04 seapp_contexts
  • -rw-r--r-- 1 yonghe yonghe 74768 1月 19 15:04 sepolicy
  • drwxr-xr-x 2 yonghe yonghe 4096 119 15:04 sys
  • drwxr-xr-x 2 yonghe yonghe 4096 119 15:04 system
  • -rw-r--r-- 1 yonghe yonghe 272 1月 19 15:04 ueventd.goldfish.rc
  • -rw-r--r-- 1 yonghe yonghe 4024 1月 19 15:04 ueventd.rc

4、修改ramdisk目录下的内容。

5、重新打包

# cd ../

# gzip -c ramdisk > ramdisk.img

方便获取更多学习、工作、生活信息请关注本站微信公众号城东书院 微信服务号城东书院 微信订阅号
推荐内容
相关内容
栏目更新
栏目热门