gongzhiyao0 2012-01-05
在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的详细信息,或者下载地址请点这里