Pixel Phones as Development Platforms

Stay organized with collections Save and categorize content based on your preferences.

The Automotive partner teams who develop front-end software need a Google-supported hardware platform on which to develop apps and user experiences.

Caveats

These limitations apply when using a Pixel 4a (5G) and Pixel 5 as development platforms:

  • The Pixel 4a (5G) and Pixel 5 are verified and supported. To learn more about the Pixel, visit the Google Store.

  • The following devices are supported but not actively tested. Be sure to download the correct binaries and then follow the steps below:
    • Pixel 3a
    • Pixel 3aXL
    • Pixel 4
    • Pixel 4XL
    • Pixel 4a
    • Pixel 6 and 6 Pro (experimental)
  • You must use Android 12, build SP1A.210812.016.A1.

  • Support is not provided for All Bluetooth profiles.

Prerequisites

Before you continue, confirm you have the following items:

  1. OEM unlocking is required. Use either an unlocked Pixel 4a (5G) or Pixel 5
  2. Linux desktop capable of building Android code. For more information, see Establishing a Build Environment.

Code sync and build

  1. 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
    
  2. Download the proprietary binaries and patches.
    1. 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 -
      
    2. 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 -
      
  3. Run the build. Be sure to replace <target> in the following example with either aosp_bramble_car or aosp_redfin_car:
    . build/envsetup.sh
    lunch <target>
    m
    
  4. Build the Automotive-related packages:
    m android.hardware.automotive.audiocontrol@1.0-service android.hardware.automotive.vehicle@2.0-service
    

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:

  1. Go to Settings > System > Developer options and enable USB debugging and OEM unlocking:
USB bebugging OEM unlocking

Flash the build

  1. To place the device into fastboot mode and then unlock it:
    adb reboot bootloader
    fastboot flashing unlock
    
  2. On the device, select Unlock the Bootloader. Doing so erases all data on the device!
  3. To flash the build:
    fastboot -w flashall
    
  4. After the build boots and the Home screen is displayed:
    1. 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 remount
      
    2. To push the required Automotive-specific files to the device:
      adb sync vendor
      adb reboot
      
    3. Wait for the device to start:

    Experimental

    Pixel 6 and 6 Pro are supported on an experimental basis. We're working to bring these devices out of the experimental stage.

    Make sure you have satisfied each prerequisite listed above:

    Code sync and build

    • Sync android-12.0.0_r4 (SD1A.210817.015.A4)
    • Download the correct binaries for Oriole (P6) and Raven(P6 Pro) for SD1A.210817.015.A4 from https://developers.google.com/android/drivers
    • Cherrypick the Android 12 patches.
    • Build aosp_oriole_car (Pixel 6) or aosp_raven_car (Pixel 6 Pro).
    • The AAOS build artifacts.
    • m android.hardware.automotive.audiocontrol@1.0-service android.hardware.automotive.vehicle@2.0-service
      
    • Flash device and enable adb remount as described in above in Step 4 remount
    • Push AAOS artifacts to the device
    • FILES="bin/hw/android.hardware.automotive.vehicle@2.0-service bin/hw/android.hardware.automotive.audiocontrol@1.0-service lib64/android.automotive.watchdog-V2-ndk_platform.so lib64/android.hardware.automotive.audiocontrol@1.0.so lib64/android.automotive.watchdog-V2-ndk_platform.so lib64/android.hardware.automotive.vehicle@2.0.so etc/vintf/manifest/android.hardware.automotive.vehicle@2.0-service.xml etc/vintf/manifest/audiocontrol_manifest.xml etc/init/android.hardware.automotive.audiocontrol@1.0-service.rc etc/init/android.hardware.automotive.vehicle@2.0-service.rc"; for F in $FILES ; do echo writing $F; adb push $OUT/vendor/$F vendor/$F ; done
      adb reboot
      
    • Optional to fix display density use following command
    • adb shell wm density 240
      adb reboot