1#!/bin/bash 2 3if [ ! -d $ANDROID_BUILD_TOP/hardware/interfaces ] ; then 4 echo "Where is hardware/interfaces?"; 5 exit 1; 6fi 7 8if [ ! -d $ANDROID_BUILD_TOP/system/libhidl/transport ] ; then 9 echo "Where is system/libhidl/transport?"; 10 exit 1; 11fi 12 13echo "WARNING: This script changes files in many places." 14 15# These files only exist to facilitate the easy transition to hidl. 16 17options="-Lexport-header \ 18 -randroid.hardware:hardware/interfaces \ 19 -randroid.hidl:system/libhidl/transport" 20 21# hardware/libhardware 22hidl-gen $options \ 23 -o $ANDROID_BUILD_TOP/hardware/libhardware/include/hardware/sensors-base.h \ 24 android.hardware.sensors@1.0 25hidl-gen $options \ 26 -o $ANDROID_BUILD_TOP/hardware/libhardware/include/hardware/nfc-base.h \ 27 android.hardware.nfc@1.0 28hidl-gen $options \ 29 -o $ANDROID_BUILD_TOP/hardware/libhardware/include/hardware/gnss-base.h \ 30 android.hardware.gnss@1.0 31 32# system/core 33hidl-gen $options \ 34 -o $ANDROID_BUILD_TOP/system/core/include/system/graphics-base-v1.0.h \ 35 android.hardware.graphics.common@1.0 36hidl-gen $options \ 37 -o $ANDROID_BUILD_TOP/system/core/include/system/graphics-base-v1.1.h \ 38 android.hardware.graphics.common@1.1 39hidl-gen $options \ 40 -o $ANDROID_BUILD_TOP/system/core/include/system/graphics-base-v1.2.h \ 41 android.hardware.graphics.common@1.2 42 43# system/media 44hidl-gen $options \ 45 -o $ANDROID_BUILD_TOP/system/media/audio/include/system/audio-base.h \ 46 android.hardware.audio.common@2.0 47hidl-gen $options \ 48 -o $ANDROID_BUILD_TOP/system/media/audio/include/system/audio_effect-base.h \ 49 android.hardware.audio.effect@2.0 50