Search code examples
raspberry-pi4android-buildandroid-12android-automotive

Android Automotive OS (API 31+) on Raspberry Pi stuck on startup


I am trying to build an Android image for Raspberry Pi 4B with Android Automotive OS instead of the usual Android. Following the instructions on this repository worked from the repo sync down to the generated files I have to put onto my SD card.

The problem arises once I put the newly formatted SD card into the RPi 4b. The rainbow screen appears, goes away and then the boot animation for AAOS appears... And stays on it for an indefinite time.

I did try to do the same with the original repository, modified some config to make it Automotive. I even went to a third repository and my luck failed there as well...

The modification I added was this line in the rpi4.mk file
$(call inherit-product, packages/services/Car/car_product/build/car.mk)

To add: On the latter 2 builds I did try the pure Android RPi without Automotive modification, which booted perfectly fine. And currently we are working with an image of AAOS Version 11 (API 30) on a Raspberry Pi (albeit with some hiccups)

My question(s):

  • Am I missing more configuration?
  • Is it possible to build AAOS on Version 12 (especially for the Raspberry Pi)?

Solution

  • I resolved it and wrote my (partial) answer on this Groups conversation.

    Back to the start, I found a way to get Debugging out of a Raspberry Pi 4 with Android while booting by following this tutorial. With that, my PC was able to detect the Raspberry Pi as an Android device in ADB (I used a USB-C to USB-C cable. Power was sufficient).

    Doing adb bugreport and going through the logs, I discovered, that there is a service, which doesn't start, because it needs GPS, which (obviously) the Raspberry Pi 4 doesn't have in-built.

    Removing the line, which initialize the service and then AAOS 12 booted as usual.

    The files I added to the build might bloat the system, but for the sole purpose of having AAOS 12 running, I can't complain.

    TL;DR: Follow these steps to get AAOS 12.