Tuesday, September 21, 2021

Android BSP BUILDTYPE internals: user vs userdebug

Android documentation states that:

The userdebug build should behave the same as the user build, with the ability to enable additional debugging that normally violates the security model of the platform.

Sometimes the actual build behavior is not as expected and we need to check what are the differences between user and userdebug. It starts with the lunch command:

$ lunch aosp_arm-user

The BUILDTYPE flag is saved in the shell environment as $TARGET_BUILD_VARIANT.

I tracked down AOSP source for $TARGET_BUILD_VARIANT.

The diagram shows some of the most interesting occurrences.

1st thing for the further investigation is a difference between 2
KERNEL_DEFCONFIG files.