Android源碼目錄下的build/envsetup.sh文件,描述編譯的命令linux
- 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.android
要想使用這些命令,首先須要在android源碼根目錄執行. build/envsetup.sh 腳本設置環境app
m:編譯全部的模塊
mm:編譯當前目錄下的模塊,當前目錄下要有Android.mk文件
mmm:編譯指定路徑下的模塊,指定路徑下要有Android.mk文件ui
下面舉個例子說明,假設我要編譯android下的packages/apps/Settings模塊,當前目錄爲源碼根目錄,方法以下:get
一、. build/envsetup.sh
二、mmm packages/apps/Settings源碼
編譯完成後安裝到系統
編譯
adb install -r out/target/product/lcsh6580_weg_sh_l/system/priv-app/Settings/Settings.apk(apk的輸出位置)
module
或者打包到系統鏡像中
打包
lunch 選擇你要編譯的源碼
方法
make snod將你修改的模塊打入到system.img中
3.從新刷人設備