After building Android Automotive from source, how do I
This is how I got it to work on Android 8.1.0 branch OPM5.171019.017:
$ source ./build/envsetup.sh
$ lunch aosp_car_x86_64-eng
$ emulator
Followed by the below output on the terminal:
emulator: WARNING: system partition size adjusted to match image file (2562 MB > 200 MB)
emulator: WARNING: data partition size adjusted to match image file (550 MB > 200 MB)
warning: host doesn't support requested feature: CPUID.80000001H:ECX.sse4a [bit 6]
warning: host doesn't support requested feature: CPUID.80000001H:ECX.sse4a [bit 6]
And the android emulator display shows up booting android automotive. I would recommend you try building the engineering version if the above solution does not work in userdebug mode. Please share the stack trace for further analysis.
About the second part of your question. I think you are mixing up android auto with android automotive.
Android Auto is just an app and can be deployed/setup using an APK and some minor tweaking, while Android Automotive is a customized version of android designed specifically for the automotive industry with its own set of system applications. Therefore, it cannot be simply deployed on a device by just installing an APK.