Using Pixel 3 XL as a Development Platform

The Automotive partner teams who develop front-end software need a Google-supported hardware platform on which to develop apps and user experiences. The Pixel 3 XL is provided for these purposes.

Caveats

These limitations apply when using the Pixel 3 XL as a development platform:

  • Only the Pixel 3 XL is supported.

  • The Pixel 3 XL works only with AOSP 10 build QP1A.190711.020.

  • Bluetooth profiles are not supported.

Prerequisites

Before you continue, confirm you have the following items:

Code sync and build

  1. To sync with AOSP build QP1A.190711.020, run:
    mkdir aosp_crosshatch
    cd aosp_crosshatch
    repo init -u https://android.googlesource.com/platform/manifest -b
    android-10.0.0_r2
    repo sync -j4 -c -q
    
  2. To download the Pixel 3 XL binaries, such as the vendor image and Qualcomm drivers for Android 10 (QP1A.190711.020), run:

    curl --output -
    https://dl.google.com/dl/android/aosp/google_devices-crosshatch-q
    p1a.190711.020-861edfad.tgz | tar -xzvf -
    
    tail -n +315 extract-google_devices-crosshatch.sh | tar -zxvf -
    
    curl --output https://dl.google.com/dl/android/aosp/qcom-crosshatch-qp1a.190711.020-f44a22d8.tgz | tar -xzvf -
    
    tail -n +315 extract-qcom-crosshatch.sh | tar -xzvf -
    
  3. To apply patches, run:

    cd device
    #Clone google_car repo
    git clone https://android.googlesource.com/device/google_car &&
    (cd google_car && f=`git rev-parse --git-dir`/hooks/commit-msg ;
    mkdir -p $(dirname $f) ; curl -Lo $f
    https://gerrit-review.googlesource.com/tools/hooks/commit-msg ; chmod +x $f)
    
    cd google_car
    # the Car patch
    git fetch "https://android.googlesource.com/device/google_car"
    refs/changes/79/1125979/1 && git cherry-pick FETCH_HEAD
    
    cd ../..
    
  4. To apply additional patches, change the following line in device/google/crosshatch/device.mk:

    From:

    PRODUCT_PRODUCT_PROPERTIES += \
         ro.adb.secure=1
    

    To:

    PRODUCT_PRODUCT_PROPERTIES += \
         ro.adb.secure=0
    
  5. To build aosp_crosshatch_car, run:

    . build/envsetup.sh
    lunch aosp_crosshatch_car
    m
    
  6. To build packages specific to Automotive, run:

    m android.hardware.automotive.audiocontrol@1.0-service
    android.hardware.automotive.vehicle@2.0-service
    

Set up the Pixel 3 XL to flash the build

Note: To enable Developer options, go to Settings > System > About Phone and then tap Build Number seven times.

  1. To enable USB Debugging (ADB), go to Settings > System > Developer options:

    USB debugging
  2. To enable OEM Unlocking, go to Settings > System > Developer options:

    OEM unlocking></p>
  </li>
</ol>

<h2>Flash the build</h2>

<ol>
  <li>
    <p>To place the device into fastboot mode and unlock it, run:</p>

<pre class= adb reboot bootloader fastboot flashing unlock

  1. On the device, select Unload the Bootloader. Doing so erases all data on the device!

  2. To flash the build, run:

    fastboot -w flashall
    
  3. After the build boots and the Home screen is displayed, enable adb remount:

    adb disable-verity
    adb reboot
    adb root
    adb remount
    
  4. To push the required Automotive-specific files to the device, run:

    adb sync vendor
    adb reboot
    
  5. Wait for the device to start: