今天在網上找到了源碼本身先保留下html
通過漫長的等待, android4.0 (Ice Cream Sandwich)的源碼終於放出來了 (下載,編譯運行 android ICS 的經驗。 如下是詳細內容:linux
Android ICS 下載
http://source.android.com/source/downloading.html 上有 最新的ICS 源代碼同步的地址。若是環境已經設置好了的話,同步最新的代碼很是的簡單:android
- $ mkdir WORKING_DIRECTORY
- $ cd WORKING_DIRECTORY
-
- $ repo init -u https://android.googlesource.com/platform/manifest -b android-4.0.1_r1
-
- $repo sync
下載完成後主要包含一下目錄:ionic
- abi bionic bootable build cts dalvik development device docs external frameworks hardware libcore Makefile ndk out packages prebuilt sdk system
Android ICS 模擬器的編譯
編譯模擬器版本和之前方法同樣:ui
- . build/envsetup.sh
- lunch sdk-eng
- make
編譯完成後工做目錄($TOP)裏增長了一個log文件 v8.log
Android ICS 模擬器的啓動
仍是老一套:
- $cd out/host/linux-x86/sdk/android-sdk_eng.xxx_linux-x86/tools
- $./android list targets
- Available Android targets:
- ----------
- id: 1 or "android-14"
- Name: Android 4.0
- Type: Platform
- API level: 14
- Revision: 2
- Skins: QVGA, WSVGA, HVGA, WVGA854, WXGA720, WQVGA432, WVGA800 (default), WQVGA400, WXGA800
- ABIs : armeabi-v7a
-
- $./android create avd -t 1 -n ics
- Auto-selecting single ABI armeabi-v7a
- Android 4.0 is a basic Android platform.
- Do you wish to create a custom hardware profile [no]
- Created AVD 'ics' based on Android 4.0, ARM (armeabi-v7a) processor,
- with the following hardware config:
- hw.lcd.density=240
- vm.heapSize=24
- hw.ramSize=512
-
- $./emulator -avd ics
因而 emulator就起來了:
![](http://static.javashuo.com/static/loading.gif)
第一次起來後真難看啊。多是初始化沒有作好。關掉後從新啓動,這下子好多了:google
Homespa
![](http://static.javashuo.com/static/loading.gif)
Launcher:orm
![](http://static.javashuo.com/static/loading.gif)
Settings:htm
![](http://static.javashuo.com/static/loading.gif)
About:v8
![](http://static.javashuo.com/static/loading.gif)
版本顯示: android 的確是4.0.1 可是kernel 卻不是傳說中的3.0 啊。
並且,這個版本默認的就支持中文: (之前的sdk有沒有?)
![](http://static.javashuo.com/static/loading.gif)
常見的編譯錯誤及解決方案
出乎所料,編譯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.
-----------------------------------------