2015/11/2

aosp. emulator and make sdk.

如果照 https://yaapb.wordpress.com/2012/09/22/build-a-custom-android-emulator-image/

直接 拉 googlesource 的 master 來build. 現在是 6.0

6.0 的 build system 好像變了,不是以前的 gnu Make, 變成 Ninja..
所以 build 到 41% 後出現 Jack connection fail...
--- Jack 是 android 的新 build system (ref: http://source.android.com/source/jack.html )

5.1.1 的話,會有 clang c++ library fail,
切到 5.0.1_r2 也一樣。

後來,make clean 後再 make 就 OK 了。
所以要看看是不是 5.1.1 也一樣 clean 後 OK

用 android-6.0.0_r1 這個branch 的話,也可以 build OK (full_x86)

用 android-5.0.2_r1 來 build aosp_x86
build 完後,which 看一下 emulator 的位置, 在 prebuilts/android-emulator/linux-x86_64/emulator
直接 run emulator, 他就會用 剛剛 build 好的 aosp_x86 image 來開機。
在 emulator 的 about 中可以看到 android system 的 build 版本。
----------------------------------------------
make sdk..

一樣,follow: https://android.googlesource.com/platform/sdk/+/master/docs/howto_build_SDK.txt
  $ cd ~/my-android-git
  $ . build/envsetup.sh
  $ lunch sdk-eng
  $ make sdk
這樣build 出 linux sdk
要build windows sdk 要 follow 後面說的,改用
  $ make win_sdk

需要tofrodos 跟 mingw32
----------------------------------
imx sdk

結果 fail:
make: *** [out/target/product/generic/obj/APPS/BasicDreams_intermediates/arm/package.odex] Aborted (core dumped)

因為是 generic 這個 platform fail..
所以 lunch 用 imx 的試試看...

還是 fail...
development/build/sdk.atree:193: couldn't locate source file: userdata.img
development/build/sdk.atree:482: couldn't locate source file: system/app/EmulatorSmokeTests/EmulatorSmokeTests.apk

ref: http://www.programgo.com/article/1118474640/

解決方法,跟google 到的一樣,把 sdk.atree 中,couldn't locate source file 的 item 都 comment 掉,再 make 一次就可以了。

-----------------------------------
aosp sdk
5.0.2_r1, aosp_x86-eng, make sdk..
development/build/sdk.atree:47: couldn't locate source file: bin/sqlite3
development/build/sdk.atree:49: couldn't locate source file: bin/etc1tool
development/build/sdk.atree:86: couldn't locate source file: bin/bcc_compat
development/build/sdk.atree:167: couldn't locate source file: framework/layoutlib.jar
development/build/sdk.atree:168: couldn't locate source file: framework/icu4j.jar
development/build/sdk.atree:481: couldn't locate source file: framework/layoutlib-tests.jar
development/build/sdk.atree:482: couldn't locate source file: system/app/EmulatorSmokeTests/EmulatorSmokeTests.apk
查.除了 sqlite3以外,真的都沒有 build 出來。
layoutlib 是給 eclipe 用的。

然後 JBQ 說: https://groups.google.com/forum/#!topic/android-building/kePECtbvGlE
lunch sdk-eng
make sdk

原來是有歷史的,..make sdk 要先..

沒有留言:

張貼留言