Let's pretend our directories are:
~/work/android: directory where you did your git, envbuild, lunch/choosecombo from.
~/work/tmp: empty directory for us to play in
If you have already done a build, you will find out/target/product/generic/ramdisk.img. This is a gzipped cpio file.
Extracting ramdisk.img
((modify files... for example, init.rc or init.goldfish.rc))~/work/tmp$ cp ~/work/android/out/target/product/generic/ramdisk.img ./ramdisk.cpio.gz~/work/tmp$ gzip -d ramdisk.cpio.gz~/work/tmp$ mkdir tmp2~/work/tmp$ cd tmp2~/work/tmp/tmp2$ cpio -i -F ../ramdisk.cpio
Rebuilding ramdisk.img
~/work/tmp/tmp2$ cpio -i -t -F ../ramdisk.cpio | cpio -o -H newc -O ../ramdisk2.cpio~/work/tmp/tmp2$ cd ..~/work/tmp$ gzip -c ramdisk2.cpio > ramdisk.img
Now you should be able to use the new ramdisk.img with your emulator =)
No comments:
Post a Comment