android snod 編譯到system.img中


mmm -j4 snod framework/base 

 mp systemimage

  使用模塊編譯,只需要在你所在的模塊的目錄或者其子目錄,執行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

       編譯模塊
  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查看用法


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM