Framework 開發起步知識記錄

1. 編譯源碼命令 :linux進入android源碼目錄,終端輸入: make -j4

  353  . build/envsetup.sh
  354  choosecombo 4 f12nad eng
  355  make clean
  356  make -j8 update-api 2>&1 | tee update-api.log
  357  make -k -j12 2>&1 | tee build.log
linux

2. 編譯某個目錄下的源碼: android

linux進入android源碼目錄,終端輸入: source build/envsetup.sh , 回車ubuntu

而後輸入:mmm XXX目錄路徑。api

好比編譯聯繫人:
mmm packages/apps/Contacts/
編完以後生成兩個文件:
out/target/product/generic/data/app/ContactsTests.apk
out/target/product/generic/system/app/ Contacts.apkapp

編譯出來的APK,但APK並不包含在system文件夾中,咱們可使用make snod 打包system文件夾,產生新的system.img。
 
3. 對模擬器操做system下面的文件,用cmd,裏面輸入:adb remount。 這樣就能夠操做了。
4. 從新設置linux的root密碼命令: sudo passwd root 5. 設置ubuntu的軟件源(網易的,速度比較快) deb http://mirrors.163.com/ubuntu/ lucid main universe restricted multiverse deb-src http://mirrors.163.com/ubuntu/ lucid main universe restricted multiverse deb http://mirrors.163.com/ubuntu/ lucid-security universe main multiverse restricted deb-src http://mirrors.163.com/ubuntu/ lucid-security universe main multiverse restricted deb http://mirrors.163.com/ubuntu/ lucid-updates universe main multiverse restricted deb http://mirrors.163.com/ubuntu/ lucid-proposed universe main multiverse restricted deb-src http://mirrors.163.com/ubuntu/ lucid-proposed universe main multiverse restricted deb http://mirrors.163.com/ubuntu/ lucid-backports universe main multiverse restricted deb-src http://mirrors.163.com/ubuntu/ lucid-backports universe main multiverse restricted deb-src http://mirrors.163.com/ubuntu/ lucid-updates universe main multiverse restricted
相關文章
相關標籤/搜索