Google regularly update their guide for using Pixel devices to run Android Automotive (AAOS). The latest supported device is Pixel tablet. This guide serve as an archive of Google’s official guide about building and flashing with image of Android Automotive on Pixel 4a (5g) and Pixel 5.
Prerequisites
Before you continue, confirm you have the following items:
- OEM unlocking is required. Use either an unlocked Pixel 4a (5G) or Pixel 5
- Linux desktop capable of building Android code. For more information, see Establishing a Build Environment.
Code sync and build
- To sync Android build SP1A.210812.016.A1:mkdir aaos_on_phone
cd aaos_on_phone
repo init -u https://android.googlesource.com/platform/manifest -b android-12.0.0_r3 --use-superproject --partial-clone --partial-clone-exclude=platform/frameworks/base --clone-filter=blob:limit=10M
repo sync -j8 -c -q - Download the proprietary binaries and patches.
- Pixel 4a (5G). Download the 4a (5G) binaries, such as the vendor image and Qualcomm drivers for Android 12, build SP1A.210812.016.A1:
curl --output - https://dl.google.com/dl/android/aosp/google_devices-bramble-sp1a.210812.016.a1-a60d24d5.tgz | tar -xzvf -
tail -n +315 extract-google_devices-bramble.sh | tar -zxvf -curl --output - https://dl.google.com/dl/android/aosp/qcom-bramble-sp1a.210812.016.a1-3fa45eab.tgz | tar -xzvf -
tail -n +315 extract-qcom-bramble.sh | tar -xzvf - - Pixel 5. Download the Pixel 5 binaries, such as the vendor image and Qualcomm drivers for Android 12, build SP1A.210812.016.A1:
curl --output - https://dl.google.com/dl/android/aosp/google_devices-redfin-sp1a.210812.016.a1-8813b219.tgz | tar -xzvf -
tail -n +315 extract-google_devices-redfin.sh | tar -zxvf -
curl --output - https://dl.google.com/dl/android/aosp/qcom-redfin-sp1a.210812.016.a1-8d32b5b1.tgz | tar -xzvf -
tail -n +315 extract-qcom-redfin.sh | tar -xzvf -
- Pixel 4a (5G). Download the 4a (5G) binaries, such as the vendor image and Qualcomm drivers for Android 12, build SP1A.210812.016.A1:
- Run the build. Be sure to replace
<target>
in the following example with eitheraosp_bramble_car
oraosp_redfin_car
:. build/envsetup.sh
lunch <target>
m - Build the Automotive-related packages:
m [email protected] [email protected]
Set up the device to flash the build
If you haven’t already done so, enable Developer options. Go to Settings > System > About Phone and then tap Build Number seven times.
When you’ve enabled Developer options:
- Go to Settings > System > Developer options and enable USB debugging and OEM unlocking:
Flash the build
- To place the device into fastboot mode and then unlock it:
adb reboot bootloader
fastboot flashing unlock - On the device, select Unlock the Bootloader. Doing so erases all data on the device!
- To flash the build:
fastboot -w flashall
- After the build boots and the Home screen is displayed:
- To enable
adb remount
:
adb root && sleep 5 && adb disable-verity && sleep 1 && adb reboot && adb wait-for-device && sleep 5 && adb root && sleep 5 && adb remount2.
- To push the required Automotive-specific files to the device:
adb sync vendor
adb rebootWait for the device to start:
- To enable