Android 4.0.1 源碼下載,模擬器編譯和運行

    今天在網上找到了源碼本身先保留下html

通過漫長的等待, android4.0 (Ice Cream Sandwich)的源碼終於放出來了 (下載,編譯運行 android ICS 的經驗。 如下是詳細內容:linux

Android ICS 下載

http://source.android.com/source/downloading.html 上有 最新的ICS 源代碼同步的地址。若是環境已經設置好了的話,同步最新的代碼很是的簡單:android

  1. $ mkdir WORKING_DIRECTORY  
  2. $ cd WORKING_DIRECTORY  
  3.   
  4. $ repo init -u https://android.googlesource.com/platform/manifest -b android-4.0.1_r1  
  5.   
  6. $repo sync  

下載完成後主要包含一下目錄:ionic

  1. abi  bionic  bootable  build  cts  dalvik  development  device  docs  external  frameworks  hardware  libcore  Makefile  ndk  out  packages  prebuilt  sdk  system  

Android ICS 模擬器的編譯

編譯模擬器版本和之前方法同樣:ui

  1. . build/envsetup.sh  
  2. lunch sdk-eng  
  3. make  
編譯完成後工做目錄($TOP)裏增長了一個log文件 v8.log

Android ICS 模擬器的啓動

仍是老一套:
  1. $cd out/host/linux-x86/sdk/android-sdk_eng.xxx_linux-x86/tools  
  2. $./android list targets  
  3. Available Android targets:  
  4. ----------  
  5. id: 1 or "android-14"  
  6.      Name: Android 4.0  
  7.      Type: Platform  
  8.      API level: 14  
  9.      Revision: 2  
  10.      Skins: QVGA, WSVGA, HVGA, WVGA854, WXGA720, WQVGA432, WVGA800 (default), WQVGA400, WXGA800  
  11.      ABIs : armeabi-v7a  
  12.   
  13. $./android create avd -t 1 -n ics  
  14. Auto-selecting single ABI armeabi-v7a  
  15. Android 4.0 is a basic Android platform.  
  16. Do you wish to create a custom hardware profile [no]  
  17. Created AVD 'ics' based on Android 4.0, ARM (armeabi-v7a) processor,  
  18. with the following hardware config:  
  19. hw.lcd.density=240  
  20. vm.heapSize=24  
  21. hw.ramSize=512  
  22.   
  23. $./emulator -avd ics  
因而 emulator就起來了:

第一次起來後真難看啊。多是初始化沒有作好。關掉後從新啓動,這下子好多了:google


Homespa

Launcher:orm

 

Settings:htm

 

About:v8

 

版本顯示: android 的確是4.0.1   可是kernel 卻不是傳說中的3.0 啊。

 

並且,這個版本默認的就支持中文: (之前的sdk有沒有?)

常見的編譯錯誤及解決方案

出乎所料,編譯sdk居然沒有碰到任何編譯錯誤。 看樣子google仍是很厚道的,放出來的是完整的版本。不是有些人猜想的過濾版。 這樣子的話編譯出硬件版本應該不是大問題,不知道會不會立刻就有什麼 大米系統 流出...

 

---- Revision History -------------

2011-11-07     0.1        Initial version. Prepare title and framework of the ariticle and wait for ICS to come ...

2011-11-15     1.0        Update real content when ICS comes out.

-----------------------------------------

相關文章
相關標籤/搜索