AOSP lunch wrong target

8.1k views Asked by At

First off I am new to android building and just wanted to start off with something simple, so I wanted to build AOSP 8.0 for my Xperia X (F5121) following the guide from Sony on how to build AOSP for unlocked devices.

So to start the build I type source build/envsetup.sh && lunch and get this :

Lunch menu... pick a combo:
 1. aosp_arm-eng
 2. aosp_arm64-eng
 3. aosp_mips-eng
 4. aosp_mips64-eng
 5. aosp_x86-eng
 6. aosp_x86_64-eng
 7. full_fugu-userdebug
 8. aosp_fugu-userdebug
 9. car_emu_arm64-userdebug
 10. car_emu_arm-userdebug
 11. car_emu_x86_64-userdebug
 12. car_emu_x86-userdebug
 13. mini_emulator_arm64-userdebug
 14. m_e_arm-userdebug
 15. m_e_mips64-eng
 16. m_e_mips-userdebug
 17. mini_emulator_x86_64-userdebug
 18. mini_emulator_x86-userdebug
 19. aosp_dragon-userdebug
 20. aosp_dragon-eng
 21. aosp_marlin-userdebug
 22. aosp_marlin_svelte-userdebug
 23. aosp_sailfish-userdebug
 24. aosp_angler-userdebug
 25. aosp_bullhead-userdebug
 26. aosp_bullhead_svelte-userdebug
 27. hikey-userdebug
 28. aosp_f8131-userdebug
 29. aosp_f8132-userdebug
 30. aosp_f8331-userdebug
 31. aosp_f8332-userdebug
 32. aosp_g8231-userdebug
 33. aosp_g8232-userdebug
 34. aosp_f5321-userdebug
 35. aosp_g8141-userdebug
 36. aosp_g8142-userdebug
 37. aosp_f5121-userdebug
 38. aosp_f5122-userdebug
 39. aosp_e2303-userdebug
 40. aosp_e2333-userdebug

Which would you like? [aosp_arm-eng] 37

============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=8.0.0
TARGET_PRODUCT=aosp_f5121
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_PLATFORM_VERSION=OPR1
TARGET_BUILD_APPS=
TARGET_ARCH=arm64
TARGET_ARCH_VARIANT=armv8-a
TARGET_CPU_VARIANT=cortex-a53
TARGET_2ND_ARCH=arm
TARGET_2ND_ARCH_VARIANT=armv7-a-neon
TARGET_2ND_CPU_VARIANT=cortex-a53.a57
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-4.4.0-31-generic-x86_64-with-Ubuntu-14.04-trusty
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=OPR6.170623.012
OUT_DIR=out
AUX_OS_VARIANT_LIST=

So far so good, but now after running the make command it gives me this:

PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=8.0.0
TARGET_PRODUCT=aosp_arm
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_PLATFORM_VERSION=OPR1
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a
TARGET_CPU_VARIANT=generic
TARGET_2ND_ARCH=
TARGET_2ND_ARCH_VARIANT=
TARGET_2ND_CPU_VARIANT=
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-4.4.0-31-generic-x86_64-with-Ubuntu-14.04-trusty
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=OPR6.170623.012
OUT_DIR=out
AUX_OS_VARIANT_LIST=

It just starts building erverytime for aosp_arm-eng even though I choosed my device in the lunch menu.

Running lunch aosp_f5121-userdebug changes nothing as it builds really everytime aosp_arm-eng instead of aosp_f5121-userdebug.

So am I doing something wrong or is that normal? But I assume it isn't normal.

Thanks.

2

There are 2 answers

1
Andrii Mykush On

I had similar issue during sudo make (without sudo I could not perform make, had "permission denied" error). The solution was to perform next command sequence:

  1. sudo su
  2. make clobber
  3. source build/envsetup.sh
  4. lunch
  5. make
0
develop1 On

Here are some things you could try

1) run make clobber then source build/envsetup.sh and only then run lunch.

This way if source build/envsetup.sh has a problem you can see it in the output.

2) Make sure that you got the correct binaries for your device and for the version of android you are building. It is also important that they are extracted properly.

3) aosp_arm-eng should still work on your device properly (if binaries are correct).

4) If all else fails, clear out everything in your build environment and start from scratch.