#!/usr/bin/env bash
set -euo pipefail

out_adevtool_deps/host/linux-x86/bin/bpmodify -w -m android.hardware.automotive.vehicle.property -parameter frozen -set-bool false hardware/interfaces/automotive/vehicle/aidl_property/Android.bp
mkdir -p hardware/interfaces/automotive/vehicle/aidl_property/aidl_api/android.hardware.automotive.vehicle.property/current
rsync --recursive --update --delete-before out_adevtool_deps/soong/.intermediates/hardware/interfaces/automotive/vehicle/aidl_property/android.hardware.automotive.vehicle.property_interface/dump/* hardware/interfaces/automotive/vehicle/aidl_property/aidl_api/android.hardware.automotive.vehicle.property/current
out_adevtool_deps/host/linux-x86/bin/bpmodify -w -m android.hardware.automotive.vehicle.property -parameter versions -remove-property hardware/interfaces/automotive/vehicle/aidl_property/Android.bp
