Android 檔案系統

來源:互聯網
上載者:User

檔案系統

編譯android源碼之後,在out/target/product/generic一些檔案:ramdisk.img、system.img、userdata.img、 system、 data、root

其中root、system、data三個目錄分別是目標根檔案系統、主檔案系統和資料檔案系統的目錄。

ramdisk.img 根檔案系統映像
system.img 主檔案系統映像
userdata.img資料映像

其中,system.img是由 system打包壓縮得到的, userdata.img是由 data打包壓縮得到的。
系統啟動時先掛載ramdisk.img,接著分別把system.img和userdata.img掛載到 ramdisk下的system和data目錄。

根檔案系統:系統啟動時第一個mount的檔案系統,其下可能會繼續掛載其他的檔案系統。
/out/target/product/generic/root包括以下目錄: data、dev、proc、sbin、sys、system、init/init.rc等。

主檔案系統
/out/target/product/generic/system包括以下目錄:app、bin、etc、fonts、framework、lib、usr、xbin

=> ramdisk.img is gziped archive. ramdisk.img is a small partition image that is mounted read-only by the kernel at boot time. It only contains /init and a few config files. It is used to start init which will mount the rest
of the system images properly and run the init procedure. A Ramdisk is a standard Linux feature. It is made just for the Android and do special things to start up the Android system.

=> system.img is a partition image that will be mounted as /system
and thus contains all system binaries.

=> userdata.img is a partition image that can be mounted as /data and thus contains all application-specific and user-specific data

obj 是中間目標檔案目錄,其下面的APPS是java應用程式套件組合的目錄,EXECUTABLES 是可執行程式的目錄,SHARED_LIBRARIES STATIC_LIBRARIEs分別是動態庫和靜態庫的目錄。

編譯出來的應用程式就是放在system/app下的;使用者安裝的程式則是放在data/app下。

AN

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.