2016-12-12 18:44:30 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
2017-09-26 03:43:27 +02:00
|
|
|
if [ ! -d $ANDROID_BUILD_TOP/hardware/interfaces ] ; then
|
2016-12-12 18:44:30 +01:00
|
|
|
echo "Where is hardware/interfaces?";
|
|
|
|
exit 1;
|
|
|
|
fi
|
|
|
|
|
2017-09-26 03:43:27 +02:00
|
|
|
if [ ! -d $ANDROID_BUILD_TOP/system/libhidl/transport ] ; then
|
2016-12-12 18:44:30 +01:00
|
|
|
echo "Where is system/libhidl/transport?";
|
|
|
|
exit 1;
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo "WARNING: This script changes files in many places."
|
|
|
|
|
|
|
|
# These files only exist to facilitate the easy transition to hidl.
|
|
|
|
|
|
|
|
options="-Lexport-header \
|
|
|
|
-randroid.hardware:hardware/interfaces \
|
|
|
|
-randroid.hidl:system/libhidl/transport"
|
|
|
|
|
|
|
|
# hardware/libhardware
|
|
|
|
hidl-gen $options \
|
2017-09-26 03:43:27 +02:00
|
|
|
-o $ANDROID_BUILD_TOP/hardware/libhardware/include/hardware/sensors-base.h \
|
2016-12-12 18:44:30 +01:00
|
|
|
android.hardware.sensors@1.0
|
|
|
|
hidl-gen $options \
|
2017-09-26 03:43:27 +02:00
|
|
|
-o $ANDROID_BUILD_TOP/hardware/libhardware/include/hardware/nfc-base.h \
|
2016-12-12 18:44:30 +01:00
|
|
|
android.hardware.nfc@1.0
|
2016-11-22 17:17:23 +01:00
|
|
|
hidl-gen $options \
|
2017-09-26 03:43:27 +02:00
|
|
|
-o $ANDROID_BUILD_TOP/hardware/libhardware/include/hardware/gnss-base.h \
|
2016-11-22 17:17:23 +01:00
|
|
|
android.hardware.gnss@1.0
|
2016-12-12 18:44:30 +01:00
|
|
|
|
|
|
|
# system/core
|
|
|
|
hidl-gen $options \
|
2017-12-12 22:38:07 +01:00
|
|
|
-o $ANDROID_BUILD_TOP/system/core/include/system/graphics-base-v1.0.h \
|
2016-12-12 18:44:30 +01:00
|
|
|
android.hardware.graphics.common@1.0
|
2017-12-12 22:38:07 +01:00
|
|
|
hidl-gen $options \
|
|
|
|
-o $ANDROID_BUILD_TOP/system/core/include/system/graphics-base-v1.1.h \
|
|
|
|
android.hardware.graphics.common@1.1
|
2018-10-10 01:09:12 +02:00
|
|
|
hidl-gen $options \
|
|
|
|
-o $ANDROID_BUILD_TOP/system/core/include/system/graphics-base-v1.2.h \
|
|
|
|
android.hardware.graphics.common@1.2
|
2016-12-12 18:44:30 +01:00
|
|
|
|
|
|
|
# system/media
|
2020-10-19 23:27:14 +02:00
|
|
|
hidl-gen $options \
|
|
|
|
-o $ANDROID_BUILD_TOP/system/media/audio/include/system/audio_common-base.h \
|
|
|
|
android.hardware.audio.common@7.0
|
2016-12-12 18:44:30 +01:00
|
|
|
hidl-gen $options \
|
2022-02-14 20:08:09 +01:00
|
|
|
-o $ANDROID_BUILD_TOP/system/media/audio/include/system/audio-base-v7.0.h \
|
2020-10-19 23:27:14 +02:00
|
|
|
android.hardware.audio@7.0
|
2022-02-14 20:08:09 +01:00
|
|
|
hidl-gen $options \
|
|
|
|
-o $ANDROID_BUILD_TOP/system/media/audio/include/system/audio-base-v7.1.h \
|
|
|
|
android.hardware.audio@7.1
|
2016-12-12 18:44:30 +01:00
|
|
|
hidl-gen $options \
|
2017-09-26 03:43:27 +02:00
|
|
|
-o $ANDROID_BUILD_TOP/system/media/audio/include/system/audio_effect-base.h \
|
2020-10-19 23:27:14 +02:00
|
|
|
android.hardware.audio.effect@7.0
|