jayanth vutukuri
jayanth vutukuri

Reputation: 15

How ro run emulator with aosp 10(Q) source code

I downloaded the aosp 10(Q)source code with repo init -u https://android.googlesource.com/platform/manifest -b android-10.0.0_r40 ,
repo sync. To run emulator, i started building the code with source build/envsetup.sh. I was confused to select which lunch option to run emulator. Here are the lunch options present :

 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

Please tell me which lunch option is used to run emulator in aosp Q.

Upvotes: 0

Views: 2470

Answers (1)

Lakindu
Lakindu

Reputation: 960

According to Android documentation (Android Emulator > Building AVD images), you should choose lunch sdk_phone_x86 or lunch sdk_phone_x86_64.

You should choose this option according to your machine's CPU architecture. If you are using Ubuntu machine, use the command lscpu to check your CPU architecture in a terminal. If it says x86_64, then choose sdk_phone_x86_64 lunch option. If you choose the lunch option like this, it would make Android images that run really fast on your machine.

But if you need to run system apps/system services/executables/libraries that are built only for arm or arm64 architecture, you can still build Android images for arm/arm64 and run them on your machine. To build arm64 images you can choose sdk_phone_arm64 lunch option. But running arm Android images on your x86 machine will be very slow.

You can see all the options you have for emulator like this :

$ 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

Upvotes: 2

Related Questions