歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux編程 >> Linux編程 >> 在Ubuntu上編譯CyanogenMod 2.3 generic

在Ubuntu上編譯CyanogenMod 2.3 generic

日期:2017/3/1 10:40:52   编辑:Linux編程

在Ubuntu上編譯CM2.3 generic版,主要參考官方文檔:http://wiki.cyanogenmod.com/wiki/Android_SDK_Emulator:_Compile_CyanogenMod_(Linux)

在編譯過程中遇到的問題有:

1)Checking API: checkapi-last
Checking API: checkapi-current
(unknown): error 13: Class Android.app.Profile changed final qualifier

.....

******************************


You have tried to change the API from what has been previously approved.
To make these errors go away, you have two choices:
1) You can add "@hide" javadoc comments to the methods, etc. listed in the
errors above.
2) You can update current.xml by executing the following command:
make update-api
To submit the revised current.xml to the main Android repository,
you will need approval.
******************************
make: *** [out/target/common/obj/PACKAGING/checkapi-current-timestamp] Error 38


解決辦法:執行make update-api 後再編譯,順利完成。


2)編出來的鏡像在官方SDK下的模擬器上運行是黑屏,無任何顯示。

解決辦法:直接運行官方模擬器,也是黑屏,用emulator -verbose觀察發現

按照官方文檔Create a folder called android-10-cyanogen on Your/Android-SDK/platforms/方法,在新建

Vitual device時無論選擇第一個2.3.3還是第二個2.3.3,都是調用android-10-cyanogen中CM的鏡像,

在source.properties修改Platform.Version=2.3.7,用以區分系統原有鏡像和CM鏡像。
然後運行官方模擬器原有的系統鏡像正常,故還是CM編譯出來系統鏡像的問題。
emulator -verbose -show-kernel @cm2.3
運行出現錯誤:kernel panic - not syncing:attempted to kill init,屏幕黑屏無任何顯示。
在CM源碼中找到armv7的linux內核鏡像kernel kernel-qemu-armv7,拷到sdk相應目錄,再次執行
emulator -verbose -show-kernel @cm2.3 -kernel kernel-qemu-armv7,
成功在模擬器上運行CM源碼編譯的ROM啦。

更多關於CyanogenMod的詳細信息,或者下載地址請點這裡

Copyright © Linux教程網 All Rights Reserved