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

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