android模組編譯,mm,mmm

來源:互聯網
上載者:User

如果你只修改某一個模組的內容,卻每次都要執行make, 最後等待很長時間。
使用模組編譯,只需要在你所在的模組的目錄或者其子目錄,執行mm,便可以編譯出一個單獨的apk,這樣豈不快哉!
具體步驟:
        1)開啟~/.baserc檔案,加入source ~/I850/build/envsetup.sh. 加入你自己該檔案所在的路徑,這樣就免去了每次啟動新的終端執行mm命令之前,需要引用此檔案。
        2)完成步驟1之後,就可以在你的模組裡面隨意執行mm了,要想使用其他快速命令,可以查看envsetup.sh檔案,比如 cgrep,jgrep,resgrep在不同類型的檔案裡面進行相應的查詢。還有m,mmm等等
        3)還可以使用adb push 將你的apk push到模擬器或者手機終端,也可以在工程根目錄通過make -snod產生新的system.img

 

 

 from http://mcuos.com/redirect.php?tid=4553&goto=lastpost

編譯模組

Android中的一個應用程式可以單獨編譯,編譯後需要重建system.img。
在Android目錄下運行
$ . build/envsetup.sh  或者
$ source build/envsetup.sh ,然後就會多出幾個可用的命令:

- croot:   Changes directory to the top of the tree.
- m:       Makes from the top of the tree.
- mm:      Builds all of the modules in the current directory.
- mmm:     Builds all of the modules in the supplied directories.
- cgrep:   Greps on all local C/C++ files.
- jgrep:   Greps on all local Java files.
- resgrep: Greps on all local res/*.xml files.
- godir:   Go to the directory containing a file.
- printconfig: 當前build的配置情況.
可以使用 --help查看用法。
如:在修改了某一個模組以後,可以使用 $ mmm <目錄>  來重新編譯所有在<目錄>中的所有模組,使用 $ mm  編譯目前的目錄中的所有模組。
編完之後,即修改了Android系統以後,可以使用 $ make snod 重建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.