經(jīng)過漫長的等待, android4.0 (Ice Cream Sandwich)的源碼終于放出來了 (三星說,嘿嘿,我的產(chǎn)品已經(jīng)開賣了好幾個(gè)星期了,不要意思,又領(lǐng)先了一步),本博客將在第一時(shí)間與大家分享,下載,編譯運(yùn)行 android ICS 的經(jīng)驗(yàn)。 以下是詳細(xì)內(nèi)容:
Android ICS 下載
http://source.android.com/source/downloading.html 上有 最新的ICS 源代碼同步的地址。如果環(huán)境已經(jīng)設(shè)置好了的話,同步最新的代碼非常的簡單:
- $ mkdir WORKING_DIRECTORY
- $ cd WORKING_DIRECTORY
-
- $ repo init -u https://android.googlesource.com/platform/manifest -b android-4.0.1_r1
-
- $repo sync
下載完成后主要包含一下目錄:
- abi bionic bootable build cts dalvik development device docs external frameworks hardware libcore Makefile ndk out packages prebuilt sdk system
Android ICS 模擬器的編譯
編譯模擬器版本和以前方法一樣:
- . build/envsetup.sh
- lunch sdk-eng
- make
編譯完成后工作目錄($TOP)里增加了一個(gè)log文件 v8.log
Android ICS 模擬器的啟動(dòng)
還是老一套:
- $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就起來了:
第一次起來后真難看啊??赡苁浅跏蓟瘺]有做好。關(guān)掉后重新啟動(dòng),這下子好多了:
Home
Launcher:
Settings:
About:
版本顯示: android 的確是4.0.1 但是kernel 卻不是傳說中的3.0 啊。
而且,這個(gè)版本默認(rèn)的就支持中文: (以前的sdk有沒有?)
常見的編譯錯(cuò)誤及解決方案
出乎所料,編譯sdk竟然沒有碰到任何編譯錯(cuò)誤。 看樣子google還是很厚道的,放出來的是完整的版本。不是有些人猜測的過濾版。 這樣子的話編譯出硬件版本應(yīng)該不是大問題,不知道會(huì)不會(huì)馬上就有什么 大米系統(tǒng) 流出...
---- 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.
本站僅提供存儲(chǔ)服務(wù),所有內(nèi)容均由用戶發(fā)布,如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請
點(diǎn)擊舉報(bào)。