【问题标题】:How ro run emulator with aosp 10(Q) source code如何使用 aosp 10(Q) 源代码运行模拟器
【发布时间】:2020-07-30 15:58:25
【问题描述】:

我下载了 aosp 10(Q) 源代码 repo init -u https://android.googlesource.com/platform/manifest -b android-10.0.0_r40
repo sync。为了运行模拟器,我开始使用source build/envsetup.sh 构建代码。我很困惑选择运行模拟器的午餐选项。以下是目前的午餐选择:

 1. aosp_arm-eng
 2. aosp_arm64-eng
 3. aosp_blueline-userdebug
 4. aosp_bonito-userdebug
 5. aosp_car_arm-userdebug
 6. aosp_car_arm64-userdebug
 7. aosp_car_x86-userdebug
 8. aosp_car_x86_64-userdebug
 9. aosp_cf_arm64_phone-userdebug
 10. aosp_cf_x86_64_phone-userdebug
 11. aosp_cf_x86_auto-userdebug
 12. aosp_cf_x86_phone-userdebug
 13. aosp_cf_x86_tv-userdebug
 14. aosp_coral-userdebug
 15. aosp_coral_car-userdebug
 16. aosp_crosshatch-userdebug
 17. aosp_crosshatch_car-userdebug
 18. aosp_flame-userdebug
 19. aosp_marlin-userdebug
 20. aosp_sailfish-userdebug
 21. aosp_sargo-userdebug
 22. aosp_taimen-userdebug
 23. aosp_walleye-userdebug
 24. aosp_walleye_test-userdebug
 25. aosp_x86-eng
 26. aosp_x86_64-eng
 27. beagle_x15-userdebug
 28. car_x86_64-userdebug
 29. fuchsia_arm64-eng
 30. fuchsia_x86_64-eng
 31. hikey-userdebug
 32. hikey64_only-userdebug
 33. hikey960-userdebug
 34. hikey960_tv-userdebug
 35. hikey_tv-userdebug
 36. m_e_arm-userdebug
 37. mini_emulator_arm64-userdebug
 38. mini_emulator_x86-userdebug
 39. mini_emulator_x86_64-userdebug
 40. poplar-eng
 41. poplar-user
 42. poplar-userdebug
 43. qemu_trusty_arm64-userdebug
 44. uml-userdebug

请告诉我在 aosp Q 中使用哪个午餐选项来运行模拟器。

【问题讨论】:

标签: android build android-source


【解决方案1】:

根据 Android 文档 (Android Emulator > Building AVD images), 你应该选择lunch sdk_phone_x86lunch sdk_phone_x86_64

您应该根据您机器的 CPU 架构选择此选项。 如果您使用的是 Ubuntu 机器,请使用命令 lscpu 在终端中检查您的 CPU 架构。 如果显示x86_64,则选择sdk_phone_x86_64 午餐选项。 如果您选择这样的午餐选项,它会使 Android 图像在您的机器上运行得非常快。

但如果您需要运行仅为 arm 或 arm64 架构构建的系统应用程序/系统服务/可执行文件/库,您仍然可以为 arm/arm64 构建 Android 映像并在您的机器上运行它们。 要构建arm64 图像,您可以选择sdk_phone_arm64 午餐选项。 但是在你的 x86 机器上运行 arm Android 镜像会很慢。

您可以像这样查看模拟器的所有选项:

$ cd <aosp_root_dir>
$ ls -l build/make/target/product/sdk_phone_*

# Output :-
# sdk_phone_arm64.mk
# sdk_phone_armv7.mk
# sdk_phone_x86_64.mk
# sdk_phone_x86.mk

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2013-06-01
    • 2012-02-19
    • 1970-01-01
    • 2019-12-06
    • 1970-01-01
    • 2013-06-03
    • 2011-12-29
    相关资源
    最近更新 更多