1#!/bin/bash
2
3set -ex
4
5if [[ "$@" != *"--no-reboot"* ]]; then
6    adb reboot recovery
7    echo "Waiting for device to boot into recovery..."
8    adb wait-for-recovery
9fi
10adb root
11adb wait-for-recovery
12
13# There is no /data in recovery unless mounted.
14# Push test to /system directory in the recovery ramdisk
15adb push ${ANDROID_PRODUCT_OUT}/data/nativetest64/vintf_object_recovery_test/vintf_object_recovery_test \
16       /system/bin/vintf_object_recovery_test
17
18adb shell /system/bin/vintf_object_recovery_test
19