1#!/bin/bash
2# Enable VHAL mode on userdebug and eng build.
3echo "Turning on Fake VHAL mode" \
4  && touch /tmp/ENABLE \
5  && echo "restarting adb shell as root" \
6  && adb root \
7  && adb wait-for-device \
8  && adb push /tmp/ENABLE /data/system/car/fake_vhal_config/ENABLE \
9  && echo "restarting adb shell" \
10  && adb shell stop \
11  && adb shell start \
12  && echo "waiting 10s for car service to start" \
13  && adb wait-for-device \
14  && sleep 10s \
15  && adb shell cmd car_service check-fake-vhal