android image 壓縮和解壓 unyaffs與mkyaffs2image

來源:互聯網
上載者:User

http://blog.chinaunix.net/space.php?uid=25832818&do=blog&id=3039340

android-sdk檔案夾下platform存放的是android對應的平台術語平台表示android本身(platform),包括所有的二進位檔案、程式碼程式庫和工具。SDK中提供的emulator只是android平台中到眾多組件之一【google android 揭秘】
1.解壓檔案下載工具 wget http://unyaffs.googlecode.com/files/unyaffs並且增加執行許可權 chmod 777 unyaffs解壓system.img和userdata.imgunyaffs ./your+image+name.img解壓到當前檔案夾解壓ramdisk.imgmv ramdisk.img ramdisk.gzgunzip ramdisk.gzcpio -id < ./ramdisk
2.壓縮檔mkyaffs2image命令完成壓縮,該檔案在android源碼編譯完後到out/host/linux-x86/bin或者直接編譯源碼

==========================================

mkyaffs2image的用法

http://blog.csdn.net/bjutstar/article/details/7182089

在Ubuntu中第一次使用mkyaffs2image命令時,會提示

mkyaffs2image:找不到命令

還需要安裝mkyaffs2image

http://code.google.com/p/fatplus/downloads/detail?name=yaffs2-source.tar&can=2&q=

下載yaffs2-source.tar 

解壓後,進入utils檔案夾,然後make

將make之後產生的mkyaffs2image檔案拷貝到/usr/bin目錄下

$ su
# cp mkyaffs2image /usr/bin/
# chmod 777 /usr/bin/mkyaffs2image

之後

$ mkyaffs2image 
mkyaffs2image: image building tool for YAFFS2 built Jan  6 2012
usage: mkyaffs2image dir image_file [convert]
           dir        the directory tree to be converted
           image_file the output file to hold the image
           'convert'  produce a big-endian image from a little-endian machine

表明安裝成功,同時也可以看到該命令的用法

mkyaffs2image dir image_file

例如,針對Android源碼中的system.img檔案的產生,可以使用

$ mkyaffs2image out/target/product/smdkv210/system/ out/target/product/smdkv210/system.img

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.