# Android Auto (Gearhead) on a Google Play image.
#
# The app ships as an .xapk bundle: a base APK plus split APKs. dorker installs them
# together. The file is not committed: when it is missing, dorker runs ./fetch.sh (the FETCH
# line below), which downloads the latest with apkeep. Delete the file to fetch it again.
#
# This needs a Play Store image: the plain google_apis image has an Android Auto stub signed
# with the AOSP test key, which a Google-signed Android Auto cannot replace
# (INSTALL_FAILED_UPDATE_INCOMPATIBLE). The Play image's stub is Google-signed.
FROM android:36-playstore

MEMORY 3GB
CPUS 2
DISK 6GB

DEVICE pixel_7
HEADLESS true

INSTALL ./com.google.android.projection.gearhead.xapk
FETCH ./fetch.sh

# Runs once, when the image is built: turns on Android Auto's developer mode and starts its
# head unit server. The snapshot below keeps it running.
PROVISION ./enable-dev-mode.sh

SETTING window_animation_scale 0
SETTING transition_animation_scale 0
SETTING animator_duration_scale 0

SNAPSHOT ready
