Merge "Update comments for vendor-specific parameters API."
diff --git a/Android.bp b/Android.bp
index 7ae00b6..978559a 100644
--- a/Android.bp
+++ b/Android.bp
@@ -2,6 +2,11 @@
     "*"
 ]
 
+hidl_package_root {
+    name: "android.hardware",
+    path: "hardware/interfaces",
+}
+
 cc_defaults {
     name: "hidl_defaults",
     cflags: [
diff --git a/audio/2.0/Android.bp b/audio/2.0/Android.bp
index db3efbc..1643c12 100644
--- a/audio/2.0/Android.bp
+++ b/audio/2.0/Android.bp
@@ -1,7 +1,11 @@
-// This file is autogenerated by hidl-gen. Do not edit manually.
+// This file is autogenerated by hidl-gen -Landroidbp.
 
-filegroup {
-    name: "android.hardware.audio@2.0_hal",
+hidl_interface {
+    name: "android.hardware.audio@2.0",
+    root: "android.hardware",
+    vndk: {
+        enabled: true,
+    },
     srcs: [
         "types.hal",
         "IDevice.hal",
@@ -12,209 +16,21 @@
         "IStreamOut.hal",
         "IStreamOutCallback.hal",
     ],
-}
-
-genrule {
-    name: "android.hardware.audio@2.0_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.audio@2.0",
-    srcs: [
-        ":android.hardware.audio@2.0_hal",
-    ],
-    out: [
-        "android/hardware/audio/2.0/types.cpp",
-        "android/hardware/audio/2.0/DeviceAll.cpp",
-        "android/hardware/audio/2.0/DevicesFactoryAll.cpp",
-        "android/hardware/audio/2.0/PrimaryDeviceAll.cpp",
-        "android/hardware/audio/2.0/StreamAll.cpp",
-        "android/hardware/audio/2.0/StreamInAll.cpp",
-        "android/hardware/audio/2.0/StreamOutAll.cpp",
-        "android/hardware/audio/2.0/StreamOutCallbackAll.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.audio@2.0_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.audio@2.0",
-    srcs: [
-        ":android.hardware.audio@2.0_hal",
-    ],
-    out: [
-        "android/hardware/audio/2.0/types.h",
-        "android/hardware/audio/2.0/hwtypes.h",
-        "android/hardware/audio/2.0/IDevice.h",
-        "android/hardware/audio/2.0/IHwDevice.h",
-        "android/hardware/audio/2.0/BnHwDevice.h",
-        "android/hardware/audio/2.0/BpHwDevice.h",
-        "android/hardware/audio/2.0/BsDevice.h",
-        "android/hardware/audio/2.0/IDevicesFactory.h",
-        "android/hardware/audio/2.0/IHwDevicesFactory.h",
-        "android/hardware/audio/2.0/BnHwDevicesFactory.h",
-        "android/hardware/audio/2.0/BpHwDevicesFactory.h",
-        "android/hardware/audio/2.0/BsDevicesFactory.h",
-        "android/hardware/audio/2.0/IPrimaryDevice.h",
-        "android/hardware/audio/2.0/IHwPrimaryDevice.h",
-        "android/hardware/audio/2.0/BnHwPrimaryDevice.h",
-        "android/hardware/audio/2.0/BpHwPrimaryDevice.h",
-        "android/hardware/audio/2.0/BsPrimaryDevice.h",
-        "android/hardware/audio/2.0/IStream.h",
-        "android/hardware/audio/2.0/IHwStream.h",
-        "android/hardware/audio/2.0/BnHwStream.h",
-        "android/hardware/audio/2.0/BpHwStream.h",
-        "android/hardware/audio/2.0/BsStream.h",
-        "android/hardware/audio/2.0/IStreamIn.h",
-        "android/hardware/audio/2.0/IHwStreamIn.h",
-        "android/hardware/audio/2.0/BnHwStreamIn.h",
-        "android/hardware/audio/2.0/BpHwStreamIn.h",
-        "android/hardware/audio/2.0/BsStreamIn.h",
-        "android/hardware/audio/2.0/IStreamOut.h",
-        "android/hardware/audio/2.0/IHwStreamOut.h",
-        "android/hardware/audio/2.0/BnHwStreamOut.h",
-        "android/hardware/audio/2.0/BpHwStreamOut.h",
-        "android/hardware/audio/2.0/BsStreamOut.h",
-        "android/hardware/audio/2.0/IStreamOutCallback.h",
-        "android/hardware/audio/2.0/IHwStreamOutCallback.h",
-        "android/hardware/audio/2.0/BnHwStreamOutCallback.h",
-        "android/hardware/audio/2.0/BpHwStreamOutCallback.h",
-        "android/hardware/audio/2.0/BsStreamOutCallback.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.audio@2.0",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.audio@2.0_genc++"],
-    generated_headers: ["android.hardware.audio@2.0_genc++_headers"],
-    export_generated_headers: ["android.hardware.audio@2.0_genc++_headers"],
-    vendor_available: true,
-    vndk: {
-        enabled: true,
-    },
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
+    interfaces: [
         "android.hardware.audio.common@2.0",
+        "android.hidl.base@1.0",
     ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-        "android.hardware.audio.common@2.0",
+    types: [
+        "AudioDrain",
+        "DeviceAddress",
+        "MessageQueueFlagBits",
+        "MmapBufferInfo",
+        "MmapPosition",
+        "ParameterValue",
+        "Result",
+        "TimeSpec",
     ],
+    gen_java: false,
+    gen_java_constants: true,
 }
 
-// This package is not java compatible. Not creating java target.
-
-genrule {
-    name: "android.hardware.audio-V2.0-java-constants_gen_java",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Ljava-constants -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.audio@2.0",
-    srcs: [
-        ":android.hardware.audio@2.0_hal",
-    ],
-    out: [
-        "android/hardware/audio/V2_0/Constants.java",
-    ],
-}
-
-java_library {
-    name: "android.hardware.audio-V2.0-java-constants",
-    no_framework_libs: true,
-    defaults: ["hidl-java-module-defaults"],
-    srcs: [":android.hardware.audio-V2.0-java-constants_gen_java"],
-}
-
-genrule {
-    name: "android.hardware.audio@2.0-adapter-helper_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.audio@2.0",
-    srcs: [
-        ":android.hardware.audio@2.0_hal",
-    ],
-    out: [
-        "android/hardware/audio/2.0/ADevice.cpp",
-        "android/hardware/audio/2.0/ADevicesFactory.cpp",
-        "android/hardware/audio/2.0/APrimaryDevice.cpp",
-        "android/hardware/audio/2.0/AStream.cpp",
-        "android/hardware/audio/2.0/AStreamIn.cpp",
-        "android/hardware/audio/2.0/AStreamOut.cpp",
-        "android/hardware/audio/2.0/AStreamOutCallback.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.audio@2.0-adapter-helper_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.audio@2.0",
-    srcs: [
-        ":android.hardware.audio@2.0_hal",
-    ],
-    out: [
-        "android/hardware/audio/2.0/ADevice.h",
-        "android/hardware/audio/2.0/ADevicesFactory.h",
-        "android/hardware/audio/2.0/APrimaryDevice.h",
-        "android/hardware/audio/2.0/AStream.h",
-        "android/hardware/audio/2.0/AStreamIn.h",
-        "android/hardware/audio/2.0/AStreamOut.h",
-        "android/hardware/audio/2.0/AStreamOutCallback.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.audio@2.0-adapter-helper",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.audio@2.0-adapter-helper_genc++"],
-    generated_headers: ["android.hardware.audio@2.0-adapter-helper_genc++_headers"],
-    export_generated_headers: ["android.hardware.audio@2.0-adapter-helper_genc++_headers"],
-    vendor_available: true,
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-        "libhidladapter",
-        "android.hardware.audio.common@2.0",
-        "android.hardware.audio@2.0",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-        "libhidladapter",
-        "android.hardware.audio.common@2.0",
-        "android.hardware.audio@2.0",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-}
-
-genrule {
-    name: "android.hardware.audio@2.0-adapter_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-main -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.audio@2.0",
-    out: ["main.cpp"]
-}
-
-cc_test {
-    name: "android.hardware.audio@2.0-adapter",
-    defaults: ["hidl-module-defaults"],
-    shared_libs: [
-        "libhidladapter",
-        "libhidlbase",
-        "libhidltransport",
-        "libutils",
-        "android.hardware.audio.common@2.0",
-        "android.hardware.audio@2.0",
-        "android.hardware.audio@2.0-adapter-helper",
-    ],
-    generated_sources: ["android.hardware.audio@2.0-adapter_genc++"],
-}
diff --git a/audio/common/2.0/Android.bp b/audio/common/2.0/Android.bp
index 4ca82b2..878b594 100644
--- a/audio/common/2.0/Android.bp
+++ b/audio/common/2.0/Android.bp
@@ -1,81 +1,48 @@
-// This file is autogenerated by hidl-gen. Do not edit manually.
+// This file is autogenerated by hidl-gen -Landroidbp.
 
-filegroup {
-    name: "android.hardware.audio.common@2.0_hal",
-    srcs: [
-        "types.hal",
-    ],
-}
-
-genrule {
-    name: "android.hardware.audio.common@2.0_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.audio.common@2.0",
-    srcs: [
-        ":android.hardware.audio.common@2.0_hal",
-    ],
-    out: [
-        "android/hardware/audio/common/2.0/types.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.audio.common@2.0_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.audio.common@2.0",
-    srcs: [
-        ":android.hardware.audio.common@2.0_hal",
-    ],
-    out: [
-        "android/hardware/audio/common/2.0/types.h",
-        "android/hardware/audio/common/2.0/hwtypes.h",
-    ],
-}
-
-cc_library {
+hidl_interface {
     name: "android.hardware.audio.common@2.0",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.audio.common@2.0_genc++"],
-    generated_headers: ["android.hardware.audio.common@2.0_genc++_headers"],
-    export_generated_headers: ["android.hardware.audio.common@2.0_genc++_headers"],
-    vendor_available: true,
+    root: "android.hardware",
     vndk: {
         enabled: true,
     },
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-    ],
-}
-
-// This package is not java compatible. Not creating java target.
-
-genrule {
-    name: "android.hardware.audio.common-V2.0-java-constants_gen_java",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Ljava-constants -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.audio.common@2.0",
     srcs: [
-        ":android.hardware.audio.common@2.0_hal",
+        "types.hal",
     ],
-    out: [
-        "android/hardware/audio/common/V2_0/Constants.java",
+    types: [
+        "AudioChannelMask",
+        "AudioConfig",
+        "AudioDevice",
+        "AudioFormat",
+        "AudioGain",
+        "AudioGainConfig",
+        "AudioGainMode",
+        "AudioHandleConsts",
+        "AudioInputFlag",
+        "AudioInterleave",
+        "AudioMixLatencyClass",
+        "AudioMode",
+        "AudioOffloadInfo",
+        "AudioOutputFlag",
+        "AudioPort",
+        "AudioPortConfig",
+        "AudioPortConfigDeviceExt",
+        "AudioPortConfigMask",
+        "AudioPortConfigSessionExt",
+        "AudioPortDeviceExt",
+        "AudioPortMixExt",
+        "AudioPortRole",
+        "AudioPortSessionExt",
+        "AudioPortType",
+        "AudioSessionConsts",
+        "AudioSource",
+        "AudioStreamType",
+        "AudioUsage",
+        "FixedChannelCount",
+        "ThreadInfo",
+        "Uuid",
     ],
+    gen_java: false,
+    gen_java_constants: true,
 }
 
-java_library {
-    name: "android.hardware.audio.common-V2.0-java-constants",
-    no_framework_libs: true,
-    defaults: ["hidl-java-module-defaults"],
-    srcs: [":android.hardware.audio.common-V2.0-java-constants_gen_java"],
-}
-// This package has no interfaces. Not creating versioning adapter.
diff --git a/audio/effect/2.0/Android.bp b/audio/effect/2.0/Android.bp
index 09fd3a4..c4f8b06 100644
--- a/audio/effect/2.0/Android.bp
+++ b/audio/effect/2.0/Android.bp
@@ -1,7 +1,11 @@
-// This file is autogenerated by hidl-gen. Do not edit manually.
+// This file is autogenerated by hidl-gen -Landroidbp.
 
-filegroup {
-    name: "android.hardware.audio.effect@2.0_hal",
+hidl_interface {
+    name: "android.hardware.audio.effect@2.0",
+    root: "android.hardware",
+    vndk: {
+        enabled: true,
+    },
     srcs: [
         "types.hal",
         "IAcousticEchoCancelerEffect.hal",
@@ -19,265 +23,25 @@
         "IVirtualizerEffect.hal",
         "IVisualizerEffect.hal",
     ],
-}
-
-genrule {
-    name: "android.hardware.audio.effect@2.0_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.audio.effect@2.0",
-    srcs: [
-        ":android.hardware.audio.effect@2.0_hal",
-    ],
-    out: [
-        "android/hardware/audio/effect/2.0/types.cpp",
-        "android/hardware/audio/effect/2.0/AcousticEchoCancelerEffectAll.cpp",
-        "android/hardware/audio/effect/2.0/AutomaticGainControlEffectAll.cpp",
-        "android/hardware/audio/effect/2.0/BassBoostEffectAll.cpp",
-        "android/hardware/audio/effect/2.0/DownmixEffectAll.cpp",
-        "android/hardware/audio/effect/2.0/EffectAll.cpp",
-        "android/hardware/audio/effect/2.0/EffectBufferProviderCallbackAll.cpp",
-        "android/hardware/audio/effect/2.0/EffectsFactoryAll.cpp",
-        "android/hardware/audio/effect/2.0/EnvironmentalReverbEffectAll.cpp",
-        "android/hardware/audio/effect/2.0/EqualizerEffectAll.cpp",
-        "android/hardware/audio/effect/2.0/LoudnessEnhancerEffectAll.cpp",
-        "android/hardware/audio/effect/2.0/NoiseSuppressionEffectAll.cpp",
-        "android/hardware/audio/effect/2.0/PresetReverbEffectAll.cpp",
-        "android/hardware/audio/effect/2.0/VirtualizerEffectAll.cpp",
-        "android/hardware/audio/effect/2.0/VisualizerEffectAll.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.audio.effect@2.0_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.audio.effect@2.0",
-    srcs: [
-        ":android.hardware.audio.effect@2.0_hal",
-    ],
-    out: [
-        "android/hardware/audio/effect/2.0/types.h",
-        "android/hardware/audio/effect/2.0/hwtypes.h",
-        "android/hardware/audio/effect/2.0/IAcousticEchoCancelerEffect.h",
-        "android/hardware/audio/effect/2.0/IHwAcousticEchoCancelerEffect.h",
-        "android/hardware/audio/effect/2.0/BnHwAcousticEchoCancelerEffect.h",
-        "android/hardware/audio/effect/2.0/BpHwAcousticEchoCancelerEffect.h",
-        "android/hardware/audio/effect/2.0/BsAcousticEchoCancelerEffect.h",
-        "android/hardware/audio/effect/2.0/IAutomaticGainControlEffect.h",
-        "android/hardware/audio/effect/2.0/IHwAutomaticGainControlEffect.h",
-        "android/hardware/audio/effect/2.0/BnHwAutomaticGainControlEffect.h",
-        "android/hardware/audio/effect/2.0/BpHwAutomaticGainControlEffect.h",
-        "android/hardware/audio/effect/2.0/BsAutomaticGainControlEffect.h",
-        "android/hardware/audio/effect/2.0/IBassBoostEffect.h",
-        "android/hardware/audio/effect/2.0/IHwBassBoostEffect.h",
-        "android/hardware/audio/effect/2.0/BnHwBassBoostEffect.h",
-        "android/hardware/audio/effect/2.0/BpHwBassBoostEffect.h",
-        "android/hardware/audio/effect/2.0/BsBassBoostEffect.h",
-        "android/hardware/audio/effect/2.0/IDownmixEffect.h",
-        "android/hardware/audio/effect/2.0/IHwDownmixEffect.h",
-        "android/hardware/audio/effect/2.0/BnHwDownmixEffect.h",
-        "android/hardware/audio/effect/2.0/BpHwDownmixEffect.h",
-        "android/hardware/audio/effect/2.0/BsDownmixEffect.h",
-        "android/hardware/audio/effect/2.0/IEffect.h",
-        "android/hardware/audio/effect/2.0/IHwEffect.h",
-        "android/hardware/audio/effect/2.0/BnHwEffect.h",
-        "android/hardware/audio/effect/2.0/BpHwEffect.h",
-        "android/hardware/audio/effect/2.0/BsEffect.h",
-        "android/hardware/audio/effect/2.0/IEffectBufferProviderCallback.h",
-        "android/hardware/audio/effect/2.0/IHwEffectBufferProviderCallback.h",
-        "android/hardware/audio/effect/2.0/BnHwEffectBufferProviderCallback.h",
-        "android/hardware/audio/effect/2.0/BpHwEffectBufferProviderCallback.h",
-        "android/hardware/audio/effect/2.0/BsEffectBufferProviderCallback.h",
-        "android/hardware/audio/effect/2.0/IEffectsFactory.h",
-        "android/hardware/audio/effect/2.0/IHwEffectsFactory.h",
-        "android/hardware/audio/effect/2.0/BnHwEffectsFactory.h",
-        "android/hardware/audio/effect/2.0/BpHwEffectsFactory.h",
-        "android/hardware/audio/effect/2.0/BsEffectsFactory.h",
-        "android/hardware/audio/effect/2.0/IEnvironmentalReverbEffect.h",
-        "android/hardware/audio/effect/2.0/IHwEnvironmentalReverbEffect.h",
-        "android/hardware/audio/effect/2.0/BnHwEnvironmentalReverbEffect.h",
-        "android/hardware/audio/effect/2.0/BpHwEnvironmentalReverbEffect.h",
-        "android/hardware/audio/effect/2.0/BsEnvironmentalReverbEffect.h",
-        "android/hardware/audio/effect/2.0/IEqualizerEffect.h",
-        "android/hardware/audio/effect/2.0/IHwEqualizerEffect.h",
-        "android/hardware/audio/effect/2.0/BnHwEqualizerEffect.h",
-        "android/hardware/audio/effect/2.0/BpHwEqualizerEffect.h",
-        "android/hardware/audio/effect/2.0/BsEqualizerEffect.h",
-        "android/hardware/audio/effect/2.0/ILoudnessEnhancerEffect.h",
-        "android/hardware/audio/effect/2.0/IHwLoudnessEnhancerEffect.h",
-        "android/hardware/audio/effect/2.0/BnHwLoudnessEnhancerEffect.h",
-        "android/hardware/audio/effect/2.0/BpHwLoudnessEnhancerEffect.h",
-        "android/hardware/audio/effect/2.0/BsLoudnessEnhancerEffect.h",
-        "android/hardware/audio/effect/2.0/INoiseSuppressionEffect.h",
-        "android/hardware/audio/effect/2.0/IHwNoiseSuppressionEffect.h",
-        "android/hardware/audio/effect/2.0/BnHwNoiseSuppressionEffect.h",
-        "android/hardware/audio/effect/2.0/BpHwNoiseSuppressionEffect.h",
-        "android/hardware/audio/effect/2.0/BsNoiseSuppressionEffect.h",
-        "android/hardware/audio/effect/2.0/IPresetReverbEffect.h",
-        "android/hardware/audio/effect/2.0/IHwPresetReverbEffect.h",
-        "android/hardware/audio/effect/2.0/BnHwPresetReverbEffect.h",
-        "android/hardware/audio/effect/2.0/BpHwPresetReverbEffect.h",
-        "android/hardware/audio/effect/2.0/BsPresetReverbEffect.h",
-        "android/hardware/audio/effect/2.0/IVirtualizerEffect.h",
-        "android/hardware/audio/effect/2.0/IHwVirtualizerEffect.h",
-        "android/hardware/audio/effect/2.0/BnHwVirtualizerEffect.h",
-        "android/hardware/audio/effect/2.0/BpHwVirtualizerEffect.h",
-        "android/hardware/audio/effect/2.0/BsVirtualizerEffect.h",
-        "android/hardware/audio/effect/2.0/IVisualizerEffect.h",
-        "android/hardware/audio/effect/2.0/IHwVisualizerEffect.h",
-        "android/hardware/audio/effect/2.0/BnHwVisualizerEffect.h",
-        "android/hardware/audio/effect/2.0/BpHwVisualizerEffect.h",
-        "android/hardware/audio/effect/2.0/BsVisualizerEffect.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.audio.effect@2.0",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.audio.effect@2.0_genc++"],
-    generated_headers: ["android.hardware.audio.effect@2.0_genc++_headers"],
-    export_generated_headers: ["android.hardware.audio.effect@2.0_genc++_headers"],
-    vendor_available: true,
-    vndk: {
-        enabled: true,
-    },
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
+    interfaces: [
         "android.hardware.audio.common@2.0",
+        "android.hidl.base@1.0",
     ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-        "android.hardware.audio.common@2.0",
+    types: [
+        "AudioBuffer",
+        "EffectAuxChannelsConfig",
+        "EffectBufferAccess",
+        "EffectBufferConfig",
+        "EffectConfig",
+        "EffectConfigParameters",
+        "EffectDescriptor",
+        "EffectFeature",
+        "EffectFlags",
+        "EffectOffloadParameter",
+        "MessageQueueFlagBits",
+        "Result",
     ],
+    gen_java: false,
+    gen_java_constants: true,
 }
 
-// This package is not java compatible. Not creating java target.
-
-genrule {
-    name: "android.hardware.audio.effect-V2.0-java-constants_gen_java",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Ljava-constants -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.audio.effect@2.0",
-    srcs: [
-        ":android.hardware.audio.effect@2.0_hal",
-    ],
-    out: [
-        "android/hardware/audio/effect/V2_0/Constants.java",
-    ],
-}
-
-java_library {
-    name: "android.hardware.audio.effect-V2.0-java-constants",
-    no_framework_libs: true,
-    defaults: ["hidl-java-module-defaults"],
-    srcs: [":android.hardware.audio.effect-V2.0-java-constants_gen_java"],
-}
-
-genrule {
-    name: "android.hardware.audio.effect@2.0-adapter-helper_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.audio.effect@2.0",
-    srcs: [
-        ":android.hardware.audio.effect@2.0_hal",
-    ],
-    out: [
-        "android/hardware/audio/effect/2.0/AAcousticEchoCancelerEffect.cpp",
-        "android/hardware/audio/effect/2.0/AAutomaticGainControlEffect.cpp",
-        "android/hardware/audio/effect/2.0/ABassBoostEffect.cpp",
-        "android/hardware/audio/effect/2.0/ADownmixEffect.cpp",
-        "android/hardware/audio/effect/2.0/AEffect.cpp",
-        "android/hardware/audio/effect/2.0/AEffectBufferProviderCallback.cpp",
-        "android/hardware/audio/effect/2.0/AEffectsFactory.cpp",
-        "android/hardware/audio/effect/2.0/AEnvironmentalReverbEffect.cpp",
-        "android/hardware/audio/effect/2.0/AEqualizerEffect.cpp",
-        "android/hardware/audio/effect/2.0/ALoudnessEnhancerEffect.cpp",
-        "android/hardware/audio/effect/2.0/ANoiseSuppressionEffect.cpp",
-        "android/hardware/audio/effect/2.0/APresetReverbEffect.cpp",
-        "android/hardware/audio/effect/2.0/AVirtualizerEffect.cpp",
-        "android/hardware/audio/effect/2.0/AVisualizerEffect.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.audio.effect@2.0-adapter-helper_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.audio.effect@2.0",
-    srcs: [
-        ":android.hardware.audio.effect@2.0_hal",
-    ],
-    out: [
-        "android/hardware/audio/effect/2.0/AAcousticEchoCancelerEffect.h",
-        "android/hardware/audio/effect/2.0/AAutomaticGainControlEffect.h",
-        "android/hardware/audio/effect/2.0/ABassBoostEffect.h",
-        "android/hardware/audio/effect/2.0/ADownmixEffect.h",
-        "android/hardware/audio/effect/2.0/AEffect.h",
-        "android/hardware/audio/effect/2.0/AEffectBufferProviderCallback.h",
-        "android/hardware/audio/effect/2.0/AEffectsFactory.h",
-        "android/hardware/audio/effect/2.0/AEnvironmentalReverbEffect.h",
-        "android/hardware/audio/effect/2.0/AEqualizerEffect.h",
-        "android/hardware/audio/effect/2.0/ALoudnessEnhancerEffect.h",
-        "android/hardware/audio/effect/2.0/ANoiseSuppressionEffect.h",
-        "android/hardware/audio/effect/2.0/APresetReverbEffect.h",
-        "android/hardware/audio/effect/2.0/AVirtualizerEffect.h",
-        "android/hardware/audio/effect/2.0/AVisualizerEffect.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.audio.effect@2.0-adapter-helper",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.audio.effect@2.0-adapter-helper_genc++"],
-    generated_headers: ["android.hardware.audio.effect@2.0-adapter-helper_genc++_headers"],
-    export_generated_headers: ["android.hardware.audio.effect@2.0-adapter-helper_genc++_headers"],
-    vendor_available: true,
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-        "libhidladapter",
-        "android.hardware.audio.common@2.0",
-        "android.hardware.audio.effect@2.0",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-        "libhidladapter",
-        "android.hardware.audio.common@2.0",
-        "android.hardware.audio.effect@2.0",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-}
-
-genrule {
-    name: "android.hardware.audio.effect@2.0-adapter_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-main -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.audio.effect@2.0",
-    out: ["main.cpp"]
-}
-
-cc_test {
-    name: "android.hardware.audio.effect@2.0-adapter",
-    defaults: ["hidl-module-defaults"],
-    shared_libs: [
-        "libhidladapter",
-        "libhidlbase",
-        "libhidltransport",
-        "libutils",
-        "android.hardware.audio.common@2.0",
-        "android.hardware.audio.effect@2.0",
-        "android.hardware.audio.effect@2.0-adapter-helper",
-    ],
-    generated_sources: ["android.hardware.audio.effect@2.0-adapter_genc++"],
-}
diff --git a/automotive/evs/1.0/Android.bp b/automotive/evs/1.0/Android.bp
index fa5fac0..4bc4068 100644
--- a/automotive/evs/1.0/Android.bp
+++ b/automotive/evs/1.0/Android.bp
@@ -1,7 +1,11 @@
-// This file is autogenerated by hidl-gen. Do not edit manually.
+// This file is autogenerated by hidl-gen -Landroidbp.
 
-filegroup {
-    name: "android.hardware.automotive.evs@1.0_hal",
+hidl_interface {
+    name: "android.hardware.automotive.evs@1.0",
+    root: "android.hardware",
+    vndk: {
+        enabled: true,
+    },
     srcs: [
         "types.hal",
         "IEvsCamera.hal",
@@ -9,164 +13,16 @@
         "IEvsDisplay.hal",
         "IEvsEnumerator.hal",
     ],
+    interfaces: [
+        "android.hidl.base@1.0",
+    ],
+    types: [
+        "BufferDesc",
+        "CameraDesc",
+        "DisplayDesc",
+        "DisplayState",
+        "EvsResult",
+    ],
+    gen_java: false,
 }
 
-genrule {
-    name: "android.hardware.automotive.evs@1.0_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.automotive.evs@1.0",
-    srcs: [
-        ":android.hardware.automotive.evs@1.0_hal",
-    ],
-    out: [
-        "android/hardware/automotive/evs/1.0/types.cpp",
-        "android/hardware/automotive/evs/1.0/EvsCameraAll.cpp",
-        "android/hardware/automotive/evs/1.0/EvsCameraStreamAll.cpp",
-        "android/hardware/automotive/evs/1.0/EvsDisplayAll.cpp",
-        "android/hardware/automotive/evs/1.0/EvsEnumeratorAll.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.automotive.evs@1.0_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.automotive.evs@1.0",
-    srcs: [
-        ":android.hardware.automotive.evs@1.0_hal",
-    ],
-    out: [
-        "android/hardware/automotive/evs/1.0/types.h",
-        "android/hardware/automotive/evs/1.0/hwtypes.h",
-        "android/hardware/automotive/evs/1.0/IEvsCamera.h",
-        "android/hardware/automotive/evs/1.0/IHwEvsCamera.h",
-        "android/hardware/automotive/evs/1.0/BnHwEvsCamera.h",
-        "android/hardware/automotive/evs/1.0/BpHwEvsCamera.h",
-        "android/hardware/automotive/evs/1.0/BsEvsCamera.h",
-        "android/hardware/automotive/evs/1.0/IEvsCameraStream.h",
-        "android/hardware/automotive/evs/1.0/IHwEvsCameraStream.h",
-        "android/hardware/automotive/evs/1.0/BnHwEvsCameraStream.h",
-        "android/hardware/automotive/evs/1.0/BpHwEvsCameraStream.h",
-        "android/hardware/automotive/evs/1.0/BsEvsCameraStream.h",
-        "android/hardware/automotive/evs/1.0/IEvsDisplay.h",
-        "android/hardware/automotive/evs/1.0/IHwEvsDisplay.h",
-        "android/hardware/automotive/evs/1.0/BnHwEvsDisplay.h",
-        "android/hardware/automotive/evs/1.0/BpHwEvsDisplay.h",
-        "android/hardware/automotive/evs/1.0/BsEvsDisplay.h",
-        "android/hardware/automotive/evs/1.0/IEvsEnumerator.h",
-        "android/hardware/automotive/evs/1.0/IHwEvsEnumerator.h",
-        "android/hardware/automotive/evs/1.0/BnHwEvsEnumerator.h",
-        "android/hardware/automotive/evs/1.0/BpHwEvsEnumerator.h",
-        "android/hardware/automotive/evs/1.0/BsEvsEnumerator.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.automotive.evs@1.0",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.automotive.evs@1.0_genc++"],
-    generated_headers: ["android.hardware.automotive.evs@1.0_genc++_headers"],
-    export_generated_headers: ["android.hardware.automotive.evs@1.0_genc++_headers"],
-    vendor_available: true,
-    vndk: {
-        enabled: true,
-    },
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-    ],
-}
-
-// This package is not java compatible. Not creating java target.
-
-// This package does not export any types. Not creating java constants export.
-
-
-genrule {
-    name: "android.hardware.automotive.evs@1.0-adapter-helper_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.automotive.evs@1.0",
-    srcs: [
-        ":android.hardware.automotive.evs@1.0_hal",
-    ],
-    out: [
-        "android/hardware/automotive/evs/1.0/AEvsCamera.cpp",
-        "android/hardware/automotive/evs/1.0/AEvsCameraStream.cpp",
-        "android/hardware/automotive/evs/1.0/AEvsDisplay.cpp",
-        "android/hardware/automotive/evs/1.0/AEvsEnumerator.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.automotive.evs@1.0-adapter-helper_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.automotive.evs@1.0",
-    srcs: [
-        ":android.hardware.automotive.evs@1.0_hal",
-    ],
-    out: [
-        "android/hardware/automotive/evs/1.0/AEvsCamera.h",
-        "android/hardware/automotive/evs/1.0/AEvsCameraStream.h",
-        "android/hardware/automotive/evs/1.0/AEvsDisplay.h",
-        "android/hardware/automotive/evs/1.0/AEvsEnumerator.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.automotive.evs@1.0-adapter-helper",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.automotive.evs@1.0-adapter-helper_genc++"],
-    generated_headers: ["android.hardware.automotive.evs@1.0-adapter-helper_genc++_headers"],
-    export_generated_headers: ["android.hardware.automotive.evs@1.0-adapter-helper_genc++_headers"],
-    vendor_available: true,
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-        "libhidladapter",
-        "android.hardware.automotive.evs@1.0",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-        "libhidladapter",
-        "android.hardware.automotive.evs@1.0",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-}
-
-genrule {
-    name: "android.hardware.automotive.evs@1.0-adapter_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-main -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.automotive.evs@1.0",
-    out: ["main.cpp"]
-}
-
-cc_test {
-    name: "android.hardware.automotive.evs@1.0-adapter",
-    defaults: ["hidl-module-defaults"],
-    shared_libs: [
-        "libhidladapter",
-        "libhidlbase",
-        "libhidltransport",
-        "libutils",
-        "android.hardware.automotive.evs@1.0",
-        "android.hardware.automotive.evs@1.0-adapter-helper",
-    ],
-    generated_sources: ["android.hardware.automotive.evs@1.0-adapter_genc++"],
-}
diff --git a/automotive/vehicle/2.0/Android.bp b/automotive/vehicle/2.0/Android.bp
index 10f99b1..7ab2387 100644
--- a/automotive/vehicle/2.0/Android.bp
+++ b/automotive/vehicle/2.0/Android.bp
@@ -1,240 +1,87 @@
-// This file is autogenerated by hidl-gen. Do not edit manually.
+// This file is autogenerated by hidl-gen -Landroidbp.
 
-filegroup {
-    name: "android.hardware.automotive.vehicle@2.0_hal",
+hidl_interface {
+    name: "android.hardware.automotive.vehicle@2.0",
+    root: "android.hardware",
+    vndk: {
+        enabled: true,
+    },
     srcs: [
         "types.hal",
         "IVehicle.hal",
         "IVehicleCallback.hal",
     ],
+    interfaces: [
+        "android.hidl.base@1.0",
+    ],
+    types: [
+        "DiagnosticFloatSensorIndex",
+        "DiagnosticIntegerSensorIndex",
+        "EvConnectorType",
+        "FuelType",
+        "Obd2CommonIgnitionMonitors",
+        "Obd2CompressionIgnitionMonitors",
+        "Obd2FuelSystemStatus",
+        "Obd2FuelType",
+        "Obd2IgnitionMonitorKind",
+        "Obd2SecondaryAirStatus",
+        "Obd2SparkIgnitionMonitors",
+        "StatusCode",
+        "SubscribeFlags",
+        "SubscribeOptions",
+        "VehicleApPowerBootupReason",
+        "VehicleApPowerSetState",
+        "VehicleApPowerState",
+        "VehicleApPowerStateConfigFlag",
+        "VehicleApPowerStateIndex",
+        "VehicleApPowerStateShutdownParam",
+        "VehicleArea",
+        "VehicleAreaConfig",
+        "VehicleAreaDoor",
+        "VehicleAreaMirror",
+        "VehicleAreaSeat",
+        "VehicleAreaWindow",
+        "VehicleAreaZone",
+        "VehicleAudioContextFlag",
+        "VehicleAudioExtFocusFlag",
+        "VehicleAudioFocusIndex",
+        "VehicleAudioFocusRequest",
+        "VehicleAudioFocusState",
+        "VehicleAudioHwVariantConfigFlag",
+        "VehicleAudioRoutingPolicyIndex",
+        "VehicleAudioStream",
+        "VehicleAudioStreamFlag",
+        "VehicleAudioVolumeCapabilityFlag",
+        "VehicleAudioVolumeIndex",
+        "VehicleAudioVolumeLimitIndex",
+        "VehicleAudioVolumeState",
+        "VehicleDisplay",
+        "VehicleDrivingStatus",
+        "VehicleGear",
+        "VehicleHvacFanDirection",
+        "VehicleHwKeyInputAction",
+        "VehicleIgnitionState",
+        "VehicleInstrumentClusterType",
+        "VehiclePropConfig",
+        "VehiclePropValue",
+        "VehicleProperty",
+        "VehiclePropertyAccess",
+        "VehiclePropertyChangeMode",
+        "VehiclePropertyGroup",
+        "VehiclePropertyOperation",
+        "VehiclePropertyType",
+        "VehicleRadioConstants",
+        "VehicleTurnSignal",
+        "VehicleUnit",
+        "VmsAvailabilityStateIntegerValuesIndex",
+        "VmsBaseMessageIntegerValuesIndex",
+        "VmsMessageType",
+        "VmsMessageWithLayerAndPublisherIdIntegerValuesIndex",
+        "VmsMessageWithLayerIntegerValuesIndex",
+        "VmsOfferingMessageIntegerValuesIndex",
+        "VmsSubscriptionsStateIntegerValuesIndex",
+        "Wheel",
+    ],
+    gen_java: true,
 }
 
-genrule {
-    name: "android.hardware.automotive.vehicle@2.0_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.automotive.vehicle@2.0",
-    srcs: [
-        ":android.hardware.automotive.vehicle@2.0_hal",
-    ],
-    out: [
-        "android/hardware/automotive/vehicle/2.0/types.cpp",
-        "android/hardware/automotive/vehicle/2.0/VehicleAll.cpp",
-        "android/hardware/automotive/vehicle/2.0/VehicleCallbackAll.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.automotive.vehicle@2.0_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.automotive.vehicle@2.0",
-    srcs: [
-        ":android.hardware.automotive.vehicle@2.0_hal",
-    ],
-    out: [
-        "android/hardware/automotive/vehicle/2.0/types.h",
-        "android/hardware/automotive/vehicle/2.0/hwtypes.h",
-        "android/hardware/automotive/vehicle/2.0/IVehicle.h",
-        "android/hardware/automotive/vehicle/2.0/IHwVehicle.h",
-        "android/hardware/automotive/vehicle/2.0/BnHwVehicle.h",
-        "android/hardware/automotive/vehicle/2.0/BpHwVehicle.h",
-        "android/hardware/automotive/vehicle/2.0/BsVehicle.h",
-        "android/hardware/automotive/vehicle/2.0/IVehicleCallback.h",
-        "android/hardware/automotive/vehicle/2.0/IHwVehicleCallback.h",
-        "android/hardware/automotive/vehicle/2.0/BnHwVehicleCallback.h",
-        "android/hardware/automotive/vehicle/2.0/BpHwVehicleCallback.h",
-        "android/hardware/automotive/vehicle/2.0/BsVehicleCallback.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.automotive.vehicle@2.0",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.automotive.vehicle@2.0_genc++"],
-    generated_headers: ["android.hardware.automotive.vehicle@2.0_genc++_headers"],
-    export_generated_headers: ["android.hardware.automotive.vehicle@2.0_genc++_headers"],
-    vendor_available: true,
-    vndk: {
-        enabled: true,
-    },
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-    ],
-}
-
-genrule {
-    name: "android.hardware.automotive.vehicle-V2.0-java_gen_java",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Ljava -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.automotive.vehicle@2.0",
-    srcs: [
-        ":android.hardware.automotive.vehicle@2.0_hal",
-    ],
-    out: [
-        "android/hardware/automotive/vehicle/V2_0/DiagnosticFloatSensorIndex.java",
-        "android/hardware/automotive/vehicle/V2_0/DiagnosticIntegerSensorIndex.java",
-        "android/hardware/automotive/vehicle/V2_0/Obd2CommonIgnitionMonitors.java",
-        "android/hardware/automotive/vehicle/V2_0/Obd2CompressionIgnitionMonitors.java",
-        "android/hardware/automotive/vehicle/V2_0/Obd2FuelSystemStatus.java",
-        "android/hardware/automotive/vehicle/V2_0/Obd2FuelType.java",
-        "android/hardware/automotive/vehicle/V2_0/Obd2IgnitionMonitorKind.java",
-        "android/hardware/automotive/vehicle/V2_0/Obd2SecondaryAirStatus.java",
-        "android/hardware/automotive/vehicle/V2_0/Obd2SparkIgnitionMonitors.java",
-        "android/hardware/automotive/vehicle/V2_0/StatusCode.java",
-        "android/hardware/automotive/vehicle/V2_0/SubscribeFlags.java",
-        "android/hardware/automotive/vehicle/V2_0/SubscribeOptions.java",
-        "android/hardware/automotive/vehicle/V2_0/VehicleApPowerBootupReason.java",
-        "android/hardware/automotive/vehicle/V2_0/VehicleApPowerSetState.java",
-        "android/hardware/automotive/vehicle/V2_0/VehicleApPowerState.java",
-        "android/hardware/automotive/vehicle/V2_0/VehicleApPowerStateConfigFlag.java",
-        "android/hardware/automotive/vehicle/V2_0/VehicleApPowerStateIndex.java",
-        "android/hardware/automotive/vehicle/V2_0/VehicleApPowerStateShutdownParam.java",
-        "android/hardware/automotive/vehicle/V2_0/VehicleArea.java",
-        "android/hardware/automotive/vehicle/V2_0/VehicleAreaConfig.java",
-        "android/hardware/automotive/vehicle/V2_0/VehicleAreaDoor.java",
-        "android/hardware/automotive/vehicle/V2_0/VehicleAreaMirror.java",
-        "android/hardware/automotive/vehicle/V2_0/VehicleAreaSeat.java",
-        "android/hardware/automotive/vehicle/V2_0/VehicleAreaWindow.java",
-        "android/hardware/automotive/vehicle/V2_0/VehicleAreaZone.java",
-        "android/hardware/automotive/vehicle/V2_0/VehicleAudioContextFlag.java",
-        "android/hardware/automotive/vehicle/V2_0/VehicleAudioExtFocusFlag.java",
-        "android/hardware/automotive/vehicle/V2_0/VehicleAudioFocusIndex.java",
-        "android/hardware/automotive/vehicle/V2_0/VehicleAudioFocusRequest.java",
-        "android/hardware/automotive/vehicle/V2_0/VehicleAudioFocusState.java",
-        "android/hardware/automotive/vehicle/V2_0/VehicleAudioHwVariantConfigFlag.java",
-        "android/hardware/automotive/vehicle/V2_0/VehicleAudioRoutingPolicyIndex.java",
-        "android/hardware/automotive/vehicle/V2_0/VehicleAudioStream.java",
-        "android/hardware/automotive/vehicle/V2_0/VehicleAudioStreamFlag.java",
-        "android/hardware/automotive/vehicle/V2_0/VehicleAudioVolumeCapabilityFlag.java",
-        "android/hardware/automotive/vehicle/V2_0/VehicleAudioVolumeIndex.java",
-        "android/hardware/automotive/vehicle/V2_0/VehicleAudioVolumeLimitIndex.java",
-        "android/hardware/automotive/vehicle/V2_0/VehicleAudioVolumeState.java",
-        "android/hardware/automotive/vehicle/V2_0/VehicleDisplay.java",
-        "android/hardware/automotive/vehicle/V2_0/VehicleDrivingStatus.java",
-        "android/hardware/automotive/vehicle/V2_0/VehicleGear.java",
-        "android/hardware/automotive/vehicle/V2_0/VehicleHvacFanDirection.java",
-        "android/hardware/automotive/vehicle/V2_0/VehicleHwKeyInputAction.java",
-        "android/hardware/automotive/vehicle/V2_0/VehicleIgnitionState.java",
-        "android/hardware/automotive/vehicle/V2_0/VehicleInstrumentClusterType.java",
-        "android/hardware/automotive/vehicle/V2_0/VehiclePropConfig.java",
-        "android/hardware/automotive/vehicle/V2_0/VehiclePropValue.java",
-        "android/hardware/automotive/vehicle/V2_0/VehicleProperty.java",
-        "android/hardware/automotive/vehicle/V2_0/VehiclePropertyAccess.java",
-        "android/hardware/automotive/vehicle/V2_0/VehiclePropertyChangeMode.java",
-        "android/hardware/automotive/vehicle/V2_0/VehiclePropertyGroup.java",
-        "android/hardware/automotive/vehicle/V2_0/VehiclePropertyOperation.java",
-        "android/hardware/automotive/vehicle/V2_0/VehiclePropertyType.java",
-        "android/hardware/automotive/vehicle/V2_0/VehicleRadioConstants.java",
-        "android/hardware/automotive/vehicle/V2_0/VehicleTurnSignal.java",
-        "android/hardware/automotive/vehicle/V2_0/VehicleUnit.java",
-        "android/hardware/automotive/vehicle/V2_0/VmsAvailabilityStateIntegerValuesIndex.java",
-        "android/hardware/automotive/vehicle/V2_0/VmsBaseMessageIntegerValuesIndex.java",
-        "android/hardware/automotive/vehicle/V2_0/VmsMessageType.java",
-        "android/hardware/automotive/vehicle/V2_0/VmsMessageWithLayerAndPublisherIdIntegerValuesIndex.java",
-        "android/hardware/automotive/vehicle/V2_0/VmsMessageWithLayerIntegerValuesIndex.java",
-        "android/hardware/automotive/vehicle/V2_0/VmsOfferingMessageIntegerValuesIndex.java",
-        "android/hardware/automotive/vehicle/V2_0/VmsSubscriptionsStateIntegerValuesIndex.java",
-        "android/hardware/automotive/vehicle/V2_0/Wheel.java",
-        "android/hardware/automotive/vehicle/V2_0/IVehicle.java",
-        "android/hardware/automotive/vehicle/V2_0/IVehicleCallback.java",
-    ],
-}
-
-java_library {
-    name: "android.hardware.automotive.vehicle-V2.0-java",
-    no_framework_libs: true,
-    defaults: ["hidl-java-module-defaults"],
-    srcs: [":android.hardware.automotive.vehicle-V2.0-java_gen_java"],
-    libs: [
-        "hwbinder",
-        "android.hidl.base-V1.0-java",
-    ]
-}
-
-// This package does not export any types. Not creating java constants export.
-
-
-genrule {
-    name: "android.hardware.automotive.vehicle@2.0-adapter-helper_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.automotive.vehicle@2.0",
-    srcs: [
-        ":android.hardware.automotive.vehicle@2.0_hal",
-    ],
-    out: [
-        "android/hardware/automotive/vehicle/2.0/AVehicle.cpp",
-        "android/hardware/automotive/vehicle/2.0/AVehicleCallback.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.automotive.vehicle@2.0-adapter-helper_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.automotive.vehicle@2.0",
-    srcs: [
-        ":android.hardware.automotive.vehicle@2.0_hal",
-    ],
-    out: [
-        "android/hardware/automotive/vehicle/2.0/AVehicle.h",
-        "android/hardware/automotive/vehicle/2.0/AVehicleCallback.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.automotive.vehicle@2.0-adapter-helper",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.automotive.vehicle@2.0-adapter-helper_genc++"],
-    generated_headers: ["android.hardware.automotive.vehicle@2.0-adapter-helper_genc++_headers"],
-    export_generated_headers: ["android.hardware.automotive.vehicle@2.0-adapter-helper_genc++_headers"],
-    vendor_available: true,
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-        "libhidladapter",
-        "android.hardware.automotive.vehicle@2.0",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-        "libhidladapter",
-        "android.hardware.automotive.vehicle@2.0",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-}
-
-genrule {
-    name: "android.hardware.automotive.vehicle@2.0-adapter_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-main -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.automotive.vehicle@2.0",
-    out: ["main.cpp"]
-}
-
-cc_test {
-    name: "android.hardware.automotive.vehicle@2.0-adapter",
-    defaults: ["hidl-module-defaults"],
-    shared_libs: [
-        "libhidladapter",
-        "libhidlbase",
-        "libhidltransport",
-        "libutils",
-        "android.hardware.automotive.vehicle@2.0",
-        "android.hardware.automotive.vehicle@2.0-adapter-helper",
-    ],
-    generated_sources: ["android.hardware.automotive.vehicle@2.0-adapter_genc++"],
-}
diff --git a/biometrics/fingerprint/2.1/Android.bp b/biometrics/fingerprint/2.1/Android.bp
index 16f83b4..dbcce92 100644
--- a/biometrics/fingerprint/2.1/Android.bp
+++ b/biometrics/fingerprint/2.1/Android.bp
@@ -1,185 +1,30 @@
-// This file is autogenerated by hidl-gen. Do not edit manually.
+// This file is autogenerated by hidl-gen -Landroidbp.
 
-filegroup {
-    name: "android.hardware.biometrics.fingerprint@2.1_hal",
+hidl_interface {
+    name: "android.hardware.biometrics.fingerprint@2.1",
+    root: "android.hardware",
+    vndk: {
+        enabled: true,
+    },
     srcs: [
         "types.hal",
         "IBiometricsFingerprint.hal",
         "IBiometricsFingerprintClientCallback.hal",
     ],
+    interfaces: [
+        "android.hidl.base@1.0",
+    ],
+    types: [
+        "FingerprintAcquired",
+        "FingerprintAcquiredInfo",
+        "FingerprintAuthenticated",
+        "FingerprintEnroll",
+        "FingerprintError",
+        "FingerprintFingerId",
+        "FingerprintIterator",
+        "FingerprintMsgType",
+        "RequestStatus",
+    ],
+    gen_java: true,
 }
 
-genrule {
-    name: "android.hardware.biometrics.fingerprint@2.1_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.biometrics.fingerprint@2.1",
-    srcs: [
-        ":android.hardware.biometrics.fingerprint@2.1_hal",
-    ],
-    out: [
-        "android/hardware/biometrics/fingerprint/2.1/types.cpp",
-        "android/hardware/biometrics/fingerprint/2.1/BiometricsFingerprintAll.cpp",
-        "android/hardware/biometrics/fingerprint/2.1/BiometricsFingerprintClientCallbackAll.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.biometrics.fingerprint@2.1_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.biometrics.fingerprint@2.1",
-    srcs: [
-        ":android.hardware.biometrics.fingerprint@2.1_hal",
-    ],
-    out: [
-        "android/hardware/biometrics/fingerprint/2.1/types.h",
-        "android/hardware/biometrics/fingerprint/2.1/hwtypes.h",
-        "android/hardware/biometrics/fingerprint/2.1/IBiometricsFingerprint.h",
-        "android/hardware/biometrics/fingerprint/2.1/IHwBiometricsFingerprint.h",
-        "android/hardware/biometrics/fingerprint/2.1/BnHwBiometricsFingerprint.h",
-        "android/hardware/biometrics/fingerprint/2.1/BpHwBiometricsFingerprint.h",
-        "android/hardware/biometrics/fingerprint/2.1/BsBiometricsFingerprint.h",
-        "android/hardware/biometrics/fingerprint/2.1/IBiometricsFingerprintClientCallback.h",
-        "android/hardware/biometrics/fingerprint/2.1/IHwBiometricsFingerprintClientCallback.h",
-        "android/hardware/biometrics/fingerprint/2.1/BnHwBiometricsFingerprintClientCallback.h",
-        "android/hardware/biometrics/fingerprint/2.1/BpHwBiometricsFingerprintClientCallback.h",
-        "android/hardware/biometrics/fingerprint/2.1/BsBiometricsFingerprintClientCallback.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.biometrics.fingerprint@2.1",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.biometrics.fingerprint@2.1_genc++"],
-    generated_headers: ["android.hardware.biometrics.fingerprint@2.1_genc++_headers"],
-    export_generated_headers: ["android.hardware.biometrics.fingerprint@2.1_genc++_headers"],
-    vendor_available: true,
-    vndk: {
-        enabled: true,
-    },
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-    ],
-}
-
-genrule {
-    name: "android.hardware.biometrics.fingerprint-V2.1-java_gen_java",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Ljava -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.biometrics.fingerprint@2.1",
-    srcs: [
-        ":android.hardware.biometrics.fingerprint@2.1_hal",
-    ],
-    out: [
-        "android/hardware/biometrics/fingerprint/V2_1/FingerprintAcquired.java",
-        "android/hardware/biometrics/fingerprint/V2_1/FingerprintAcquiredInfo.java",
-        "android/hardware/biometrics/fingerprint/V2_1/FingerprintAuthenticated.java",
-        "android/hardware/biometrics/fingerprint/V2_1/FingerprintEnroll.java",
-        "android/hardware/biometrics/fingerprint/V2_1/FingerprintError.java",
-        "android/hardware/biometrics/fingerprint/V2_1/FingerprintFingerId.java",
-        "android/hardware/biometrics/fingerprint/V2_1/FingerprintIterator.java",
-        "android/hardware/biometrics/fingerprint/V2_1/FingerprintMsgType.java",
-        "android/hardware/biometrics/fingerprint/V2_1/RequestStatus.java",
-        "android/hardware/biometrics/fingerprint/V2_1/IBiometricsFingerprint.java",
-        "android/hardware/biometrics/fingerprint/V2_1/IBiometricsFingerprintClientCallback.java",
-    ],
-}
-
-java_library {
-    name: "android.hardware.biometrics.fingerprint-V2.1-java",
-    no_framework_libs: true,
-    defaults: ["hidl-java-module-defaults"],
-    srcs: [":android.hardware.biometrics.fingerprint-V2.1-java_gen_java"],
-    libs: [
-        "hwbinder",
-        "android.hidl.base-V1.0-java",
-    ]
-}
-
-// This package does not export any types. Not creating java constants export.
-
-
-genrule {
-    name: "android.hardware.biometrics.fingerprint@2.1-adapter-helper_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.biometrics.fingerprint@2.1",
-    srcs: [
-        ":android.hardware.biometrics.fingerprint@2.1_hal",
-    ],
-    out: [
-        "android/hardware/biometrics/fingerprint/2.1/ABiometricsFingerprint.cpp",
-        "android/hardware/biometrics/fingerprint/2.1/ABiometricsFingerprintClientCallback.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.biometrics.fingerprint@2.1-adapter-helper_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.biometrics.fingerprint@2.1",
-    srcs: [
-        ":android.hardware.biometrics.fingerprint@2.1_hal",
-    ],
-    out: [
-        "android/hardware/biometrics/fingerprint/2.1/ABiometricsFingerprint.h",
-        "android/hardware/biometrics/fingerprint/2.1/ABiometricsFingerprintClientCallback.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.biometrics.fingerprint@2.1-adapter-helper",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.biometrics.fingerprint@2.1-adapter-helper_genc++"],
-    generated_headers: ["android.hardware.biometrics.fingerprint@2.1-adapter-helper_genc++_headers"],
-    export_generated_headers: ["android.hardware.biometrics.fingerprint@2.1-adapter-helper_genc++_headers"],
-    vendor_available: true,
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-        "libhidladapter",
-        "android.hardware.biometrics.fingerprint@2.1",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-        "libhidladapter",
-        "android.hardware.biometrics.fingerprint@2.1",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-}
-
-genrule {
-    name: "android.hardware.biometrics.fingerprint@2.1-adapter_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-main -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.biometrics.fingerprint@2.1",
-    out: ["main.cpp"]
-}
-
-cc_test {
-    name: "android.hardware.biometrics.fingerprint@2.1-adapter",
-    defaults: ["hidl-module-defaults"],
-    shared_libs: [
-        "libhidladapter",
-        "libhidlbase",
-        "libhidltransport",
-        "libutils",
-        "android.hardware.biometrics.fingerprint@2.1",
-        "android.hardware.biometrics.fingerprint@2.1-adapter-helper",
-    ],
-    generated_sources: ["android.hardware.biometrics.fingerprint@2.1-adapter_genc++"],
-}
diff --git a/bluetooth/1.0/Android.bp b/bluetooth/1.0/Android.bp
index e5b3b4b..49df8a3 100644
--- a/bluetooth/1.0/Android.bp
+++ b/bluetooth/1.0/Android.bp
@@ -1,177 +1,22 @@
-// This file is autogenerated by hidl-gen. Do not edit manually.
+// This file is autogenerated by hidl-gen -Landroidbp.
 
-filegroup {
-    name: "android.hardware.bluetooth@1.0_hal",
+hidl_interface {
+    name: "android.hardware.bluetooth@1.0",
+    root: "android.hardware",
+    vndk: {
+        enabled: true,
+    },
     srcs: [
         "types.hal",
         "IBluetoothHci.hal",
         "IBluetoothHciCallbacks.hal",
     ],
+    interfaces: [
+        "android.hidl.base@1.0",
+    ],
+    types: [
+        "Status",
+    ],
+    gen_java: true,
 }
 
-genrule {
-    name: "android.hardware.bluetooth@1.0_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.bluetooth@1.0",
-    srcs: [
-        ":android.hardware.bluetooth@1.0_hal",
-    ],
-    out: [
-        "android/hardware/bluetooth/1.0/types.cpp",
-        "android/hardware/bluetooth/1.0/BluetoothHciAll.cpp",
-        "android/hardware/bluetooth/1.0/BluetoothHciCallbacksAll.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.bluetooth@1.0_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.bluetooth@1.0",
-    srcs: [
-        ":android.hardware.bluetooth@1.0_hal",
-    ],
-    out: [
-        "android/hardware/bluetooth/1.0/types.h",
-        "android/hardware/bluetooth/1.0/hwtypes.h",
-        "android/hardware/bluetooth/1.0/IBluetoothHci.h",
-        "android/hardware/bluetooth/1.0/IHwBluetoothHci.h",
-        "android/hardware/bluetooth/1.0/BnHwBluetoothHci.h",
-        "android/hardware/bluetooth/1.0/BpHwBluetoothHci.h",
-        "android/hardware/bluetooth/1.0/BsBluetoothHci.h",
-        "android/hardware/bluetooth/1.0/IBluetoothHciCallbacks.h",
-        "android/hardware/bluetooth/1.0/IHwBluetoothHciCallbacks.h",
-        "android/hardware/bluetooth/1.0/BnHwBluetoothHciCallbacks.h",
-        "android/hardware/bluetooth/1.0/BpHwBluetoothHciCallbacks.h",
-        "android/hardware/bluetooth/1.0/BsBluetoothHciCallbacks.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.bluetooth@1.0",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.bluetooth@1.0_genc++"],
-    generated_headers: ["android.hardware.bluetooth@1.0_genc++_headers"],
-    export_generated_headers: ["android.hardware.bluetooth@1.0_genc++_headers"],
-    vendor_available: true,
-    vndk: {
-        enabled: true,
-    },
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-    ],
-}
-
-genrule {
-    name: "android.hardware.bluetooth-V1.0-java_gen_java",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Ljava -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.bluetooth@1.0",
-    srcs: [
-        ":android.hardware.bluetooth@1.0_hal",
-    ],
-    out: [
-        "android/hardware/bluetooth/V1_0/Status.java",
-        "android/hardware/bluetooth/V1_0/IBluetoothHci.java",
-        "android/hardware/bluetooth/V1_0/IBluetoothHciCallbacks.java",
-    ],
-}
-
-java_library {
-    name: "android.hardware.bluetooth-V1.0-java",
-    no_framework_libs: true,
-    defaults: ["hidl-java-module-defaults"],
-    srcs: [":android.hardware.bluetooth-V1.0-java_gen_java"],
-    libs: [
-        "hwbinder",
-        "android.hidl.base-V1.0-java",
-    ]
-}
-
-// This package does not export any types. Not creating java constants export.
-
-
-genrule {
-    name: "android.hardware.bluetooth@1.0-adapter-helper_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.bluetooth@1.0",
-    srcs: [
-        ":android.hardware.bluetooth@1.0_hal",
-    ],
-    out: [
-        "android/hardware/bluetooth/1.0/ABluetoothHci.cpp",
-        "android/hardware/bluetooth/1.0/ABluetoothHciCallbacks.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.bluetooth@1.0-adapter-helper_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.bluetooth@1.0",
-    srcs: [
-        ":android.hardware.bluetooth@1.0_hal",
-    ],
-    out: [
-        "android/hardware/bluetooth/1.0/ABluetoothHci.h",
-        "android/hardware/bluetooth/1.0/ABluetoothHciCallbacks.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.bluetooth@1.0-adapter-helper",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.bluetooth@1.0-adapter-helper_genc++"],
-    generated_headers: ["android.hardware.bluetooth@1.0-adapter-helper_genc++_headers"],
-    export_generated_headers: ["android.hardware.bluetooth@1.0-adapter-helper_genc++_headers"],
-    vendor_available: true,
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-        "libhidladapter",
-        "android.hardware.bluetooth@1.0",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-        "libhidladapter",
-        "android.hardware.bluetooth@1.0",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-}
-
-genrule {
-    name: "android.hardware.bluetooth@1.0-adapter_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-main -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.bluetooth@1.0",
-    out: ["main.cpp"]
-}
-
-cc_test {
-    name: "android.hardware.bluetooth@1.0-adapter",
-    defaults: ["hidl-module-defaults"],
-    shared_libs: [
-        "libhidladapter",
-        "libhidlbase",
-        "libhidltransport",
-        "libutils",
-        "android.hardware.bluetooth@1.0",
-        "android.hardware.bluetooth@1.0-adapter-helper",
-    ],
-    generated_sources: ["android.hardware.bluetooth@1.0-adapter_genc++"],
-}
diff --git a/boot/1.0/Android.bp b/boot/1.0/Android.bp
index 98db2ab..85c3b61 100644
--- a/boot/1.0/Android.bp
+++ b/boot/1.0/Android.bp
@@ -1,168 +1,22 @@
-// This file is autogenerated by hidl-gen. Do not edit manually.
+// This file is autogenerated by hidl-gen -Landroidbp.
 
-filegroup {
-    name: "android.hardware.boot@1.0_hal",
+hidl_interface {
+    name: "android.hardware.boot@1.0",
+    root: "android.hardware",
+    vndk: {
+        enabled: true,
+    },
     srcs: [
         "types.hal",
         "IBootControl.hal",
     ],
+    interfaces: [
+        "android.hidl.base@1.0",
+    ],
+    types: [
+        "BoolResult",
+        "CommandResult",
+    ],
+    gen_java: true,
 }
 
-genrule {
-    name: "android.hardware.boot@1.0_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.boot@1.0",
-    srcs: [
-        ":android.hardware.boot@1.0_hal",
-    ],
-    out: [
-        "android/hardware/boot/1.0/types.cpp",
-        "android/hardware/boot/1.0/BootControlAll.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.boot@1.0_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.boot@1.0",
-    srcs: [
-        ":android.hardware.boot@1.0_hal",
-    ],
-    out: [
-        "android/hardware/boot/1.0/types.h",
-        "android/hardware/boot/1.0/hwtypes.h",
-        "android/hardware/boot/1.0/IBootControl.h",
-        "android/hardware/boot/1.0/IHwBootControl.h",
-        "android/hardware/boot/1.0/BnHwBootControl.h",
-        "android/hardware/boot/1.0/BpHwBootControl.h",
-        "android/hardware/boot/1.0/BsBootControl.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.boot@1.0",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.boot@1.0_genc++"],
-    generated_headers: ["android.hardware.boot@1.0_genc++_headers"],
-    export_generated_headers: ["android.hardware.boot@1.0_genc++_headers"],
-    vendor_available: true,
-    vndk: {
-        enabled: true,
-    },
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-    ],
-}
-
-genrule {
-    name: "android.hardware.boot-V1.0-java_gen_java",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Ljava -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.boot@1.0",
-    srcs: [
-        ":android.hardware.boot@1.0_hal",
-    ],
-    out: [
-        "android/hardware/boot/V1_0/BoolResult.java",
-        "android/hardware/boot/V1_0/CommandResult.java",
-        "android/hardware/boot/V1_0/IBootControl.java",
-    ],
-}
-
-java_library {
-    name: "android.hardware.boot-V1.0-java",
-    no_framework_libs: true,
-    defaults: ["hidl-java-module-defaults"],
-    srcs: [":android.hardware.boot-V1.0-java_gen_java"],
-    libs: [
-        "hwbinder",
-        "android.hidl.base-V1.0-java",
-    ]
-}
-
-// This package does not export any types. Not creating java constants export.
-
-
-genrule {
-    name: "android.hardware.boot@1.0-adapter-helper_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.boot@1.0",
-    srcs: [
-        ":android.hardware.boot@1.0_hal",
-    ],
-    out: [
-        "android/hardware/boot/1.0/ABootControl.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.boot@1.0-adapter-helper_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.boot@1.0",
-    srcs: [
-        ":android.hardware.boot@1.0_hal",
-    ],
-    out: [
-        "android/hardware/boot/1.0/ABootControl.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.boot@1.0-adapter-helper",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.boot@1.0-adapter-helper_genc++"],
-    generated_headers: ["android.hardware.boot@1.0-adapter-helper_genc++_headers"],
-    export_generated_headers: ["android.hardware.boot@1.0-adapter-helper_genc++_headers"],
-    vendor_available: true,
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-        "libhidladapter",
-        "android.hardware.boot@1.0",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-        "libhidladapter",
-        "android.hardware.boot@1.0",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-}
-
-genrule {
-    name: "android.hardware.boot@1.0-adapter_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-main -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.boot@1.0",
-    out: ["main.cpp"]
-}
-
-cc_test {
-    name: "android.hardware.boot@1.0-adapter",
-    defaults: ["hidl-module-defaults"],
-    shared_libs: [
-        "libhidladapter",
-        "libhidlbase",
-        "libhidltransport",
-        "libutils",
-        "android.hardware.boot@1.0",
-        "android.hardware.boot@1.0-adapter-helper",
-    ],
-    generated_sources: ["android.hardware.boot@1.0-adapter_genc++"],
-}
diff --git a/broadcastradio/1.0/Android.bp b/broadcastradio/1.0/Android.bp
index 6e994d7..ecfecc4 100644
--- a/broadcastradio/1.0/Android.bp
+++ b/broadcastradio/1.0/Android.bp
@@ -1,7 +1,11 @@
-// This file is autogenerated by hidl-gen. Do not edit manually.
+// This file is autogenerated by hidl-gen -Landroidbp.
 
-filegroup {
-    name: "android.hardware.broadcastradio@1.0_hal",
+hidl_interface {
+    name: "android.hardware.broadcastradio@1.0",
+    root: "android.hardware",
+    vndk: {
+        enabled: true,
+    },
     srcs: [
         "types.hal",
         "IBroadcastRadio.hal",
@@ -9,164 +13,26 @@
         "ITuner.hal",
         "ITunerCallback.hal",
     ],
+    interfaces: [
+        "android.hidl.base@1.0",
+    ],
+    types: [
+        "AmBandConfig",
+        "Band",
+        "BandConfig",
+        "Class",
+        "Deemphasis",
+        "Direction",
+        "FmBandConfig",
+        "MetaData",
+        "MetaDataClock",
+        "MetadataKey",
+        "MetadataType",
+        "ProgramInfo",
+        "Properties",
+        "Rds",
+        "Result",
+    ],
+    gen_java: false,
 }
 
-genrule {
-    name: "android.hardware.broadcastradio@1.0_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.broadcastradio@1.0",
-    srcs: [
-        ":android.hardware.broadcastradio@1.0_hal",
-    ],
-    out: [
-        "android/hardware/broadcastradio/1.0/types.cpp",
-        "android/hardware/broadcastradio/1.0/BroadcastRadioAll.cpp",
-        "android/hardware/broadcastradio/1.0/BroadcastRadioFactoryAll.cpp",
-        "android/hardware/broadcastradio/1.0/TunerAll.cpp",
-        "android/hardware/broadcastradio/1.0/TunerCallbackAll.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.broadcastradio@1.0_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.broadcastradio@1.0",
-    srcs: [
-        ":android.hardware.broadcastradio@1.0_hal",
-    ],
-    out: [
-        "android/hardware/broadcastradio/1.0/types.h",
-        "android/hardware/broadcastradio/1.0/hwtypes.h",
-        "android/hardware/broadcastradio/1.0/IBroadcastRadio.h",
-        "android/hardware/broadcastradio/1.0/IHwBroadcastRadio.h",
-        "android/hardware/broadcastradio/1.0/BnHwBroadcastRadio.h",
-        "android/hardware/broadcastradio/1.0/BpHwBroadcastRadio.h",
-        "android/hardware/broadcastradio/1.0/BsBroadcastRadio.h",
-        "android/hardware/broadcastradio/1.0/IBroadcastRadioFactory.h",
-        "android/hardware/broadcastradio/1.0/IHwBroadcastRadioFactory.h",
-        "android/hardware/broadcastradio/1.0/BnHwBroadcastRadioFactory.h",
-        "android/hardware/broadcastradio/1.0/BpHwBroadcastRadioFactory.h",
-        "android/hardware/broadcastradio/1.0/BsBroadcastRadioFactory.h",
-        "android/hardware/broadcastradio/1.0/ITuner.h",
-        "android/hardware/broadcastradio/1.0/IHwTuner.h",
-        "android/hardware/broadcastradio/1.0/BnHwTuner.h",
-        "android/hardware/broadcastradio/1.0/BpHwTuner.h",
-        "android/hardware/broadcastradio/1.0/BsTuner.h",
-        "android/hardware/broadcastradio/1.0/ITunerCallback.h",
-        "android/hardware/broadcastradio/1.0/IHwTunerCallback.h",
-        "android/hardware/broadcastradio/1.0/BnHwTunerCallback.h",
-        "android/hardware/broadcastradio/1.0/BpHwTunerCallback.h",
-        "android/hardware/broadcastradio/1.0/BsTunerCallback.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.broadcastradio@1.0",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.broadcastradio@1.0_genc++"],
-    generated_headers: ["android.hardware.broadcastradio@1.0_genc++_headers"],
-    export_generated_headers: ["android.hardware.broadcastradio@1.0_genc++_headers"],
-    vendor_available: true,
-    vndk: {
-        enabled: true,
-    },
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-    ],
-}
-
-// This package is not java compatible. Not creating java target.
-
-// This package does not export any types. Not creating java constants export.
-
-
-genrule {
-    name: "android.hardware.broadcastradio@1.0-adapter-helper_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.broadcastradio@1.0",
-    srcs: [
-        ":android.hardware.broadcastradio@1.0_hal",
-    ],
-    out: [
-        "android/hardware/broadcastradio/1.0/ABroadcastRadio.cpp",
-        "android/hardware/broadcastradio/1.0/ABroadcastRadioFactory.cpp",
-        "android/hardware/broadcastradio/1.0/ATuner.cpp",
-        "android/hardware/broadcastradio/1.0/ATunerCallback.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.broadcastradio@1.0-adapter-helper_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.broadcastradio@1.0",
-    srcs: [
-        ":android.hardware.broadcastradio@1.0_hal",
-    ],
-    out: [
-        "android/hardware/broadcastradio/1.0/ABroadcastRadio.h",
-        "android/hardware/broadcastradio/1.0/ABroadcastRadioFactory.h",
-        "android/hardware/broadcastradio/1.0/ATuner.h",
-        "android/hardware/broadcastradio/1.0/ATunerCallback.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.broadcastradio@1.0-adapter-helper",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.broadcastradio@1.0-adapter-helper_genc++"],
-    generated_headers: ["android.hardware.broadcastradio@1.0-adapter-helper_genc++_headers"],
-    export_generated_headers: ["android.hardware.broadcastradio@1.0-adapter-helper_genc++_headers"],
-    vendor_available: true,
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-        "libhidladapter",
-        "android.hardware.broadcastradio@1.0",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-        "libhidladapter",
-        "android.hardware.broadcastradio@1.0",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-}
-
-genrule {
-    name: "android.hardware.broadcastradio@1.0-adapter_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-main -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.broadcastradio@1.0",
-    out: ["main.cpp"]
-}
-
-cc_test {
-    name: "android.hardware.broadcastradio@1.0-adapter",
-    defaults: ["hidl-module-defaults"],
-    shared_libs: [
-        "libhidladapter",
-        "libhidlbase",
-        "libhidltransport",
-        "libutils",
-        "android.hardware.broadcastradio@1.0",
-        "android.hardware.broadcastradio@1.0-adapter-helper",
-    ],
-    generated_sources: ["android.hardware.broadcastradio@1.0-adapter_genc++"],
-}
diff --git a/broadcastradio/1.1/Android.bp b/broadcastradio/1.1/Android.bp
index a487c3f..1d59105 100644
--- a/broadcastradio/1.1/Android.bp
+++ b/broadcastradio/1.1/Android.bp
@@ -1,7 +1,11 @@
-// This file is autogenerated by hidl-gen. Do not edit manually.
+// This file is autogenerated by hidl-gen -Landroidbp.
 
-filegroup {
-    name: "android.hardware.broadcastradio@1.1_hal",
+hidl_interface {
+    name: "android.hardware.broadcastradio@1.1",
+    root: "android.hardware",
+    vndk: {
+        enabled: true,
+    },
     srcs: [
         "types.hal",
         "IBroadcastRadio.hal",
@@ -9,171 +13,22 @@
         "ITuner.hal",
         "ITunerCallback.hal",
     ],
-}
-
-genrule {
-    name: "android.hardware.broadcastradio@1.1_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.broadcastradio@1.1",
-    srcs: [
-        ":android.hardware.broadcastradio@1.1_hal",
-    ],
-    out: [
-        "android/hardware/broadcastradio/1.1/types.cpp",
-        "android/hardware/broadcastradio/1.1/BroadcastRadioAll.cpp",
-        "android/hardware/broadcastradio/1.1/BroadcastRadioFactoryAll.cpp",
-        "android/hardware/broadcastradio/1.1/TunerAll.cpp",
-        "android/hardware/broadcastradio/1.1/TunerCallbackAll.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.broadcastradio@1.1_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.broadcastradio@1.1",
-    srcs: [
-        ":android.hardware.broadcastradio@1.1_hal",
-    ],
-    out: [
-        "android/hardware/broadcastradio/1.1/types.h",
-        "android/hardware/broadcastradio/1.1/hwtypes.h",
-        "android/hardware/broadcastradio/1.1/IBroadcastRadio.h",
-        "android/hardware/broadcastradio/1.1/IHwBroadcastRadio.h",
-        "android/hardware/broadcastradio/1.1/BnHwBroadcastRadio.h",
-        "android/hardware/broadcastradio/1.1/BpHwBroadcastRadio.h",
-        "android/hardware/broadcastradio/1.1/BsBroadcastRadio.h",
-        "android/hardware/broadcastradio/1.1/IBroadcastRadioFactory.h",
-        "android/hardware/broadcastradio/1.1/IHwBroadcastRadioFactory.h",
-        "android/hardware/broadcastradio/1.1/BnHwBroadcastRadioFactory.h",
-        "android/hardware/broadcastradio/1.1/BpHwBroadcastRadioFactory.h",
-        "android/hardware/broadcastradio/1.1/BsBroadcastRadioFactory.h",
-        "android/hardware/broadcastradio/1.1/ITuner.h",
-        "android/hardware/broadcastradio/1.1/IHwTuner.h",
-        "android/hardware/broadcastradio/1.1/BnHwTuner.h",
-        "android/hardware/broadcastradio/1.1/BpHwTuner.h",
-        "android/hardware/broadcastradio/1.1/BsTuner.h",
-        "android/hardware/broadcastradio/1.1/ITunerCallback.h",
-        "android/hardware/broadcastradio/1.1/IHwTunerCallback.h",
-        "android/hardware/broadcastradio/1.1/BnHwTunerCallback.h",
-        "android/hardware/broadcastradio/1.1/BpHwTunerCallback.h",
-        "android/hardware/broadcastradio/1.1/BsTunerCallback.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.broadcastradio@1.1",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.broadcastradio@1.1_genc++"],
-    generated_headers: ["android.hardware.broadcastradio@1.1_genc++_headers"],
-    export_generated_headers: ["android.hardware.broadcastradio@1.1_genc++_headers"],
-    vendor_available: true,
-    vndk: {
-        enabled: true,
-    },
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
+    interfaces: [
         "android.hardware.broadcastradio@1.0",
+        "android.hidl.base@1.0",
     ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-        "android.hardware.broadcastradio@1.0",
+    types: [
+        "IdentifierType",
+        "Modulation",
+        "ProgramIdentifier",
+        "ProgramInfo",
+        "ProgramInfoFlags",
+        "ProgramListResult",
+        "ProgramSelector",
+        "ProgramType",
+        "Properties",
+        "VendorKeyValue",
     ],
+    gen_java: false,
 }
 
-// This package is not java compatible. Not creating java target.
-
-// This package does not export any types. Not creating java constants export.
-
-
-genrule {
-    name: "android.hardware.broadcastradio@1.1-adapter-helper_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.broadcastradio@1.1",
-    srcs: [
-        ":android.hardware.broadcastradio@1.1_hal",
-    ],
-    out: [
-        "android/hardware/broadcastradio/1.1/ABroadcastRadio.cpp",
-        "android/hardware/broadcastradio/1.1/ABroadcastRadioFactory.cpp",
-        "android/hardware/broadcastradio/1.1/ATuner.cpp",
-        "android/hardware/broadcastradio/1.1/ATunerCallback.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.broadcastradio@1.1-adapter-helper_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.broadcastradio@1.1",
-    srcs: [
-        ":android.hardware.broadcastradio@1.1_hal",
-    ],
-    out: [
-        "android/hardware/broadcastradio/1.1/ABroadcastRadio.h",
-        "android/hardware/broadcastradio/1.1/ABroadcastRadioFactory.h",
-        "android/hardware/broadcastradio/1.1/ATuner.h",
-        "android/hardware/broadcastradio/1.1/ATunerCallback.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.broadcastradio@1.1-adapter-helper",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.broadcastradio@1.1-adapter-helper_genc++"],
-    generated_headers: ["android.hardware.broadcastradio@1.1-adapter-helper_genc++_headers"],
-    export_generated_headers: ["android.hardware.broadcastradio@1.1-adapter-helper_genc++_headers"],
-    vendor_available: true,
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-        "libhidladapter",
-        "android.hardware.broadcastradio@1.0",
-        "android.hardware.broadcastradio@1.1",
-        "android.hardware.broadcastradio@1.0-adapter-helper",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-        "libhidladapter",
-        "android.hardware.broadcastradio@1.0",
-        "android.hardware.broadcastradio@1.1",
-        "android.hardware.broadcastradio@1.0-adapter-helper",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-}
-
-genrule {
-    name: "android.hardware.broadcastradio@1.1-adapter_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-main -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.broadcastradio@1.1",
-    out: ["main.cpp"]
-}
-
-cc_test {
-    name: "android.hardware.broadcastradio@1.1-adapter",
-    defaults: ["hidl-module-defaults"],
-    shared_libs: [
-        "libhidladapter",
-        "libhidlbase",
-        "libhidltransport",
-        "libutils",
-        "android.hardware.broadcastradio@1.0",
-        "android.hardware.broadcastradio@1.1",
-        "android.hardware.broadcastradio@1.1-adapter-helper",
-    ],
-    generated_sources: ["android.hardware.broadcastradio@1.1-adapter_genc++"],
-}
diff --git a/broadcastradio/1.2/Android.bp b/broadcastradio/1.2/Android.bp
index 1a7f904..913da8c 100644
--- a/broadcastradio/1.2/Android.bp
+++ b/broadcastradio/1.2/Android.bp
@@ -1,177 +1,24 @@
-// This file is autogenerated by hidl-gen. Do not edit manually.
+// This file is autogenerated by hidl-gen -Landroidbp.
 
-filegroup {
-    name: "android.hardware.broadcastradio@1.2_hal",
+hidl_interface {
+    name: "android.hardware.broadcastradio@1.2",
+    root: "android.hardware",
+    vndk: {
+        enabled: true,
+    },
     srcs: [
         "types.hal",
         "IBroadcastRadioFactory.hal",
         "ITuner.hal",
         "ITunerCallback.hal",
     ],
-}
-
-genrule {
-    name: "android.hardware.broadcastradio@1.2_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.broadcastradio@1.2",
-    srcs: [
-        ":android.hardware.broadcastradio@1.2_hal",
-    ],
-    out: [
-        "android/hardware/broadcastradio/1.2/types.cpp",
-        "android/hardware/broadcastradio/1.2/BroadcastRadioFactoryAll.cpp",
-        "android/hardware/broadcastradio/1.2/TunerAll.cpp",
-        "android/hardware/broadcastradio/1.2/TunerCallbackAll.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.broadcastradio@1.2_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.broadcastradio@1.2",
-    srcs: [
-        ":android.hardware.broadcastradio@1.2_hal",
-    ],
-    out: [
-        "android/hardware/broadcastradio/1.2/types.h",
-        "android/hardware/broadcastradio/1.2/hwtypes.h",
-        "android/hardware/broadcastradio/1.2/IBroadcastRadioFactory.h",
-        "android/hardware/broadcastradio/1.2/IHwBroadcastRadioFactory.h",
-        "android/hardware/broadcastradio/1.2/BnHwBroadcastRadioFactory.h",
-        "android/hardware/broadcastradio/1.2/BpHwBroadcastRadioFactory.h",
-        "android/hardware/broadcastradio/1.2/BsBroadcastRadioFactory.h",
-        "android/hardware/broadcastradio/1.2/ITuner.h",
-        "android/hardware/broadcastradio/1.2/IHwTuner.h",
-        "android/hardware/broadcastradio/1.2/BnHwTuner.h",
-        "android/hardware/broadcastradio/1.2/BpHwTuner.h",
-        "android/hardware/broadcastradio/1.2/BsTuner.h",
-        "android/hardware/broadcastradio/1.2/ITunerCallback.h",
-        "android/hardware/broadcastradio/1.2/IHwTunerCallback.h",
-        "android/hardware/broadcastradio/1.2/BnHwTunerCallback.h",
-        "android/hardware/broadcastradio/1.2/BpHwTunerCallback.h",
-        "android/hardware/broadcastradio/1.2/BsTunerCallback.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.broadcastradio@1.2",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.broadcastradio@1.2_genc++"],
-    generated_headers: ["android.hardware.broadcastradio@1.2_genc++_headers"],
-    export_generated_headers: ["android.hardware.broadcastradio@1.2_genc++_headers"],
-    vendor_available: true,
-    vndk: {
-        enabled: true,
-    },
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
+    interfaces: [
         "android.hardware.broadcastradio@1.0",
         "android.hardware.broadcastradio@1.1",
+        "android.hidl.base@1.0",
     ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-        "android.hardware.broadcastradio@1.0",
-        "android.hardware.broadcastradio@1.1",
+    types: [
     ],
+    gen_java: false,
 }
 
-// This package is not java compatible. Not creating java target.
-
-// This package does not export any types. Not creating java constants export.
-
-
-genrule {
-    name: "android.hardware.broadcastradio@1.2-adapter-helper_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.broadcastradio@1.2",
-    srcs: [
-        ":android.hardware.broadcastradio@1.2_hal",
-    ],
-    out: [
-        "android/hardware/broadcastradio/1.2/ABroadcastRadioFactory.cpp",
-        "android/hardware/broadcastradio/1.2/ATuner.cpp",
-        "android/hardware/broadcastradio/1.2/ATunerCallback.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.broadcastradio@1.2-adapter-helper_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.broadcastradio@1.2",
-    srcs: [
-        ":android.hardware.broadcastradio@1.2_hal",
-    ],
-    out: [
-        "android/hardware/broadcastradio/1.2/ABroadcastRadioFactory.h",
-        "android/hardware/broadcastradio/1.2/ATuner.h",
-        "android/hardware/broadcastradio/1.2/ATunerCallback.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.broadcastradio@1.2-adapter-helper",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.broadcastradio@1.2-adapter-helper_genc++"],
-    generated_headers: ["android.hardware.broadcastradio@1.2-adapter-helper_genc++_headers"],
-    export_generated_headers: ["android.hardware.broadcastradio@1.2-adapter-helper_genc++_headers"],
-    vendor_available: true,
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-        "libhidladapter",
-        "android.hardware.broadcastradio@1.0",
-        "android.hardware.broadcastradio@1.1",
-        "android.hardware.broadcastradio@1.2",
-        "android.hardware.broadcastradio@1.0-adapter-helper",
-        "android.hardware.broadcastradio@1.1-adapter-helper",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-        "libhidladapter",
-        "android.hardware.broadcastradio@1.0",
-        "android.hardware.broadcastradio@1.1",
-        "android.hardware.broadcastradio@1.2",
-        "android.hardware.broadcastradio@1.0-adapter-helper",
-        "android.hardware.broadcastradio@1.1-adapter-helper",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-}
-
-genrule {
-    name: "android.hardware.broadcastradio@1.2-adapter_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-main -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.broadcastradio@1.2",
-    out: ["main.cpp"]
-}
-
-cc_test {
-    name: "android.hardware.broadcastradio@1.2-adapter",
-    defaults: ["hidl-module-defaults"],
-    shared_libs: [
-        "libhidladapter",
-        "libhidlbase",
-        "libhidltransport",
-        "libutils",
-        "android.hardware.broadcastradio@1.0",
-        "android.hardware.broadcastradio@1.1",
-        "android.hardware.broadcastradio@1.2",
-        "android.hardware.broadcastradio@1.2-adapter-helper",
-    ],
-    generated_sources: ["android.hardware.broadcastradio@1.2-adapter_genc++"],
-}
diff --git a/camera/common/1.0/Android.bp b/camera/common/1.0/Android.bp
index 8a553e2..c42e054 100644
--- a/camera/common/1.0/Android.bp
+++ b/camera/common/1.0/Android.bp
@@ -1,93 +1,25 @@
-// This file is autogenerated by hidl-gen. Do not edit manually.
+// This file is autogenerated by hidl-gen -Landroidbp.
 
-filegroup {
-    name: "android.hardware.camera.common@1.0_hal",
-    srcs: [
-        "types.hal",
-    ],
-}
-
-genrule {
-    name: "android.hardware.camera.common@1.0_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.camera.common@1.0",
-    srcs: [
-        ":android.hardware.camera.common@1.0_hal",
-    ],
-    out: [
-        "android/hardware/camera/common/1.0/types.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.camera.common@1.0_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.camera.common@1.0",
-    srcs: [
-        ":android.hardware.camera.common@1.0_hal",
-    ],
-    out: [
-        "android/hardware/camera/common/1.0/types.h",
-        "android/hardware/camera/common/1.0/hwtypes.h",
-    ],
-}
-
-cc_library {
+hidl_interface {
     name: "android.hardware.camera.common@1.0",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.camera.common@1.0_genc++"],
-    generated_headers: ["android.hardware.camera.common@1.0_genc++_headers"],
-    export_generated_headers: ["android.hardware.camera.common@1.0_genc++_headers"],
-    vendor_available: true,
+    root: "android.hardware",
     vndk: {
         enabled: true,
     },
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-    ],
-}
-
-genrule {
-    name: "android.hardware.camera.common-V1.0-java_gen_java",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Ljava -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.camera.common@1.0",
     srcs: [
-        ":android.hardware.camera.common@1.0_hal",
+        "types.hal",
     ],
-    out: [
-        "android/hardware/camera/common/V1_0/CameraDeviceStatus.java",
-        "android/hardware/camera/common/V1_0/CameraMetadataType.java",
-        "android/hardware/camera/common/V1_0/CameraResourceCost.java",
-        "android/hardware/camera/common/V1_0/Status.java",
-        "android/hardware/camera/common/V1_0/TagBoundaryId.java",
-        "android/hardware/camera/common/V1_0/TorchMode.java",
-        "android/hardware/camera/common/V1_0/TorchModeStatus.java",
-        "android/hardware/camera/common/V1_0/VendorTag.java",
-        "android/hardware/camera/common/V1_0/VendorTagSection.java",
+    types: [
+        "CameraDeviceStatus",
+        "CameraMetadataType",
+        "CameraResourceCost",
+        "Status",
+        "TagBoundaryId",
+        "TorchMode",
+        "TorchModeStatus",
+        "VendorTag",
+        "VendorTagSection",
     ],
+    gen_java: true,
 }
 
-java_library {
-    name: "android.hardware.camera.common-V1.0-java",
-    no_framework_libs: true,
-    defaults: ["hidl-java-module-defaults"],
-    srcs: [":android.hardware.camera.common-V1.0-java_gen_java"],
-    libs: [
-        "hwbinder",
-    ]
-}
-
-// This package does not export any types. Not creating java constants export.
-
-// This package has no interfaces. Not creating versioning adapter.
diff --git a/camera/device/1.0/Android.bp b/camera/device/1.0/Android.bp
index f19aae9..dbf2a10 100644
--- a/camera/device/1.0/Android.bp
+++ b/camera/device/1.0/Android.bp
@@ -1,173 +1,34 @@
-// This file is autogenerated by hidl-gen. Do not edit manually.
+// This file is autogenerated by hidl-gen -Landroidbp.
 
-filegroup {
-    name: "android.hardware.camera.device@1.0_hal",
+hidl_interface {
+    name: "android.hardware.camera.device@1.0",
+    root: "android.hardware",
+    vndk: {
+        enabled: true,
+    },
     srcs: [
         "types.hal",
         "ICameraDevice.hal",
         "ICameraDeviceCallback.hal",
         "ICameraDevicePreviewCallback.hal",
     ],
-}
-
-genrule {
-    name: "android.hardware.camera.device@1.0_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.camera.device@1.0",
-    srcs: [
-        ":android.hardware.camera.device@1.0_hal",
-    ],
-    out: [
-        "android/hardware/camera/device/1.0/types.cpp",
-        "android/hardware/camera/device/1.0/CameraDeviceAll.cpp",
-        "android/hardware/camera/device/1.0/CameraDeviceCallbackAll.cpp",
-        "android/hardware/camera/device/1.0/CameraDevicePreviewCallbackAll.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.camera.device@1.0_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.camera.device@1.0",
-    srcs: [
-        ":android.hardware.camera.device@1.0_hal",
-    ],
-    out: [
-        "android/hardware/camera/device/1.0/types.h",
-        "android/hardware/camera/device/1.0/hwtypes.h",
-        "android/hardware/camera/device/1.0/ICameraDevice.h",
-        "android/hardware/camera/device/1.0/IHwCameraDevice.h",
-        "android/hardware/camera/device/1.0/BnHwCameraDevice.h",
-        "android/hardware/camera/device/1.0/BpHwCameraDevice.h",
-        "android/hardware/camera/device/1.0/BsCameraDevice.h",
-        "android/hardware/camera/device/1.0/ICameraDeviceCallback.h",
-        "android/hardware/camera/device/1.0/IHwCameraDeviceCallback.h",
-        "android/hardware/camera/device/1.0/BnHwCameraDeviceCallback.h",
-        "android/hardware/camera/device/1.0/BpHwCameraDeviceCallback.h",
-        "android/hardware/camera/device/1.0/BsCameraDeviceCallback.h",
-        "android/hardware/camera/device/1.0/ICameraDevicePreviewCallback.h",
-        "android/hardware/camera/device/1.0/IHwCameraDevicePreviewCallback.h",
-        "android/hardware/camera/device/1.0/BnHwCameraDevicePreviewCallback.h",
-        "android/hardware/camera/device/1.0/BpHwCameraDevicePreviewCallback.h",
-        "android/hardware/camera/device/1.0/BsCameraDevicePreviewCallback.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.camera.device@1.0",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.camera.device@1.0_genc++"],
-    generated_headers: ["android.hardware.camera.device@1.0_genc++_headers"],
-    export_generated_headers: ["android.hardware.camera.device@1.0_genc++_headers"],
-    vendor_available: true,
-    vndk: {
-        enabled: true,
-    },
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
+    interfaces: [
         "android.hardware.camera.common@1.0",
         "android.hardware.graphics.common@1.0",
+        "android.hidl.base@1.0",
     ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-        "android.hardware.camera.common@1.0",
-        "android.hardware.graphics.common@1.0",
+    types: [
+        "CameraFace",
+        "CameraFacing",
+        "CameraFrameMetadata",
+        "CameraInfo",
+        "CommandType",
+        "DataCallbackMsg",
+        "FrameCallbackFlag",
+        "HandleTimestampMessage",
+        "NotifyCallbackMsg",
+        "VideoFrameMessage",
     ],
+    gen_java: false,
 }
 
-// This package is not java compatible. Not creating java target.
-
-// This package does not export any types. Not creating java constants export.
-
-
-genrule {
-    name: "android.hardware.camera.device@1.0-adapter-helper_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.camera.device@1.0",
-    srcs: [
-        ":android.hardware.camera.device@1.0_hal",
-    ],
-    out: [
-        "android/hardware/camera/device/1.0/ACameraDevice.cpp",
-        "android/hardware/camera/device/1.0/ACameraDeviceCallback.cpp",
-        "android/hardware/camera/device/1.0/ACameraDevicePreviewCallback.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.camera.device@1.0-adapter-helper_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.camera.device@1.0",
-    srcs: [
-        ":android.hardware.camera.device@1.0_hal",
-    ],
-    out: [
-        "android/hardware/camera/device/1.0/ACameraDevice.h",
-        "android/hardware/camera/device/1.0/ACameraDeviceCallback.h",
-        "android/hardware/camera/device/1.0/ACameraDevicePreviewCallback.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.camera.device@1.0-adapter-helper",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.camera.device@1.0-adapter-helper_genc++"],
-    generated_headers: ["android.hardware.camera.device@1.0-adapter-helper_genc++_headers"],
-    export_generated_headers: ["android.hardware.camera.device@1.0-adapter-helper_genc++_headers"],
-    vendor_available: true,
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-        "libhidladapter",
-        "android.hardware.camera.common@1.0",
-        "android.hardware.camera.device@1.0",
-        "android.hardware.graphics.common@1.0",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-        "libhidladapter",
-        "android.hardware.camera.common@1.0",
-        "android.hardware.camera.device@1.0",
-        "android.hardware.graphics.common@1.0",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-}
-
-genrule {
-    name: "android.hardware.camera.device@1.0-adapter_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-main -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.camera.device@1.0",
-    out: ["main.cpp"]
-}
-
-cc_test {
-    name: "android.hardware.camera.device@1.0-adapter",
-    defaults: ["hidl-module-defaults"],
-    shared_libs: [
-        "libhidladapter",
-        "libhidlbase",
-        "libhidltransport",
-        "libutils",
-        "android.hardware.camera.common@1.0",
-        "android.hardware.camera.device@1.0",
-        "android.hardware.graphics.common@1.0",
-        "android.hardware.camera.device@1.0-adapter-helper",
-    ],
-    generated_sources: ["android.hardware.camera.device@1.0-adapter_genc++"],
-}
diff --git a/camera/device/3.2/Android.bp b/camera/device/3.2/Android.bp
index 0dcbdb4..a8a164e 100644
--- a/camera/device/3.2/Android.bp
+++ b/camera/device/3.2/Android.bp
@@ -1,173 +1,44 @@
-// This file is autogenerated by hidl-gen. Do not edit manually.
+// This file is autogenerated by hidl-gen -Landroidbp.
 
-filegroup {
-    name: "android.hardware.camera.device@3.2_hal",
+hidl_interface {
+    name: "android.hardware.camera.device@3.2",
+    root: "android.hardware",
+    vndk: {
+        enabled: true,
+    },
     srcs: [
         "types.hal",
         "ICameraDevice.hal",
         "ICameraDeviceCallback.hal",
         "ICameraDeviceSession.hal",
     ],
-}
-
-genrule {
-    name: "android.hardware.camera.device@3.2_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.camera.device@3.2",
-    srcs: [
-        ":android.hardware.camera.device@3.2_hal",
-    ],
-    out: [
-        "android/hardware/camera/device/3.2/types.cpp",
-        "android/hardware/camera/device/3.2/CameraDeviceAll.cpp",
-        "android/hardware/camera/device/3.2/CameraDeviceCallbackAll.cpp",
-        "android/hardware/camera/device/3.2/CameraDeviceSessionAll.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.camera.device@3.2_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.camera.device@3.2",
-    srcs: [
-        ":android.hardware.camera.device@3.2_hal",
-    ],
-    out: [
-        "android/hardware/camera/device/3.2/types.h",
-        "android/hardware/camera/device/3.2/hwtypes.h",
-        "android/hardware/camera/device/3.2/ICameraDevice.h",
-        "android/hardware/camera/device/3.2/IHwCameraDevice.h",
-        "android/hardware/camera/device/3.2/BnHwCameraDevice.h",
-        "android/hardware/camera/device/3.2/BpHwCameraDevice.h",
-        "android/hardware/camera/device/3.2/BsCameraDevice.h",
-        "android/hardware/camera/device/3.2/ICameraDeviceCallback.h",
-        "android/hardware/camera/device/3.2/IHwCameraDeviceCallback.h",
-        "android/hardware/camera/device/3.2/BnHwCameraDeviceCallback.h",
-        "android/hardware/camera/device/3.2/BpHwCameraDeviceCallback.h",
-        "android/hardware/camera/device/3.2/BsCameraDeviceCallback.h",
-        "android/hardware/camera/device/3.2/ICameraDeviceSession.h",
-        "android/hardware/camera/device/3.2/IHwCameraDeviceSession.h",
-        "android/hardware/camera/device/3.2/BnHwCameraDeviceSession.h",
-        "android/hardware/camera/device/3.2/BpHwCameraDeviceSession.h",
-        "android/hardware/camera/device/3.2/BsCameraDeviceSession.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.camera.device@3.2",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.camera.device@3.2_genc++"],
-    generated_headers: ["android.hardware.camera.device@3.2_genc++_headers"],
-    export_generated_headers: ["android.hardware.camera.device@3.2_genc++_headers"],
-    vendor_available: true,
-    vndk: {
-        enabled: true,
-    },
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
+    interfaces: [
         "android.hardware.camera.common@1.0",
         "android.hardware.graphics.common@1.0",
+        "android.hidl.base@1.0",
     ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-        "android.hardware.camera.common@1.0",
-        "android.hardware.graphics.common@1.0",
+    types: [
+        "BufferCache",
+        "BufferStatus",
+        "CameraBlob",
+        "CameraBlobId",
+        "CaptureRequest",
+        "CaptureResult",
+        "ErrorCode",
+        "ErrorMsg",
+        "HalStream",
+        "HalStreamConfiguration",
+        "MsgType",
+        "NotifyMsg",
+        "RequestTemplate",
+        "ShutterMsg",
+        "Stream",
+        "StreamBuffer",
+        "StreamConfiguration",
+        "StreamConfigurationMode",
+        "StreamRotation",
+        "StreamType",
     ],
+    gen_java: false,
 }
 
-// This package is not java compatible. Not creating java target.
-
-// This package does not export any types. Not creating java constants export.
-
-
-genrule {
-    name: "android.hardware.camera.device@3.2-adapter-helper_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.camera.device@3.2",
-    srcs: [
-        ":android.hardware.camera.device@3.2_hal",
-    ],
-    out: [
-        "android/hardware/camera/device/3.2/ACameraDevice.cpp",
-        "android/hardware/camera/device/3.2/ACameraDeviceCallback.cpp",
-        "android/hardware/camera/device/3.2/ACameraDeviceSession.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.camera.device@3.2-adapter-helper_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.camera.device@3.2",
-    srcs: [
-        ":android.hardware.camera.device@3.2_hal",
-    ],
-    out: [
-        "android/hardware/camera/device/3.2/ACameraDevice.h",
-        "android/hardware/camera/device/3.2/ACameraDeviceCallback.h",
-        "android/hardware/camera/device/3.2/ACameraDeviceSession.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.camera.device@3.2-adapter-helper",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.camera.device@3.2-adapter-helper_genc++"],
-    generated_headers: ["android.hardware.camera.device@3.2-adapter-helper_genc++_headers"],
-    export_generated_headers: ["android.hardware.camera.device@3.2-adapter-helper_genc++_headers"],
-    vendor_available: true,
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-        "libhidladapter",
-        "android.hardware.camera.common@1.0",
-        "android.hardware.camera.device@3.2",
-        "android.hardware.graphics.common@1.0",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-        "libhidladapter",
-        "android.hardware.camera.common@1.0",
-        "android.hardware.camera.device@3.2",
-        "android.hardware.graphics.common@1.0",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-}
-
-genrule {
-    name: "android.hardware.camera.device@3.2-adapter_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-main -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.camera.device@3.2",
-    out: ["main.cpp"]
-}
-
-cc_test {
-    name: "android.hardware.camera.device@3.2-adapter",
-    defaults: ["hidl-module-defaults"],
-    shared_libs: [
-        "libhidladapter",
-        "libhidlbase",
-        "libhidltransport",
-        "libutils",
-        "android.hardware.camera.common@1.0",
-        "android.hardware.camera.device@3.2",
-        "android.hardware.graphics.common@1.0",
-        "android.hardware.camera.device@3.2-adapter-helper",
-    ],
-    generated_sources: ["android.hardware.camera.device@3.2-adapter_genc++"],
-}
diff --git a/camera/device/3.3/Android.bp b/camera/device/3.3/Android.bp
index af3d7b4..f006f79 100644
--- a/camera/device/3.3/Android.bp
+++ b/camera/device/3.3/Android.bp
@@ -1,162 +1,25 @@
-// This file is autogenerated by hidl-gen. Do not edit manually.
+// This file is autogenerated by hidl-gen -Landroidbp.
 
-filegroup {
-    name: "android.hardware.camera.device@3.3_hal",
+hidl_interface {
+    name: "android.hardware.camera.device@3.3",
+    root: "android.hardware",
+    vndk: {
+        enabled: true,
+    },
     srcs: [
         "types.hal",
         "ICameraDeviceSession.hal",
     ],
-}
-
-genrule {
-    name: "android.hardware.camera.device@3.3_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.camera.device@3.3",
-    srcs: [
-        ":android.hardware.camera.device@3.3_hal",
-    ],
-    out: [
-        "android/hardware/camera/device/3.3/types.cpp",
-        "android/hardware/camera/device/3.3/CameraDeviceSessionAll.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.camera.device@3.3_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.camera.device@3.3",
-    srcs: [
-        ":android.hardware.camera.device@3.3_hal",
-    ],
-    out: [
-        "android/hardware/camera/device/3.3/types.h",
-        "android/hardware/camera/device/3.3/hwtypes.h",
-        "android/hardware/camera/device/3.3/ICameraDeviceSession.h",
-        "android/hardware/camera/device/3.3/IHwCameraDeviceSession.h",
-        "android/hardware/camera/device/3.3/BnHwCameraDeviceSession.h",
-        "android/hardware/camera/device/3.3/BpHwCameraDeviceSession.h",
-        "android/hardware/camera/device/3.3/BsCameraDeviceSession.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.camera.device@3.3",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.camera.device@3.3_genc++"],
-    generated_headers: ["android.hardware.camera.device@3.3_genc++_headers"],
-    export_generated_headers: ["android.hardware.camera.device@3.3_genc++_headers"],
-    vendor_available: true,
-    vndk: {
-        enabled: true,
-    },
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
+    interfaces: [
         "android.hardware.camera.common@1.0",
         "android.hardware.camera.device@3.2",
         "android.hardware.graphics.common@1.0",
+        "android.hidl.base@1.0",
     ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-        "android.hardware.camera.common@1.0",
-        "android.hardware.camera.device@3.2",
-        "android.hardware.graphics.common@1.0",
+    types: [
+        "HalStream",
+        "HalStreamConfiguration",
     ],
+    gen_java: false,
 }
 
-// This package is not java compatible. Not creating java target.
-
-// This package does not export any types. Not creating java constants export.
-
-
-genrule {
-    name: "android.hardware.camera.device@3.3-adapter-helper_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.camera.device@3.3",
-    srcs: [
-        ":android.hardware.camera.device@3.3_hal",
-    ],
-    out: [
-        "android/hardware/camera/device/3.3/ACameraDeviceSession.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.camera.device@3.3-adapter-helper_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.camera.device@3.3",
-    srcs: [
-        ":android.hardware.camera.device@3.3_hal",
-    ],
-    out: [
-        "android/hardware/camera/device/3.3/ACameraDeviceSession.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.camera.device@3.3-adapter-helper",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.camera.device@3.3-adapter-helper_genc++"],
-    generated_headers: ["android.hardware.camera.device@3.3-adapter-helper_genc++_headers"],
-    export_generated_headers: ["android.hardware.camera.device@3.3-adapter-helper_genc++_headers"],
-    vendor_available: true,
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-        "libhidladapter",
-        "android.hardware.camera.common@1.0",
-        "android.hardware.camera.device@3.2",
-        "android.hardware.camera.device@3.3",
-        "android.hardware.graphics.common@1.0",
-        "android.hardware.camera.device@3.2-adapter-helper",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-        "libhidladapter",
-        "android.hardware.camera.common@1.0",
-        "android.hardware.camera.device@3.2",
-        "android.hardware.camera.device@3.3",
-        "android.hardware.graphics.common@1.0",
-        "android.hardware.camera.device@3.2-adapter-helper",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-}
-
-genrule {
-    name: "android.hardware.camera.device@3.3-adapter_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-main -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.camera.device@3.3",
-    out: ["main.cpp"]
-}
-
-cc_test {
-    name: "android.hardware.camera.device@3.3-adapter",
-    defaults: ["hidl-module-defaults"],
-    shared_libs: [
-        "libhidladapter",
-        "libhidlbase",
-        "libhidltransport",
-        "libutils",
-        "android.hardware.camera.common@1.0",
-        "android.hardware.camera.device@3.2",
-        "android.hardware.camera.device@3.3",
-        "android.hardware.graphics.common@1.0",
-        "android.hardware.camera.device@3.3-adapter-helper",
-    ],
-    generated_sources: ["android.hardware.camera.device@3.3-adapter_genc++"],
-}
diff --git a/camera/metadata/3.2/Android.bp b/camera/metadata/3.2/Android.bp
index 455a271..bce2c9b 100644
--- a/camera/metadata/3.2/Android.bp
+++ b/camera/metadata/3.2/Android.bp
@@ -1,148 +1,80 @@
-// This file is autogenerated by hidl-gen. Do not edit manually.
+// This file is autogenerated by hidl-gen -Landroidbp.
 
-filegroup {
-    name: "android.hardware.camera.metadata@3.2_hal",
-    srcs: [
-        "types.hal",
-    ],
-}
-
-genrule {
-    name: "android.hardware.camera.metadata@3.2_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.camera.metadata@3.2",
-    srcs: [
-        ":android.hardware.camera.metadata@3.2_hal",
-    ],
-    out: [
-        "android/hardware/camera/metadata/3.2/types.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.camera.metadata@3.2_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.camera.metadata@3.2",
-    srcs: [
-        ":android.hardware.camera.metadata@3.2_hal",
-    ],
-    out: [
-        "android/hardware/camera/metadata/3.2/types.h",
-        "android/hardware/camera/metadata/3.2/hwtypes.h",
-    ],
-}
-
-cc_library {
+hidl_interface {
     name: "android.hardware.camera.metadata@3.2",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.camera.metadata@3.2_genc++"],
-    generated_headers: ["android.hardware.camera.metadata@3.2_genc++_headers"],
-    export_generated_headers: ["android.hardware.camera.metadata@3.2_genc++_headers"],
-    vendor_available: true,
+    root: "android.hardware",
     vndk: {
         enabled: true,
     },
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-    ],
-}
-
-genrule {
-    name: "android.hardware.camera.metadata-V3.2-java_gen_java",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Ljava -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.camera.metadata@3.2",
     srcs: [
-        ":android.hardware.camera.metadata@3.2_hal",
+        "types.hal",
     ],
-    out: [
-        "android/hardware/camera/metadata/V3_2/CameraMetadataEnumAndroidBlackLevelLock.java",
-        "android/hardware/camera/metadata/V3_2/CameraMetadataEnumAndroidColorCorrectionAberrationMode.java",
-        "android/hardware/camera/metadata/V3_2/CameraMetadataEnumAndroidColorCorrectionMode.java",
-        "android/hardware/camera/metadata/V3_2/CameraMetadataEnumAndroidControlAeAntibandingMode.java",
-        "android/hardware/camera/metadata/V3_2/CameraMetadataEnumAndroidControlAeLock.java",
-        "android/hardware/camera/metadata/V3_2/CameraMetadataEnumAndroidControlAeLockAvailable.java",
-        "android/hardware/camera/metadata/V3_2/CameraMetadataEnumAndroidControlAeMode.java",
-        "android/hardware/camera/metadata/V3_2/CameraMetadataEnumAndroidControlAePrecaptureTrigger.java",
-        "android/hardware/camera/metadata/V3_2/CameraMetadataEnumAndroidControlAeState.java",
-        "android/hardware/camera/metadata/V3_2/CameraMetadataEnumAndroidControlAfMode.java",
-        "android/hardware/camera/metadata/V3_2/CameraMetadataEnumAndroidControlAfState.java",
-        "android/hardware/camera/metadata/V3_2/CameraMetadataEnumAndroidControlAfTrigger.java",
-        "android/hardware/camera/metadata/V3_2/CameraMetadataEnumAndroidControlAwbLock.java",
-        "android/hardware/camera/metadata/V3_2/CameraMetadataEnumAndroidControlAwbLockAvailable.java",
-        "android/hardware/camera/metadata/V3_2/CameraMetadataEnumAndroidControlAwbMode.java",
-        "android/hardware/camera/metadata/V3_2/CameraMetadataEnumAndroidControlAwbState.java",
-        "android/hardware/camera/metadata/V3_2/CameraMetadataEnumAndroidControlCaptureIntent.java",
-        "android/hardware/camera/metadata/V3_2/CameraMetadataEnumAndroidControlEffectMode.java",
-        "android/hardware/camera/metadata/V3_2/CameraMetadataEnumAndroidControlEnableZsl.java",
-        "android/hardware/camera/metadata/V3_2/CameraMetadataEnumAndroidControlMode.java",
-        "android/hardware/camera/metadata/V3_2/CameraMetadataEnumAndroidControlSceneMode.java",
-        "android/hardware/camera/metadata/V3_2/CameraMetadataEnumAndroidControlVideoStabilizationMode.java",
-        "android/hardware/camera/metadata/V3_2/CameraMetadataEnumAndroidDemosaicMode.java",
-        "android/hardware/camera/metadata/V3_2/CameraMetadataEnumAndroidDepthAvailableDepthStreamConfigurations.java",
-        "android/hardware/camera/metadata/V3_2/CameraMetadataEnumAndroidDepthDepthIsExclusive.java",
-        "android/hardware/camera/metadata/V3_2/CameraMetadataEnumAndroidEdgeMode.java",
-        "android/hardware/camera/metadata/V3_2/CameraMetadataEnumAndroidFlashInfoAvailable.java",
-        "android/hardware/camera/metadata/V3_2/CameraMetadataEnumAndroidFlashMode.java",
-        "android/hardware/camera/metadata/V3_2/CameraMetadataEnumAndroidFlashState.java",
-        "android/hardware/camera/metadata/V3_2/CameraMetadataEnumAndroidHotPixelMode.java",
-        "android/hardware/camera/metadata/V3_2/CameraMetadataEnumAndroidInfoSupportedHardwareLevel.java",
-        "android/hardware/camera/metadata/V3_2/CameraMetadataEnumAndroidLedAvailableLeds.java",
-        "android/hardware/camera/metadata/V3_2/CameraMetadataEnumAndroidLedTransmit.java",
-        "android/hardware/camera/metadata/V3_2/CameraMetadataEnumAndroidLensFacing.java",
-        "android/hardware/camera/metadata/V3_2/CameraMetadataEnumAndroidLensInfoFocusDistanceCalibration.java",
-        "android/hardware/camera/metadata/V3_2/CameraMetadataEnumAndroidLensOpticalStabilizationMode.java",
-        "android/hardware/camera/metadata/V3_2/CameraMetadataEnumAndroidLensState.java",
-        "android/hardware/camera/metadata/V3_2/CameraMetadataEnumAndroidNoiseReductionMode.java",
-        "android/hardware/camera/metadata/V3_2/CameraMetadataEnumAndroidQuirksPartialResult.java",
-        "android/hardware/camera/metadata/V3_2/CameraMetadataEnumAndroidRequestAvailableCapabilities.java",
-        "android/hardware/camera/metadata/V3_2/CameraMetadataEnumAndroidRequestMetadataMode.java",
-        "android/hardware/camera/metadata/V3_2/CameraMetadataEnumAndroidRequestType.java",
-        "android/hardware/camera/metadata/V3_2/CameraMetadataEnumAndroidScalerAvailableFormats.java",
-        "android/hardware/camera/metadata/V3_2/CameraMetadataEnumAndroidScalerAvailableStreamConfigurations.java",
-        "android/hardware/camera/metadata/V3_2/CameraMetadataEnumAndroidScalerCroppingType.java",
-        "android/hardware/camera/metadata/V3_2/CameraMetadataEnumAndroidSensorInfoColorFilterArrangement.java",
-        "android/hardware/camera/metadata/V3_2/CameraMetadataEnumAndroidSensorInfoLensShadingApplied.java",
-        "android/hardware/camera/metadata/V3_2/CameraMetadataEnumAndroidSensorInfoTimestampSource.java",
-        "android/hardware/camera/metadata/V3_2/CameraMetadataEnumAndroidSensorReferenceIlluminant1.java",
-        "android/hardware/camera/metadata/V3_2/CameraMetadataEnumAndroidSensorTestPatternMode.java",
-        "android/hardware/camera/metadata/V3_2/CameraMetadataEnumAndroidShadingMode.java",
-        "android/hardware/camera/metadata/V3_2/CameraMetadataEnumAndroidStatisticsFaceDetectMode.java",
-        "android/hardware/camera/metadata/V3_2/CameraMetadataEnumAndroidStatisticsHistogramMode.java",
-        "android/hardware/camera/metadata/V3_2/CameraMetadataEnumAndroidStatisticsHotPixelMapMode.java",
-        "android/hardware/camera/metadata/V3_2/CameraMetadataEnumAndroidStatisticsLensShadingMapMode.java",
-        "android/hardware/camera/metadata/V3_2/CameraMetadataEnumAndroidStatisticsSceneFlicker.java",
-        "android/hardware/camera/metadata/V3_2/CameraMetadataEnumAndroidStatisticsSharpnessMapMode.java",
-        "android/hardware/camera/metadata/V3_2/CameraMetadataEnumAndroidSyncFrameNumber.java",
-        "android/hardware/camera/metadata/V3_2/CameraMetadataEnumAndroidSyncMaxLatency.java",
-        "android/hardware/camera/metadata/V3_2/CameraMetadataEnumAndroidTonemapMode.java",
-        "android/hardware/camera/metadata/V3_2/CameraMetadataEnumAndroidTonemapPresetCurve.java",
-        "android/hardware/camera/metadata/V3_2/CameraMetadataSection.java",
-        "android/hardware/camera/metadata/V3_2/CameraMetadataSectionStart.java",
-        "android/hardware/camera/metadata/V3_2/CameraMetadataTag.java",
+    types: [
+        "CameraMetadataEnumAndroidBlackLevelLock",
+        "CameraMetadataEnumAndroidColorCorrectionAberrationMode",
+        "CameraMetadataEnumAndroidColorCorrectionMode",
+        "CameraMetadataEnumAndroidControlAeAntibandingMode",
+        "CameraMetadataEnumAndroidControlAeLock",
+        "CameraMetadataEnumAndroidControlAeLockAvailable",
+        "CameraMetadataEnumAndroidControlAeMode",
+        "CameraMetadataEnumAndroidControlAePrecaptureTrigger",
+        "CameraMetadataEnumAndroidControlAeState",
+        "CameraMetadataEnumAndroidControlAfMode",
+        "CameraMetadataEnumAndroidControlAfState",
+        "CameraMetadataEnumAndroidControlAfTrigger",
+        "CameraMetadataEnumAndroidControlAwbLock",
+        "CameraMetadataEnumAndroidControlAwbLockAvailable",
+        "CameraMetadataEnumAndroidControlAwbMode",
+        "CameraMetadataEnumAndroidControlAwbState",
+        "CameraMetadataEnumAndroidControlCaptureIntent",
+        "CameraMetadataEnumAndroidControlEffectMode",
+        "CameraMetadataEnumAndroidControlEnableZsl",
+        "CameraMetadataEnumAndroidControlMode",
+        "CameraMetadataEnumAndroidControlSceneMode",
+        "CameraMetadataEnumAndroidControlVideoStabilizationMode",
+        "CameraMetadataEnumAndroidDemosaicMode",
+        "CameraMetadataEnumAndroidDepthAvailableDepthStreamConfigurations",
+        "CameraMetadataEnumAndroidDepthDepthIsExclusive",
+        "CameraMetadataEnumAndroidEdgeMode",
+        "CameraMetadataEnumAndroidFlashInfoAvailable",
+        "CameraMetadataEnumAndroidFlashMode",
+        "CameraMetadataEnumAndroidFlashState",
+        "CameraMetadataEnumAndroidHotPixelMode",
+        "CameraMetadataEnumAndroidInfoSupportedHardwareLevel",
+        "CameraMetadataEnumAndroidLedAvailableLeds",
+        "CameraMetadataEnumAndroidLedTransmit",
+        "CameraMetadataEnumAndroidLensFacing",
+        "CameraMetadataEnumAndroidLensInfoFocusDistanceCalibration",
+        "CameraMetadataEnumAndroidLensOpticalStabilizationMode",
+        "CameraMetadataEnumAndroidLensState",
+        "CameraMetadataEnumAndroidNoiseReductionMode",
+        "CameraMetadataEnumAndroidQuirksPartialResult",
+        "CameraMetadataEnumAndroidRequestAvailableCapabilities",
+        "CameraMetadataEnumAndroidRequestMetadataMode",
+        "CameraMetadataEnumAndroidRequestType",
+        "CameraMetadataEnumAndroidScalerAvailableFormats",
+        "CameraMetadataEnumAndroidScalerAvailableStreamConfigurations",
+        "CameraMetadataEnumAndroidScalerCroppingType",
+        "CameraMetadataEnumAndroidSensorInfoColorFilterArrangement",
+        "CameraMetadataEnumAndroidSensorInfoLensShadingApplied",
+        "CameraMetadataEnumAndroidSensorInfoTimestampSource",
+        "CameraMetadataEnumAndroidSensorReferenceIlluminant1",
+        "CameraMetadataEnumAndroidSensorTestPatternMode",
+        "CameraMetadataEnumAndroidShadingMode",
+        "CameraMetadataEnumAndroidStatisticsFaceDetectMode",
+        "CameraMetadataEnumAndroidStatisticsHistogramMode",
+        "CameraMetadataEnumAndroidStatisticsHotPixelMapMode",
+        "CameraMetadataEnumAndroidStatisticsLensShadingMapMode",
+        "CameraMetadataEnumAndroidStatisticsSceneFlicker",
+        "CameraMetadataEnumAndroidStatisticsSharpnessMapMode",
+        "CameraMetadataEnumAndroidSyncFrameNumber",
+        "CameraMetadataEnumAndroidSyncMaxLatency",
+        "CameraMetadataEnumAndroidTonemapMode",
+        "CameraMetadataEnumAndroidTonemapPresetCurve",
+        "CameraMetadataSection",
+        "CameraMetadataSectionStart",
+        "CameraMetadataTag",
     ],
+    gen_java: true,
 }
 
-java_library {
-    name: "android.hardware.camera.metadata-V3.2-java",
-    no_framework_libs: true,
-    defaults: ["hidl-java-module-defaults"],
-    srcs: [":android.hardware.camera.metadata-V3.2-java_gen_java"],
-    libs: [
-        "hwbinder",
-    ]
-}
-
-// This package does not export any types. Not creating java constants export.
-
-// This package has no interfaces. Not creating versioning adapter.
diff --git a/camera/provider/2.4/Android.bp b/camera/provider/2.4/Android.bp
index 3aa8d8b..63d7fd5 100644
--- a/camera/provider/2.4/Android.bp
+++ b/camera/provider/2.4/Android.bp
@@ -1,169 +1,21 @@
-// This file is autogenerated by hidl-gen. Do not edit manually.
+// This file is autogenerated by hidl-gen -Landroidbp.
 
-filegroup {
-    name: "android.hardware.camera.provider@2.4_hal",
+hidl_interface {
+    name: "android.hardware.camera.provider@2.4",
+    root: "android.hardware",
+    vndk: {
+        enabled: true,
+    },
     srcs: [
         "ICameraProvider.hal",
         "ICameraProviderCallback.hal",
     ],
-}
-
-genrule {
-    name: "android.hardware.camera.provider@2.4_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.camera.provider@2.4",
-    srcs: [
-        ":android.hardware.camera.provider@2.4_hal",
-    ],
-    out: [
-        "android/hardware/camera/provider/2.4/CameraProviderAll.cpp",
-        "android/hardware/camera/provider/2.4/CameraProviderCallbackAll.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.camera.provider@2.4_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.camera.provider@2.4",
-    srcs: [
-        ":android.hardware.camera.provider@2.4_hal",
-    ],
-    out: [
-        "android/hardware/camera/provider/2.4/ICameraProvider.h",
-        "android/hardware/camera/provider/2.4/IHwCameraProvider.h",
-        "android/hardware/camera/provider/2.4/BnHwCameraProvider.h",
-        "android/hardware/camera/provider/2.4/BpHwCameraProvider.h",
-        "android/hardware/camera/provider/2.4/BsCameraProvider.h",
-        "android/hardware/camera/provider/2.4/ICameraProviderCallback.h",
-        "android/hardware/camera/provider/2.4/IHwCameraProviderCallback.h",
-        "android/hardware/camera/provider/2.4/BnHwCameraProviderCallback.h",
-        "android/hardware/camera/provider/2.4/BpHwCameraProviderCallback.h",
-        "android/hardware/camera/provider/2.4/BsCameraProviderCallback.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.camera.provider@2.4",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.camera.provider@2.4_genc++"],
-    generated_headers: ["android.hardware.camera.provider@2.4_genc++_headers"],
-    export_generated_headers: ["android.hardware.camera.provider@2.4_genc++_headers"],
-    vendor_available: true,
-    vndk: {
-        enabled: true,
-    },
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
+    interfaces: [
         "android.hardware.camera.common@1.0",
         "android.hardware.camera.device@1.0",
         "android.hardware.camera.device@3.2",
+        "android.hidl.base@1.0",
     ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-        "android.hardware.camera.common@1.0",
-        "android.hardware.camera.device@1.0",
-        "android.hardware.camera.device@3.2",
-    ],
+    gen_java: false,
 }
 
-// This package is not java compatible. Not creating java target.
-
-// This package does not export any types. Not creating java constants export.
-
-
-genrule {
-    name: "android.hardware.camera.provider@2.4-adapter-helper_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.camera.provider@2.4",
-    srcs: [
-        ":android.hardware.camera.provider@2.4_hal",
-    ],
-    out: [
-        "android/hardware/camera/provider/2.4/ACameraProvider.cpp",
-        "android/hardware/camera/provider/2.4/ACameraProviderCallback.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.camera.provider@2.4-adapter-helper_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.camera.provider@2.4",
-    srcs: [
-        ":android.hardware.camera.provider@2.4_hal",
-    ],
-    out: [
-        "android/hardware/camera/provider/2.4/ACameraProvider.h",
-        "android/hardware/camera/provider/2.4/ACameraProviderCallback.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.camera.provider@2.4-adapter-helper",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.camera.provider@2.4-adapter-helper_genc++"],
-    generated_headers: ["android.hardware.camera.provider@2.4-adapter-helper_genc++_headers"],
-    export_generated_headers: ["android.hardware.camera.provider@2.4-adapter-helper_genc++_headers"],
-    vendor_available: true,
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-        "libhidladapter",
-        "android.hardware.camera.common@1.0",
-        "android.hardware.camera.device@1.0",
-        "android.hardware.camera.device@3.2",
-        "android.hardware.camera.provider@2.4",
-        "android.hardware.camera.device@1.0-adapter-helper",
-        "android.hardware.camera.device@3.2-adapter-helper",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-        "libhidladapter",
-        "android.hardware.camera.common@1.0",
-        "android.hardware.camera.device@1.0",
-        "android.hardware.camera.device@3.2",
-        "android.hardware.camera.provider@2.4",
-        "android.hardware.camera.device@1.0-adapter-helper",
-        "android.hardware.camera.device@3.2-adapter-helper",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-}
-
-genrule {
-    name: "android.hardware.camera.provider@2.4-adapter_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-main -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.camera.provider@2.4",
-    out: ["main.cpp"]
-}
-
-cc_test {
-    name: "android.hardware.camera.provider@2.4-adapter",
-    defaults: ["hidl-module-defaults"],
-    shared_libs: [
-        "libhidladapter",
-        "libhidlbase",
-        "libhidltransport",
-        "libutils",
-        "android.hardware.camera.common@1.0",
-        "android.hardware.camera.device@1.0",
-        "android.hardware.camera.device@3.2",
-        "android.hardware.camera.provider@2.4",
-        "android.hardware.camera.provider@2.4-adapter-helper",
-    ],
-    generated_sources: ["android.hardware.camera.provider@2.4-adapter_genc++"],
-}
diff --git a/cas/1.0/Android.bp b/cas/1.0/Android.bp
index 80610f9..39b36be 100644
--- a/cas/1.0/Android.bp
+++ b/cas/1.0/Android.bp
@@ -1,7 +1,11 @@
-// This file is autogenerated by hidl-gen. Do not edit manually.
+// This file is autogenerated by hidl-gen -Landroidbp.
 
-filegroup {
-    name: "android.hardware.cas@1.0_hal",
+hidl_interface {
+    name: "android.hardware.cas@1.0",
+    root: "android.hardware",
+    vndk: {
+        enabled: true,
+    },
     srcs: [
         "types.hal",
         "ICas.hal",
@@ -9,190 +13,13 @@
         "IDescramblerBase.hal",
         "IMediaCasService.hal",
     ],
+    interfaces: [
+        "android.hidl.base@1.0",
+    ],
+    types: [
+        "HidlCasPluginDescriptor",
+        "Status",
+    ],
+    gen_java: true,
 }
 
-genrule {
-    name: "android.hardware.cas@1.0_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.cas@1.0",
-    srcs: [
-        ":android.hardware.cas@1.0_hal",
-    ],
-    out: [
-        "android/hardware/cas/1.0/types.cpp",
-        "android/hardware/cas/1.0/CasAll.cpp",
-        "android/hardware/cas/1.0/CasListenerAll.cpp",
-        "android/hardware/cas/1.0/DescramblerBaseAll.cpp",
-        "android/hardware/cas/1.0/MediaCasServiceAll.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.cas@1.0_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.cas@1.0",
-    srcs: [
-        ":android.hardware.cas@1.0_hal",
-    ],
-    out: [
-        "android/hardware/cas/1.0/types.h",
-        "android/hardware/cas/1.0/hwtypes.h",
-        "android/hardware/cas/1.0/ICas.h",
-        "android/hardware/cas/1.0/IHwCas.h",
-        "android/hardware/cas/1.0/BnHwCas.h",
-        "android/hardware/cas/1.0/BpHwCas.h",
-        "android/hardware/cas/1.0/BsCas.h",
-        "android/hardware/cas/1.0/ICasListener.h",
-        "android/hardware/cas/1.0/IHwCasListener.h",
-        "android/hardware/cas/1.0/BnHwCasListener.h",
-        "android/hardware/cas/1.0/BpHwCasListener.h",
-        "android/hardware/cas/1.0/BsCasListener.h",
-        "android/hardware/cas/1.0/IDescramblerBase.h",
-        "android/hardware/cas/1.0/IHwDescramblerBase.h",
-        "android/hardware/cas/1.0/BnHwDescramblerBase.h",
-        "android/hardware/cas/1.0/BpHwDescramblerBase.h",
-        "android/hardware/cas/1.0/BsDescramblerBase.h",
-        "android/hardware/cas/1.0/IMediaCasService.h",
-        "android/hardware/cas/1.0/IHwMediaCasService.h",
-        "android/hardware/cas/1.0/BnHwMediaCasService.h",
-        "android/hardware/cas/1.0/BpHwMediaCasService.h",
-        "android/hardware/cas/1.0/BsMediaCasService.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.cas@1.0",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.cas@1.0_genc++"],
-    generated_headers: ["android.hardware.cas@1.0_genc++_headers"],
-    export_generated_headers: ["android.hardware.cas@1.0_genc++_headers"],
-    vendor_available: true,
-    vndk: {
-        enabled: true,
-    },
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-    ],
-}
-
-genrule {
-    name: "android.hardware.cas-V1.0-java_gen_java",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Ljava -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.cas@1.0",
-    srcs: [
-        ":android.hardware.cas@1.0_hal",
-    ],
-    out: [
-        "android/hardware/cas/V1_0/HidlCasPluginDescriptor.java",
-        "android/hardware/cas/V1_0/Status.java",
-        "android/hardware/cas/V1_0/ICas.java",
-        "android/hardware/cas/V1_0/ICasListener.java",
-        "android/hardware/cas/V1_0/IDescramblerBase.java",
-        "android/hardware/cas/V1_0/IMediaCasService.java",
-    ],
-}
-
-java_library {
-    name: "android.hardware.cas-V1.0-java",
-    no_framework_libs: true,
-    defaults: ["hidl-java-module-defaults"],
-    srcs: [":android.hardware.cas-V1.0-java_gen_java"],
-    libs: [
-        "hwbinder",
-        "android.hidl.base-V1.0-java",
-    ]
-}
-
-// This package does not export any types. Not creating java constants export.
-
-
-genrule {
-    name: "android.hardware.cas@1.0-adapter-helper_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.cas@1.0",
-    srcs: [
-        ":android.hardware.cas@1.0_hal",
-    ],
-    out: [
-        "android/hardware/cas/1.0/ACas.cpp",
-        "android/hardware/cas/1.0/ACasListener.cpp",
-        "android/hardware/cas/1.0/ADescramblerBase.cpp",
-        "android/hardware/cas/1.0/AMediaCasService.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.cas@1.0-adapter-helper_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.cas@1.0",
-    srcs: [
-        ":android.hardware.cas@1.0_hal",
-    ],
-    out: [
-        "android/hardware/cas/1.0/ACas.h",
-        "android/hardware/cas/1.0/ACasListener.h",
-        "android/hardware/cas/1.0/ADescramblerBase.h",
-        "android/hardware/cas/1.0/AMediaCasService.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.cas@1.0-adapter-helper",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.cas@1.0-adapter-helper_genc++"],
-    generated_headers: ["android.hardware.cas@1.0-adapter-helper_genc++_headers"],
-    export_generated_headers: ["android.hardware.cas@1.0-adapter-helper_genc++_headers"],
-    vendor_available: true,
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-        "libhidladapter",
-        "android.hardware.cas@1.0",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-        "libhidladapter",
-        "android.hardware.cas@1.0",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-}
-
-genrule {
-    name: "android.hardware.cas@1.0-adapter_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-main -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.cas@1.0",
-    out: ["main.cpp"]
-}
-
-cc_test {
-    name: "android.hardware.cas@1.0-adapter",
-    defaults: ["hidl-module-defaults"],
-    shared_libs: [
-        "libhidladapter",
-        "libhidlbase",
-        "libhidltransport",
-        "libutils",
-        "android.hardware.cas@1.0",
-        "android.hardware.cas@1.0-adapter-helper",
-    ],
-    generated_sources: ["android.hardware.cas@1.0-adapter_genc++"],
-}
diff --git a/cas/native/1.0/Android.bp b/cas/native/1.0/Android.bp
index 65bd7fb..7587416 100644
--- a/cas/native/1.0/Android.bp
+++ b/cas/native/1.0/Android.bp
@@ -1,152 +1,26 @@
-// This file is autogenerated by hidl-gen. Do not edit manually.
+// This file is autogenerated by hidl-gen -Landroidbp.
 
-filegroup {
-    name: "android.hardware.cas.native@1.0_hal",
+hidl_interface {
+    name: "android.hardware.cas.native@1.0",
+    root: "android.hardware",
+    vndk: {
+        enabled: true,
+    },
     srcs: [
         "types.hal",
         "IDescrambler.hal",
     ],
-}
-
-genrule {
-    name: "android.hardware.cas.native@1.0_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.cas.native@1.0",
-    srcs: [
-        ":android.hardware.cas.native@1.0_hal",
-    ],
-    out: [
-        "android/hardware/cas/native/1.0/types.cpp",
-        "android/hardware/cas/native/1.0/DescramblerAll.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.cas.native@1.0_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.cas.native@1.0",
-    srcs: [
-        ":android.hardware.cas.native@1.0_hal",
-    ],
-    out: [
-        "android/hardware/cas/native/1.0/types.h",
-        "android/hardware/cas/native/1.0/hwtypes.h",
-        "android/hardware/cas/native/1.0/IDescrambler.h",
-        "android/hardware/cas/native/1.0/IHwDescrambler.h",
-        "android/hardware/cas/native/1.0/BnHwDescrambler.h",
-        "android/hardware/cas/native/1.0/BpHwDescrambler.h",
-        "android/hardware/cas/native/1.0/BsDescrambler.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.cas.native@1.0",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.cas.native@1.0_genc++"],
-    generated_headers: ["android.hardware.cas.native@1.0_genc++_headers"],
-    export_generated_headers: ["android.hardware.cas.native@1.0_genc++_headers"],
-    vendor_available: true,
-    vndk: {
-        enabled: true,
-    },
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
+    interfaces: [
         "android.hardware.cas@1.0",
+        "android.hidl.base@1.0",
     ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-        "android.hardware.cas@1.0",
+    types: [
+        "BufferType",
+        "DestinationBuffer",
+        "ScramblingControl",
+        "SharedBuffer",
+        "SubSample",
     ],
+    gen_java: false,
 }
 
-// This package is not java compatible. Not creating java target.
-
-// This package does not export any types. Not creating java constants export.
-
-
-genrule {
-    name: "android.hardware.cas.native@1.0-adapter-helper_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.cas.native@1.0",
-    srcs: [
-        ":android.hardware.cas.native@1.0_hal",
-    ],
-    out: [
-        "android/hardware/cas/native/1.0/ADescrambler.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.cas.native@1.0-adapter-helper_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.cas.native@1.0",
-    srcs: [
-        ":android.hardware.cas.native@1.0_hal",
-    ],
-    out: [
-        "android/hardware/cas/native/1.0/ADescrambler.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.cas.native@1.0-adapter-helper",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.cas.native@1.0-adapter-helper_genc++"],
-    generated_headers: ["android.hardware.cas.native@1.0-adapter-helper_genc++_headers"],
-    export_generated_headers: ["android.hardware.cas.native@1.0-adapter-helper_genc++_headers"],
-    vendor_available: true,
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-        "libhidladapter",
-        "android.hardware.cas.native@1.0",
-        "android.hardware.cas@1.0",
-        "android.hardware.cas@1.0-adapter-helper",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-        "libhidladapter",
-        "android.hardware.cas.native@1.0",
-        "android.hardware.cas@1.0",
-        "android.hardware.cas@1.0-adapter-helper",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-}
-
-genrule {
-    name: "android.hardware.cas.native@1.0-adapter_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-main -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.cas.native@1.0",
-    out: ["main.cpp"]
-}
-
-cc_test {
-    name: "android.hardware.cas.native@1.0-adapter",
-    defaults: ["hidl-module-defaults"],
-    shared_libs: [
-        "libhidladapter",
-        "libhidlbase",
-        "libhidltransport",
-        "libutils",
-        "android.hardware.cas.native@1.0",
-        "android.hardware.cas@1.0",
-        "android.hardware.cas.native@1.0-adapter-helper",
-    ],
-    generated_sources: ["android.hardware.cas.native@1.0-adapter_genc++"],
-}
diff --git a/compatibility_matrix.current.xml b/compatibility_matrix.current.xml
index 4b09c3b..55dfab8 100644
--- a/compatibility_matrix.current.xml
+++ b/compatibility_matrix.current.xml
@@ -155,14 +155,6 @@
             <instance>default</instance>
         </interface>
     </hal>
-    <hal format="hidl" optional="true">
-        <name>android.hardware.health</name>
-        <version>1.0</version>
-        <interface>
-            <name>IHealth</name>
-            <instance>default</instance>
-        </interface>
-    </hal>
     <hal format="hidl" optional="false">
         <name>android.hardware.health</name>
         <version>2.0</version>
diff --git a/configstore/1.0/Android.bp b/configstore/1.0/Android.bp
index da0331b..5e98e5c 100644
--- a/configstore/1.0/Android.bp
+++ b/configstore/1.0/Android.bp
@@ -1,172 +1,26 @@
-// This file is autogenerated by hidl-gen. Do not edit manually.
+// This file is autogenerated by hidl-gen -Landroidbp.
 
-filegroup {
-    name: "android.hardware.configstore@1.0_hal",
+hidl_interface {
+    name: "android.hardware.configstore@1.0",
+    root: "android.hardware",
+    vndk: {
+        enabled: true,
+    },
     srcs: [
         "types.hal",
         "ISurfaceFlingerConfigs.hal",
     ],
+    interfaces: [
+        "android.hidl.base@1.0",
+    ],
+    types: [
+        "OptionalBool",
+        "OptionalInt32",
+        "OptionalInt64",
+        "OptionalString",
+        "OptionalUInt32",
+        "OptionalUInt64",
+    ],
+    gen_java: true,
 }
 
-genrule {
-    name: "android.hardware.configstore@1.0_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.configstore@1.0",
-    srcs: [
-        ":android.hardware.configstore@1.0_hal",
-    ],
-    out: [
-        "android/hardware/configstore/1.0/types.cpp",
-        "android/hardware/configstore/1.0/SurfaceFlingerConfigsAll.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.configstore@1.0_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.configstore@1.0",
-    srcs: [
-        ":android.hardware.configstore@1.0_hal",
-    ],
-    out: [
-        "android/hardware/configstore/1.0/types.h",
-        "android/hardware/configstore/1.0/hwtypes.h",
-        "android/hardware/configstore/1.0/ISurfaceFlingerConfigs.h",
-        "android/hardware/configstore/1.0/IHwSurfaceFlingerConfigs.h",
-        "android/hardware/configstore/1.0/BnHwSurfaceFlingerConfigs.h",
-        "android/hardware/configstore/1.0/BpHwSurfaceFlingerConfigs.h",
-        "android/hardware/configstore/1.0/BsSurfaceFlingerConfigs.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.configstore@1.0",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.configstore@1.0_genc++"],
-    generated_headers: ["android.hardware.configstore@1.0_genc++_headers"],
-    export_generated_headers: ["android.hardware.configstore@1.0_genc++_headers"],
-    vendor_available: true,
-    vndk: {
-        enabled: true,
-    },
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-    ],
-}
-
-genrule {
-    name: "android.hardware.configstore-V1.0-java_gen_java",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Ljava -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.configstore@1.0",
-    srcs: [
-        ":android.hardware.configstore@1.0_hal",
-    ],
-    out: [
-        "android/hardware/configstore/V1_0/OptionalBool.java",
-        "android/hardware/configstore/V1_0/OptionalInt32.java",
-        "android/hardware/configstore/V1_0/OptionalInt64.java",
-        "android/hardware/configstore/V1_0/OptionalString.java",
-        "android/hardware/configstore/V1_0/OptionalUInt32.java",
-        "android/hardware/configstore/V1_0/OptionalUInt64.java",
-        "android/hardware/configstore/V1_0/ISurfaceFlingerConfigs.java",
-    ],
-}
-
-java_library {
-    name: "android.hardware.configstore-V1.0-java",
-    no_framework_libs: true,
-    defaults: ["hidl-java-module-defaults"],
-    srcs: [":android.hardware.configstore-V1.0-java_gen_java"],
-    libs: [
-        "hwbinder",
-        "android.hidl.base-V1.0-java",
-    ]
-}
-
-// This package does not export any types. Not creating java constants export.
-
-
-genrule {
-    name: "android.hardware.configstore@1.0-adapter-helper_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.configstore@1.0",
-    srcs: [
-        ":android.hardware.configstore@1.0_hal",
-    ],
-    out: [
-        "android/hardware/configstore/1.0/ASurfaceFlingerConfigs.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.configstore@1.0-adapter-helper_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.configstore@1.0",
-    srcs: [
-        ":android.hardware.configstore@1.0_hal",
-    ],
-    out: [
-        "android/hardware/configstore/1.0/ASurfaceFlingerConfigs.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.configstore@1.0-adapter-helper",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.configstore@1.0-adapter-helper_genc++"],
-    generated_headers: ["android.hardware.configstore@1.0-adapter-helper_genc++_headers"],
-    export_generated_headers: ["android.hardware.configstore@1.0-adapter-helper_genc++_headers"],
-    vendor_available: true,
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-        "libhidladapter",
-        "android.hardware.configstore@1.0",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-        "libhidladapter",
-        "android.hardware.configstore@1.0",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-}
-
-genrule {
-    name: "android.hardware.configstore@1.0-adapter_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-main -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.configstore@1.0",
-    out: ["main.cpp"]
-}
-
-cc_test {
-    name: "android.hardware.configstore@1.0-adapter",
-    defaults: ["hidl-module-defaults"],
-    shared_libs: [
-        "libhidladapter",
-        "libhidlbase",
-        "libhidltransport",
-        "libutils",
-        "android.hardware.configstore@1.0",
-        "android.hardware.configstore@1.0-adapter-helper",
-    ],
-    generated_sources: ["android.hardware.configstore@1.0-adapter_genc++"],
-}
diff --git a/configstore/1.1/Android.bp b/configstore/1.1/Android.bp
index 3f8d580..f0a1748 100644
--- a/configstore/1.1/Android.bp
+++ b/configstore/1.1/Android.bp
@@ -1,170 +1,18 @@
-// This file is autogenerated by hidl-gen. Do not edit manually.
+// This file is autogenerated by hidl-gen -Landroidbp.
 
-filegroup {
-    name: "android.hardware.configstore@1.1_hal",
-    srcs: [
-        "ISurfaceFlingerConfigs.hal",
-    ],
-}
-
-genrule {
-    name: "android.hardware.configstore@1.1_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.configstore@1.1",
-    srcs: [
-        ":android.hardware.configstore@1.1_hal",
-    ],
-    out: [
-        "android/hardware/configstore/1.1/SurfaceFlingerConfigsAll.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.configstore@1.1_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.configstore@1.1",
-    srcs: [
-        ":android.hardware.configstore@1.1_hal",
-    ],
-    out: [
-        "android/hardware/configstore/1.1/ISurfaceFlingerConfigs.h",
-        "android/hardware/configstore/1.1/IHwSurfaceFlingerConfigs.h",
-        "android/hardware/configstore/1.1/BnHwSurfaceFlingerConfigs.h",
-        "android/hardware/configstore/1.1/BpHwSurfaceFlingerConfigs.h",
-        "android/hardware/configstore/1.1/BsSurfaceFlingerConfigs.h",
-    ],
-}
-
-cc_library {
+hidl_interface {
     name: "android.hardware.configstore@1.1",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.configstore@1.1_genc++"],
-    generated_headers: ["android.hardware.configstore@1.1_genc++_headers"],
-    export_generated_headers: ["android.hardware.configstore@1.1_genc++_headers"],
-    vendor_available: true,
+    root: "android.hardware",
     vndk: {
         enabled: true,
     },
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-        "android.hardware.configstore@1.0",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-        "android.hardware.configstore@1.0",
-    ],
-}
-
-genrule {
-    name: "android.hardware.configstore-V1.1-java_gen_java",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Ljava -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.configstore@1.1",
     srcs: [
-        ":android.hardware.configstore@1.1_hal",
+        "ISurfaceFlingerConfigs.hal",
     ],
-    out: [
-        "android/hardware/configstore/V1_1/ISurfaceFlingerConfigs.java",
-    ],
-}
-
-java_library {
-    name: "android.hardware.configstore-V1.1-java",
-    no_framework_libs: true,
-    defaults: ["hidl-java-module-defaults"],
-    srcs: [":android.hardware.configstore-V1.1-java_gen_java"],
-    libs: [
-        "hwbinder",
-        "android.hardware.configstore-V1.0-java",
-        "android.hidl.base-V1.0-java",
-    ]
-}
-
-// This package does not export any types. Not creating java constants export.
-
-
-genrule {
-    name: "android.hardware.configstore@1.1-adapter-helper_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.configstore@1.1",
-    srcs: [
-        ":android.hardware.configstore@1.1_hal",
-    ],
-    out: [
-        "android/hardware/configstore/1.1/ASurfaceFlingerConfigs.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.configstore@1.1-adapter-helper_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.configstore@1.1",
-    srcs: [
-        ":android.hardware.configstore@1.1_hal",
-    ],
-    out: [
-        "android/hardware/configstore/1.1/ASurfaceFlingerConfigs.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.configstore@1.1-adapter-helper",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.configstore@1.1-adapter-helper_genc++"],
-    generated_headers: ["android.hardware.configstore@1.1-adapter-helper_genc++_headers"],
-    export_generated_headers: ["android.hardware.configstore@1.1-adapter-helper_genc++_headers"],
-    vendor_available: true,
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-        "libhidladapter",
+    interfaces: [
         "android.hardware.configstore@1.0",
-        "android.hardware.configstore@1.1",
-        "android.hardware.configstore@1.0-adapter-helper",
-        "android.hidl.base@1.0-adapter-helper",
+        "android.hidl.base@1.0",
     ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-        "libhidladapter",
-        "android.hardware.configstore@1.0",
-        "android.hardware.configstore@1.1",
-        "android.hardware.configstore@1.0-adapter-helper",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
+    gen_java: true,
 }
 
-genrule {
-    name: "android.hardware.configstore@1.1-adapter_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-main -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.configstore@1.1",
-    out: ["main.cpp"]
-}
-
-cc_test {
-    name: "android.hardware.configstore@1.1-adapter",
-    defaults: ["hidl-module-defaults"],
-    shared_libs: [
-        "libhidladapter",
-        "libhidlbase",
-        "libhidltransport",
-        "libutils",
-        "android.hardware.configstore@1.0",
-        "android.hardware.configstore@1.1",
-        "android.hardware.configstore@1.1-adapter-helper",
-    ],
-    generated_sources: ["android.hardware.configstore@1.1-adapter_genc++"],
-}
diff --git a/configstore/1.1/default/Android.mk b/configstore/1.1/default/Android.mk
index 58b67c1..53e454b 100644
--- a/configstore/1.1/default/Android.mk
+++ b/configstore/1.1/default/Android.mk
@@ -13,14 +13,14 @@
 include $(LOCAL_PATH)/surfaceflinger.mk
 
 LOCAL_SHARED_LIBRARIES := \
-    android.hardware.configstore@1.0 \
-    android.hardware.configstore@1.1 \
     libhidlbase \
     libhidltransport \
     libbase \
     libhwminijail \
     liblog \
     libutils \
+    android.hardware.configstore@1.0 \
+    android.hardware.configstore@1.1
 
 include $(BUILD_EXECUTABLE)
 
diff --git a/contexthub/1.0/Android.bp b/contexthub/1.0/Android.bp
index 93b3bf4..77dba66 100644
--- a/contexthub/1.0/Android.bp
+++ b/contexthub/1.0/Android.bp
@@ -1,190 +1,35 @@
-// This file is autogenerated by hidl-gen. Do not edit manually.
+// This file is autogenerated by hidl-gen -Landroidbp.
 
-filegroup {
-    name: "android.hardware.contexthub@1.0_hal",
+hidl_interface {
+    name: "android.hardware.contexthub@1.0",
+    root: "android.hardware",
+    vndk: {
+        enabled: true,
+    },
     srcs: [
         "types.hal",
         "IContexthub.hal",
         "IContexthubCallback.hal",
     ],
+    interfaces: [
+        "android.hidl.base@1.0",
+    ],
+    types: [
+        "AsyncEventType",
+        "ContextHub",
+        "ContextHubMsg",
+        "HostEndPoint",
+        "HubAppInfo",
+        "HubMemoryFlag",
+        "HubMemoryType",
+        "MemRange",
+        "NanoAppBinary",
+        "NanoAppFlags",
+        "PhysicalSensor",
+        "Result",
+        "SensorType",
+        "TransactionResult",
+    ],
+    gen_java: true,
 }
 
-genrule {
-    name: "android.hardware.contexthub@1.0_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.contexthub@1.0",
-    srcs: [
-        ":android.hardware.contexthub@1.0_hal",
-    ],
-    out: [
-        "android/hardware/contexthub/1.0/types.cpp",
-        "android/hardware/contexthub/1.0/ContexthubAll.cpp",
-        "android/hardware/contexthub/1.0/ContexthubCallbackAll.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.contexthub@1.0_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.contexthub@1.0",
-    srcs: [
-        ":android.hardware.contexthub@1.0_hal",
-    ],
-    out: [
-        "android/hardware/contexthub/1.0/types.h",
-        "android/hardware/contexthub/1.0/hwtypes.h",
-        "android/hardware/contexthub/1.0/IContexthub.h",
-        "android/hardware/contexthub/1.0/IHwContexthub.h",
-        "android/hardware/contexthub/1.0/BnHwContexthub.h",
-        "android/hardware/contexthub/1.0/BpHwContexthub.h",
-        "android/hardware/contexthub/1.0/BsContexthub.h",
-        "android/hardware/contexthub/1.0/IContexthubCallback.h",
-        "android/hardware/contexthub/1.0/IHwContexthubCallback.h",
-        "android/hardware/contexthub/1.0/BnHwContexthubCallback.h",
-        "android/hardware/contexthub/1.0/BpHwContexthubCallback.h",
-        "android/hardware/contexthub/1.0/BsContexthubCallback.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.contexthub@1.0",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.contexthub@1.0_genc++"],
-    generated_headers: ["android.hardware.contexthub@1.0_genc++_headers"],
-    export_generated_headers: ["android.hardware.contexthub@1.0_genc++_headers"],
-    vendor_available: true,
-    vndk: {
-        enabled: true,
-    },
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-    ],
-}
-
-genrule {
-    name: "android.hardware.contexthub-V1.0-java_gen_java",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Ljava -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.contexthub@1.0",
-    srcs: [
-        ":android.hardware.contexthub@1.0_hal",
-    ],
-    out: [
-        "android/hardware/contexthub/V1_0/AsyncEventType.java",
-        "android/hardware/contexthub/V1_0/ContextHub.java",
-        "android/hardware/contexthub/V1_0/ContextHubMsg.java",
-        "android/hardware/contexthub/V1_0/HostEndPoint.java",
-        "android/hardware/contexthub/V1_0/HubAppInfo.java",
-        "android/hardware/contexthub/V1_0/HubMemoryFlag.java",
-        "android/hardware/contexthub/V1_0/HubMemoryType.java",
-        "android/hardware/contexthub/V1_0/MemRange.java",
-        "android/hardware/contexthub/V1_0/NanoAppBinary.java",
-        "android/hardware/contexthub/V1_0/NanoAppFlags.java",
-        "android/hardware/contexthub/V1_0/PhysicalSensor.java",
-        "android/hardware/contexthub/V1_0/Result.java",
-        "android/hardware/contexthub/V1_0/SensorType.java",
-        "android/hardware/contexthub/V1_0/TransactionResult.java",
-        "android/hardware/contexthub/V1_0/IContexthub.java",
-        "android/hardware/contexthub/V1_0/IContexthubCallback.java",
-    ],
-}
-
-java_library {
-    name: "android.hardware.contexthub-V1.0-java",
-    no_framework_libs: true,
-    defaults: ["hidl-java-module-defaults"],
-    srcs: [":android.hardware.contexthub-V1.0-java_gen_java"],
-    libs: [
-        "hwbinder",
-        "android.hidl.base-V1.0-java",
-    ]
-}
-
-// This package does not export any types. Not creating java constants export.
-
-
-genrule {
-    name: "android.hardware.contexthub@1.0-adapter-helper_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.contexthub@1.0",
-    srcs: [
-        ":android.hardware.contexthub@1.0_hal",
-    ],
-    out: [
-        "android/hardware/contexthub/1.0/AContexthub.cpp",
-        "android/hardware/contexthub/1.0/AContexthubCallback.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.contexthub@1.0-adapter-helper_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.contexthub@1.0",
-    srcs: [
-        ":android.hardware.contexthub@1.0_hal",
-    ],
-    out: [
-        "android/hardware/contexthub/1.0/AContexthub.h",
-        "android/hardware/contexthub/1.0/AContexthubCallback.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.contexthub@1.0-adapter-helper",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.contexthub@1.0-adapter-helper_genc++"],
-    generated_headers: ["android.hardware.contexthub@1.0-adapter-helper_genc++_headers"],
-    export_generated_headers: ["android.hardware.contexthub@1.0-adapter-helper_genc++_headers"],
-    vendor_available: true,
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-        "libhidladapter",
-        "android.hardware.contexthub@1.0",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-        "libhidladapter",
-        "android.hardware.contexthub@1.0",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-}
-
-genrule {
-    name: "android.hardware.contexthub@1.0-adapter_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-main -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.contexthub@1.0",
-    out: ["main.cpp"]
-}
-
-cc_test {
-    name: "android.hardware.contexthub@1.0-adapter",
-    defaults: ["hidl-module-defaults"],
-    shared_libs: [
-        "libhidladapter",
-        "libhidlbase",
-        "libhidltransport",
-        "libutils",
-        "android.hardware.contexthub@1.0",
-        "android.hardware.contexthub@1.0-adapter-helper",
-    ],
-    generated_sources: ["android.hardware.contexthub@1.0-adapter_genc++"],
-}
diff --git a/current.txt b/current.txt
index c1aa97a..6d49d26 100644
--- a/current.txt
+++ b/current.txt
@@ -196,6 +196,7 @@
 78589343d8ee2e1b155acad3fbdc7fcbb6af94491aee968b2383c21627264f8b android.hardware.radio@1.0::IRadioResponse # Available in Android O, b/68061860
 e822cb7f4a1bdd45689c5e92ccd19a2201c20b771bd4b2ec1ae627e324591f9d android.hardware.radio@1.0::IRadioResponse
 6e69adb24d7c0b0ca3a54a38c49a5625b161b3f5d5f7d6fda0befdbbfc8e9e06 android.hardware.radio@1.0::IRadioResponse
+c2c50ec74c87a583c683b4493f8f9f2e454a8d41c57af5b3eb88823a999f0ea4 android.hardware.radio@1.0::IRadioResponse # Added for b/65230472 for Android O
 28e929b453df3d9f5060af2764e6cdb123ddb893e3e86923c877f6ff7e5f02c9 android.hardware.wifi@1.0::types
 bfd81bcafa3c97519cd56ad29e9fa48e23d1d323b89dbcc85899282a8c628194 android.hardware.automotive.vehicle@2.0::types
 df1d7b27e644bfed0a4f606a8c44d35d45cafce82c7c648494c8a25c7cd4a949 android.hardware.wifi@1.0::types
diff --git a/drm/1.0/Android.bp b/drm/1.0/Android.bp
index eb26e86..aca5ae4 100644
--- a/drm/1.0/Android.bp
+++ b/drm/1.0/Android.bp
@@ -1,7 +1,11 @@
-// This file is autogenerated by hidl-gen. Do not edit manually.
+// This file is autogenerated by hidl-gen -Landroidbp.
 
-filegroup {
-    name: "android.hardware.drm@1.0_hal",
+hidl_interface {
+    name: "android.hardware.drm@1.0",
+    root: "android.hardware",
+    vndk: {
+        enabled: true,
+    },
     srcs: [
         "types.hal",
         "ICryptoFactory.hal",
@@ -10,172 +14,25 @@
         "IDrmPlugin.hal",
         "IDrmPluginListener.hal",
     ],
+    interfaces: [
+        "android.hidl.base@1.0",
+    ],
+    types: [
+        "BufferType",
+        "DestinationBuffer",
+        "EventType",
+        "KeyRequestType",
+        "KeyStatus",
+        "KeyStatusType",
+        "KeyType",
+        "KeyValue",
+        "Mode",
+        "Pattern",
+        "SecureStop",
+        "SharedBuffer",
+        "Status",
+        "SubSample",
+    ],
+    gen_java: false,
 }
 
-genrule {
-    name: "android.hardware.drm@1.0_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.drm@1.0",
-    srcs: [
-        ":android.hardware.drm@1.0_hal",
-    ],
-    out: [
-        "android/hardware/drm/1.0/types.cpp",
-        "android/hardware/drm/1.0/CryptoFactoryAll.cpp",
-        "android/hardware/drm/1.0/CryptoPluginAll.cpp",
-        "android/hardware/drm/1.0/DrmFactoryAll.cpp",
-        "android/hardware/drm/1.0/DrmPluginAll.cpp",
-        "android/hardware/drm/1.0/DrmPluginListenerAll.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.drm@1.0_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.drm@1.0",
-    srcs: [
-        ":android.hardware.drm@1.0_hal",
-    ],
-    out: [
-        "android/hardware/drm/1.0/types.h",
-        "android/hardware/drm/1.0/hwtypes.h",
-        "android/hardware/drm/1.0/ICryptoFactory.h",
-        "android/hardware/drm/1.0/IHwCryptoFactory.h",
-        "android/hardware/drm/1.0/BnHwCryptoFactory.h",
-        "android/hardware/drm/1.0/BpHwCryptoFactory.h",
-        "android/hardware/drm/1.0/BsCryptoFactory.h",
-        "android/hardware/drm/1.0/ICryptoPlugin.h",
-        "android/hardware/drm/1.0/IHwCryptoPlugin.h",
-        "android/hardware/drm/1.0/BnHwCryptoPlugin.h",
-        "android/hardware/drm/1.0/BpHwCryptoPlugin.h",
-        "android/hardware/drm/1.0/BsCryptoPlugin.h",
-        "android/hardware/drm/1.0/IDrmFactory.h",
-        "android/hardware/drm/1.0/IHwDrmFactory.h",
-        "android/hardware/drm/1.0/BnHwDrmFactory.h",
-        "android/hardware/drm/1.0/BpHwDrmFactory.h",
-        "android/hardware/drm/1.0/BsDrmFactory.h",
-        "android/hardware/drm/1.0/IDrmPlugin.h",
-        "android/hardware/drm/1.0/IHwDrmPlugin.h",
-        "android/hardware/drm/1.0/BnHwDrmPlugin.h",
-        "android/hardware/drm/1.0/BpHwDrmPlugin.h",
-        "android/hardware/drm/1.0/BsDrmPlugin.h",
-        "android/hardware/drm/1.0/IDrmPluginListener.h",
-        "android/hardware/drm/1.0/IHwDrmPluginListener.h",
-        "android/hardware/drm/1.0/BnHwDrmPluginListener.h",
-        "android/hardware/drm/1.0/BpHwDrmPluginListener.h",
-        "android/hardware/drm/1.0/BsDrmPluginListener.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.drm@1.0",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.drm@1.0_genc++"],
-    generated_headers: ["android.hardware.drm@1.0_genc++_headers"],
-    export_generated_headers: ["android.hardware.drm@1.0_genc++_headers"],
-    vendor_available: true,
-    vndk: {
-        enabled: true,
-    },
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-    ],
-}
-
-// This package is not java compatible. Not creating java target.
-
-// This package does not export any types. Not creating java constants export.
-
-
-genrule {
-    name: "android.hardware.drm@1.0-adapter-helper_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.drm@1.0",
-    srcs: [
-        ":android.hardware.drm@1.0_hal",
-    ],
-    out: [
-        "android/hardware/drm/1.0/ACryptoFactory.cpp",
-        "android/hardware/drm/1.0/ACryptoPlugin.cpp",
-        "android/hardware/drm/1.0/ADrmFactory.cpp",
-        "android/hardware/drm/1.0/ADrmPlugin.cpp",
-        "android/hardware/drm/1.0/ADrmPluginListener.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.drm@1.0-adapter-helper_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.drm@1.0",
-    srcs: [
-        ":android.hardware.drm@1.0_hal",
-    ],
-    out: [
-        "android/hardware/drm/1.0/ACryptoFactory.h",
-        "android/hardware/drm/1.0/ACryptoPlugin.h",
-        "android/hardware/drm/1.0/ADrmFactory.h",
-        "android/hardware/drm/1.0/ADrmPlugin.h",
-        "android/hardware/drm/1.0/ADrmPluginListener.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.drm@1.0-adapter-helper",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.drm@1.0-adapter-helper_genc++"],
-    generated_headers: ["android.hardware.drm@1.0-adapter-helper_genc++_headers"],
-    export_generated_headers: ["android.hardware.drm@1.0-adapter-helper_genc++_headers"],
-    vendor_available: true,
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-        "libhidladapter",
-        "android.hardware.drm@1.0",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-        "libhidladapter",
-        "android.hardware.drm@1.0",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-}
-
-genrule {
-    name: "android.hardware.drm@1.0-adapter_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-main -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.drm@1.0",
-    out: ["main.cpp"]
-}
-
-cc_test {
-    name: "android.hardware.drm@1.0-adapter",
-    defaults: ["hidl-module-defaults"],
-    shared_libs: [
-        "libhidladapter",
-        "libhidlbase",
-        "libhidltransport",
-        "libutils",
-        "android.hardware.drm@1.0",
-        "android.hardware.drm@1.0-adapter-helper",
-    ],
-    generated_sources: ["android.hardware.drm@1.0-adapter_genc++"],
-}
diff --git a/drm/1.0/vts/functional/drm_hal_clearkey_test.cpp b/drm/1.0/vts/functional/drm_hal_clearkey_test.cpp
index a110eb1..4a1892b 100644
--- a/drm/1.0/vts/functional/drm_hal_clearkey_test.cpp
+++ b/drm/1.0/vts/functional/drm_hal_clearkey_test.cpp
@@ -89,10 +89,6 @@
     0x10, 0x20, 0x30, 0x40, 0x50, 0x60, 0x70, 0x80,
     0x10, 0x20, 0x30, 0x40, 0x50, 0x60, 0x70, 0x80};
 
-static const uint32_t k256SubSampleByteCount = 256;
-static const uint32_t k512SubSampleClearBytes = 512;
-static const uint32_t k512SubSampleEncryptedBytes = 512;
-
 class DrmHalClearkeyFactoryTest : public ::testing::VtsHalHidlTargetTestBase {
    public:
     virtual void SetUp() override {
@@ -349,8 +345,7 @@
  * Helper method to close a session
  */
 void DrmHalClearkeyPluginTest::closeSession(const SessionId& sessionId) {
-    auto result = drmPlugin->closeSession(sessionId);
-    EXPECT_EQ(Status::OK, result);
+    EXPECT_TRUE(drmPlugin->closeSession(sessionId).isOk());
 }
 
 /**
@@ -793,7 +788,7 @@
  */
 TEST_F(DrmHalClearkeyPluginTest, GenericEncryptNotSupported) {
     SessionId session = openSession();
-    ;
+
     hidl_vec<uint8_t> keyId = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1};
     hidl_vec<uint8_t> input = {1, 2, 3, 4, 5};
     hidl_vec<uint8_t> iv = std::vector<uint8_t>(AES_BLOCK_SIZE, 0);
@@ -822,7 +817,7 @@
 
 TEST_F(DrmHalClearkeyPluginTest, GenericSignNotSupported) {
     SessionId session = openSession();
-    ;
+
     hidl_vec<uint8_t> keyId = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1};
     hidl_vec<uint8_t> message = {1, 2, 3, 4, 5};
     auto res = drmPlugin->sign(session, keyId, message,
@@ -836,7 +831,7 @@
 
 TEST_F(DrmHalClearkeyPluginTest, GenericVerifyNotSupported) {
     SessionId session = openSession();
-    ;
+
     hidl_vec<uint8_t> keyId = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1};
     hidl_vec<uint8_t> message = {1, 2, 3, 4, 5};
     hidl_vec<uint8_t> signature = {0, 0, 0, 0, 0, 0, 0, 0,
@@ -926,8 +921,7 @@
  */
 TEST_F(DrmHalClearkeyPluginTest, SetMediaDrmSession) {
     auto sessionId = openSession();
-    Status status = cryptoPlugin->setMediaDrmSession(sessionId);
-    EXPECT_EQ(Status::OK, status);
+    EXPECT_TRUE(cryptoPlugin->setMediaDrmSession(sessionId).isOk());
     closeSession(sessionId);
 }
 
@@ -948,8 +942,7 @@
  */
 TEST_F(DrmHalClearkeyPluginTest, SetMediaDrmSessionEmptySession) {
     SessionId sessionId;
-    Status status = cryptoPlugin->setMediaDrmSession(sessionId);
-    EXPECT_EQ(Status::OK, status);
+    EXPECT_TRUE(cryptoPlugin->setMediaDrmSession(sessionId).isOk());
 }
 
 /**
@@ -1131,18 +1124,17 @@
 TEST_F(DrmHalClearkeyDecryptTest, ClearSegmentTest) {
     vector<uint8_t> iv(AES_BLOCK_SIZE, 0);
     const Pattern noPattern = {0, 0};
+    const uint32_t kByteCount = 256;
     const vector<SubSample> subSamples = {
-        {.numBytesOfClearData = k256SubSampleByteCount,
+        {.numBytesOfClearData = kByteCount,
          .numBytesOfEncryptedData = 0}};
     auto sessionId = openSession();
     loadKeys(sessionId);
-
-    Status status = cryptoPlugin->setMediaDrmSession(sessionId);
-    EXPECT_EQ(Status::OK, status);
+    EXPECT_TRUE(cryptoPlugin->setMediaDrmSession(sessionId).isOk());
 
     uint32_t byteCount = decrypt(Mode::UNENCRYPTED, &iv[0], subSamples,
             noPattern, Status::OK);
-    EXPECT_EQ(k256SubSampleByteCount, byteCount);
+    EXPECT_EQ(kByteCount, byteCount);
 
     closeSession(sessionId);
 }
@@ -1154,18 +1146,18 @@
 TEST_F(DrmHalClearkeyDecryptTest, EncryptedAesCtrSegmentTest) {
     vector<uint8_t> iv(AES_BLOCK_SIZE, 0);
     const Pattern noPattern = {0, 0};
+    const uint32_t kClearBytes = 512;
+    const uint32_t kEncryptedBytes = 512;
     const vector<SubSample> subSamples = {
-        {.numBytesOfClearData = k512SubSampleClearBytes,
-         .numBytesOfEncryptedData = k512SubSampleEncryptedBytes}};
+        {.numBytesOfClearData = kClearBytes,
+         .numBytesOfEncryptedData = kEncryptedBytes}};
     auto sessionId = openSession();
     loadKeys(sessionId);
-
-    Status status = cryptoPlugin->setMediaDrmSession(sessionId);
-    EXPECT_EQ(Status::OK, status);
+    EXPECT_TRUE(cryptoPlugin->setMediaDrmSession(sessionId).isOk());
 
     uint32_t byteCount = decrypt(Mode::AES_CTR, &iv[0], subSamples,
             noPattern, Status::OK);
-    EXPECT_EQ(k512SubSampleClearBytes + k512SubSampleEncryptedBytes, byteCount);
+    EXPECT_EQ(kClearBytes + kEncryptedBytes, byteCount);
 
     closeSession(sessionId);
 }
@@ -1177,12 +1169,10 @@
     vector<uint8_t> iv(AES_BLOCK_SIZE, 0);
     const Pattern noPattern = {0, 0};
     const vector<SubSample> subSamples = {
-        {.numBytesOfClearData = k256SubSampleByteCount,
-         .numBytesOfEncryptedData = k256SubSampleByteCount}};
+        {.numBytesOfClearData = 256,
+         .numBytesOfEncryptedData = 256}};
     auto sessionId = openSession();
-
-    Status status = cryptoPlugin->setMediaDrmSession(sessionId);
-    EXPECT_EQ(Status::OK, status);
+    EXPECT_TRUE(cryptoPlugin->setMediaDrmSession(sessionId).isOk());
 
     uint32_t byteCount = decrypt(Mode::AES_CTR, &iv[0], subSamples,
             noPattern, Status::ERROR_DRM_NO_LICENSE);
@@ -1207,9 +1197,9 @@
             EXPECT_EQ(Status::OK, status);
             EXPECT_EQ(0u, myKeySetId.size());
         });
-    ASSERT_OK(res);
+    EXPECT_OK(res);
 
-    ASSERT_TRUE(cryptoPlugin->setMediaDrmSession(sessionId).isOk());
+    EXPECT_TRUE(cryptoPlugin->setMediaDrmSession(sessionId).isOk());
 
     uint32_t byteCount = decrypt(Mode::AES_CTR, &iv[0], subSamples,
             noPattern, Status::ERROR_DRM_NO_LICENSE);
@@ -1224,9 +1214,11 @@
 TEST_F(DrmHalClearkeyDecryptTest, DecryptWithEmptyKey) {
     vector<uint8_t> iv(AES_BLOCK_SIZE, 0);
     const Pattern noPattern = {0, 0};
+    const uint32_t kClearBytes = 512;
+    const uint32_t kEncryptedBytes = 512;
     const vector<SubSample> subSamples = {
-        {.numBytesOfClearData = k512SubSampleClearBytes,
-         .numBytesOfEncryptedData = k512SubSampleEncryptedBytes}};
+        {.numBytesOfClearData = kClearBytes,
+         .numBytesOfEncryptedData = kEncryptedBytes}};
 
     // base 64 encoded JSON response string, must not contain padding character '='
     const hidl_string emptyKeyResponse =
@@ -1259,9 +1251,11 @@
 TEST_F(DrmHalClearkeyDecryptTest, DecryptWithKeyTooLong) {
     vector<uint8_t> iv(AES_BLOCK_SIZE, 0);
     const Pattern noPattern = {0, 0};
+    const uint32_t kClearBytes = 512;
+    const uint32_t kEncryptedBytes = 512;
     const vector<SubSample> subSamples = {
-        {.numBytesOfClearData = k512SubSampleClearBytes,
-         .numBytesOfEncryptedData = k512SubSampleEncryptedBytes}};
+        {.numBytesOfClearData = kClearBytes,
+         .numBytesOfEncryptedData = kEncryptedBytes}};
 
     // base 64 encoded JSON response string, must not contain padding character '='
     const hidl_string keyTooLongResponse =
diff --git a/dumpstate/1.0/Android.bp b/dumpstate/1.0/Android.bp
index 04ad6d8..bc704f1 100644
--- a/dumpstate/1.0/Android.bp
+++ b/dumpstate/1.0/Android.bp
@@ -1,141 +1,17 @@
-// This file is autogenerated by hidl-gen. Do not edit manually.
+// This file is autogenerated by hidl-gen -Landroidbp.
 
-filegroup {
-    name: "android.hardware.dumpstate@1.0_hal",
-    srcs: [
-        "IDumpstateDevice.hal",
-    ],
-}
-
-genrule {
-    name: "android.hardware.dumpstate@1.0_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.dumpstate@1.0",
-    srcs: [
-        ":android.hardware.dumpstate@1.0_hal",
-    ],
-    out: [
-        "android/hardware/dumpstate/1.0/DumpstateDeviceAll.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.dumpstate@1.0_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.dumpstate@1.0",
-    srcs: [
-        ":android.hardware.dumpstate@1.0_hal",
-    ],
-    out: [
-        "android/hardware/dumpstate/1.0/IDumpstateDevice.h",
-        "android/hardware/dumpstate/1.0/IHwDumpstateDevice.h",
-        "android/hardware/dumpstate/1.0/BnHwDumpstateDevice.h",
-        "android/hardware/dumpstate/1.0/BpHwDumpstateDevice.h",
-        "android/hardware/dumpstate/1.0/BsDumpstateDevice.h",
-    ],
-}
-
-cc_library {
+hidl_interface {
     name: "android.hardware.dumpstate@1.0",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.dumpstate@1.0_genc++"],
-    generated_headers: ["android.hardware.dumpstate@1.0_genc++_headers"],
-    export_generated_headers: ["android.hardware.dumpstate@1.0_genc++_headers"],
-    vendor_available: true,
+    root: "android.hardware",
     vndk: {
         enabled: true,
     },
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-    ],
-}
-
-// This package is not java compatible. Not creating java target.
-
-// This package does not export any types. Not creating java constants export.
-
-
-genrule {
-    name: "android.hardware.dumpstate@1.0-adapter-helper_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.dumpstate@1.0",
     srcs: [
-        ":android.hardware.dumpstate@1.0_hal",
+        "IDumpstateDevice.hal",
     ],
-    out: [
-        "android/hardware/dumpstate/1.0/ADumpstateDevice.cpp",
+    interfaces: [
+        "android.hidl.base@1.0",
     ],
+    gen_java: false,
 }
 
-genrule {
-    name: "android.hardware.dumpstate@1.0-adapter-helper_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.dumpstate@1.0",
-    srcs: [
-        ":android.hardware.dumpstate@1.0_hal",
-    ],
-    out: [
-        "android/hardware/dumpstate/1.0/ADumpstateDevice.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.dumpstate@1.0-adapter-helper",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.dumpstate@1.0-adapter-helper_genc++"],
-    generated_headers: ["android.hardware.dumpstate@1.0-adapter-helper_genc++_headers"],
-    export_generated_headers: ["android.hardware.dumpstate@1.0-adapter-helper_genc++_headers"],
-    vendor_available: true,
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-        "libhidladapter",
-        "android.hardware.dumpstate@1.0",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-        "libhidladapter",
-        "android.hardware.dumpstate@1.0",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-}
-
-genrule {
-    name: "android.hardware.dumpstate@1.0-adapter_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-main -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.dumpstate@1.0",
-    out: ["main.cpp"]
-}
-
-cc_test {
-    name: "android.hardware.dumpstate@1.0-adapter",
-    defaults: ["hidl-module-defaults"],
-    shared_libs: [
-        "libhidladapter",
-        "libhidlbase",
-        "libhidltransport",
-        "libutils",
-        "android.hardware.dumpstate@1.0",
-        "android.hardware.dumpstate@1.0-adapter-helper",
-    ],
-    generated_sources: ["android.hardware.dumpstate@1.0-adapter_genc++"],
-}
diff --git a/gatekeeper/1.0/Android.bp b/gatekeeper/1.0/Android.bp
index dad2979..7dc2133 100644
--- a/gatekeeper/1.0/Android.bp
+++ b/gatekeeper/1.0/Android.bp
@@ -1,168 +1,22 @@
-// This file is autogenerated by hidl-gen. Do not edit manually.
+// This file is autogenerated by hidl-gen -Landroidbp.
 
-filegroup {
-    name: "android.hardware.gatekeeper@1.0_hal",
+hidl_interface {
+    name: "android.hardware.gatekeeper@1.0",
+    root: "android.hardware",
+    vndk: {
+        enabled: true,
+    },
     srcs: [
         "types.hal",
         "IGatekeeper.hal",
     ],
+    interfaces: [
+        "android.hidl.base@1.0",
+    ],
+    types: [
+        "GatekeeperResponse",
+        "GatekeeperStatusCode",
+    ],
+    gen_java: true,
 }
 
-genrule {
-    name: "android.hardware.gatekeeper@1.0_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.gatekeeper@1.0",
-    srcs: [
-        ":android.hardware.gatekeeper@1.0_hal",
-    ],
-    out: [
-        "android/hardware/gatekeeper/1.0/types.cpp",
-        "android/hardware/gatekeeper/1.0/GatekeeperAll.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.gatekeeper@1.0_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.gatekeeper@1.0",
-    srcs: [
-        ":android.hardware.gatekeeper@1.0_hal",
-    ],
-    out: [
-        "android/hardware/gatekeeper/1.0/types.h",
-        "android/hardware/gatekeeper/1.0/hwtypes.h",
-        "android/hardware/gatekeeper/1.0/IGatekeeper.h",
-        "android/hardware/gatekeeper/1.0/IHwGatekeeper.h",
-        "android/hardware/gatekeeper/1.0/BnHwGatekeeper.h",
-        "android/hardware/gatekeeper/1.0/BpHwGatekeeper.h",
-        "android/hardware/gatekeeper/1.0/BsGatekeeper.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.gatekeeper@1.0",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.gatekeeper@1.0_genc++"],
-    generated_headers: ["android.hardware.gatekeeper@1.0_genc++_headers"],
-    export_generated_headers: ["android.hardware.gatekeeper@1.0_genc++_headers"],
-    vendor_available: true,
-    vndk: {
-        enabled: true,
-    },
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-    ],
-}
-
-genrule {
-    name: "android.hardware.gatekeeper-V1.0-java_gen_java",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Ljava -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.gatekeeper@1.0",
-    srcs: [
-        ":android.hardware.gatekeeper@1.0_hal",
-    ],
-    out: [
-        "android/hardware/gatekeeper/V1_0/GatekeeperResponse.java",
-        "android/hardware/gatekeeper/V1_0/GatekeeperStatusCode.java",
-        "android/hardware/gatekeeper/V1_0/IGatekeeper.java",
-    ],
-}
-
-java_library {
-    name: "android.hardware.gatekeeper-V1.0-java",
-    no_framework_libs: true,
-    defaults: ["hidl-java-module-defaults"],
-    srcs: [":android.hardware.gatekeeper-V1.0-java_gen_java"],
-    libs: [
-        "hwbinder",
-        "android.hidl.base-V1.0-java",
-    ]
-}
-
-// This package does not export any types. Not creating java constants export.
-
-
-genrule {
-    name: "android.hardware.gatekeeper@1.0-adapter-helper_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.gatekeeper@1.0",
-    srcs: [
-        ":android.hardware.gatekeeper@1.0_hal",
-    ],
-    out: [
-        "android/hardware/gatekeeper/1.0/AGatekeeper.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.gatekeeper@1.0-adapter-helper_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.gatekeeper@1.0",
-    srcs: [
-        ":android.hardware.gatekeeper@1.0_hal",
-    ],
-    out: [
-        "android/hardware/gatekeeper/1.0/AGatekeeper.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.gatekeeper@1.0-adapter-helper",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.gatekeeper@1.0-adapter-helper_genc++"],
-    generated_headers: ["android.hardware.gatekeeper@1.0-adapter-helper_genc++_headers"],
-    export_generated_headers: ["android.hardware.gatekeeper@1.0-adapter-helper_genc++_headers"],
-    vendor_available: true,
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-        "libhidladapter",
-        "android.hardware.gatekeeper@1.0",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-        "libhidladapter",
-        "android.hardware.gatekeeper@1.0",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-}
-
-genrule {
-    name: "android.hardware.gatekeeper@1.0-adapter_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-main -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.gatekeeper@1.0",
-    out: ["main.cpp"]
-}
-
-cc_test {
-    name: "android.hardware.gatekeeper@1.0-adapter",
-    defaults: ["hidl-module-defaults"],
-    shared_libs: [
-        "libhidladapter",
-        "libhidlbase",
-        "libhidltransport",
-        "libutils",
-        "android.hardware.gatekeeper@1.0",
-        "android.hardware.gatekeeper@1.0-adapter-helper",
-    ],
-    generated_sources: ["android.hardware.gatekeeper@1.0-adapter_genc++"],
-}
diff --git a/gnss/1.0/Android.bp b/gnss/1.0/Android.bp
index 81920b7..dc659a3 100644
--- a/gnss/1.0/Android.bp
+++ b/gnss/1.0/Android.bp
@@ -1,7 +1,11 @@
-// This file is autogenerated by hidl-gen. Do not edit manually.
+// This file is autogenerated by hidl-gen -Landroidbp.
 
-filegroup {
-    name: "android.hardware.gnss@1.0_hal",
+hidl_interface {
+    name: "android.hardware.gnss@1.0",
+    root: "android.hardware",
+    vndk: {
+        enabled: true,
+    },
     srcs: [
         "types.hal",
         "IAGnss.hal",
@@ -25,352 +29,16 @@
         "IGnssXtra.hal",
         "IGnssXtraCallback.hal",
     ],
+    interfaces: [
+        "android.hidl.base@1.0",
+    ],
+    types: [
+        "GnssConstellationType",
+        "GnssLocation",
+        "GnssLocationFlags",
+        "GnssMax",
+    ],
+    gen_java: true,
+    gen_java_constants: true,
 }
 
-genrule {
-    name: "android.hardware.gnss@1.0_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.gnss@1.0",
-    srcs: [
-        ":android.hardware.gnss@1.0_hal",
-    ],
-    out: [
-        "android/hardware/gnss/1.0/types.cpp",
-        "android/hardware/gnss/1.0/AGnssAll.cpp",
-        "android/hardware/gnss/1.0/AGnssCallbackAll.cpp",
-        "android/hardware/gnss/1.0/AGnssRilAll.cpp",
-        "android/hardware/gnss/1.0/AGnssRilCallbackAll.cpp",
-        "android/hardware/gnss/1.0/GnssAll.cpp",
-        "android/hardware/gnss/1.0/GnssBatchingAll.cpp",
-        "android/hardware/gnss/1.0/GnssBatchingCallbackAll.cpp",
-        "android/hardware/gnss/1.0/GnssCallbackAll.cpp",
-        "android/hardware/gnss/1.0/GnssConfigurationAll.cpp",
-        "android/hardware/gnss/1.0/GnssDebugAll.cpp",
-        "android/hardware/gnss/1.0/GnssGeofenceCallbackAll.cpp",
-        "android/hardware/gnss/1.0/GnssGeofencingAll.cpp",
-        "android/hardware/gnss/1.0/GnssMeasurementAll.cpp",
-        "android/hardware/gnss/1.0/GnssMeasurementCallbackAll.cpp",
-        "android/hardware/gnss/1.0/GnssNavigationMessageAll.cpp",
-        "android/hardware/gnss/1.0/GnssNavigationMessageCallbackAll.cpp",
-        "android/hardware/gnss/1.0/GnssNiAll.cpp",
-        "android/hardware/gnss/1.0/GnssNiCallbackAll.cpp",
-        "android/hardware/gnss/1.0/GnssXtraAll.cpp",
-        "android/hardware/gnss/1.0/GnssXtraCallbackAll.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.gnss@1.0_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.gnss@1.0",
-    srcs: [
-        ":android.hardware.gnss@1.0_hal",
-    ],
-    out: [
-        "android/hardware/gnss/1.0/types.h",
-        "android/hardware/gnss/1.0/hwtypes.h",
-        "android/hardware/gnss/1.0/IAGnss.h",
-        "android/hardware/gnss/1.0/IHwAGnss.h",
-        "android/hardware/gnss/1.0/BnHwAGnss.h",
-        "android/hardware/gnss/1.0/BpHwAGnss.h",
-        "android/hardware/gnss/1.0/BsAGnss.h",
-        "android/hardware/gnss/1.0/IAGnssCallback.h",
-        "android/hardware/gnss/1.0/IHwAGnssCallback.h",
-        "android/hardware/gnss/1.0/BnHwAGnssCallback.h",
-        "android/hardware/gnss/1.0/BpHwAGnssCallback.h",
-        "android/hardware/gnss/1.0/BsAGnssCallback.h",
-        "android/hardware/gnss/1.0/IAGnssRil.h",
-        "android/hardware/gnss/1.0/IHwAGnssRil.h",
-        "android/hardware/gnss/1.0/BnHwAGnssRil.h",
-        "android/hardware/gnss/1.0/BpHwAGnssRil.h",
-        "android/hardware/gnss/1.0/BsAGnssRil.h",
-        "android/hardware/gnss/1.0/IAGnssRilCallback.h",
-        "android/hardware/gnss/1.0/IHwAGnssRilCallback.h",
-        "android/hardware/gnss/1.0/BnHwAGnssRilCallback.h",
-        "android/hardware/gnss/1.0/BpHwAGnssRilCallback.h",
-        "android/hardware/gnss/1.0/BsAGnssRilCallback.h",
-        "android/hardware/gnss/1.0/IGnss.h",
-        "android/hardware/gnss/1.0/IHwGnss.h",
-        "android/hardware/gnss/1.0/BnHwGnss.h",
-        "android/hardware/gnss/1.0/BpHwGnss.h",
-        "android/hardware/gnss/1.0/BsGnss.h",
-        "android/hardware/gnss/1.0/IGnssBatching.h",
-        "android/hardware/gnss/1.0/IHwGnssBatching.h",
-        "android/hardware/gnss/1.0/BnHwGnssBatching.h",
-        "android/hardware/gnss/1.0/BpHwGnssBatching.h",
-        "android/hardware/gnss/1.0/BsGnssBatching.h",
-        "android/hardware/gnss/1.0/IGnssBatchingCallback.h",
-        "android/hardware/gnss/1.0/IHwGnssBatchingCallback.h",
-        "android/hardware/gnss/1.0/BnHwGnssBatchingCallback.h",
-        "android/hardware/gnss/1.0/BpHwGnssBatchingCallback.h",
-        "android/hardware/gnss/1.0/BsGnssBatchingCallback.h",
-        "android/hardware/gnss/1.0/IGnssCallback.h",
-        "android/hardware/gnss/1.0/IHwGnssCallback.h",
-        "android/hardware/gnss/1.0/BnHwGnssCallback.h",
-        "android/hardware/gnss/1.0/BpHwGnssCallback.h",
-        "android/hardware/gnss/1.0/BsGnssCallback.h",
-        "android/hardware/gnss/1.0/IGnssConfiguration.h",
-        "android/hardware/gnss/1.0/IHwGnssConfiguration.h",
-        "android/hardware/gnss/1.0/BnHwGnssConfiguration.h",
-        "android/hardware/gnss/1.0/BpHwGnssConfiguration.h",
-        "android/hardware/gnss/1.0/BsGnssConfiguration.h",
-        "android/hardware/gnss/1.0/IGnssDebug.h",
-        "android/hardware/gnss/1.0/IHwGnssDebug.h",
-        "android/hardware/gnss/1.0/BnHwGnssDebug.h",
-        "android/hardware/gnss/1.0/BpHwGnssDebug.h",
-        "android/hardware/gnss/1.0/BsGnssDebug.h",
-        "android/hardware/gnss/1.0/IGnssGeofenceCallback.h",
-        "android/hardware/gnss/1.0/IHwGnssGeofenceCallback.h",
-        "android/hardware/gnss/1.0/BnHwGnssGeofenceCallback.h",
-        "android/hardware/gnss/1.0/BpHwGnssGeofenceCallback.h",
-        "android/hardware/gnss/1.0/BsGnssGeofenceCallback.h",
-        "android/hardware/gnss/1.0/IGnssGeofencing.h",
-        "android/hardware/gnss/1.0/IHwGnssGeofencing.h",
-        "android/hardware/gnss/1.0/BnHwGnssGeofencing.h",
-        "android/hardware/gnss/1.0/BpHwGnssGeofencing.h",
-        "android/hardware/gnss/1.0/BsGnssGeofencing.h",
-        "android/hardware/gnss/1.0/IGnssMeasurement.h",
-        "android/hardware/gnss/1.0/IHwGnssMeasurement.h",
-        "android/hardware/gnss/1.0/BnHwGnssMeasurement.h",
-        "android/hardware/gnss/1.0/BpHwGnssMeasurement.h",
-        "android/hardware/gnss/1.0/BsGnssMeasurement.h",
-        "android/hardware/gnss/1.0/IGnssMeasurementCallback.h",
-        "android/hardware/gnss/1.0/IHwGnssMeasurementCallback.h",
-        "android/hardware/gnss/1.0/BnHwGnssMeasurementCallback.h",
-        "android/hardware/gnss/1.0/BpHwGnssMeasurementCallback.h",
-        "android/hardware/gnss/1.0/BsGnssMeasurementCallback.h",
-        "android/hardware/gnss/1.0/IGnssNavigationMessage.h",
-        "android/hardware/gnss/1.0/IHwGnssNavigationMessage.h",
-        "android/hardware/gnss/1.0/BnHwGnssNavigationMessage.h",
-        "android/hardware/gnss/1.0/BpHwGnssNavigationMessage.h",
-        "android/hardware/gnss/1.0/BsGnssNavigationMessage.h",
-        "android/hardware/gnss/1.0/IGnssNavigationMessageCallback.h",
-        "android/hardware/gnss/1.0/IHwGnssNavigationMessageCallback.h",
-        "android/hardware/gnss/1.0/BnHwGnssNavigationMessageCallback.h",
-        "android/hardware/gnss/1.0/BpHwGnssNavigationMessageCallback.h",
-        "android/hardware/gnss/1.0/BsGnssNavigationMessageCallback.h",
-        "android/hardware/gnss/1.0/IGnssNi.h",
-        "android/hardware/gnss/1.0/IHwGnssNi.h",
-        "android/hardware/gnss/1.0/BnHwGnssNi.h",
-        "android/hardware/gnss/1.0/BpHwGnssNi.h",
-        "android/hardware/gnss/1.0/BsGnssNi.h",
-        "android/hardware/gnss/1.0/IGnssNiCallback.h",
-        "android/hardware/gnss/1.0/IHwGnssNiCallback.h",
-        "android/hardware/gnss/1.0/BnHwGnssNiCallback.h",
-        "android/hardware/gnss/1.0/BpHwGnssNiCallback.h",
-        "android/hardware/gnss/1.0/BsGnssNiCallback.h",
-        "android/hardware/gnss/1.0/IGnssXtra.h",
-        "android/hardware/gnss/1.0/IHwGnssXtra.h",
-        "android/hardware/gnss/1.0/BnHwGnssXtra.h",
-        "android/hardware/gnss/1.0/BpHwGnssXtra.h",
-        "android/hardware/gnss/1.0/BsGnssXtra.h",
-        "android/hardware/gnss/1.0/IGnssXtraCallback.h",
-        "android/hardware/gnss/1.0/IHwGnssXtraCallback.h",
-        "android/hardware/gnss/1.0/BnHwGnssXtraCallback.h",
-        "android/hardware/gnss/1.0/BpHwGnssXtraCallback.h",
-        "android/hardware/gnss/1.0/BsGnssXtraCallback.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.gnss@1.0",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.gnss@1.0_genc++"],
-    generated_headers: ["android.hardware.gnss@1.0_genc++_headers"],
-    export_generated_headers: ["android.hardware.gnss@1.0_genc++_headers"],
-    vendor_available: true,
-    vndk: {
-        enabled: true,
-    },
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-    ],
-}
-
-genrule {
-    name: "android.hardware.gnss-V1.0-java_gen_java",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Ljava -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.gnss@1.0",
-    srcs: [
-        ":android.hardware.gnss@1.0_hal",
-    ],
-    out: [
-        "android/hardware/gnss/V1_0/GnssConstellationType.java",
-        "android/hardware/gnss/V1_0/GnssLocation.java",
-        "android/hardware/gnss/V1_0/GnssLocationFlags.java",
-        "android/hardware/gnss/V1_0/GnssMax.java",
-        "android/hardware/gnss/V1_0/IAGnss.java",
-        "android/hardware/gnss/V1_0/IAGnssCallback.java",
-        "android/hardware/gnss/V1_0/IAGnssRil.java",
-        "android/hardware/gnss/V1_0/IAGnssRilCallback.java",
-        "android/hardware/gnss/V1_0/IGnss.java",
-        "android/hardware/gnss/V1_0/IGnssBatching.java",
-        "android/hardware/gnss/V1_0/IGnssBatchingCallback.java",
-        "android/hardware/gnss/V1_0/IGnssCallback.java",
-        "android/hardware/gnss/V1_0/IGnssConfiguration.java",
-        "android/hardware/gnss/V1_0/IGnssDebug.java",
-        "android/hardware/gnss/V1_0/IGnssGeofenceCallback.java",
-        "android/hardware/gnss/V1_0/IGnssGeofencing.java",
-        "android/hardware/gnss/V1_0/IGnssMeasurement.java",
-        "android/hardware/gnss/V1_0/IGnssMeasurementCallback.java",
-        "android/hardware/gnss/V1_0/IGnssNavigationMessage.java",
-        "android/hardware/gnss/V1_0/IGnssNavigationMessageCallback.java",
-        "android/hardware/gnss/V1_0/IGnssNi.java",
-        "android/hardware/gnss/V1_0/IGnssNiCallback.java",
-        "android/hardware/gnss/V1_0/IGnssXtra.java",
-        "android/hardware/gnss/V1_0/IGnssXtraCallback.java",
-    ],
-}
-
-java_library {
-    name: "android.hardware.gnss-V1.0-java",
-    no_framework_libs: true,
-    defaults: ["hidl-java-module-defaults"],
-    srcs: [":android.hardware.gnss-V1.0-java_gen_java"],
-    libs: [
-        "hwbinder",
-        "android.hidl.base-V1.0-java",
-    ]
-}
-
-genrule {
-    name: "android.hardware.gnss-V1.0-java-constants_gen_java",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Ljava-constants -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.gnss@1.0",
-    srcs: [
-        ":android.hardware.gnss@1.0_hal",
-    ],
-    out: [
-        "android/hardware/gnss/V1_0/Constants.java",
-    ],
-}
-
-java_library {
-    name: "android.hardware.gnss-V1.0-java-constants",
-    no_framework_libs: true,
-    defaults: ["hidl-java-module-defaults"],
-    srcs: [":android.hardware.gnss-V1.0-java-constants_gen_java"],
-}
-
-genrule {
-    name: "android.hardware.gnss@1.0-adapter-helper_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.gnss@1.0",
-    srcs: [
-        ":android.hardware.gnss@1.0_hal",
-    ],
-    out: [
-        "android/hardware/gnss/1.0/AAGnss.cpp",
-        "android/hardware/gnss/1.0/AAGnssCallback.cpp",
-        "android/hardware/gnss/1.0/AAGnssRil.cpp",
-        "android/hardware/gnss/1.0/AAGnssRilCallback.cpp",
-        "android/hardware/gnss/1.0/AGnss.cpp",
-        "android/hardware/gnss/1.0/AGnssBatching.cpp",
-        "android/hardware/gnss/1.0/AGnssBatchingCallback.cpp",
-        "android/hardware/gnss/1.0/AGnssCallback.cpp",
-        "android/hardware/gnss/1.0/AGnssConfiguration.cpp",
-        "android/hardware/gnss/1.0/AGnssDebug.cpp",
-        "android/hardware/gnss/1.0/AGnssGeofenceCallback.cpp",
-        "android/hardware/gnss/1.0/AGnssGeofencing.cpp",
-        "android/hardware/gnss/1.0/AGnssMeasurement.cpp",
-        "android/hardware/gnss/1.0/AGnssMeasurementCallback.cpp",
-        "android/hardware/gnss/1.0/AGnssNavigationMessage.cpp",
-        "android/hardware/gnss/1.0/AGnssNavigationMessageCallback.cpp",
-        "android/hardware/gnss/1.0/AGnssNi.cpp",
-        "android/hardware/gnss/1.0/AGnssNiCallback.cpp",
-        "android/hardware/gnss/1.0/AGnssXtra.cpp",
-        "android/hardware/gnss/1.0/AGnssXtraCallback.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.gnss@1.0-adapter-helper_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.gnss@1.0",
-    srcs: [
-        ":android.hardware.gnss@1.0_hal",
-    ],
-    out: [
-        "android/hardware/gnss/1.0/AAGnss.h",
-        "android/hardware/gnss/1.0/AAGnssCallback.h",
-        "android/hardware/gnss/1.0/AAGnssRil.h",
-        "android/hardware/gnss/1.0/AAGnssRilCallback.h",
-        "android/hardware/gnss/1.0/AGnss.h",
-        "android/hardware/gnss/1.0/AGnssBatching.h",
-        "android/hardware/gnss/1.0/AGnssBatchingCallback.h",
-        "android/hardware/gnss/1.0/AGnssCallback.h",
-        "android/hardware/gnss/1.0/AGnssConfiguration.h",
-        "android/hardware/gnss/1.0/AGnssDebug.h",
-        "android/hardware/gnss/1.0/AGnssGeofenceCallback.h",
-        "android/hardware/gnss/1.0/AGnssGeofencing.h",
-        "android/hardware/gnss/1.0/AGnssMeasurement.h",
-        "android/hardware/gnss/1.0/AGnssMeasurementCallback.h",
-        "android/hardware/gnss/1.0/AGnssNavigationMessage.h",
-        "android/hardware/gnss/1.0/AGnssNavigationMessageCallback.h",
-        "android/hardware/gnss/1.0/AGnssNi.h",
-        "android/hardware/gnss/1.0/AGnssNiCallback.h",
-        "android/hardware/gnss/1.0/AGnssXtra.h",
-        "android/hardware/gnss/1.0/AGnssXtraCallback.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.gnss@1.0-adapter-helper",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.gnss@1.0-adapter-helper_genc++"],
-    generated_headers: ["android.hardware.gnss@1.0-adapter-helper_genc++_headers"],
-    export_generated_headers: ["android.hardware.gnss@1.0-adapter-helper_genc++_headers"],
-    vendor_available: true,
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-        "libhidladapter",
-        "android.hardware.gnss@1.0",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-        "libhidladapter",
-        "android.hardware.gnss@1.0",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-}
-
-genrule {
-    name: "android.hardware.gnss@1.0-adapter_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-main -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.gnss@1.0",
-    out: ["main.cpp"]
-}
-
-cc_test {
-    name: "android.hardware.gnss@1.0-adapter",
-    defaults: ["hidl-module-defaults"],
-    shared_libs: [
-        "libhidladapter",
-        "libhidlbase",
-        "libhidltransport",
-        "libutils",
-        "android.hardware.gnss@1.0",
-        "android.hardware.gnss@1.0-adapter-helper",
-    ],
-    generated_sources: ["android.hardware.gnss@1.0-adapter_genc++"],
-}
diff --git a/graphics/allocator/2.0/Android.bp b/graphics/allocator/2.0/Android.bp
index e98f90a..0b0722e 100644
--- a/graphics/allocator/2.0/Android.bp
+++ b/graphics/allocator/2.0/Android.bp
@@ -1,154 +1,20 @@
-// This file is autogenerated by hidl-gen. Do not edit manually.
+// This file is autogenerated by hidl-gen -Landroidbp.
 
-filegroup {
-    name: "android.hardware.graphics.allocator@2.0_hal",
-    srcs: [
-        "IAllocator.hal",
-    ],
-}
-
-genrule {
-    name: "android.hardware.graphics.allocator@2.0_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.graphics.allocator@2.0",
-    srcs: [
-        ":android.hardware.graphics.allocator@2.0_hal",
-    ],
-    out: [
-        "android/hardware/graphics/allocator/2.0/AllocatorAll.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.graphics.allocator@2.0_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.graphics.allocator@2.0",
-    srcs: [
-        ":android.hardware.graphics.allocator@2.0_hal",
-    ],
-    out: [
-        "android/hardware/graphics/allocator/2.0/IAllocator.h",
-        "android/hardware/graphics/allocator/2.0/IHwAllocator.h",
-        "android/hardware/graphics/allocator/2.0/BnHwAllocator.h",
-        "android/hardware/graphics/allocator/2.0/BpHwAllocator.h",
-        "android/hardware/graphics/allocator/2.0/BsAllocator.h",
-    ],
-}
-
-cc_library {
+hidl_interface {
     name: "android.hardware.graphics.allocator@2.0",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.graphics.allocator@2.0_genc++"],
-    generated_headers: ["android.hardware.graphics.allocator@2.0_genc++_headers"],
-    export_generated_headers: ["android.hardware.graphics.allocator@2.0_genc++_headers"],
-    vendor_available: true,
+    root: "android.hardware",
     vndk: {
         enabled: true,
         support_system_process: true,
     },
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-        "android.hardware.graphics.common@1.0",
-        "android.hardware.graphics.mapper@2.0",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-        "android.hardware.graphics.common@1.0",
-        "android.hardware.graphics.mapper@2.0",
-    ],
-}
-
-// This package is not java compatible. Not creating java target.
-
-// This package does not export any types. Not creating java constants export.
-
-
-genrule {
-    name: "android.hardware.graphics.allocator@2.0-adapter-helper_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.graphics.allocator@2.0",
     srcs: [
-        ":android.hardware.graphics.allocator@2.0_hal",
+        "IAllocator.hal",
     ],
-    out: [
-        "android/hardware/graphics/allocator/2.0/AAllocator.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.graphics.allocator@2.0-adapter-helper_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.graphics.allocator@2.0",
-    srcs: [
-        ":android.hardware.graphics.allocator@2.0_hal",
-    ],
-    out: [
-        "android/hardware/graphics/allocator/2.0/AAllocator.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.graphics.allocator@2.0-adapter-helper",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.graphics.allocator@2.0-adapter-helper_genc++"],
-    generated_headers: ["android.hardware.graphics.allocator@2.0-adapter-helper_genc++_headers"],
-    export_generated_headers: ["android.hardware.graphics.allocator@2.0-adapter-helper_genc++_headers"],
-    vendor_available: true,
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-        "libhidladapter",
-        "android.hardware.graphics.allocator@2.0",
+    interfaces: [
         "android.hardware.graphics.common@1.0",
         "android.hardware.graphics.mapper@2.0",
-        "android.hardware.graphics.mapper@2.0-adapter-helper",
-        "android.hidl.base@1.0-adapter-helper",
+        "android.hidl.base@1.0",
     ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-        "libhidladapter",
-        "android.hardware.graphics.allocator@2.0",
-        "android.hardware.graphics.common@1.0",
-        "android.hardware.graphics.mapper@2.0",
-        "android.hardware.graphics.mapper@2.0-adapter-helper",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
+    gen_java: false,
 }
 
-genrule {
-    name: "android.hardware.graphics.allocator@2.0-adapter_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-main -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.graphics.allocator@2.0",
-    out: ["main.cpp"]
-}
-
-cc_test {
-    name: "android.hardware.graphics.allocator@2.0-adapter",
-    defaults: ["hidl-module-defaults"],
-    shared_libs: [
-        "libhidladapter",
-        "libhidlbase",
-        "libhidltransport",
-        "libutils",
-        "android.hardware.graphics.allocator@2.0",
-        "android.hardware.graphics.common@1.0",
-        "android.hardware.graphics.mapper@2.0",
-        "android.hardware.graphics.allocator@2.0-adapter-helper",
-    ],
-    generated_sources: ["android.hardware.graphics.allocator@2.0-adapter_genc++"],
-}
diff --git a/graphics/bufferqueue/1.0/Android.bp b/graphics/bufferqueue/1.0/Android.bp
index 5e930b9..0333a42 100644
--- a/graphics/bufferqueue/1.0/Android.bp
+++ b/graphics/bufferqueue/1.0/Android.bp
@@ -1,160 +1,20 @@
-// This file is autogenerated by hidl-gen. Do not edit manually.
+// This file is autogenerated by hidl-gen -Landroidbp.
 
-filegroup {
-    name: "android.hardware.graphics.bufferqueue@1.0_hal",
+hidl_interface {
+    name: "android.hardware.graphics.bufferqueue@1.0",
+    root: "android.hardware",
+    vndk: {
+        enabled: true,
+    },
     srcs: [
         "IGraphicBufferProducer.hal",
         "IProducerListener.hal",
     ],
-}
-
-genrule {
-    name: "android.hardware.graphics.bufferqueue@1.0_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.graphics.bufferqueue@1.0",
-    srcs: [
-        ":android.hardware.graphics.bufferqueue@1.0_hal",
-    ],
-    out: [
-        "android/hardware/graphics/bufferqueue/1.0/GraphicBufferProducerAll.cpp",
-        "android/hardware/graphics/bufferqueue/1.0/ProducerListenerAll.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.graphics.bufferqueue@1.0_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.graphics.bufferqueue@1.0",
-    srcs: [
-        ":android.hardware.graphics.bufferqueue@1.0_hal",
-    ],
-    out: [
-        "android/hardware/graphics/bufferqueue/1.0/IGraphicBufferProducer.h",
-        "android/hardware/graphics/bufferqueue/1.0/IHwGraphicBufferProducer.h",
-        "android/hardware/graphics/bufferqueue/1.0/BnHwGraphicBufferProducer.h",
-        "android/hardware/graphics/bufferqueue/1.0/BpHwGraphicBufferProducer.h",
-        "android/hardware/graphics/bufferqueue/1.0/BsGraphicBufferProducer.h",
-        "android/hardware/graphics/bufferqueue/1.0/IProducerListener.h",
-        "android/hardware/graphics/bufferqueue/1.0/IHwProducerListener.h",
-        "android/hardware/graphics/bufferqueue/1.0/BnHwProducerListener.h",
-        "android/hardware/graphics/bufferqueue/1.0/BpHwProducerListener.h",
-        "android/hardware/graphics/bufferqueue/1.0/BsProducerListener.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.graphics.bufferqueue@1.0",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.graphics.bufferqueue@1.0_genc++"],
-    generated_headers: ["android.hardware.graphics.bufferqueue@1.0_genc++_headers"],
-    export_generated_headers: ["android.hardware.graphics.bufferqueue@1.0_genc++_headers"],
-    vendor_available: true,
-    vndk: {
-        enabled: true,
-    },
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
+    interfaces: [
         "android.hardware.graphics.common@1.0",
         "android.hardware.media@1.0",
+        "android.hidl.base@1.0",
     ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-        "android.hardware.graphics.common@1.0",
-        "android.hardware.media@1.0",
-    ],
+    gen_java: false,
 }
 
-// This package is not java compatible. Not creating java target.
-
-// This package does not export any types. Not creating java constants export.
-
-
-genrule {
-    name: "android.hardware.graphics.bufferqueue@1.0-adapter-helper_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.graphics.bufferqueue@1.0",
-    srcs: [
-        ":android.hardware.graphics.bufferqueue@1.0_hal",
-    ],
-    out: [
-        "android/hardware/graphics/bufferqueue/1.0/AGraphicBufferProducer.cpp",
-        "android/hardware/graphics/bufferqueue/1.0/AProducerListener.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.graphics.bufferqueue@1.0-adapter-helper_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.graphics.bufferqueue@1.0",
-    srcs: [
-        ":android.hardware.graphics.bufferqueue@1.0_hal",
-    ],
-    out: [
-        "android/hardware/graphics/bufferqueue/1.0/AGraphicBufferProducer.h",
-        "android/hardware/graphics/bufferqueue/1.0/AProducerListener.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.graphics.bufferqueue@1.0-adapter-helper",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.graphics.bufferqueue@1.0-adapter-helper_genc++"],
-    generated_headers: ["android.hardware.graphics.bufferqueue@1.0-adapter-helper_genc++_headers"],
-    export_generated_headers: ["android.hardware.graphics.bufferqueue@1.0-adapter-helper_genc++_headers"],
-    vendor_available: true,
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-        "libhidladapter",
-        "android.hardware.graphics.bufferqueue@1.0",
-        "android.hardware.graphics.common@1.0",
-        "android.hardware.media@1.0",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-        "libhidladapter",
-        "android.hardware.graphics.bufferqueue@1.0",
-        "android.hardware.graphics.common@1.0",
-        "android.hardware.media@1.0",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-}
-
-genrule {
-    name: "android.hardware.graphics.bufferqueue@1.0-adapter_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-main -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.graphics.bufferqueue@1.0",
-    out: ["main.cpp"]
-}
-
-cc_test {
-    name: "android.hardware.graphics.bufferqueue@1.0-adapter",
-    defaults: ["hidl-module-defaults"],
-    shared_libs: [
-        "libhidladapter",
-        "libhidlbase",
-        "libhidltransport",
-        "libutils",
-        "android.hardware.graphics.bufferqueue@1.0",
-        "android.hardware.graphics.common@1.0",
-        "android.hardware.media@1.0",
-        "android.hardware.graphics.bufferqueue@1.0-adapter-helper",
-    ],
-    generated_sources: ["android.hardware.graphics.bufferqueue@1.0-adapter_genc++"],
-}
diff --git a/graphics/common/1.0/Android.bp b/graphics/common/1.0/Android.bp
index 4ea9c1a..f88cbdf 100644
--- a/graphics/common/1.0/Android.bp
+++ b/graphics/common/1.0/Android.bp
@@ -1,108 +1,25 @@
-// This file is autogenerated by hidl-gen. Do not edit manually.
+// This file is autogenerated by hidl-gen -Landroidbp.
 
-filegroup {
-    name: "android.hardware.graphics.common@1.0_hal",
-    srcs: [
-        "types.hal",
-    ],
-}
-
-genrule {
-    name: "android.hardware.graphics.common@1.0_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.graphics.common@1.0",
-    srcs: [
-        ":android.hardware.graphics.common@1.0_hal",
-    ],
-    out: [
-        "android/hardware/graphics/common/1.0/types.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.graphics.common@1.0_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.graphics.common@1.0",
-    srcs: [
-        ":android.hardware.graphics.common@1.0_hal",
-    ],
-    out: [
-        "android/hardware/graphics/common/1.0/types.h",
-        "android/hardware/graphics/common/1.0/hwtypes.h",
-    ],
-}
-
-cc_library {
+hidl_interface {
     name: "android.hardware.graphics.common@1.0",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.graphics.common@1.0_genc++"],
-    generated_headers: ["android.hardware.graphics.common@1.0_genc++_headers"],
-    export_generated_headers: ["android.hardware.graphics.common@1.0_genc++_headers"],
-    vendor_available: true,
+    root: "android.hardware",
     vndk: {
         enabled: true,
         support_system_process: true,
     },
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-    ],
-}
-
-genrule {
-    name: "android.hardware.graphics.common-V1.0-java_gen_java",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Ljava -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.graphics.common@1.0",
     srcs: [
-        ":android.hardware.graphics.common@1.0_hal",
+        "types.hal",
     ],
-    out: [
-        "android/hardware/graphics/common/V1_0/BufferUsage.java",
-        "android/hardware/graphics/common/V1_0/ColorMode.java",
-        "android/hardware/graphics/common/V1_0/ColorTransform.java",
-        "android/hardware/graphics/common/V1_0/Dataspace.java",
-        "android/hardware/graphics/common/V1_0/Hdr.java",
-        "android/hardware/graphics/common/V1_0/PixelFormat.java",
-        "android/hardware/graphics/common/V1_0/Transform.java",
+    types: [
+        "BufferUsage",
+        "ColorMode",
+        "ColorTransform",
+        "Dataspace",
+        "Hdr",
+        "PixelFormat",
+        "Transform",
     ],
+    gen_java: true,
+    gen_java_constants: true,
 }
 
-java_library {
-    name: "android.hardware.graphics.common-V1.0-java",
-    no_framework_libs: true,
-    defaults: ["hidl-java-module-defaults"],
-    srcs: [":android.hardware.graphics.common-V1.0-java_gen_java"],
-    libs: [
-        "hwbinder",
-    ]
-}
-
-genrule {
-    name: "android.hardware.graphics.common-V1.0-java-constants_gen_java",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Ljava-constants -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.graphics.common@1.0",
-    srcs: [
-        ":android.hardware.graphics.common@1.0_hal",
-    ],
-    out: [
-        "android/hardware/graphics/common/V1_0/Constants.java",
-    ],
-}
-
-java_library {
-    name: "android.hardware.graphics.common-V1.0-java-constants",
-    no_framework_libs: true,
-    defaults: ["hidl-java-module-defaults"],
-    srcs: [":android.hardware.graphics.common-V1.0-java-constants_gen_java"],
-}
-// This package has no interfaces. Not creating versioning adapter.
diff --git a/graphics/composer/2.1/Android.bp b/graphics/composer/2.1/Android.bp
index 41cc5a6..8fbc8c2 100644
--- a/graphics/composer/2.1/Android.bp
+++ b/graphics/composer/2.1/Android.bp
@@ -1,168 +1,24 @@
-// This file is autogenerated by hidl-gen. Do not edit manually.
+// This file is autogenerated by hidl-gen -Landroidbp.
 
-filegroup {
-    name: "android.hardware.graphics.composer@2.1_hal",
+hidl_interface {
+    name: "android.hardware.graphics.composer@2.1",
+    root: "android.hardware",
+    vndk: {
+        enabled: true,
+    },
     srcs: [
         "types.hal",
         "IComposer.hal",
         "IComposerCallback.hal",
         "IComposerClient.hal",
     ],
-}
-
-genrule {
-    name: "android.hardware.graphics.composer@2.1_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.graphics.composer@2.1",
-    srcs: [
-        ":android.hardware.graphics.composer@2.1_hal",
-    ],
-    out: [
-        "android/hardware/graphics/composer/2.1/types.cpp",
-        "android/hardware/graphics/composer/2.1/ComposerAll.cpp",
-        "android/hardware/graphics/composer/2.1/ComposerCallbackAll.cpp",
-        "android/hardware/graphics/composer/2.1/ComposerClientAll.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.graphics.composer@2.1_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.graphics.composer@2.1",
-    srcs: [
-        ":android.hardware.graphics.composer@2.1_hal",
-    ],
-    out: [
-        "android/hardware/graphics/composer/2.1/types.h",
-        "android/hardware/graphics/composer/2.1/hwtypes.h",
-        "android/hardware/graphics/composer/2.1/IComposer.h",
-        "android/hardware/graphics/composer/2.1/IHwComposer.h",
-        "android/hardware/graphics/composer/2.1/BnHwComposer.h",
-        "android/hardware/graphics/composer/2.1/BpHwComposer.h",
-        "android/hardware/graphics/composer/2.1/BsComposer.h",
-        "android/hardware/graphics/composer/2.1/IComposerCallback.h",
-        "android/hardware/graphics/composer/2.1/IHwComposerCallback.h",
-        "android/hardware/graphics/composer/2.1/BnHwComposerCallback.h",
-        "android/hardware/graphics/composer/2.1/BpHwComposerCallback.h",
-        "android/hardware/graphics/composer/2.1/BsComposerCallback.h",
-        "android/hardware/graphics/composer/2.1/IComposerClient.h",
-        "android/hardware/graphics/composer/2.1/IHwComposerClient.h",
-        "android/hardware/graphics/composer/2.1/BnHwComposerClient.h",
-        "android/hardware/graphics/composer/2.1/BpHwComposerClient.h",
-        "android/hardware/graphics/composer/2.1/BsComposerClient.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.graphics.composer@2.1",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.graphics.composer@2.1_genc++"],
-    generated_headers: ["android.hardware.graphics.composer@2.1_genc++_headers"],
-    export_generated_headers: ["android.hardware.graphics.composer@2.1_genc++_headers"],
-    vendor_available: true,
-    vndk: {
-        enabled: true,
-    },
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
+    interfaces: [
         "android.hardware.graphics.common@1.0",
+        "android.hidl.base@1.0",
     ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-        "android.hardware.graphics.common@1.0",
+    types: [
+        "Error",
     ],
+    gen_java: false,
 }
 
-// This package is not java compatible. Not creating java target.
-
-// This package does not export any types. Not creating java constants export.
-
-
-genrule {
-    name: "android.hardware.graphics.composer@2.1-adapter-helper_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.graphics.composer@2.1",
-    srcs: [
-        ":android.hardware.graphics.composer@2.1_hal",
-    ],
-    out: [
-        "android/hardware/graphics/composer/2.1/AComposer.cpp",
-        "android/hardware/graphics/composer/2.1/AComposerCallback.cpp",
-        "android/hardware/graphics/composer/2.1/AComposerClient.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.graphics.composer@2.1-adapter-helper_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.graphics.composer@2.1",
-    srcs: [
-        ":android.hardware.graphics.composer@2.1_hal",
-    ],
-    out: [
-        "android/hardware/graphics/composer/2.1/AComposer.h",
-        "android/hardware/graphics/composer/2.1/AComposerCallback.h",
-        "android/hardware/graphics/composer/2.1/AComposerClient.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.graphics.composer@2.1-adapter-helper",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.graphics.composer@2.1-adapter-helper_genc++"],
-    generated_headers: ["android.hardware.graphics.composer@2.1-adapter-helper_genc++_headers"],
-    export_generated_headers: ["android.hardware.graphics.composer@2.1-adapter-helper_genc++_headers"],
-    vendor_available: true,
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-        "libhidladapter",
-        "android.hardware.graphics.common@1.0",
-        "android.hardware.graphics.composer@2.1",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-        "libhidladapter",
-        "android.hardware.graphics.common@1.0",
-        "android.hardware.graphics.composer@2.1",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-}
-
-genrule {
-    name: "android.hardware.graphics.composer@2.1-adapter_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-main -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.graphics.composer@2.1",
-    out: ["main.cpp"]
-}
-
-cc_test {
-    name: "android.hardware.graphics.composer@2.1-adapter",
-    defaults: ["hidl-module-defaults"],
-    shared_libs: [
-        "libhidladapter",
-        "libhidlbase",
-        "libhidltransport",
-        "libutils",
-        "android.hardware.graphics.common@1.0",
-        "android.hardware.graphics.composer@2.1",
-        "android.hardware.graphics.composer@2.1-adapter-helper",
-    ],
-    generated_sources: ["android.hardware.graphics.composer@2.1-adapter_genc++"],
-}
diff --git a/graphics/mapper/2.0/Android.bp b/graphics/mapper/2.0/Android.bp
index 3b9f0d8..2f9a344 100644
--- a/graphics/mapper/2.0/Android.bp
+++ b/graphics/mapper/2.0/Android.bp
@@ -1,151 +1,24 @@
-// This file is autogenerated by hidl-gen. Do not edit manually.
+// This file is autogenerated by hidl-gen -Landroidbp.
 
-filegroup {
-    name: "android.hardware.graphics.mapper@2.0_hal",
-    srcs: [
-        "types.hal",
-        "IMapper.hal",
-    ],
-}
-
-genrule {
-    name: "android.hardware.graphics.mapper@2.0_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.graphics.mapper@2.0",
-    srcs: [
-        ":android.hardware.graphics.mapper@2.0_hal",
-    ],
-    out: [
-        "android/hardware/graphics/mapper/2.0/types.cpp",
-        "android/hardware/graphics/mapper/2.0/MapperAll.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.graphics.mapper@2.0_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.graphics.mapper@2.0",
-    srcs: [
-        ":android.hardware.graphics.mapper@2.0_hal",
-    ],
-    out: [
-        "android/hardware/graphics/mapper/2.0/types.h",
-        "android/hardware/graphics/mapper/2.0/hwtypes.h",
-        "android/hardware/graphics/mapper/2.0/IMapper.h",
-        "android/hardware/graphics/mapper/2.0/IHwMapper.h",
-        "android/hardware/graphics/mapper/2.0/BnHwMapper.h",
-        "android/hardware/graphics/mapper/2.0/BpHwMapper.h",
-        "android/hardware/graphics/mapper/2.0/BsMapper.h",
-    ],
-}
-
-cc_library {
+hidl_interface {
     name: "android.hardware.graphics.mapper@2.0",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.graphics.mapper@2.0_genc++"],
-    generated_headers: ["android.hardware.graphics.mapper@2.0_genc++_headers"],
-    export_generated_headers: ["android.hardware.graphics.mapper@2.0_genc++_headers"],
-    vendor_available: true,
+    root: "android.hardware",
     vndk: {
         enabled: true,
         support_system_process: true,
     },
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-        "android.hardware.graphics.common@1.0",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-        "android.hardware.graphics.common@1.0",
-    ],
-}
-
-// This package is not java compatible. Not creating java target.
-
-// This package does not export any types. Not creating java constants export.
-
-
-genrule {
-    name: "android.hardware.graphics.mapper@2.0-adapter-helper_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.graphics.mapper@2.0",
     srcs: [
-        ":android.hardware.graphics.mapper@2.0_hal",
+        "types.hal",
+        "IMapper.hal",
     ],
-    out: [
-        "android/hardware/graphics/mapper/2.0/AMapper.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.graphics.mapper@2.0-adapter-helper_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.graphics.mapper@2.0",
-    srcs: [
-        ":android.hardware.graphics.mapper@2.0_hal",
-    ],
-    out: [
-        "android/hardware/graphics/mapper/2.0/AMapper.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.graphics.mapper@2.0-adapter-helper",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.graphics.mapper@2.0-adapter-helper_genc++"],
-    generated_headers: ["android.hardware.graphics.mapper@2.0-adapter-helper_genc++_headers"],
-    export_generated_headers: ["android.hardware.graphics.mapper@2.0-adapter-helper_genc++_headers"],
-    vendor_available: true,
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-        "libhidladapter",
+    interfaces: [
         "android.hardware.graphics.common@1.0",
-        "android.hardware.graphics.mapper@2.0",
-        "android.hidl.base@1.0-adapter-helper",
+        "android.hidl.base@1.0",
     ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-        "libhidladapter",
-        "android.hardware.graphics.common@1.0",
-        "android.hardware.graphics.mapper@2.0",
-        "android.hidl.base@1.0-adapter-helper",
+    types: [
+        "Error",
+        "YCbCrLayout",
     ],
+    gen_java: false,
 }
 
-genrule {
-    name: "android.hardware.graphics.mapper@2.0-adapter_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-main -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.graphics.mapper@2.0",
-    out: ["main.cpp"]
-}
-
-cc_test {
-    name: "android.hardware.graphics.mapper@2.0-adapter",
-    defaults: ["hidl-module-defaults"],
-    shared_libs: [
-        "libhidladapter",
-        "libhidlbase",
-        "libhidltransport",
-        "libutils",
-        "android.hardware.graphics.common@1.0",
-        "android.hardware.graphics.mapper@2.0",
-        "android.hardware.graphics.mapper@2.0-adapter-helper",
-    ],
-    generated_sources: ["android.hardware.graphics.mapper@2.0-adapter_genc++"],
-}
diff --git a/graphics/mapper/2.0/vts/functional/VtsHalGraphicsMapperTestUtils.cpp b/graphics/mapper/2.0/vts/functional/VtsHalGraphicsMapperTestUtils.cpp
index c534889..671c4b1 100644
--- a/graphics/mapper/2.0/vts/functional/VtsHalGraphicsMapperTestUtils.cpp
+++ b/graphics/mapper/2.0/vts/functional/VtsHalGraphicsMapperTestUtils.cpp
@@ -30,10 +30,12 @@
 }
 
 void Gralloc::init() {
-    mAllocator = ::testing::VtsHalHidlTargetTestBase::getService<IAllocator>();
+    mAllocator = ::testing::VtsHalHidlTargetTestBase::getService<IAllocator>(
+        GraphicsMapperHidlEnvironment::Instance()->getServiceName<IAllocator>());
     ASSERT_NE(nullptr, mAllocator.get()) << "failed to get allocator service";
 
-    mMapper = ::testing::VtsHalHidlTargetTestBase::getService<IMapper>();
+    mMapper = ::testing::VtsHalHidlTargetTestBase::getService<IMapper>(
+        GraphicsMapperHidlEnvironment::Instance()->getServiceName<IMapper>());
     ASSERT_NE(nullptr, mMapper.get()) << "failed to get mapper service";
     ASSERT_FALSE(mMapper->isRemote()) << "mapper is not in passthrough mode";
 }
diff --git a/graphics/mapper/2.0/vts/functional/VtsHalGraphicsMapperTestUtils.h b/graphics/mapper/2.0/vts/functional/VtsHalGraphicsMapperTestUtils.h
index 757f20b..9cf60a3 100644
--- a/graphics/mapper/2.0/vts/functional/VtsHalGraphicsMapperTestUtils.h
+++ b/graphics/mapper/2.0/vts/functional/VtsHalGraphicsMapperTestUtils.h
@@ -19,6 +19,7 @@
 
 #include <unordered_set>
 
+#include <VtsHalHidlTargetTestEnvBase.h>
 #include <android/hardware/graphics/allocator/2.0/IAllocator.h>
 #include <android/hardware/graphics/mapper/2.0/IMapper.h>
 #include <utils/StrongPointer.h>
@@ -88,6 +89,21 @@
     std::unordered_set<const native_handle_t*> mImportedBuffers;
 };
 
+// Test environment for graphics.mapper.
+class GraphicsMapperHidlEnvironment : public ::testing::VtsHalHidlTargetTestEnvBase {
+   public:
+    // get the test environment singleton
+    static GraphicsMapperHidlEnvironment* Instance() {
+        static GraphicsMapperHidlEnvironment* instance = new GraphicsMapperHidlEnvironment;
+        return instance;
+    }
+
+    virtual void registerTestServices() override {
+        registerTestService<IAllocator>();
+        registerTestService<IMapper>();
+    }
+};
+
 }  // namespace tests
 }  // namespace V2_0
 }  // namespace mapper
diff --git a/graphics/mapper/2.0/vts/functional/VtsHalGraphicsMapperV2_0TargetTest.cpp b/graphics/mapper/2.0/vts/functional/VtsHalGraphicsMapperV2_0TargetTest.cpp
index c74013b..1f94898 100644
--- a/graphics/mapper/2.0/vts/functional/VtsHalGraphicsMapperV2_0TargetTest.cpp
+++ b/graphics/mapper/2.0/vts/functional/VtsHalGraphicsMapperV2_0TargetTest.cpp
@@ -403,10 +403,11 @@
 }  // namespace android
 
 int main(int argc, char** argv) {
-  ::testing::InitGoogleTest(&argc, argv);
-
-  int status = RUN_ALL_TESTS();
-  LOG(INFO) << "Test result = " << status;
-
-  return status;
+    using android::hardware::graphics::mapper::V2_0::tests::GraphicsMapperHidlEnvironment;
+    ::testing::AddGlobalTestEnvironment(GraphicsMapperHidlEnvironment::Instance());
+    ::testing::InitGoogleTest(&argc, argv);
+    GraphicsMapperHidlEnvironment::Instance()->init(&argc, argv);
+    int status = RUN_ALL_TESTS();
+    LOG(INFO) << "Test result = " << status;
+    return status;
 }
diff --git a/graphics/mapper/2.1/Android.bp b/graphics/mapper/2.1/Android.bp
index 029fbbe..7438d64 100644
--- a/graphics/mapper/2.1/Android.bp
+++ b/graphics/mapper/2.1/Android.bp
@@ -1,154 +1,20 @@
-// This file is autogenerated by hidl-gen. Do not edit manually.
+// This file is autogenerated by hidl-gen -Landroidbp.
 
-filegroup {
-    name: "android.hardware.graphics.mapper@2.1_hal",
-    srcs: [
-        "IMapper.hal",
-    ],
-}
-
-genrule {
-    name: "android.hardware.graphics.mapper@2.1_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.graphics.mapper@2.1",
-    srcs: [
-        ":android.hardware.graphics.mapper@2.1_hal",
-    ],
-    out: [
-        "android/hardware/graphics/mapper/2.1/MapperAll.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.graphics.mapper@2.1_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.graphics.mapper@2.1",
-    srcs: [
-        ":android.hardware.graphics.mapper@2.1_hal",
-    ],
-    out: [
-        "android/hardware/graphics/mapper/2.1/IMapper.h",
-        "android/hardware/graphics/mapper/2.1/IHwMapper.h",
-        "android/hardware/graphics/mapper/2.1/BnHwMapper.h",
-        "android/hardware/graphics/mapper/2.1/BpHwMapper.h",
-        "android/hardware/graphics/mapper/2.1/BsMapper.h",
-    ],
-}
-
-cc_library {
+hidl_interface {
     name: "android.hardware.graphics.mapper@2.1",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.graphics.mapper@2.1_genc++"],
-    generated_headers: ["android.hardware.graphics.mapper@2.1_genc++_headers"],
-    export_generated_headers: ["android.hardware.graphics.mapper@2.1_genc++_headers"],
-    vendor_available: true,
+    root: "android.hardware",
     vndk: {
         enabled: true,
         support_system_process: true,
     },
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-        "android.hardware.graphics.common@1.0",
-        "android.hardware.graphics.mapper@2.0",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-        "android.hardware.graphics.common@1.0",
-        "android.hardware.graphics.mapper@2.0",
-    ],
-}
-
-// This package is not java compatible. Not creating java target.
-
-// This package does not export any types. Not creating java constants export.
-
-
-genrule {
-    name: "android.hardware.graphics.mapper@2.1-adapter-helper_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.graphics.mapper@2.1",
     srcs: [
-        ":android.hardware.graphics.mapper@2.1_hal",
+        "IMapper.hal",
     ],
-    out: [
-        "android/hardware/graphics/mapper/2.1/AMapper.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.graphics.mapper@2.1-adapter-helper_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.graphics.mapper@2.1",
-    srcs: [
-        ":android.hardware.graphics.mapper@2.1_hal",
-    ],
-    out: [
-        "android/hardware/graphics/mapper/2.1/AMapper.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.graphics.mapper@2.1-adapter-helper",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.graphics.mapper@2.1-adapter-helper_genc++"],
-    generated_headers: ["android.hardware.graphics.mapper@2.1-adapter-helper_genc++_headers"],
-    export_generated_headers: ["android.hardware.graphics.mapper@2.1-adapter-helper_genc++_headers"],
-    vendor_available: true,
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-        "libhidladapter",
+    interfaces: [
         "android.hardware.graphics.common@1.0",
         "android.hardware.graphics.mapper@2.0",
-        "android.hardware.graphics.mapper@2.1",
-        "android.hardware.graphics.mapper@2.0-adapter-helper",
-        "android.hidl.base@1.0-adapter-helper",
+        "android.hidl.base@1.0",
     ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-        "libhidladapter",
-        "android.hardware.graphics.common@1.0",
-        "android.hardware.graphics.mapper@2.0",
-        "android.hardware.graphics.mapper@2.1",
-        "android.hardware.graphics.mapper@2.0-adapter-helper",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
+    gen_java: false,
 }
 
-genrule {
-    name: "android.hardware.graphics.mapper@2.1-adapter_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-main -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.graphics.mapper@2.1",
-    out: ["main.cpp"]
-}
-
-cc_test {
-    name: "android.hardware.graphics.mapper@2.1-adapter",
-    defaults: ["hidl-module-defaults"],
-    shared_libs: [
-        "libhidladapter",
-        "libhidlbase",
-        "libhidltransport",
-        "libutils",
-        "android.hardware.graphics.common@1.0",
-        "android.hardware.graphics.mapper@2.0",
-        "android.hardware.graphics.mapper@2.1",
-        "android.hardware.graphics.mapper@2.1-adapter-helper",
-    ],
-    generated_sources: ["android.hardware.graphics.mapper@2.1-adapter_genc++"],
-}
diff --git a/health/1.0/Android.bp b/health/1.0/Android.bp
index 4fe1f2d..dcbaf58 100644
--- a/health/1.0/Android.bp
+++ b/health/1.0/Android.bp
@@ -1,187 +1,26 @@
-// This file is autogenerated by hidl-gen. Do not edit manually.
+// This file is autogenerated by hidl-gen -Landroidbp.
 
-filegroup {
-    name: "android.hardware.health@1.0_hal",
+hidl_interface {
+    name: "android.hardware.health@1.0",
+    root: "android.hardware",
+    vndk: {
+        enabled: true,
+    },
     srcs: [
         "types.hal",
         "IHealth.hal",
     ],
+    interfaces: [
+        "android.hidl.base@1.0",
+    ],
+    types: [
+        "BatteryHealth",
+        "BatteryStatus",
+        "HealthConfig",
+        "HealthInfo",
+        "Result",
+    ],
+    gen_java: true,
+    gen_java_constants: true,
 }
 
-genrule {
-    name: "android.hardware.health@1.0_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.health@1.0",
-    srcs: [
-        ":android.hardware.health@1.0_hal",
-    ],
-    out: [
-        "android/hardware/health/1.0/types.cpp",
-        "android/hardware/health/1.0/HealthAll.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.health@1.0_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.health@1.0",
-    srcs: [
-        ":android.hardware.health@1.0_hal",
-    ],
-    out: [
-        "android/hardware/health/1.0/types.h",
-        "android/hardware/health/1.0/hwtypes.h",
-        "android/hardware/health/1.0/IHealth.h",
-        "android/hardware/health/1.0/IHwHealth.h",
-        "android/hardware/health/1.0/BnHwHealth.h",
-        "android/hardware/health/1.0/BpHwHealth.h",
-        "android/hardware/health/1.0/BsHealth.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.health@1.0",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.health@1.0_genc++"],
-    generated_headers: ["android.hardware.health@1.0_genc++_headers"],
-    export_generated_headers: ["android.hardware.health@1.0_genc++_headers"],
-    vendor_available: true,
-    vndk: {
-        enabled: true,
-    },
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-    ],
-}
-
-genrule {
-    name: "android.hardware.health-V1.0-java_gen_java",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Ljava -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.health@1.0",
-    srcs: [
-        ":android.hardware.health@1.0_hal",
-    ],
-    out: [
-        "android/hardware/health/V1_0/BatteryHealth.java",
-        "android/hardware/health/V1_0/BatteryStatus.java",
-        "android/hardware/health/V1_0/HealthConfig.java",
-        "android/hardware/health/V1_0/HealthInfo.java",
-        "android/hardware/health/V1_0/Result.java",
-        "android/hardware/health/V1_0/IHealth.java",
-    ],
-}
-
-java_library {
-    name: "android.hardware.health-V1.0-java",
-    no_framework_libs: true,
-    defaults: ["hidl-java-module-defaults"],
-    srcs: [":android.hardware.health-V1.0-java_gen_java"],
-    libs: [
-        "hwbinder",
-        "android.hidl.base-V1.0-java",
-    ]
-}
-
-genrule {
-    name: "android.hardware.health-V1.0-java-constants_gen_java",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Ljava-constants -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.health@1.0",
-    srcs: [
-        ":android.hardware.health@1.0_hal",
-    ],
-    out: [
-        "android/hardware/health/V1_0/Constants.java",
-    ],
-}
-
-java_library {
-    name: "android.hardware.health-V1.0-java-constants",
-    no_framework_libs: true,
-    defaults: ["hidl-java-module-defaults"],
-    srcs: [":android.hardware.health-V1.0-java-constants_gen_java"],
-}
-
-genrule {
-    name: "android.hardware.health@1.0-adapter-helper_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.health@1.0",
-    srcs: [
-        ":android.hardware.health@1.0_hal",
-    ],
-    out: [
-        "android/hardware/health/1.0/AHealth.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.health@1.0-adapter-helper_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.health@1.0",
-    srcs: [
-        ":android.hardware.health@1.0_hal",
-    ],
-    out: [
-        "android/hardware/health/1.0/AHealth.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.health@1.0-adapter-helper",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.health@1.0-adapter-helper_genc++"],
-    generated_headers: ["android.hardware.health@1.0-adapter-helper_genc++_headers"],
-    export_generated_headers: ["android.hardware.health@1.0-adapter-helper_genc++_headers"],
-    vendor_available: true,
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-        "libhidladapter",
-        "android.hardware.health@1.0",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-        "libhidladapter",
-        "android.hardware.health@1.0",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-}
-
-genrule {
-    name: "android.hardware.health@1.0-adapter_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-main -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.health@1.0",
-    out: ["main.cpp"]
-}
-
-cc_test {
-    name: "android.hardware.health@1.0-adapter",
-    defaults: ["hidl-module-defaults"],
-    shared_libs: [
-        "libhidladapter",
-        "libhidlbase",
-        "libhidltransport",
-        "libutils",
-        "android.hardware.health@1.0",
-        "android.hardware.health@1.0-adapter-helper",
-    ],
-    generated_sources: ["android.hardware.health@1.0-adapter_genc++"],
-}
diff --git a/health/2.0/Android.bp b/health/2.0/Android.bp
index 97265ec..1080df1 100644
--- a/health/2.0/Android.bp
+++ b/health/2.0/Android.bp
@@ -1,185 +1,23 @@
-// This file is autogenerated by hidl-gen. Do not edit manually.
+// This file is autogenerated by hidl-gen -Landroidbp.
 
-filegroup {
-    name: "android.hardware.health@2.0_hal",
+hidl_interface {
+    name: "android.hardware.health@2.0",
+    root: "android.hardware",
+    vndk: {
+        enabled: true,
+    },
     srcs: [
         "types.hal",
         "IHealth.hal",
         "IHealthInfoCallback.hal",
     ],
-}
-
-genrule {
-    name: "android.hardware.health@2.0_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.health@2.0",
-    srcs: [
-        ":android.hardware.health@2.0_hal",
-    ],
-    out: [
-        "android/hardware/health/2.0/types.cpp",
-        "android/hardware/health/2.0/HealthAll.cpp",
-        "android/hardware/health/2.0/HealthInfoCallbackAll.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.health@2.0_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.health@2.0",
-    srcs: [
-        ":android.hardware.health@2.0_hal",
-    ],
-    out: [
-        "android/hardware/health/2.0/types.h",
-        "android/hardware/health/2.0/hwtypes.h",
-        "android/hardware/health/2.0/IHealth.h",
-        "android/hardware/health/2.0/IHwHealth.h",
-        "android/hardware/health/2.0/BnHwHealth.h",
-        "android/hardware/health/2.0/BpHwHealth.h",
-        "android/hardware/health/2.0/BsHealth.h",
-        "android/hardware/health/2.0/IHealthInfoCallback.h",
-        "android/hardware/health/2.0/IHwHealthInfoCallback.h",
-        "android/hardware/health/2.0/BnHwHealthInfoCallback.h",
-        "android/hardware/health/2.0/BpHwHealthInfoCallback.h",
-        "android/hardware/health/2.0/BsHealthInfoCallback.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.health@2.0",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.health@2.0_genc++"],
-    generated_headers: ["android.hardware.health@2.0_genc++_headers"],
-    export_generated_headers: ["android.hardware.health@2.0_genc++_headers"],
-    vendor_available: true,
-    vndk: {
-        enabled: true,
-    },
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
+    interfaces: [
         "android.hardware.health@1.0",
+        "android.hidl.base@1.0",
     ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-        "android.hardware.health@1.0",
+    types: [
+        "Result",
     ],
+    gen_java: true,
 }
 
-genrule {
-    name: "android.hardware.health-V2.0-java_gen_java",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Ljava -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.health@2.0",
-    srcs: [
-        ":android.hardware.health@2.0_hal",
-    ],
-    out: [
-        "android/hardware/health/V2_0/Result.java",
-        "android/hardware/health/V2_0/IHealth.java",
-        "android/hardware/health/V2_0/IHealthInfoCallback.java",
-    ],
-}
-
-java_library {
-    name: "android.hardware.health-V2.0-java",
-    no_framework_libs: true,
-    defaults: ["hidl-java-module-defaults"],
-    srcs: [":android.hardware.health-V2.0-java_gen_java"],
-    libs: [
-        "hwbinder",
-        "android.hardware.health-V1.0-java",
-        "android.hidl.base-V1.0-java",
-    ]
-}
-
-// This package does not export any types. Not creating java constants export.
-
-
-genrule {
-    name: "android.hardware.health@2.0-adapter-helper_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.health@2.0",
-    srcs: [
-        ":android.hardware.health@2.0_hal",
-    ],
-    out: [
-        "android/hardware/health/2.0/AHealth.cpp",
-        "android/hardware/health/2.0/AHealthInfoCallback.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.health@2.0-adapter-helper_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.health@2.0",
-    srcs: [
-        ":android.hardware.health@2.0_hal",
-    ],
-    out: [
-        "android/hardware/health/2.0/AHealth.h",
-        "android/hardware/health/2.0/AHealthInfoCallback.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.health@2.0-adapter-helper",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.health@2.0-adapter-helper_genc++"],
-    generated_headers: ["android.hardware.health@2.0-adapter-helper_genc++_headers"],
-    export_generated_headers: ["android.hardware.health@2.0-adapter-helper_genc++_headers"],
-    vendor_available: true,
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-        "libhidladapter",
-        "android.hardware.health@1.0",
-        "android.hardware.health@2.0",
-        "android.hardware.health@1.0-adapter-helper",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-        "libhidladapter",
-        "android.hardware.health@1.0",
-        "android.hardware.health@2.0",
-        "android.hardware.health@1.0-adapter-helper",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-}
-
-genrule {
-    name: "android.hardware.health@2.0-adapter_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-main -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.health@2.0",
-    out: ["main.cpp"]
-}
-
-cc_test {
-    name: "android.hardware.health@2.0-adapter",
-    defaults: ["hidl-module-defaults"],
-    shared_libs: [
-        "libhidladapter",
-        "libhidlbase",
-        "libhidltransport",
-        "libutils",
-        "android.hardware.health@1.0",
-        "android.hardware.health@2.0",
-        "android.hardware.health@2.0-adapter-helper",
-    ],
-    generated_sources: ["android.hardware.health@2.0-adapter_genc++"],
-}
diff --git a/ir/1.0/Android.bp b/ir/1.0/Android.bp
index f5c93da..272acb3 100644
--- a/ir/1.0/Android.bp
+++ b/ir/1.0/Android.bp
@@ -1,167 +1,21 @@
-// This file is autogenerated by hidl-gen. Do not edit manually.
+// This file is autogenerated by hidl-gen -Landroidbp.
 
-filegroup {
-    name: "android.hardware.ir@1.0_hal",
+hidl_interface {
+    name: "android.hardware.ir@1.0",
+    root: "android.hardware",
+    vndk: {
+        enabled: true,
+    },
     srcs: [
         "types.hal",
         "IConsumerIr.hal",
     ],
+    interfaces: [
+        "android.hidl.base@1.0",
+    ],
+    types: [
+        "ConsumerIrFreqRange",
+    ],
+    gen_java: true,
 }
 
-genrule {
-    name: "android.hardware.ir@1.0_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.ir@1.0",
-    srcs: [
-        ":android.hardware.ir@1.0_hal",
-    ],
-    out: [
-        "android/hardware/ir/1.0/types.cpp",
-        "android/hardware/ir/1.0/ConsumerIrAll.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.ir@1.0_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.ir@1.0",
-    srcs: [
-        ":android.hardware.ir@1.0_hal",
-    ],
-    out: [
-        "android/hardware/ir/1.0/types.h",
-        "android/hardware/ir/1.0/hwtypes.h",
-        "android/hardware/ir/1.0/IConsumerIr.h",
-        "android/hardware/ir/1.0/IHwConsumerIr.h",
-        "android/hardware/ir/1.0/BnHwConsumerIr.h",
-        "android/hardware/ir/1.0/BpHwConsumerIr.h",
-        "android/hardware/ir/1.0/BsConsumerIr.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.ir@1.0",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.ir@1.0_genc++"],
-    generated_headers: ["android.hardware.ir@1.0_genc++_headers"],
-    export_generated_headers: ["android.hardware.ir@1.0_genc++_headers"],
-    vendor_available: true,
-    vndk: {
-        enabled: true,
-    },
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-    ],
-}
-
-genrule {
-    name: "android.hardware.ir-V1.0-java_gen_java",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Ljava -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.ir@1.0",
-    srcs: [
-        ":android.hardware.ir@1.0_hal",
-    ],
-    out: [
-        "android/hardware/ir/V1_0/ConsumerIrFreqRange.java",
-        "android/hardware/ir/V1_0/IConsumerIr.java",
-    ],
-}
-
-java_library {
-    name: "android.hardware.ir-V1.0-java",
-    no_framework_libs: true,
-    defaults: ["hidl-java-module-defaults"],
-    srcs: [":android.hardware.ir-V1.0-java_gen_java"],
-    libs: [
-        "hwbinder",
-        "android.hidl.base-V1.0-java",
-    ]
-}
-
-// This package does not export any types. Not creating java constants export.
-
-
-genrule {
-    name: "android.hardware.ir@1.0-adapter-helper_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.ir@1.0",
-    srcs: [
-        ":android.hardware.ir@1.0_hal",
-    ],
-    out: [
-        "android/hardware/ir/1.0/AConsumerIr.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.ir@1.0-adapter-helper_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.ir@1.0",
-    srcs: [
-        ":android.hardware.ir@1.0_hal",
-    ],
-    out: [
-        "android/hardware/ir/1.0/AConsumerIr.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.ir@1.0-adapter-helper",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.ir@1.0-adapter-helper_genc++"],
-    generated_headers: ["android.hardware.ir@1.0-adapter-helper_genc++_headers"],
-    export_generated_headers: ["android.hardware.ir@1.0-adapter-helper_genc++_headers"],
-    vendor_available: true,
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-        "libhidladapter",
-        "android.hardware.ir@1.0",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-        "libhidladapter",
-        "android.hardware.ir@1.0",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-}
-
-genrule {
-    name: "android.hardware.ir@1.0-adapter_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-main -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.ir@1.0",
-    out: ["main.cpp"]
-}
-
-cc_test {
-    name: "android.hardware.ir@1.0-adapter",
-    defaults: ["hidl-module-defaults"],
-    shared_libs: [
-        "libhidladapter",
-        "libhidlbase",
-        "libhidltransport",
-        "libutils",
-        "android.hardware.ir@1.0",
-        "android.hardware.ir@1.0-adapter-helper",
-    ],
-    generated_sources: ["android.hardware.ir@1.0-adapter_genc++"],
-}
diff --git a/keymaster/3.0/Android.bp b/keymaster/3.0/Android.bp
index b84e4ef..e0f1b94 100644
--- a/keymaster/3.0/Android.bp
+++ b/keymaster/3.0/Android.bp
@@ -1,145 +1,38 @@
-// This file is autogenerated by hidl-gen. Do not edit manually.
+// This file is autogenerated by hidl-gen -Landroidbp.
 
-filegroup {
-    name: "android.hardware.keymaster@3.0_hal",
+hidl_interface {
+    name: "android.hardware.keymaster@3.0",
+    root: "android.hardware",
+    vndk: {
+        enabled: true,
+    },
     srcs: [
         "types.hal",
         "IKeymasterDevice.hal",
     ],
+    interfaces: [
+        "android.hidl.base@1.0",
+    ],
+    types: [
+        "Algorithm",
+        "BlockMode",
+        "Digest",
+        "EcCurve",
+        "ErrorCode",
+        "HardwareAuthToken",
+        "HardwareAuthenticatorType",
+        "KeyBlobUsageRequirements",
+        "KeyCharacteristics",
+        "KeyDerivationFunction",
+        "KeyFormat",
+        "KeyOrigin",
+        "KeyParameter",
+        "KeyPurpose",
+        "PaddingMode",
+        "SecurityLevel",
+        "Tag",
+        "TagType",
+    ],
+    gen_java: false,
 }
 
-genrule {
-    name: "android.hardware.keymaster@3.0_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.keymaster@3.0",
-    srcs: [
-        ":android.hardware.keymaster@3.0_hal",
-    ],
-    out: [
-        "android/hardware/keymaster/3.0/types.cpp",
-        "android/hardware/keymaster/3.0/KeymasterDeviceAll.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.keymaster@3.0_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.keymaster@3.0",
-    srcs: [
-        ":android.hardware.keymaster@3.0_hal",
-    ],
-    out: [
-        "android/hardware/keymaster/3.0/types.h",
-        "android/hardware/keymaster/3.0/hwtypes.h",
-        "android/hardware/keymaster/3.0/IKeymasterDevice.h",
-        "android/hardware/keymaster/3.0/IHwKeymasterDevice.h",
-        "android/hardware/keymaster/3.0/BnHwKeymasterDevice.h",
-        "android/hardware/keymaster/3.0/BpHwKeymasterDevice.h",
-        "android/hardware/keymaster/3.0/BsKeymasterDevice.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.keymaster@3.0",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.keymaster@3.0_genc++"],
-    generated_headers: ["android.hardware.keymaster@3.0_genc++_headers"],
-    export_generated_headers: ["android.hardware.keymaster@3.0_genc++_headers"],
-    vendor_available: true,
-    vndk: {
-        enabled: true,
-    },
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-    ],
-}
-
-// This package is not java compatible. Not creating java target.
-
-// This package does not export any types. Not creating java constants export.
-
-
-genrule {
-    name: "android.hardware.keymaster@3.0-adapter-helper_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.keymaster@3.0",
-    srcs: [
-        ":android.hardware.keymaster@3.0_hal",
-    ],
-    out: [
-        "android/hardware/keymaster/3.0/AKeymasterDevice.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.keymaster@3.0-adapter-helper_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.keymaster@3.0",
-    srcs: [
-        ":android.hardware.keymaster@3.0_hal",
-    ],
-    out: [
-        "android/hardware/keymaster/3.0/AKeymasterDevice.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.keymaster@3.0-adapter-helper",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.keymaster@3.0-adapter-helper_genc++"],
-    generated_headers: ["android.hardware.keymaster@3.0-adapter-helper_genc++_headers"],
-    export_generated_headers: ["android.hardware.keymaster@3.0-adapter-helper_genc++_headers"],
-    vendor_available: true,
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-        "libhidladapter",
-        "android.hardware.keymaster@3.0",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-        "libhidladapter",
-        "android.hardware.keymaster@3.0",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-}
-
-genrule {
-    name: "android.hardware.keymaster@3.0-adapter_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-main -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.keymaster@3.0",
-    out: ["main.cpp"]
-}
-
-cc_test {
-    name: "android.hardware.keymaster@3.0-adapter",
-    defaults: ["hidl-module-defaults"],
-    shared_libs: [
-        "libhidladapter",
-        "libhidlbase",
-        "libhidltransport",
-        "libutils",
-        "android.hardware.keymaster@3.0",
-        "android.hardware.keymaster@3.0-adapter-helper",
-    ],
-    generated_sources: ["android.hardware.keymaster@3.0-adapter_genc++"],
-}
diff --git a/light/2.0/Android.bp b/light/2.0/Android.bp
index 2e7d84a..ee58f93 100644
--- a/light/2.0/Android.bp
+++ b/light/2.0/Android.bp
@@ -1,171 +1,25 @@
-// This file is autogenerated by hidl-gen. Do not edit manually.
+// This file is autogenerated by hidl-gen -Landroidbp.
 
-filegroup {
-    name: "android.hardware.light@2.0_hal",
+hidl_interface {
+    name: "android.hardware.light@2.0",
+    root: "android.hardware",
+    vndk: {
+        enabled: true,
+    },
     srcs: [
         "types.hal",
         "ILight.hal",
     ],
+    interfaces: [
+        "android.hidl.base@1.0",
+    ],
+    types: [
+        "Brightness",
+        "Flash",
+        "LightState",
+        "Status",
+        "Type",
+    ],
+    gen_java: true,
 }
 
-genrule {
-    name: "android.hardware.light@2.0_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.light@2.0",
-    srcs: [
-        ":android.hardware.light@2.0_hal",
-    ],
-    out: [
-        "android/hardware/light/2.0/types.cpp",
-        "android/hardware/light/2.0/LightAll.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.light@2.0_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.light@2.0",
-    srcs: [
-        ":android.hardware.light@2.0_hal",
-    ],
-    out: [
-        "android/hardware/light/2.0/types.h",
-        "android/hardware/light/2.0/hwtypes.h",
-        "android/hardware/light/2.0/ILight.h",
-        "android/hardware/light/2.0/IHwLight.h",
-        "android/hardware/light/2.0/BnHwLight.h",
-        "android/hardware/light/2.0/BpHwLight.h",
-        "android/hardware/light/2.0/BsLight.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.light@2.0",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.light@2.0_genc++"],
-    generated_headers: ["android.hardware.light@2.0_genc++_headers"],
-    export_generated_headers: ["android.hardware.light@2.0_genc++_headers"],
-    vendor_available: true,
-    vndk: {
-        enabled: true,
-    },
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-    ],
-}
-
-genrule {
-    name: "android.hardware.light-V2.0-java_gen_java",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Ljava -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.light@2.0",
-    srcs: [
-        ":android.hardware.light@2.0_hal",
-    ],
-    out: [
-        "android/hardware/light/V2_0/Brightness.java",
-        "android/hardware/light/V2_0/Flash.java",
-        "android/hardware/light/V2_0/LightState.java",
-        "android/hardware/light/V2_0/Status.java",
-        "android/hardware/light/V2_0/Type.java",
-        "android/hardware/light/V2_0/ILight.java",
-    ],
-}
-
-java_library {
-    name: "android.hardware.light-V2.0-java",
-    no_framework_libs: true,
-    defaults: ["hidl-java-module-defaults"],
-    srcs: [":android.hardware.light-V2.0-java_gen_java"],
-    libs: [
-        "hwbinder",
-        "android.hidl.base-V1.0-java",
-    ]
-}
-
-// This package does not export any types. Not creating java constants export.
-
-
-genrule {
-    name: "android.hardware.light@2.0-adapter-helper_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.light@2.0",
-    srcs: [
-        ":android.hardware.light@2.0_hal",
-    ],
-    out: [
-        "android/hardware/light/2.0/ALight.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.light@2.0-adapter-helper_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.light@2.0",
-    srcs: [
-        ":android.hardware.light@2.0_hal",
-    ],
-    out: [
-        "android/hardware/light/2.0/ALight.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.light@2.0-adapter-helper",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.light@2.0-adapter-helper_genc++"],
-    generated_headers: ["android.hardware.light@2.0-adapter-helper_genc++_headers"],
-    export_generated_headers: ["android.hardware.light@2.0-adapter-helper_genc++_headers"],
-    vendor_available: true,
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-        "libhidladapter",
-        "android.hardware.light@2.0",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-        "libhidladapter",
-        "android.hardware.light@2.0",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-}
-
-genrule {
-    name: "android.hardware.light@2.0-adapter_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-main -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.light@2.0",
-    out: ["main.cpp"]
-}
-
-cc_test {
-    name: "android.hardware.light@2.0-adapter",
-    defaults: ["hidl-module-defaults"],
-    shared_libs: [
-        "libhidladapter",
-        "libhidlbase",
-        "libhidltransport",
-        "libutils",
-        "android.hardware.light@2.0",
-        "android.hardware.light@2.0-adapter-helper",
-    ],
-    generated_sources: ["android.hardware.light@2.0-adapter_genc++"],
-}
diff --git a/media/1.0/Android.bp b/media/1.0/Android.bp
index 4957717..c5d49b6 100644
--- a/media/1.0/Android.bp
+++ b/media/1.0/Android.bp
@@ -1,67 +1,22 @@
-// This file is autogenerated by hidl-gen. Do not edit manually.
+// This file is autogenerated by hidl-gen -Landroidbp.
 
-filegroup {
-    name: "android.hardware.media@1.0_hal",
-    srcs: [
-        "types.hal",
-    ],
-}
-
-genrule {
-    name: "android.hardware.media@1.0_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.media@1.0",
-    srcs: [
-        ":android.hardware.media@1.0_hal",
-    ],
-    out: [
-        "android/hardware/media/1.0/types.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.media@1.0_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.media@1.0",
-    srcs: [
-        ":android.hardware.media@1.0_hal",
-    ],
-    out: [
-        "android/hardware/media/1.0/types.h",
-        "android/hardware/media/1.0/hwtypes.h",
-    ],
-}
-
-cc_library {
+hidl_interface {
     name: "android.hardware.media@1.0",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.media@1.0_genc++"],
-    generated_headers: ["android.hardware.media@1.0_genc++_headers"],
-    export_generated_headers: ["android.hardware.media@1.0_genc++_headers"],
-    vendor_available: true,
+    root: "android.hardware",
     vndk: {
         enabled: true,
     },
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
+    srcs: [
+        "types.hal",
+    ],
+    interfaces: [
         "android.hardware.graphics.common@1.0",
     ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-        "android.hardware.graphics.common@1.0",
+    types: [
+        "AnwBuffer",
+        "AnwBufferAttributes",
+        "Rect",
     ],
+    gen_java: false,
 }
 
-// This package is not java compatible. Not creating java target.
-
-// This package does not export any types. Not creating java constants export.
-
-// This package has no interfaces. Not creating versioning adapter.
diff --git a/media/omx/1.0/Android.bp b/media/omx/1.0/Android.bp
index 9cec144..89709bd 100644
--- a/media/omx/1.0/Android.bp
+++ b/media/omx/1.0/Android.bp
@@ -1,7 +1,11 @@
-// This file is autogenerated by hidl-gen. Do not edit manually.
+// This file is autogenerated by hidl-gen -Landroidbp.
 
-filegroup {
-    name: "android.hardware.media.omx@1.0_hal",
+hidl_interface {
+    name: "android.hardware.media.omx@1.0",
+    root: "android.hardware",
+    vndk: {
+        enabled: true,
+    },
     srcs: [
         "types.hal",
         "IGraphicBufferSource.hal",
@@ -11,197 +15,19 @@
         "IOmxObserver.hal",
         "IOmxStore.hal",
     ],
-}
-
-genrule {
-    name: "android.hardware.media.omx@1.0_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.media.omx@1.0",
-    srcs: [
-        ":android.hardware.media.omx@1.0_hal",
-    ],
-    out: [
-        "android/hardware/media/omx/1.0/types.cpp",
-        "android/hardware/media/omx/1.0/GraphicBufferSourceAll.cpp",
-        "android/hardware/media/omx/1.0/OmxAll.cpp",
-        "android/hardware/media/omx/1.0/OmxBufferSourceAll.cpp",
-        "android/hardware/media/omx/1.0/OmxNodeAll.cpp",
-        "android/hardware/media/omx/1.0/OmxObserverAll.cpp",
-        "android/hardware/media/omx/1.0/OmxStoreAll.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.media.omx@1.0_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.media.omx@1.0",
-    srcs: [
-        ":android.hardware.media.omx@1.0_hal",
-    ],
-    out: [
-        "android/hardware/media/omx/1.0/types.h",
-        "android/hardware/media/omx/1.0/hwtypes.h",
-        "android/hardware/media/omx/1.0/IGraphicBufferSource.h",
-        "android/hardware/media/omx/1.0/IHwGraphicBufferSource.h",
-        "android/hardware/media/omx/1.0/BnHwGraphicBufferSource.h",
-        "android/hardware/media/omx/1.0/BpHwGraphicBufferSource.h",
-        "android/hardware/media/omx/1.0/BsGraphicBufferSource.h",
-        "android/hardware/media/omx/1.0/IOmx.h",
-        "android/hardware/media/omx/1.0/IHwOmx.h",
-        "android/hardware/media/omx/1.0/BnHwOmx.h",
-        "android/hardware/media/omx/1.0/BpHwOmx.h",
-        "android/hardware/media/omx/1.0/BsOmx.h",
-        "android/hardware/media/omx/1.0/IOmxBufferSource.h",
-        "android/hardware/media/omx/1.0/IHwOmxBufferSource.h",
-        "android/hardware/media/omx/1.0/BnHwOmxBufferSource.h",
-        "android/hardware/media/omx/1.0/BpHwOmxBufferSource.h",
-        "android/hardware/media/omx/1.0/BsOmxBufferSource.h",
-        "android/hardware/media/omx/1.0/IOmxNode.h",
-        "android/hardware/media/omx/1.0/IHwOmxNode.h",
-        "android/hardware/media/omx/1.0/BnHwOmxNode.h",
-        "android/hardware/media/omx/1.0/BpHwOmxNode.h",
-        "android/hardware/media/omx/1.0/BsOmxNode.h",
-        "android/hardware/media/omx/1.0/IOmxObserver.h",
-        "android/hardware/media/omx/1.0/IHwOmxObserver.h",
-        "android/hardware/media/omx/1.0/BnHwOmxObserver.h",
-        "android/hardware/media/omx/1.0/BpHwOmxObserver.h",
-        "android/hardware/media/omx/1.0/BsOmxObserver.h",
-        "android/hardware/media/omx/1.0/IOmxStore.h",
-        "android/hardware/media/omx/1.0/IHwOmxStore.h",
-        "android/hardware/media/omx/1.0/BnHwOmxStore.h",
-        "android/hardware/media/omx/1.0/BpHwOmxStore.h",
-        "android/hardware/media/omx/1.0/BsOmxStore.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.media.omx@1.0",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.media.omx@1.0_genc++"],
-    generated_headers: ["android.hardware.media.omx@1.0_genc++_headers"],
-    export_generated_headers: ["android.hardware.media.omx@1.0_genc++_headers"],
-    vendor_available: true,
-    vndk: {
-        enabled: true,
-    },
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
+    interfaces: [
         "android.hardware.graphics.bufferqueue@1.0",
         "android.hardware.graphics.common@1.0",
         "android.hardware.media@1.0",
+        "android.hidl.base@1.0",
     ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-        "android.hardware.graphics.bufferqueue@1.0",
-        "android.hardware.graphics.common@1.0",
-        "android.hardware.media@1.0",
+    types: [
+        "CodecBuffer",
+        "ColorAspects",
+        "Message",
+        "PortMode",
+        "Status",
     ],
+    gen_java: false,
 }
 
-// This package is not java compatible. Not creating java target.
-
-// This package does not export any types. Not creating java constants export.
-
-
-genrule {
-    name: "android.hardware.media.omx@1.0-adapter-helper_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.media.omx@1.0",
-    srcs: [
-        ":android.hardware.media.omx@1.0_hal",
-    ],
-    out: [
-        "android/hardware/media/omx/1.0/AGraphicBufferSource.cpp",
-        "android/hardware/media/omx/1.0/AOmx.cpp",
-        "android/hardware/media/omx/1.0/AOmxBufferSource.cpp",
-        "android/hardware/media/omx/1.0/AOmxNode.cpp",
-        "android/hardware/media/omx/1.0/AOmxObserver.cpp",
-        "android/hardware/media/omx/1.0/AOmxStore.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.media.omx@1.0-adapter-helper_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.media.omx@1.0",
-    srcs: [
-        ":android.hardware.media.omx@1.0_hal",
-    ],
-    out: [
-        "android/hardware/media/omx/1.0/AGraphicBufferSource.h",
-        "android/hardware/media/omx/1.0/AOmx.h",
-        "android/hardware/media/omx/1.0/AOmxBufferSource.h",
-        "android/hardware/media/omx/1.0/AOmxNode.h",
-        "android/hardware/media/omx/1.0/AOmxObserver.h",
-        "android/hardware/media/omx/1.0/AOmxStore.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.media.omx@1.0-adapter-helper",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.media.omx@1.0-adapter-helper_genc++"],
-    generated_headers: ["android.hardware.media.omx@1.0-adapter-helper_genc++_headers"],
-    export_generated_headers: ["android.hardware.media.omx@1.0-adapter-helper_genc++_headers"],
-    vendor_available: true,
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-        "libhidladapter",
-        "android.hardware.graphics.bufferqueue@1.0",
-        "android.hardware.graphics.common@1.0",
-        "android.hardware.media.omx@1.0",
-        "android.hardware.media@1.0",
-        "android.hardware.graphics.bufferqueue@1.0-adapter-helper",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-        "libhidladapter",
-        "android.hardware.graphics.bufferqueue@1.0",
-        "android.hardware.graphics.common@1.0",
-        "android.hardware.media.omx@1.0",
-        "android.hardware.media@1.0",
-        "android.hardware.graphics.bufferqueue@1.0-adapter-helper",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-}
-
-genrule {
-    name: "android.hardware.media.omx@1.0-adapter_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-main -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.media.omx@1.0",
-    out: ["main.cpp"]
-}
-
-cc_test {
-    name: "android.hardware.media.omx@1.0-adapter",
-    defaults: ["hidl-module-defaults"],
-    shared_libs: [
-        "libhidladapter",
-        "libhidlbase",
-        "libhidltransport",
-        "libutils",
-        "android.hardware.graphics.bufferqueue@1.0",
-        "android.hardware.graphics.common@1.0",
-        "android.hardware.media.omx@1.0",
-        "android.hardware.media@1.0",
-        "android.hardware.media.omx@1.0-adapter-helper",
-    ],
-    generated_sources: ["android.hardware.media.omx@1.0-adapter_genc++"],
-}
diff --git a/media/omx/1.0/vts/functional/video/VtsHalMediaOmxV1_0TargetVideoDecTest.cpp b/media/omx/1.0/vts/functional/video/VtsHalMediaOmxV1_0TargetVideoDecTest.cpp
index 9b74a33..034992e 100644
--- a/media/omx/1.0/vts/functional/video/VtsHalMediaOmxV1_0TargetVideoDecTest.cpp
+++ b/media/omx/1.0/vts/functional/video/VtsHalMediaOmxV1_0TargetVideoDecTest.cpp
@@ -395,9 +395,9 @@
     static const CompToURL kCompToURL[] = {
         {VideoDecHidlTest::standardComp::avc,
          {"bbb_avc_176x144_300kbps_60fps.h264",
-          "bbb_avc_1920x1080_5000kbps_30fps.h264"},
+          "bbb_avc_640x360_768kbps_30fps.h264"},
          {"bbb_avc_176x144_300kbps_60fps.info",
-          "bbb_avc_1920x1080_5000kbps_30fps.info"}},
+          "bbb_avc_640x360_768kbps_30fps.info"}},
         {VideoDecHidlTest::standardComp::hevc,
          {"bbb_hevc_176x144_176kbps_60fps.hevc",
           "bbb_hevc_640x360_1600kbps_30fps.hevc"},
@@ -412,8 +412,8 @@
          {"", "bbb_h263_352x288_300kbps_12fps.h263"},
          {"", "bbb_h263_352x288_300kbps_12fps.info"}},
         {VideoDecHidlTest::standardComp::mpeg4,
-         {"", "bbb_mpeg4_1280x720_1000kbps_25fps.m4v"},
-         {"", "bbb_mpeg4_1280x720_1000kbps_25fps.info"}},
+         {"", "bbb_mpeg4_352x288_512kbps_30fps.m4v"},
+         {"", "bbb_mpeg4_352x288_512kbps_30fps.info"}},
         {VideoDecHidlTest::standardComp::vp8,
          {"bbb_vp8_176x144_240kbps_60fps.vp8",
           "bbb_vp8_640x360_2mbps_30fps.vp8"},
diff --git a/media/res/bbb_avc_1920x1080_5000kbps_30fps.h264 b/media/res/bbb_avc_1920x1080_5000kbps_30fps.h264
deleted file mode 100644
index cb8f9eb..0000000
--- a/media/res/bbb_avc_1920x1080_5000kbps_30fps.h264
+++ /dev/null
Binary files differ
diff --git a/media/res/bbb_avc_1920x1080_5000kbps_30fps.info b/media/res/bbb_avc_1920x1080_5000kbps_30fps.info
deleted file mode 100644
index feaf974..0000000
--- a/media/res/bbb_avc_1920x1080_5000kbps_30fps.info
+++ /dev/null
@@ -1,242 +0,0 @@
-31 128 0
-8 128 0
-481702 32 0
-137895 0 33333
-81863 0 100000
-98914 0 133333
-6855 0 166666
-2738 0 200000
-1340 0 266666
-1680 0 300000
-2217 0 333333
-3275 0 366666
-3509 0 433333
-4688 0 466666
-4996 0 500000
-6057 0 533333
-7061 0 600000
-7427 0 633333
-7484 0 666666
-8361 0 700000
-7803 0 766666
-8506 0 800000
-8132 0 833333
-8651 0 866666
-8424 0 933333
-8861 0 966666
-9004 0 1000000
-9431 0 1033333
-8854 0 1100000
-9681 0 1133333
-9498 0 1166666
-9694 0 1200000
-17571 0 1266666
-10029 0 1300000
-10022 0 1333333
-9939 0 1366666
-8427 0 1433333
-9522 0 1466666
-7192 0 1500000
-9844 0 1533333
-5693 0 1600000
-8057 0 1633333
-5997 0 1666666
-4028 0 1700000
-2303 0 1766666
-845 0 1800000
-191414 32 1833333
-13266 0 1866666
-16120 0 1933333
-19751 0 1966666
-6559 0 2000000
-8098 0 2033333
-8596 0 2100000
-9331 0 2133333
-9908 0 2166666
-13843 0 2200000
-13776 0 2266666
-14556 0 2300000
-14524 0 2333333
-15089 0 2366666
-14666 0 2433333
-15552 0 2466666
-15020 0 2500000
-16506 0 2533333
-15664 0 2600000
-16499 0 2633333
-16113 0 2666666
-16924 0 2700000
-15948 0 2766666
-17219 0 2800000
-16448 0 2833333
-17729 0 2866666
-16884 0 2933333
-17941 0 2966666
-17215 0 3000000
-18159 0 3033333
-17424 0 3100000
-18479 0 3133333
-17255 0 3166666
-18463 0 3200000
-18723 0 3266666
-19291 0 3300000
-18297 0 3333333
-19633 0 3366666
-18719 0 3433333
-20323 0 3466666
-17035 0 3500000
-19071 0 3533333
-17921 0 3600000
-19198 0 3633333
-18723 0 3666666
-19036 0 3700000
-18735 0 3766666
-19613 0 3800000
-18537 0 3833333
-20868 0 3866666
-16731 0 3933333
-19380 0 3966666
-18409 0 4000000
-19580 0 4033333
-18465 0 4100000
-20104 0 4133333
-16783 0 4166666
-19341 0 4200000
-18674 0 4266666
-19983 0 4300000
-19154 0 4333333
-19750 0 4366666
-19483 0 4433333
-21206 0 4466666
-17608 0 4500000
-20220 0 4533333
-18918 0 4600000
-19494 0 4633333
-19072 0 4666666
-19786 0 4700000
-18540 0 4766666
-19638 0 4800000
-18656 0 4833333
-19453 0 4866666
-19673 0 4933333
-17616 0 4966666
-18317 0 5000000
-18749 0 5033333
-18193 0 5100000
-18732 0 5133333
-18186 0 5166666
-18271 0 5200000
-18256 0 5266666
-16806 0 5300000
-17119 0 5333333
-16466 0 5366666
-15315 0 5433333
-14877 0 5466666
-13235 0 5500000
-13025 0 5533333
-10305 0 5600000
-10120 0 5633333
-7706 0 5666666
-112698 32 5700000
-1544 0 5766666
-1285 0 5800000
-1576 0 5833333
-1714 0 5866666
-1384 0 5933333
-1551 0 5966666
-3916 0 6000000
-8019 0 6033333
-8304 0 6100000
-8416 0 6133333
-8086 0 6166666
-8452 0 6200000
-9205 0 6266666
-11098 0 6300000
-19805 0 6333333
-18292 0 6366666
-14974 0 6433333
-10425 0 6466666
-9997 0 6500000
-8832 0 6533333
-7909 0 6600000
-6400 0 6633333
-5939 0 6666666
-5965 0 6700000
-6221 0 6766666
-6522 0 6800000
-7062 0 6833333
-6877 0 6866666
-6859 0 6933333
-6550 0 6966666
-6127 0 7000000
-5386 0 7033333
-5092 0 7100000
-4370 0 7133333
-4048 0 7166666
-3922 0 7200000
-11453 0 7266666
-16041 0 7300000
-16756 0 7333333
-8616 0 7366666
-9856 0 7433333
-14997 0 7466666
-18365 0 7500000
-21295 0 7533333
-19335 0 7600000
-13689 0 7633333
-14147 0 7666666
-13198 0 7700000
-10999 0 7766666
-7726 0 7800000
-8744 0 7833333
-11321 0 7866666
-14840 0 7933333
-21702 0 7966666
-27091 0 8000000
-28992 0 8033333
-26391 0 8100000
-13809 0 8133333
-11196 0 8166666
-10494 0 8200000
-9921 0 8266666
-7637 0 8300000
-7301 0 8333333
-6890 0 8366666
-9059 0 8433333
-9324 0 8466666
-10277 0 8500000
-10436 0 8533333
-10635 0 8600000
-9554 0 8633333
-8268 0 8666666
-8450 0 8700000
-8430 0 8766666
-8258 0 8800000
-8879 0 8833333
-8050 0 8866666
-7963 0 8933333
-8974 0 8966666
-10037 0 9000000
-8547 0 9033333
-6424 0 9100000
-5672 0 9133333
-6159 0 9166666
-6498 0 9200000
-7064 0 9266666
-6673 0 9300000
-6959 0 9333333
-6226 0 9366666
-6312 0 9433333
-8893 0 9466666
-8253 0 9500000
-5876 0 9533333
-5867 0 9600000
-6212 0 9633333
-6984 0 9666666
-6220 0 9700000
-6993 0 9766666
-15014 0 9800000
-22390 0 9833333
-29552 0 9866666
-24024 0 9933333
-15820 0 9966666
diff --git a/media/res/bbb_avc_640x360_768kbps_30fps.h264 b/media/res/bbb_avc_640x360_768kbps_30fps.h264
new file mode 100755
index 0000000..1d8c68f
--- /dev/null
+++ b/media/res/bbb_avc_640x360_768kbps_30fps.h264
Binary files differ
diff --git a/media/res/bbb_avc_640x360_768kbps_30fps.info b/media/res/bbb_avc_640x360_768kbps_30fps.info
new file mode 100755
index 0000000..8195c33
--- /dev/null
+++ b/media/res/bbb_avc_640x360_768kbps_30fps.info
@@ -0,0 +1,242 @@
+29 128 0
+9 128 0
+38469 32 66666
+3270 0 200000
+443 0 133333
+246 0 100000
+214 0 166666
+2280 0 300000
+368 0 233333
+238 0 266666
+688 0 433333
+287 0 366666
+234 0 333333
+172 0 400000
+1363 0 566666
+273 0 500000
+166 0 466666
+182 0 533333
+3731 0 700000
+349 0 633333
+216 0 600000
+229 0 666666
+6061 0 833333
+408 0 766666
+271 0 733333
+241 0 800000
+7004 0 966666
+442 0 900000
+261 0 866666
+229 0 933333
+7354 0 1100000
+404 0 1033333
+264 0 1000000
+198 0 1066666
+4542 0 1233333
+286 0 1166666
+205 0 1133333
+131 0 1200000
+3329 0 1333333
+216 0 1266666
+136 0 1300000
+2353 0 1366666
+986 0 1400000
+808 0 1433333
+318 0 1466666
+62 0 1500000
+55649 32 1533333
+1606 0 1566666
+2935 0 1600000
+3564 0 1633333
+3324 0 1666666
+4543 0 1700000
+1740 0 1733333
+2737 0 1766666
+2762 0 1800000
+3185 0 1833333
+3238 0 1866666
+3395 0 1900000
+3421 0 1933333
+3482 0 1966666
+3370 0 2000000
+3656 0 2033333
+3509 0 2066666
+3684 0 2100000
+3732 0 2133333
+3366 0 2166666
+3374 0 2200000
+3202 0 2233333
+3449 0 2266666
+3360 0 2300000
+3372 0 2333333
+3460 0 2366666
+3511 0 2400000
+3471 0 2433333
+3330 0 2466666
+3377 0 2500000
+3744 0 2533333
+3667 0 2566666
+3867 0 2600000
+3776 0 2633333
+3329 0 2666666
+3876 0 2700000
+3385 0 2733333
+3566 0 2766666
+3301 0 2800000
+3570 0 2833333
+3132 0 2866666
+3487 0 2900000
+3270 0 2933333
+3472 0 2966666
+3487 0 3000000
+3503 0 3033333
+3443 0 3066666
+3528 0 3100000
+3258 0 3133333
+3707 0 3166666
+3120 0 3200000
+3347 0 3233333
+3372 0 3266666
+3161 0 3300000
+3393 0 3333333
+3399 0 3366666
+2905 0 3400000
+3543 0 3433333
+3103 0 3466666
+3099 0 3500000
+3457 0 3533333
+3191 0 3566666
+3290 0 3600000
+3312 0 3633333
+2955 0 3666666
+3341 0 3700000
+3102 0 3733333
+3186 0 3766666
+3180 0 3800000
+2839 0 3833333
+3089 0 3866666
+3110 0 3900000
+3165 0 3933333
+2684 0 3966666
+3082 0 4000000
+2694 0 4033333
+3051 0 4066666
+3002 0 4100000
+2929 0 4133333
+2676 0 4166666
+2411 0 4200000
+2874 0 4233333
+2572 0 4266666
+2420 0 4300000
+2500 0 4333333
+2137 0 4366666
+2344 0 4400000
+2028 0 4433333
+1754 0 4466666
+1627 0 4500000
+1375 0 4533333
+1069 0 4566666
+801 0 4600000
+21689 32 4633333
+261 0 4733333
+76 0 4666666
+45 0 4700000
+334 0 4800000
+61 0 4766666
+1577 0 4933333
+280 0 4866666
+72 0 4833333
+479 0 4900000
+2181 0 5066666
+919 0 5000000
+349 0 4966666
+534 0 5033333
+4860 0 5166666
+759 0 5100000
+677 0 5133333
+3101 0 5300000
+498 0 5233333
+327 0 5200000
+213 0 5266666
+1640 0 5433333
+259 0 5366666
+162 0 5333333
+148 0 5400000
+2130 0 5566666
+397 0 5500000
+191 0 5466666
+180 0 5533333
+1757 0 5700000
+338 0 5633333
+194 0 5600000
+141 0 5666666
+1103 0 5833333
+289 0 5766666
+149 0 5733333
+148 0 5800000
+3914 0 5966666
+1025 0 5900000
+714 0 5866666
+428 0 5933333
+4604 0 6100000
+1456 0 6033333
+699 0 6000000
+892 0 6066666
+4535 0 6233333
+1301 0 6166666
+708 0 6133333
+592 0 6200000
+2175 0 6333333
+603 0 6266666
+411 0 6300000
+1813 0 6366666
+5055 0 6466666
+1538 0 6400000
+2201 0 6433333
+6249 0 6533333
+1420 0 6500000
+2254 0 6566666
+2441 0 6633333
+293 0 6600000
+2062 0 6700000
+213 0 6666666
+2455 0 6800000
+344 0 6733333
+204 0 6766666
+3920 0 6933333
+751 0 6866666
+376 0 6833333
+337 0 6900000
+2882 0 7066666
+457 0 7000000
+222 0 6966666
+184 0 7033333
+2734 0 7200000
+472 0 7133333
+185 0 7100000
+250 0 7166666
+2735 0 7333333
+301 0 7266666
+307 0 7233333
+109 0 7300000
+1852 0 7466666
+322 0 7400000
+153 0 7366666
+195 0 7433333
+1506 0 7600000
+350 0 7533333
+170 0 7500000
+145 0 7566666
+2123 0 7733333
+430 0 7666666
+364 0 7633333
+190 0 7700000
+1296 0 7800000
+196 0 7766666
+858 0 7833333
+3865 0 7933333
+693 0 7866666
+1606 0 7900000
+4884 0 7966666
+2821 0 8033333
+2211 0 8000000
diff --git a/media/res/bbb_mpeg4_1280x720_1000kbps_25fps.info b/media/res/bbb_mpeg4_1280x720_1000kbps_25fps.info
deleted file mode 100644
index b05a44c..0000000
--- a/media/res/bbb_mpeg4_1280x720_1000kbps_25fps.info
+++ /dev/null
@@ -1,251 +0,0 @@
-49 128 0
-49 128 0
-57542 32 0
-50961 0 40000
-29136 0 80000
-28146 0 120000
-25472 0 160000
-5752 0 200000
-4373 0 240000
-4261 0 280000
-5083 0 320000
-6504 0 360000
-5080 0 400000
-5688 0 440000
-50834 32 480000
-4559 0 520000
-4118 0 560000
-3937 0 600000
-4262 0 640000
-4649 0 680000
-3995 0 720000
-3899 0 760000
-3896 0 800000
-3998 0 840000
-4129 0 880000
-4064 0 920000
-42872 32 960000
-3265 0 1000000
-2506 0 1040000
-2178 0 1080000
-2445 0 1120000
-2461 0 1160000
-3267 0 1200000
-2700 0 1240000
-2924 0 1280000
-2405 0 1320000
-2656 0 1360000
-2494 0 1400000
-47454 32 1440000
-2956 0 1480000
-1434 0 1520000
-707 0 1560000
-1310 0 1600000
-1791 0 1640000
-2088 0 1680000
-1078 0 1720000
-738 0 1760000
-74837 32 1800000
-3304 0 1840000
-3656 0 1880000
-2822 0 1920000
-2566 0 1960000
-2816 0 2000000
-2590 0 2040000
-2471 0 2080000
-2553 0 2120000
-2547 0 2160000
-2628 0 2200000
-2664 0 2240000
-38161 32 2280000
-2995 0 2320000
-2205 0 2360000
-2055 0 2400000
-2122 0 2440000
-2236 0 2480000
-2407 0 2520000
-893 0 2560000
-2511 0 2600000
-2703 0 2640000
-2511 0 2680000
-2564 0 2720000
-35944 32 2760000
-3002 0 2800000
-2188 0 2840000
-2109 0 2880000
-2058 0 2920000
-2242 0 2960000
-2240 0 3000000
-2346 0 3040000
-2223 0 3080000
-2430 0 3120000
-2486 0 3160000
-2379 0 3200000
-34014 32 3240000
-3009 0 3280000
-2073 0 3320000
-2005 0 3360000
-2052 0 3400000
-2167 0 3440000
-2331 0 3480000
-2201 0 3520000
-896 0 3560000
-2594 0 3600000
-2589 0 3640000
-2542 0 3680000
-33973 32 3720000
-2913 0 3760000
-1978 0 3800000
-1943 0 3840000
-1983 0 3880000
-2234 0 3920000
-2142 0 3960000
-2106 0 4000000
-2253 0 4040000
-2327 0 4080000
-2186 0 4120000
-2366 0 4160000
-32094 32 4200000
-3050 0 4240000
-1913 0 4280000
-2016 0 4320000
-2097 0 4360000
-2112 0 4400000
-2163 0 4440000
-2258 0 4480000
-2231 0 4520000
-882 0 4560000
-2575 0 4600000
-2700 0 4640000
-33754 32 4680000
-3011 0 4720000
-2034 0 4760000
-1986 0 4800000
-1983 0 4840000
-2180 0 4880000
-2067 0 4920000
-2262 0 4960000
-2323 0 5000000
-2367 0 5040000
-2289 0 5080000
-2263 0 5120000
-31806 32 5160000
-3285 0 5200000
-1957 0 5240000
-2073 0 5280000
-2057 0 5320000
-2134 0 5360000
-2086 0 5400000
-2217 0 5440000
-2314 0 5480000
-2176 0 5520000
-852 0 5560000
-2421 0 5600000
-37236 32 5640000
-16140 32 5680000
-3491 0 5720000
-2891 0 5760000
-1499 0 5800000
-659 0 5840000
-652 0 5880000
-648 0 5920000
-1892 0 5960000
-3050 0 6000000
-2235 0 6040000
-1925 0 6080000
-1790 0 6120000
-16441 32 6160000
-5341 0 6200000
-2445 0 6240000
-2878 0 6280000
-2366 0 6320000
-1732 0 6360000
-1858 0 6400000
-1632 0 6440000
-1514 0 6480000
-1874 0 6520000
-1059 0 6560000
-1795 0 6600000
-20153 32 6640000
-3589 0 6680000
-2418 0 6720000
-1896 0 6760000
-1577 0 6800000
-1629 0 6840000
-1717 0 6880000
-1717 0 6920000
-1815 0 6960000
-1663 0 7000000
-1855 0 7040000
-1699 0 7080000
-21184 32 7120000
-3395 0 7160000
-3276 0 7200000
-3825 0 7240000
-2747 0 7280000
-1684 0 7320000
-2141 0 7360000
-2372 0 7400000
-2777 0 7440000
-2828 0 7480000
-2442 0 7520000
-1302 0 7560000
-20702 32 7600000
-4043 0 7640000
-2875 0 7680000
-2026 0 7720000
-1983 0 7760000
-2173 0 7800000
-2670 0 7840000
-3145 0 7880000
-5312 0 7920000
-5547 0 7960000
-4262 0 8000000
-2637 0 8040000
-15761 32 8080000
-2693 0 8120000
-1433 0 8160000
-2108 0 8200000
-2253 0 8240000
-1846 0 8280000
-1281 0 8320000
-2294 0 8360000
-2217 0 8400000
-2370 0 8440000
-1809 0 8480000
-1899 0 8520000
-21630 32 8560000
-3189 0 8600000
-1679 0 8640000
-1732 0 8680000
-1672 0 8720000
-1788 0 8760000
-1656 0 8800000
-1765 0 8840000
-1579 0 8880000
-2142 0 8920000
-1954 0 8960000
-1854 0 9000000
-24966 32 9040000
-2176 0 9080000
-1236 0 9120000
-1282 0 9160000
-1526 0 9200000
-1369 0 9240000
-1283 0 9280000
-1434 0 9320000
-1335 0 9360000
-2144 0 9400000
-1917 0 9440000
-1409 0 9480000
-27745 32 9520000
-1905 0 9560000
-1495 0 9600000
-1685 0 9640000
-1745 0 9680000
-1894 0 9720000
-3667 0 9760000
-5546 0 9800000
-5729 0 9840000
-4479 0 9880000
-3829 0 9920000
diff --git a/media/res/bbb_mpeg4_1280x720_1000kbps_25fps.m4v b/media/res/bbb_mpeg4_1280x720_1000kbps_25fps.m4v
deleted file mode 100644
index ec32d5e..0000000
--- a/media/res/bbb_mpeg4_1280x720_1000kbps_25fps.m4v
+++ /dev/null
Binary files differ
diff --git a/media/res/bbb_mpeg4_352x288_512kbps_30fps.info b/media/res/bbb_mpeg4_352x288_512kbps_30fps.info
new file mode 100755
index 0000000..326a3e1
--- /dev/null
+++ b/media/res/bbb_mpeg4_352x288_512kbps_30fps.info
@@ -0,0 +1,241 @@
+47 128 0
+21115 32 0
+16456 0 33333
+11880 0 66666
+12155 0 100000
+11402 0 133333
+5345 0 166666
+2986 0 200000
+1924 0 233333
+2275 0 266666
+2793 0 300000
+2756 0 333333
+2933 0 366666
+21100 32 400000
+1302 0 433333
+2206 0 466666
+1599 0 500000
+2558 0 533333
+2784 0 566666
+2458 0 600000
+2480 0 633333
+1446 0 666666
+3109 0 700000
+944 0 733333
+3134 0 766666
+21342 32 800000
+652 0 833333
+1708 0 866666
+2202 0 900000
+1695 0 933333
+1661 0 966666
+1652 0 1000000
+1679 0 1033333
+1690 0 1066666
+1824 0 1100000
+1803 0 1133333
+1598 0 1166666
+21540 32 1200000
+205 0 1233333
+1124 0 1266666
+1069 0 1300000
+838 0 1333333
+765 0 1366666
+4265 0 1400000
+94 0 1433333
+20463 0 1466666
+1028 0 1500000
+1475 0 1533333
+3630 0 1566666
+28373 32 1600000
+725 0 1633333
+1119 0 1666666
+1427 0 1700000
+1679 0 1733333
+1866 0 1766666
+1197 0 1800000
+1572 0 1833333
+1651 0 1866666
+1678 0 1900000
+1688 0 1933333
+1659 0 1966666
+19900 32 2000000
+584 0 2033333
+1475 0 2066666
+1678 0 2100000
+1010 0 2133333
+1435 0 2166666
+1612 0 2200000
+1602 0 2233333
+1709 0 2266666
+1737 0 2300000
+1835 0 2333333
+926 0 2366666
+20090 32 2400000
+631 0 2433333
+1576 0 2466666
+941 0 2500000
+2349 0 2533333
+1112 0 2566666
+1566 0 2600000
+1773 0 2633333
+979 0 2666666
+2246 0 2700000
+904 0 2733333
+1342 0 2766666
+20147 32 2800000
+630 0 2833333
+982 0 2866666
+2089 0 2900000
+1021 0 2933333
+1506 0 2966666
+1642 0 3000000
+968 0 3033333
+1262 0 3066666
+2270 0 3100000
+864 0 3133333
+1252 0 3166666
+20145 32 3200000
+595 0 3233333
+918 0 3266666
+1167 0 3300000
+1347 0 3333333
+1597 0 3366666
+1636 0 3400000
+944 0 3433333
+1295 0 3466666
+1397 0 3500000
+1413 0 3533333
+1432 0 3566666
+20180 32 3600000
+525 0 3633333
+1068 0 3666666
+1230 0 3700000
+1428 0 3733333
+916 0 3766666
+1948 0 3800000
+966 0 3833333
+1342 0 3866666
+1338 0 3900000
+1379 0 3933333
+1296 0 3966666
+17378 32 4000000
+583 0 4033333
+936 0 4066666
+1745 0 4100000
+987 0 4133333
+1393 0 4166666
+1495 0 4200000
+869 0 4233333
+1938 0 4266666
+828 0 4300000
+1851 0 4333333
+834 0 4366666
+17280 32 4400000
+580 0 4433333
+869 0 4466666
+1605 0 4500000
+843 0 4533333
+6147 32 4566666
+220 0 4600000
+1106 0 4633333
+395 0 4666666
+304 0 4700000
+1946 0 4733333
+154 0 4766666
+482 0 4800000
+949 0 4833333
+1088 0 4866666
+974 0 4900000
+876 0 4933333
+9164 32 4966666
+1019 0 5000000
+983 0 5033333
+1375 0 5066666
+1041 0 5100000
+789 0 5133333
+1037 0 5166666
+812 0 5200000
+732 0 5233333
+972 0 5266666
+708 0 5300000
+623 0 5333333
+10667 32 5366666
+463 0 5400000
+911 0 5433333
+861 0 5466666
+507 0 5500000
+1015 0 5533333
+501 0 5566666
+934 0 5600000
+812 0 5633333
+855 0 5666666
+804 0 5700000
+783 0 5733333
+10610 32 5766666
+950 0 5800000
+1292 0 5833333
+1002 0 5866666
+728 0 5900000
+960 0 5933333
+1230 0 5966666
+1315 0 6000000
+1248 0 6033333
+995 0 6066666
+1401 0 6100000
+905 0 6133333
+9326 32 6166666
+726 0 6200000
+667 0 6233333
+833 0 6266666
+1007 0 6300000
+1172 0 6333333
+1910 0 6366666
+1954 0 6400000
+1498 0 6433333
+1188 0 6466666
+784 0 6500000
+1005 0 6533333
+10030 32 6566666
+452 0 6600000
+763 0 6633333
+639 0 6666666
+671 0 6700000
+867 0 6733333
+963 0 6766666
+982 0 6800000
+995 0 6833333
+982 0 6866666
+747 0 6900000
+574 0 6933333
+12353 32 6966666
+474 0 7000000
+969 0 7033333
+633 0 7066666
+723 0 7100000
+1221 0 7133333
+674 0 7166666
+776 0 7200000
+572 0 7233333
+912 0 7266666
+564 0 7300000
+594 0 7333333
+16661 32 7366666
+518 0 7400000
+656 0 7433333
+625 0 7466666
+583 0 7500000
+584 0 7533333
+1027 0 7566666
+812 0 7600000
+729 0 7633333
+766 0 7666666
+901 0 7700000
+960 0 7733333
+12336 32 7766666
+944 0 7800000
+1398 0 7833333
+1625 0 7866666
+2103 0 7900000
+1630 0 7933333
+1228 0 7966666
diff --git a/media/res/bbb_mpeg4_352x288_512kbps_30fps.m4v b/media/res/bbb_mpeg4_352x288_512kbps_30fps.m4v
new file mode 100755
index 0000000..b7ead00
--- /dev/null
+++ b/media/res/bbb_mpeg4_352x288_512kbps_30fps.m4v
Binary files differ
diff --git a/memtrack/1.0/Android.bp b/memtrack/1.0/Android.bp
index 0bbcae8..d56aa64 100644
--- a/memtrack/1.0/Android.bp
+++ b/memtrack/1.0/Android.bp
@@ -1,170 +1,24 @@
-// This file is autogenerated by hidl-gen. Do not edit manually.
+// This file is autogenerated by hidl-gen -Landroidbp.
 
-filegroup {
-    name: "android.hardware.memtrack@1.0_hal",
+hidl_interface {
+    name: "android.hardware.memtrack@1.0",
+    root: "android.hardware",
+    vndk: {
+        enabled: true,
+    },
     srcs: [
         "types.hal",
         "IMemtrack.hal",
     ],
+    interfaces: [
+        "android.hidl.base@1.0",
+    ],
+    types: [
+        "MemtrackFlag",
+        "MemtrackRecord",
+        "MemtrackStatus",
+        "MemtrackType",
+    ],
+    gen_java: true,
 }
 
-genrule {
-    name: "android.hardware.memtrack@1.0_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.memtrack@1.0",
-    srcs: [
-        ":android.hardware.memtrack@1.0_hal",
-    ],
-    out: [
-        "android/hardware/memtrack/1.0/types.cpp",
-        "android/hardware/memtrack/1.0/MemtrackAll.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.memtrack@1.0_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.memtrack@1.0",
-    srcs: [
-        ":android.hardware.memtrack@1.0_hal",
-    ],
-    out: [
-        "android/hardware/memtrack/1.0/types.h",
-        "android/hardware/memtrack/1.0/hwtypes.h",
-        "android/hardware/memtrack/1.0/IMemtrack.h",
-        "android/hardware/memtrack/1.0/IHwMemtrack.h",
-        "android/hardware/memtrack/1.0/BnHwMemtrack.h",
-        "android/hardware/memtrack/1.0/BpHwMemtrack.h",
-        "android/hardware/memtrack/1.0/BsMemtrack.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.memtrack@1.0",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.memtrack@1.0_genc++"],
-    generated_headers: ["android.hardware.memtrack@1.0_genc++_headers"],
-    export_generated_headers: ["android.hardware.memtrack@1.0_genc++_headers"],
-    vendor_available: true,
-    vndk: {
-        enabled: true,
-    },
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-    ],
-}
-
-genrule {
-    name: "android.hardware.memtrack-V1.0-java_gen_java",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Ljava -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.memtrack@1.0",
-    srcs: [
-        ":android.hardware.memtrack@1.0_hal",
-    ],
-    out: [
-        "android/hardware/memtrack/V1_0/MemtrackFlag.java",
-        "android/hardware/memtrack/V1_0/MemtrackRecord.java",
-        "android/hardware/memtrack/V1_0/MemtrackStatus.java",
-        "android/hardware/memtrack/V1_0/MemtrackType.java",
-        "android/hardware/memtrack/V1_0/IMemtrack.java",
-    ],
-}
-
-java_library {
-    name: "android.hardware.memtrack-V1.0-java",
-    no_framework_libs: true,
-    defaults: ["hidl-java-module-defaults"],
-    srcs: [":android.hardware.memtrack-V1.0-java_gen_java"],
-    libs: [
-        "hwbinder",
-        "android.hidl.base-V1.0-java",
-    ]
-}
-
-// This package does not export any types. Not creating java constants export.
-
-
-genrule {
-    name: "android.hardware.memtrack@1.0-adapter-helper_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.memtrack@1.0",
-    srcs: [
-        ":android.hardware.memtrack@1.0_hal",
-    ],
-    out: [
-        "android/hardware/memtrack/1.0/AMemtrack.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.memtrack@1.0-adapter-helper_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.memtrack@1.0",
-    srcs: [
-        ":android.hardware.memtrack@1.0_hal",
-    ],
-    out: [
-        "android/hardware/memtrack/1.0/AMemtrack.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.memtrack@1.0-adapter-helper",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.memtrack@1.0-adapter-helper_genc++"],
-    generated_headers: ["android.hardware.memtrack@1.0-adapter-helper_genc++_headers"],
-    export_generated_headers: ["android.hardware.memtrack@1.0-adapter-helper_genc++_headers"],
-    vendor_available: true,
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-        "libhidladapter",
-        "android.hardware.memtrack@1.0",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-        "libhidladapter",
-        "android.hardware.memtrack@1.0",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-}
-
-genrule {
-    name: "android.hardware.memtrack@1.0-adapter_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-main -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.memtrack@1.0",
-    out: ["main.cpp"]
-}
-
-cc_test {
-    name: "android.hardware.memtrack@1.0-adapter",
-    defaults: ["hidl-module-defaults"],
-    shared_libs: [
-        "libhidladapter",
-        "libhidlbase",
-        "libhidltransport",
-        "libutils",
-        "android.hardware.memtrack@1.0",
-        "android.hardware.memtrack@1.0-adapter-helper",
-    ],
-    generated_sources: ["android.hardware.memtrack@1.0-adapter_genc++"],
-}
diff --git a/neuralnetworks/1.0/Android.bp b/neuralnetworks/1.0/Android.bp
index 26783e7..e8600d3 100644
--- a/neuralnetworks/1.0/Android.bp
+++ b/neuralnetworks/1.0/Android.bp
@@ -1,7 +1,11 @@
-// This file is autogenerated by hidl-gen. Do not edit manually.
+// This file is autogenerated by hidl-gen -Landroidbp.
 
-filegroup {
-    name: "android.hardware.neuralnetworks@1.0_hal",
+hidl_interface {
+    name: "android.hardware.neuralnetworks@1.0",
+    root: "android.hardware",
+    vndk: {
+        enabled: true,
+    },
     srcs: [
         "types.hal",
         "IDevice.hal",
@@ -9,164 +13,25 @@
         "IPreparedModel.hal",
         "IPreparedModelCallback.hal",
     ],
+    interfaces: [
+        "android.hidl.base@1.0",
+    ],
+    types: [
+        "Capabilities",
+        "DataLocation",
+        "DeviceStatus",
+        "ErrorStatus",
+        "FusedActivationFunc",
+        "Model",
+        "Operand",
+        "OperandLifeTime",
+        "OperandType",
+        "Operation",
+        "OperationType",
+        "PerformanceInfo",
+        "Request",
+        "RequestArgument",
+    ],
+    gen_java: false,
 }
 
-genrule {
-    name: "android.hardware.neuralnetworks@1.0_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.neuralnetworks@1.0",
-    srcs: [
-        ":android.hardware.neuralnetworks@1.0_hal",
-    ],
-    out: [
-        "android/hardware/neuralnetworks/1.0/types.cpp",
-        "android/hardware/neuralnetworks/1.0/DeviceAll.cpp",
-        "android/hardware/neuralnetworks/1.0/ExecutionCallbackAll.cpp",
-        "android/hardware/neuralnetworks/1.0/PreparedModelAll.cpp",
-        "android/hardware/neuralnetworks/1.0/PreparedModelCallbackAll.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.neuralnetworks@1.0_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.neuralnetworks@1.0",
-    srcs: [
-        ":android.hardware.neuralnetworks@1.0_hal",
-    ],
-    out: [
-        "android/hardware/neuralnetworks/1.0/types.h",
-        "android/hardware/neuralnetworks/1.0/hwtypes.h",
-        "android/hardware/neuralnetworks/1.0/IDevice.h",
-        "android/hardware/neuralnetworks/1.0/IHwDevice.h",
-        "android/hardware/neuralnetworks/1.0/BnHwDevice.h",
-        "android/hardware/neuralnetworks/1.0/BpHwDevice.h",
-        "android/hardware/neuralnetworks/1.0/BsDevice.h",
-        "android/hardware/neuralnetworks/1.0/IExecutionCallback.h",
-        "android/hardware/neuralnetworks/1.0/IHwExecutionCallback.h",
-        "android/hardware/neuralnetworks/1.0/BnHwExecutionCallback.h",
-        "android/hardware/neuralnetworks/1.0/BpHwExecutionCallback.h",
-        "android/hardware/neuralnetworks/1.0/BsExecutionCallback.h",
-        "android/hardware/neuralnetworks/1.0/IPreparedModel.h",
-        "android/hardware/neuralnetworks/1.0/IHwPreparedModel.h",
-        "android/hardware/neuralnetworks/1.0/BnHwPreparedModel.h",
-        "android/hardware/neuralnetworks/1.0/BpHwPreparedModel.h",
-        "android/hardware/neuralnetworks/1.0/BsPreparedModel.h",
-        "android/hardware/neuralnetworks/1.0/IPreparedModelCallback.h",
-        "android/hardware/neuralnetworks/1.0/IHwPreparedModelCallback.h",
-        "android/hardware/neuralnetworks/1.0/BnHwPreparedModelCallback.h",
-        "android/hardware/neuralnetworks/1.0/BpHwPreparedModelCallback.h",
-        "android/hardware/neuralnetworks/1.0/BsPreparedModelCallback.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.neuralnetworks@1.0",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.neuralnetworks@1.0_genc++"],
-    generated_headers: ["android.hardware.neuralnetworks@1.0_genc++_headers"],
-    export_generated_headers: ["android.hardware.neuralnetworks@1.0_genc++_headers"],
-    vendor_available: true,
-    vndk: {
-        enabled: true,
-    },
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-    ],
-}
-
-// This package is not java compatible. Not creating java target.
-
-// This package does not export any types. Not creating java constants export.
-
-
-genrule {
-    name: "android.hardware.neuralnetworks@1.0-adapter-helper_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.neuralnetworks@1.0",
-    srcs: [
-        ":android.hardware.neuralnetworks@1.0_hal",
-    ],
-    out: [
-        "android/hardware/neuralnetworks/1.0/ADevice.cpp",
-        "android/hardware/neuralnetworks/1.0/AExecutionCallback.cpp",
-        "android/hardware/neuralnetworks/1.0/APreparedModel.cpp",
-        "android/hardware/neuralnetworks/1.0/APreparedModelCallback.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.neuralnetworks@1.0-adapter-helper_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.neuralnetworks@1.0",
-    srcs: [
-        ":android.hardware.neuralnetworks@1.0_hal",
-    ],
-    out: [
-        "android/hardware/neuralnetworks/1.0/ADevice.h",
-        "android/hardware/neuralnetworks/1.0/AExecutionCallback.h",
-        "android/hardware/neuralnetworks/1.0/APreparedModel.h",
-        "android/hardware/neuralnetworks/1.0/APreparedModelCallback.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.neuralnetworks@1.0-adapter-helper",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.neuralnetworks@1.0-adapter-helper_genc++"],
-    generated_headers: ["android.hardware.neuralnetworks@1.0-adapter-helper_genc++_headers"],
-    export_generated_headers: ["android.hardware.neuralnetworks@1.0-adapter-helper_genc++_headers"],
-    vendor_available: true,
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-        "libhidladapter",
-        "android.hardware.neuralnetworks@1.0",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-        "libhidladapter",
-        "android.hardware.neuralnetworks@1.0",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-}
-
-genrule {
-    name: "android.hardware.neuralnetworks@1.0-adapter_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-main -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.neuralnetworks@1.0",
-    out: ["main.cpp"]
-}
-
-cc_test {
-    name: "android.hardware.neuralnetworks@1.0-adapter",
-    defaults: ["hidl-module-defaults"],
-    shared_libs: [
-        "libhidladapter",
-        "libhidlbase",
-        "libhidltransport",
-        "libutils",
-        "android.hardware.neuralnetworks@1.0",
-        "android.hardware.neuralnetworks@1.0-adapter-helper",
-    ],
-    generated_sources: ["android.hardware.neuralnetworks@1.0-adapter_genc++"],
-}
diff --git a/nfc/1.0/Android.bp b/nfc/1.0/Android.bp
index 4d0a49f..f821355 100644
--- a/nfc/1.0/Android.bp
+++ b/nfc/1.0/Android.bp
@@ -1,194 +1,24 @@
-// This file is autogenerated by hidl-gen. Do not edit manually.
+// This file is autogenerated by hidl-gen -Landroidbp.
 
-filegroup {
-    name: "android.hardware.nfc@1.0_hal",
+hidl_interface {
+    name: "android.hardware.nfc@1.0",
+    root: "android.hardware",
+    vndk: {
+        enabled: true,
+    },
     srcs: [
         "types.hal",
         "INfc.hal",
         "INfcClientCallback.hal",
     ],
+    interfaces: [
+        "android.hidl.base@1.0",
+    ],
+    types: [
+        "NfcEvent",
+        "NfcStatus",
+    ],
+    gen_java: true,
+    gen_java_constants: true,
 }
 
-genrule {
-    name: "android.hardware.nfc@1.0_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.nfc@1.0",
-    srcs: [
-        ":android.hardware.nfc@1.0_hal",
-    ],
-    out: [
-        "android/hardware/nfc/1.0/types.cpp",
-        "android/hardware/nfc/1.0/NfcAll.cpp",
-        "android/hardware/nfc/1.0/NfcClientCallbackAll.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.nfc@1.0_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.nfc@1.0",
-    srcs: [
-        ":android.hardware.nfc@1.0_hal",
-    ],
-    out: [
-        "android/hardware/nfc/1.0/types.h",
-        "android/hardware/nfc/1.0/hwtypes.h",
-        "android/hardware/nfc/1.0/INfc.h",
-        "android/hardware/nfc/1.0/IHwNfc.h",
-        "android/hardware/nfc/1.0/BnHwNfc.h",
-        "android/hardware/nfc/1.0/BpHwNfc.h",
-        "android/hardware/nfc/1.0/BsNfc.h",
-        "android/hardware/nfc/1.0/INfcClientCallback.h",
-        "android/hardware/nfc/1.0/IHwNfcClientCallback.h",
-        "android/hardware/nfc/1.0/BnHwNfcClientCallback.h",
-        "android/hardware/nfc/1.0/BpHwNfcClientCallback.h",
-        "android/hardware/nfc/1.0/BsNfcClientCallback.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.nfc@1.0",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.nfc@1.0_genc++"],
-    generated_headers: ["android.hardware.nfc@1.0_genc++_headers"],
-    export_generated_headers: ["android.hardware.nfc@1.0_genc++_headers"],
-    vendor_available: true,
-    vndk: {
-        enabled: true,
-    },
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-    ],
-}
-
-genrule {
-    name: "android.hardware.nfc-V1.0-java_gen_java",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Ljava -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.nfc@1.0",
-    srcs: [
-        ":android.hardware.nfc@1.0_hal",
-    ],
-    out: [
-        "android/hardware/nfc/V1_0/NfcEvent.java",
-        "android/hardware/nfc/V1_0/NfcStatus.java",
-        "android/hardware/nfc/V1_0/INfc.java",
-        "android/hardware/nfc/V1_0/INfcClientCallback.java",
-    ],
-}
-
-java_library {
-    name: "android.hardware.nfc-V1.0-java",
-    no_framework_libs: true,
-    defaults: ["hidl-java-module-defaults"],
-    srcs: [":android.hardware.nfc-V1.0-java_gen_java"],
-    libs: [
-        "hwbinder",
-        "android.hidl.base-V1.0-java",
-    ]
-}
-
-genrule {
-    name: "android.hardware.nfc-V1.0-java-constants_gen_java",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Ljava-constants -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.nfc@1.0",
-    srcs: [
-        ":android.hardware.nfc@1.0_hal",
-    ],
-    out: [
-        "android/hardware/nfc/V1_0/Constants.java",
-    ],
-}
-
-java_library {
-    name: "android.hardware.nfc-V1.0-java-constants",
-    no_framework_libs: true,
-    defaults: ["hidl-java-module-defaults"],
-    srcs: [":android.hardware.nfc-V1.0-java-constants_gen_java"],
-}
-
-genrule {
-    name: "android.hardware.nfc@1.0-adapter-helper_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.nfc@1.0",
-    srcs: [
-        ":android.hardware.nfc@1.0_hal",
-    ],
-    out: [
-        "android/hardware/nfc/1.0/ANfc.cpp",
-        "android/hardware/nfc/1.0/ANfcClientCallback.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.nfc@1.0-adapter-helper_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.nfc@1.0",
-    srcs: [
-        ":android.hardware.nfc@1.0_hal",
-    ],
-    out: [
-        "android/hardware/nfc/1.0/ANfc.h",
-        "android/hardware/nfc/1.0/ANfcClientCallback.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.nfc@1.0-adapter-helper",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.nfc@1.0-adapter-helper_genc++"],
-    generated_headers: ["android.hardware.nfc@1.0-adapter-helper_genc++_headers"],
-    export_generated_headers: ["android.hardware.nfc@1.0-adapter-helper_genc++_headers"],
-    vendor_available: true,
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-        "libhidladapter",
-        "android.hardware.nfc@1.0",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-        "libhidladapter",
-        "android.hardware.nfc@1.0",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-}
-
-genrule {
-    name: "android.hardware.nfc@1.0-adapter_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-main -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.nfc@1.0",
-    out: ["main.cpp"]
-}
-
-cc_test {
-    name: "android.hardware.nfc@1.0-adapter",
-    defaults: ["hidl-module-defaults"],
-    shared_libs: [
-        "libhidladapter",
-        "libhidlbase",
-        "libhidltransport",
-        "libutils",
-        "android.hardware.nfc@1.0",
-        "android.hardware.nfc@1.0-adapter-helper",
-    ],
-    generated_sources: ["android.hardware.nfc@1.0-adapter_genc++"],
-}
diff --git a/nfc/1.0/default/Nfc.cpp b/nfc/1.0/default/Nfc.cpp
index d337a36..fcdcbbc 100644
--- a/nfc/1.0/default/Nfc.cpp
+++ b/nfc/1.0/default/Nfc.cpp
@@ -14,9 +14,7 @@
 
 sp<INfcClientCallback> Nfc::mCallback = nullptr;
 
-Nfc::Nfc(nfc_nci_device_t* device) : mDevice(device),
-    mDeathRecipient(new NfcDeathRecipient(this)) {
-}
+Nfc::Nfc(nfc_nci_device_t* device) : mDevice(device) {}
 
 // Methods from ::android::hardware::nfc::V1_0::INfc follow.
 ::android::hardware::Return<NfcStatus> Nfc::open(const sp<INfcClientCallback>& clientCallback)  {
@@ -25,7 +23,7 @@
     if (mDevice == nullptr || mCallback == nullptr) {
         return NfcStatus::FAILED;
     }
-    mCallback->linkToDeath(mDeathRecipient, 0 /*cookie*/);
+    mCallback->linkToDeath(this, 0 /*cookie*/);
     int ret = mDevice->open(mDevice, eventCallback, dataCallback);
     return ret == 0 ? NfcStatus::OK : NfcStatus::FAILED;
 }
@@ -58,7 +56,7 @@
     if (mDevice == nullptr || mCallback == nullptr) {
         return NfcStatus::FAILED;
     }
-    mCallback->unlinkToDeath(mDeathRecipient);
+    mCallback->unlinkToDeath(this);
     return mDevice->close(mDevice) ? NfcStatus::FAILED : NfcStatus::OK;
 }
 
diff --git a/nfc/1.0/default/Nfc.h b/nfc/1.0/default/Nfc.h
index d8787fd..ab95d06 100644
--- a/nfc/1.0/default/Nfc.h
+++ b/nfc/1.0/default/Nfc.h
@@ -19,50 +19,45 @@
 using ::android::hardware::hidl_string;
 using ::android::sp;
 
-struct NfcDeathRecipient : hidl_death_recipient {
-    NfcDeathRecipient(const sp<INfc> nfc) : mNfc(nfc) {
+struct Nfc : public INfc, public hidl_death_recipient {
+    Nfc(nfc_nci_device_t* device);
+    ::android::hardware::Return<NfcStatus> open(
+        const sp<INfcClientCallback>& clientCallback) override;
+    ::android::hardware::Return<uint32_t> write(const hidl_vec<uint8_t>& data) override;
+    ::android::hardware::Return<NfcStatus> coreInitialized(const hidl_vec<uint8_t>& data) override;
+    ::android::hardware::Return<NfcStatus> prediscover() override;
+    ::android::hardware::Return<NfcStatus> close() override;
+    ::android::hardware::Return<NfcStatus> controlGranted() override;
+    ::android::hardware::Return<NfcStatus> powerCycle() override;
+
+    static void eventCallback(uint8_t event, uint8_t status) {
+        if (mCallback != nullptr) {
+            auto ret = mCallback->sendEvent((::android::hardware::nfc::V1_0::NfcEvent)event,
+                                            (::android::hardware::nfc::V1_0::NfcStatus)status);
+            if (!ret.isOk()) {
+                ALOGW("Failed to call back into NFC process.");
+            }
+        }
+    }
+    static void dataCallback(uint16_t data_len, uint8_t* p_data) {
+        hidl_vec<uint8_t> data;
+        data.setToExternal(p_data, data_len);
+        if (mCallback != nullptr) {
+            auto ret = mCallback->sendData(data);
+            if (!ret.isOk()) {
+                ALOGW("Failed to call back into NFC process.");
+            }
+        }
     }
 
-    virtual void serviceDied(uint64_t /*cookie*/, const wp<::android::hidl::base::V1_0::IBase>& /*who*/) {
-        mNfc->close();
+    virtual void serviceDied(uint64_t /*cookie*/,
+                             const wp<::android::hidl::base::V1_0::IBase>& /*who*/) {
+        close();
     }
-    sp<INfc> mNfc;
-};
 
-struct Nfc : public INfc {
-  Nfc(nfc_nci_device_t* device);
-  ::android::hardware::Return<NfcStatus> open(const sp<INfcClientCallback>& clientCallback)  override;
-  ::android::hardware::Return<uint32_t> write(const hidl_vec<uint8_t>& data)  override;
-  ::android::hardware::Return<NfcStatus> coreInitialized(const hidl_vec<uint8_t>& data)  override;
-  ::android::hardware::Return<NfcStatus> prediscover()  override;
-  ::android::hardware::Return<NfcStatus> close()  override;
-  ::android::hardware::Return<NfcStatus> controlGranted()  override;
-  ::android::hardware::Return<NfcStatus> powerCycle()  override;
-
-  static void eventCallback(uint8_t event, uint8_t status) {
-      if (mCallback != nullptr) {
-          auto ret = mCallback->sendEvent(
-                  (::android::hardware::nfc::V1_0::NfcEvent) event,
-                  (::android::hardware::nfc::V1_0::NfcStatus) status);
-          if (!ret.isOk()) {
-              ALOGW("Failed to call back into NFC process.");
-          }
-      }
-  }
-  static void dataCallback(uint16_t data_len, uint8_t* p_data) {
-      hidl_vec<uint8_t> data;
-      data.setToExternal(p_data, data_len);
-      if (mCallback != nullptr) {
-          auto ret = mCallback->sendData(data);
-          if (!ret.isOk()) {
-              ALOGW("Failed to call back into NFC process.");
-          }
-      }
-  }
-  private:
+   private:
     static sp<INfcClientCallback> mCallback;
     const nfc_nci_device_t*       mDevice;
-    sp<NfcDeathRecipient>         mDeathRecipient;
 };
 
 extern "C" INfc* HIDL_FETCH_INfc(const char* name);
diff --git a/oemlock/1.0/Android.bp b/oemlock/1.0/Android.bp
index 5dcc89e..c4ad989 100644
--- a/oemlock/1.0/Android.bp
+++ b/oemlock/1.0/Android.bp
@@ -1,168 +1,22 @@
-// This file is autogenerated by hidl-gen. Do not edit manually.
+// This file is autogenerated by hidl-gen -Landroidbp.
 
-filegroup {
-    name: "android.hardware.oemlock@1.0_hal",
+hidl_interface {
+    name: "android.hardware.oemlock@1.0",
+    root: "android.hardware",
+    vndk: {
+        enabled: true,
+    },
     srcs: [
         "types.hal",
         "IOemLock.hal",
     ],
+    interfaces: [
+        "android.hidl.base@1.0",
+    ],
+    types: [
+        "OemLockSecureStatus",
+        "OemLockStatus",
+    ],
+    gen_java: true,
 }
 
-genrule {
-    name: "android.hardware.oemlock@1.0_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.oemlock@1.0",
-    srcs: [
-        ":android.hardware.oemlock@1.0_hal",
-    ],
-    out: [
-        "android/hardware/oemlock/1.0/types.cpp",
-        "android/hardware/oemlock/1.0/OemLockAll.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.oemlock@1.0_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.oemlock@1.0",
-    srcs: [
-        ":android.hardware.oemlock@1.0_hal",
-    ],
-    out: [
-        "android/hardware/oemlock/1.0/types.h",
-        "android/hardware/oemlock/1.0/hwtypes.h",
-        "android/hardware/oemlock/1.0/IOemLock.h",
-        "android/hardware/oemlock/1.0/IHwOemLock.h",
-        "android/hardware/oemlock/1.0/BnHwOemLock.h",
-        "android/hardware/oemlock/1.0/BpHwOemLock.h",
-        "android/hardware/oemlock/1.0/BsOemLock.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.oemlock@1.0",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.oemlock@1.0_genc++"],
-    generated_headers: ["android.hardware.oemlock@1.0_genc++_headers"],
-    export_generated_headers: ["android.hardware.oemlock@1.0_genc++_headers"],
-    vendor_available: true,
-    vndk: {
-        enabled: true,
-    },
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-    ],
-}
-
-genrule {
-    name: "android.hardware.oemlock-V1.0-java_gen_java",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Ljava -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.oemlock@1.0",
-    srcs: [
-        ":android.hardware.oemlock@1.0_hal",
-    ],
-    out: [
-        "android/hardware/oemlock/V1_0/OemLockSecureStatus.java",
-        "android/hardware/oemlock/V1_0/OemLockStatus.java",
-        "android/hardware/oemlock/V1_0/IOemLock.java",
-    ],
-}
-
-java_library {
-    name: "android.hardware.oemlock-V1.0-java",
-    no_framework_libs: true,
-    defaults: ["hidl-java-module-defaults"],
-    srcs: [":android.hardware.oemlock-V1.0-java_gen_java"],
-    libs: [
-        "hwbinder",
-        "android.hidl.base-V1.0-java",
-    ]
-}
-
-// This package does not export any types. Not creating java constants export.
-
-
-genrule {
-    name: "android.hardware.oemlock@1.0-adapter-helper_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.oemlock@1.0",
-    srcs: [
-        ":android.hardware.oemlock@1.0_hal",
-    ],
-    out: [
-        "android/hardware/oemlock/1.0/AOemLock.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.oemlock@1.0-adapter-helper_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.oemlock@1.0",
-    srcs: [
-        ":android.hardware.oemlock@1.0_hal",
-    ],
-    out: [
-        "android/hardware/oemlock/1.0/AOemLock.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.oemlock@1.0-adapter-helper",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.oemlock@1.0-adapter-helper_genc++"],
-    generated_headers: ["android.hardware.oemlock@1.0-adapter-helper_genc++_headers"],
-    export_generated_headers: ["android.hardware.oemlock@1.0-adapter-helper_genc++_headers"],
-    vendor_available: true,
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-        "libhidladapter",
-        "android.hardware.oemlock@1.0",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-        "libhidladapter",
-        "android.hardware.oemlock@1.0",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-}
-
-genrule {
-    name: "android.hardware.oemlock@1.0-adapter_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-main -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.oemlock@1.0",
-    out: ["main.cpp"]
-}
-
-cc_test {
-    name: "android.hardware.oemlock@1.0-adapter",
-    defaults: ["hidl-module-defaults"],
-    shared_libs: [
-        "libhidladapter",
-        "libhidlbase",
-        "libhidltransport",
-        "libutils",
-        "android.hardware.oemlock@1.0",
-        "android.hardware.oemlock@1.0-adapter-helper",
-    ],
-    generated_sources: ["android.hardware.oemlock@1.0-adapter_genc++"],
-}
diff --git a/power/1.0/Android.bp b/power/1.0/Android.bp
index 5ac42f6..92c9483 100644
--- a/power/1.0/Android.bp
+++ b/power/1.0/Android.bp
@@ -1,171 +1,25 @@
-// This file is autogenerated by hidl-gen. Do not edit manually.
+// This file is autogenerated by hidl-gen -Landroidbp.
 
-filegroup {
-    name: "android.hardware.power@1.0_hal",
+hidl_interface {
+    name: "android.hardware.power@1.0",
+    root: "android.hardware",
+    vndk: {
+        enabled: true,
+    },
     srcs: [
         "types.hal",
         "IPower.hal",
     ],
+    interfaces: [
+        "android.hidl.base@1.0",
+    ],
+    types: [
+        "Feature",
+        "PowerHint",
+        "PowerStatePlatformSleepState",
+        "PowerStateVoter",
+        "Status",
+    ],
+    gen_java: true,
 }
 
-genrule {
-    name: "android.hardware.power@1.0_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.power@1.0",
-    srcs: [
-        ":android.hardware.power@1.0_hal",
-    ],
-    out: [
-        "android/hardware/power/1.0/types.cpp",
-        "android/hardware/power/1.0/PowerAll.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.power@1.0_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.power@1.0",
-    srcs: [
-        ":android.hardware.power@1.0_hal",
-    ],
-    out: [
-        "android/hardware/power/1.0/types.h",
-        "android/hardware/power/1.0/hwtypes.h",
-        "android/hardware/power/1.0/IPower.h",
-        "android/hardware/power/1.0/IHwPower.h",
-        "android/hardware/power/1.0/BnHwPower.h",
-        "android/hardware/power/1.0/BpHwPower.h",
-        "android/hardware/power/1.0/BsPower.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.power@1.0",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.power@1.0_genc++"],
-    generated_headers: ["android.hardware.power@1.0_genc++_headers"],
-    export_generated_headers: ["android.hardware.power@1.0_genc++_headers"],
-    vendor_available: true,
-    vndk: {
-        enabled: true,
-    },
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-    ],
-}
-
-genrule {
-    name: "android.hardware.power-V1.0-java_gen_java",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Ljava -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.power@1.0",
-    srcs: [
-        ":android.hardware.power@1.0_hal",
-    ],
-    out: [
-        "android/hardware/power/V1_0/Feature.java",
-        "android/hardware/power/V1_0/PowerHint.java",
-        "android/hardware/power/V1_0/PowerStatePlatformSleepState.java",
-        "android/hardware/power/V1_0/PowerStateVoter.java",
-        "android/hardware/power/V1_0/Status.java",
-        "android/hardware/power/V1_0/IPower.java",
-    ],
-}
-
-java_library {
-    name: "android.hardware.power-V1.0-java",
-    no_framework_libs: true,
-    defaults: ["hidl-java-module-defaults"],
-    srcs: [":android.hardware.power-V1.0-java_gen_java"],
-    libs: [
-        "hwbinder",
-        "android.hidl.base-V1.0-java",
-    ]
-}
-
-// This package does not export any types. Not creating java constants export.
-
-
-genrule {
-    name: "android.hardware.power@1.0-adapter-helper_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.power@1.0",
-    srcs: [
-        ":android.hardware.power@1.0_hal",
-    ],
-    out: [
-        "android/hardware/power/1.0/APower.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.power@1.0-adapter-helper_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.power@1.0",
-    srcs: [
-        ":android.hardware.power@1.0_hal",
-    ],
-    out: [
-        "android/hardware/power/1.0/APower.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.power@1.0-adapter-helper",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.power@1.0-adapter-helper_genc++"],
-    generated_headers: ["android.hardware.power@1.0-adapter-helper_genc++_headers"],
-    export_generated_headers: ["android.hardware.power@1.0-adapter-helper_genc++_headers"],
-    vendor_available: true,
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-        "libhidladapter",
-        "android.hardware.power@1.0",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-        "libhidladapter",
-        "android.hardware.power@1.0",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-}
-
-genrule {
-    name: "android.hardware.power@1.0-adapter_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-main -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.power@1.0",
-    out: ["main.cpp"]
-}
-
-cc_test {
-    name: "android.hardware.power@1.0-adapter",
-    defaults: ["hidl-module-defaults"],
-    shared_libs: [
-        "libhidladapter",
-        "libhidlbase",
-        "libhidltransport",
-        "libutils",
-        "android.hardware.power@1.0",
-        "android.hardware.power@1.0-adapter-helper",
-    ],
-    generated_sources: ["android.hardware.power@1.0-adapter_genc++"],
-}
diff --git a/power/1.1/Android.bp b/power/1.1/Android.bp
index cea6383..d1d8021 100644
--- a/power/1.1/Android.bp
+++ b/power/1.1/Android.bp
@@ -1,176 +1,23 @@
-// This file is autogenerated by hidl-gen. Do not edit manually.
+// This file is autogenerated by hidl-gen -Landroidbp.
 
-filegroup {
-    name: "android.hardware.power@1.1_hal",
+hidl_interface {
+    name: "android.hardware.power@1.1",
+    root: "android.hardware",
+    vndk: {
+        enabled: true,
+    },
     srcs: [
         "types.hal",
         "IPower.hal",
     ],
-}
-
-genrule {
-    name: "android.hardware.power@1.1_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.power@1.1",
-    srcs: [
-        ":android.hardware.power@1.1_hal",
-    ],
-    out: [
-        "android/hardware/power/1.1/types.cpp",
-        "android/hardware/power/1.1/PowerAll.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.power@1.1_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.power@1.1",
-    srcs: [
-        ":android.hardware.power@1.1_hal",
-    ],
-    out: [
-        "android/hardware/power/1.1/types.h",
-        "android/hardware/power/1.1/hwtypes.h",
-        "android/hardware/power/1.1/IPower.h",
-        "android/hardware/power/1.1/IHwPower.h",
-        "android/hardware/power/1.1/BnHwPower.h",
-        "android/hardware/power/1.1/BpHwPower.h",
-        "android/hardware/power/1.1/BsPower.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.power@1.1",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.power@1.1_genc++"],
-    generated_headers: ["android.hardware.power@1.1_genc++_headers"],
-    export_generated_headers: ["android.hardware.power@1.1_genc++_headers"],
-    vendor_available: true,
-    vndk: {
-        enabled: true,
-    },
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
+    interfaces: [
         "android.hardware.power@1.0",
+        "android.hidl.base@1.0",
     ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-        "android.hardware.power@1.0",
+    types: [
+        "PowerStateSubsystem",
+        "PowerStateSubsystemSleepState",
     ],
+    gen_java: true,
 }
 
-genrule {
-    name: "android.hardware.power-V1.1-java_gen_java",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Ljava -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.power@1.1",
-    srcs: [
-        ":android.hardware.power@1.1_hal",
-    ],
-    out: [
-        "android/hardware/power/V1_1/PowerStateSubsystem.java",
-        "android/hardware/power/V1_1/PowerStateSubsystemSleepState.java",
-        "android/hardware/power/V1_1/IPower.java",
-    ],
-}
-
-java_library {
-    name: "android.hardware.power-V1.1-java",
-    no_framework_libs: true,
-    defaults: ["hidl-java-module-defaults"],
-    srcs: [":android.hardware.power-V1.1-java_gen_java"],
-    libs: [
-        "hwbinder",
-        "android.hardware.power-V1.0-java",
-        "android.hidl.base-V1.0-java",
-    ]
-}
-
-// This package does not export any types. Not creating java constants export.
-
-
-genrule {
-    name: "android.hardware.power@1.1-adapter-helper_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.power@1.1",
-    srcs: [
-        ":android.hardware.power@1.1_hal",
-    ],
-    out: [
-        "android/hardware/power/1.1/APower.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.power@1.1-adapter-helper_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.power@1.1",
-    srcs: [
-        ":android.hardware.power@1.1_hal",
-    ],
-    out: [
-        "android/hardware/power/1.1/APower.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.power@1.1-adapter-helper",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.power@1.1-adapter-helper_genc++"],
-    generated_headers: ["android.hardware.power@1.1-adapter-helper_genc++_headers"],
-    export_generated_headers: ["android.hardware.power@1.1-adapter-helper_genc++_headers"],
-    vendor_available: true,
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-        "libhidladapter",
-        "android.hardware.power@1.0",
-        "android.hardware.power@1.1",
-        "android.hardware.power@1.0-adapter-helper",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-        "libhidladapter",
-        "android.hardware.power@1.0",
-        "android.hardware.power@1.1",
-        "android.hardware.power@1.0-adapter-helper",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-}
-
-genrule {
-    name: "android.hardware.power@1.1-adapter_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-main -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.power@1.1",
-    out: ["main.cpp"]
-}
-
-cc_test {
-    name: "android.hardware.power@1.1-adapter",
-    defaults: ["hidl-module-defaults"],
-    shared_libs: [
-        "libhidladapter",
-        "libhidlbase",
-        "libhidltransport",
-        "libutils",
-        "android.hardware.power@1.0",
-        "android.hardware.power@1.1",
-        "android.hardware.power@1.1-adapter-helper",
-    ],
-    generated_sources: ["android.hardware.power@1.1-adapter_genc++"],
-}
diff --git a/radio/1.0/Android.bp b/radio/1.0/Android.bp
index f5791a7..72a3ca6 100644
--- a/radio/1.0/Android.bp
+++ b/radio/1.0/Android.bp
@@ -1,7 +1,11 @@
-// This file is autogenerated by hidl-gen. Do not edit manually.
+// This file is autogenerated by hidl-gen -Landroidbp.
 
-filegroup {
-    name: "android.hardware.radio@1.0_hal",
+hidl_interface {
+    name: "android.hardware.radio@1.0",
+    root: "android.hardware",
+    vndk: {
+        enabled: true,
+    },
     srcs: [
         "types.hal",
         "IRadio.hal",
@@ -10,351 +14,165 @@
         "ISap.hal",
         "ISapCallback.hal",
     ],
+    interfaces: [
+        "android.hidl.base@1.0",
+    ],
+    types: [
+        "ActivityStatsInfo",
+        "ApnAuthType",
+        "ApnTypes",
+        "AppState",
+        "AppStatus",
+        "AppType",
+        "Call",
+        "CallForwardInfo",
+        "CallForwardInfoStatus",
+        "CallPresentation",
+        "CallState",
+        "CardState",
+        "CardStatus",
+        "Carrier",
+        "CarrierMatchType",
+        "CarrierRestrictions",
+        "CdmaBroadcastSmsConfigInfo",
+        "CdmaCallWaiting",
+        "CdmaCallWaitingNumberPlan",
+        "CdmaCallWaitingNumberPresentation",
+        "CdmaCallWaitingNumberType",
+        "CdmaDisplayInfoRecord",
+        "CdmaInfoRecName",
+        "CdmaInformationRecord",
+        "CdmaInformationRecords",
+        "CdmaLineControlInfoRecord",
+        "CdmaNumberInfoRecord",
+        "CdmaOtaProvisionStatus",
+        "CdmaRedirectingNumberInfoRecord",
+        "CdmaRedirectingReason",
+        "CdmaRoamingType",
+        "CdmaSignalInfoRecord",
+        "CdmaSignalStrength",
+        "CdmaSmsAck",
+        "CdmaSmsAddress",
+        "CdmaSmsDigitMode",
+        "CdmaSmsErrorClass",
+        "CdmaSmsMessage",
+        "CdmaSmsNumberMode",
+        "CdmaSmsNumberPlan",
+        "CdmaSmsNumberType",
+        "CdmaSmsSubaddress",
+        "CdmaSmsSubaddressType",
+        "CdmaSmsWriteArgs",
+        "CdmaSmsWriteArgsStatus",
+        "CdmaSubscriptionSource",
+        "CdmaT53AudioControlInfoRecord",
+        "CdmaT53ClirInfoRecord",
+        "CellIdentity",
+        "CellIdentityCdma",
+        "CellIdentityGsm",
+        "CellIdentityLte",
+        "CellIdentityTdscdma",
+        "CellIdentityWcdma",
+        "CellInfo",
+        "CellInfoCdma",
+        "CellInfoGsm",
+        "CellInfoLte",
+        "CellInfoTdscdma",
+        "CellInfoType",
+        "CellInfoWcdma",
+        "CfData",
+        "ClipStatus",
+        "Clir",
+        "DataCallFailCause",
+        "DataProfileId",
+        "DataProfileInfo",
+        "DataProfileInfoType",
+        "DataRegStateResult",
+        "DeviceStateType",
+        "Dial",
+        "EvdoSignalStrength",
+        "GsmBroadcastSmsConfigInfo",
+        "GsmSignalStrength",
+        "GsmSmsMessage",
+        "HardwareConfig",
+        "HardwareConfigModem",
+        "HardwareConfigSim",
+        "HardwareConfigState",
+        "HardwareConfigType",
+        "IccIo",
+        "IccIoResult",
+        "ImsSmsMessage",
+        "IndicationFilter",
+        "LastCallFailCause",
+        "LastCallFailCauseInfo",
+        "LceDataInfo",
+        "LceStatus",
+        "LceStatusInfo",
+        "LteSignalStrength",
+        "MvnoType",
+        "NeighboringCell",
+        "NvItem",
+        "NvWriteItem",
+        "OperatorInfo",
+        "OperatorStatus",
+        "P2Constant",
+        "PcoDataInfo",
+        "PersoSubstate",
+        "PhoneRestrictedState",
+        "PinState",
+        "PreferredNetworkType",
+        "RadioAccessFamily",
+        "RadioBandMode",
+        "RadioCapability",
+        "RadioCapabilityPhase",
+        "RadioCapabilityStatus",
+        "RadioCdmaSmsConst",
+        "RadioConst",
+        "RadioError",
+        "RadioIndicationType",
+        "RadioResponseInfo",
+        "RadioResponseType",
+        "RadioState",
+        "RadioTechnology",
+        "RadioTechnologyFamily",
+        "RegState",
+        "ResetNvType",
+        "RestrictedState",
+        "SapApduType",
+        "SapConnectRsp",
+        "SapDisconnectType",
+        "SapResultCode",
+        "SapStatus",
+        "SapTransferProtocol",
+        "SelectUiccSub",
+        "SendSmsResult",
+        "SetupDataCallResult",
+        "SignalStrength",
+        "SimApdu",
+        "SimRefreshResult",
+        "SimRefreshType",
+        "SmsAcknowledgeFailCause",
+        "SmsWriteArgs",
+        "SmsWriteArgsStatus",
+        "SrvccState",
+        "SsInfoData",
+        "SsRequestType",
+        "SsServiceType",
+        "SsTeleserviceType",
+        "StkCcUnsolSsResult",
+        "SubscriptionType",
+        "SuppServiceClass",
+        "SuppSvcNotification",
+        "TdScdmaSignalStrength",
+        "TimeStampType",
+        "TtyMode",
+        "UiccSubActStatus",
+        "UssdModeType",
+        "UusDcs",
+        "UusInfo",
+        "UusType",
+        "VoiceRegStateResult",
+        "WcdmaSignalStrength",
+    ],
+    gen_java: true,
 }
 
-genrule {
-    name: "android.hardware.radio@1.0_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.radio@1.0",
-    srcs: [
-        ":android.hardware.radio@1.0_hal",
-    ],
-    out: [
-        "android/hardware/radio/1.0/types.cpp",
-        "android/hardware/radio/1.0/RadioAll.cpp",
-        "android/hardware/radio/1.0/RadioIndicationAll.cpp",
-        "android/hardware/radio/1.0/RadioResponseAll.cpp",
-        "android/hardware/radio/1.0/SapAll.cpp",
-        "android/hardware/radio/1.0/SapCallbackAll.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.radio@1.0_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.radio@1.0",
-    srcs: [
-        ":android.hardware.radio@1.0_hal",
-    ],
-    out: [
-        "android/hardware/radio/1.0/types.h",
-        "android/hardware/radio/1.0/hwtypes.h",
-        "android/hardware/radio/1.0/IRadio.h",
-        "android/hardware/radio/1.0/IHwRadio.h",
-        "android/hardware/radio/1.0/BnHwRadio.h",
-        "android/hardware/radio/1.0/BpHwRadio.h",
-        "android/hardware/radio/1.0/BsRadio.h",
-        "android/hardware/radio/1.0/IRadioIndication.h",
-        "android/hardware/radio/1.0/IHwRadioIndication.h",
-        "android/hardware/radio/1.0/BnHwRadioIndication.h",
-        "android/hardware/radio/1.0/BpHwRadioIndication.h",
-        "android/hardware/radio/1.0/BsRadioIndication.h",
-        "android/hardware/radio/1.0/IRadioResponse.h",
-        "android/hardware/radio/1.0/IHwRadioResponse.h",
-        "android/hardware/radio/1.0/BnHwRadioResponse.h",
-        "android/hardware/radio/1.0/BpHwRadioResponse.h",
-        "android/hardware/radio/1.0/BsRadioResponse.h",
-        "android/hardware/radio/1.0/ISap.h",
-        "android/hardware/radio/1.0/IHwSap.h",
-        "android/hardware/radio/1.0/BnHwSap.h",
-        "android/hardware/radio/1.0/BpHwSap.h",
-        "android/hardware/radio/1.0/BsSap.h",
-        "android/hardware/radio/1.0/ISapCallback.h",
-        "android/hardware/radio/1.0/IHwSapCallback.h",
-        "android/hardware/radio/1.0/BnHwSapCallback.h",
-        "android/hardware/radio/1.0/BpHwSapCallback.h",
-        "android/hardware/radio/1.0/BsSapCallback.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.radio@1.0",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.radio@1.0_genc++"],
-    generated_headers: ["android.hardware.radio@1.0_genc++_headers"],
-    export_generated_headers: ["android.hardware.radio@1.0_genc++_headers"],
-    vendor_available: true,
-    vndk: {
-        enabled: true,
-    },
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-    ],
-}
-
-genrule {
-    name: "android.hardware.radio-V1.0-java_gen_java",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Ljava -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.radio@1.0",
-    srcs: [
-        ":android.hardware.radio@1.0_hal",
-    ],
-    out: [
-        "android/hardware/radio/V1_0/ActivityStatsInfo.java",
-        "android/hardware/radio/V1_0/ApnAuthType.java",
-        "android/hardware/radio/V1_0/ApnTypes.java",
-        "android/hardware/radio/V1_0/AppState.java",
-        "android/hardware/radio/V1_0/AppStatus.java",
-        "android/hardware/radio/V1_0/AppType.java",
-        "android/hardware/radio/V1_0/Call.java",
-        "android/hardware/radio/V1_0/CallForwardInfo.java",
-        "android/hardware/radio/V1_0/CallForwardInfoStatus.java",
-        "android/hardware/radio/V1_0/CallPresentation.java",
-        "android/hardware/radio/V1_0/CallState.java",
-        "android/hardware/radio/V1_0/CardState.java",
-        "android/hardware/radio/V1_0/CardStatus.java",
-        "android/hardware/radio/V1_0/Carrier.java",
-        "android/hardware/radio/V1_0/CarrierMatchType.java",
-        "android/hardware/radio/V1_0/CarrierRestrictions.java",
-        "android/hardware/radio/V1_0/CdmaBroadcastSmsConfigInfo.java",
-        "android/hardware/radio/V1_0/CdmaCallWaiting.java",
-        "android/hardware/radio/V1_0/CdmaCallWaitingNumberPlan.java",
-        "android/hardware/radio/V1_0/CdmaCallWaitingNumberPresentation.java",
-        "android/hardware/radio/V1_0/CdmaCallWaitingNumberType.java",
-        "android/hardware/radio/V1_0/CdmaDisplayInfoRecord.java",
-        "android/hardware/radio/V1_0/CdmaInfoRecName.java",
-        "android/hardware/radio/V1_0/CdmaInformationRecord.java",
-        "android/hardware/radio/V1_0/CdmaInformationRecords.java",
-        "android/hardware/radio/V1_0/CdmaLineControlInfoRecord.java",
-        "android/hardware/radio/V1_0/CdmaNumberInfoRecord.java",
-        "android/hardware/radio/V1_0/CdmaOtaProvisionStatus.java",
-        "android/hardware/radio/V1_0/CdmaRedirectingNumberInfoRecord.java",
-        "android/hardware/radio/V1_0/CdmaRedirectingReason.java",
-        "android/hardware/radio/V1_0/CdmaRoamingType.java",
-        "android/hardware/radio/V1_0/CdmaSignalInfoRecord.java",
-        "android/hardware/radio/V1_0/CdmaSignalStrength.java",
-        "android/hardware/radio/V1_0/CdmaSmsAck.java",
-        "android/hardware/radio/V1_0/CdmaSmsAddress.java",
-        "android/hardware/radio/V1_0/CdmaSmsDigitMode.java",
-        "android/hardware/radio/V1_0/CdmaSmsErrorClass.java",
-        "android/hardware/radio/V1_0/CdmaSmsMessage.java",
-        "android/hardware/radio/V1_0/CdmaSmsNumberMode.java",
-        "android/hardware/radio/V1_0/CdmaSmsNumberPlan.java",
-        "android/hardware/radio/V1_0/CdmaSmsNumberType.java",
-        "android/hardware/radio/V1_0/CdmaSmsSubaddress.java",
-        "android/hardware/radio/V1_0/CdmaSmsSubaddressType.java",
-        "android/hardware/radio/V1_0/CdmaSmsWriteArgs.java",
-        "android/hardware/radio/V1_0/CdmaSmsWriteArgsStatus.java",
-        "android/hardware/radio/V1_0/CdmaSubscriptionSource.java",
-        "android/hardware/radio/V1_0/CdmaT53AudioControlInfoRecord.java",
-        "android/hardware/radio/V1_0/CdmaT53ClirInfoRecord.java",
-        "android/hardware/radio/V1_0/CellIdentity.java",
-        "android/hardware/radio/V1_0/CellIdentityCdma.java",
-        "android/hardware/radio/V1_0/CellIdentityGsm.java",
-        "android/hardware/radio/V1_0/CellIdentityLte.java",
-        "android/hardware/radio/V1_0/CellIdentityTdscdma.java",
-        "android/hardware/radio/V1_0/CellIdentityWcdma.java",
-        "android/hardware/radio/V1_0/CellInfo.java",
-        "android/hardware/radio/V1_0/CellInfoCdma.java",
-        "android/hardware/radio/V1_0/CellInfoGsm.java",
-        "android/hardware/radio/V1_0/CellInfoLte.java",
-        "android/hardware/radio/V1_0/CellInfoTdscdma.java",
-        "android/hardware/radio/V1_0/CellInfoType.java",
-        "android/hardware/radio/V1_0/CellInfoWcdma.java",
-        "android/hardware/radio/V1_0/CfData.java",
-        "android/hardware/radio/V1_0/ClipStatus.java",
-        "android/hardware/radio/V1_0/Clir.java",
-        "android/hardware/radio/V1_0/DataCallFailCause.java",
-        "android/hardware/radio/V1_0/DataProfileId.java",
-        "android/hardware/radio/V1_0/DataProfileInfo.java",
-        "android/hardware/radio/V1_0/DataProfileInfoType.java",
-        "android/hardware/radio/V1_0/DataRegStateResult.java",
-        "android/hardware/radio/V1_0/DeviceStateType.java",
-        "android/hardware/radio/V1_0/Dial.java",
-        "android/hardware/radio/V1_0/EvdoSignalStrength.java",
-        "android/hardware/radio/V1_0/GsmBroadcastSmsConfigInfo.java",
-        "android/hardware/radio/V1_0/GsmSignalStrength.java",
-        "android/hardware/radio/V1_0/GsmSmsMessage.java",
-        "android/hardware/radio/V1_0/HardwareConfig.java",
-        "android/hardware/radio/V1_0/HardwareConfigModem.java",
-        "android/hardware/radio/V1_0/HardwareConfigSim.java",
-        "android/hardware/radio/V1_0/HardwareConfigState.java",
-        "android/hardware/radio/V1_0/HardwareConfigType.java",
-        "android/hardware/radio/V1_0/IccIo.java",
-        "android/hardware/radio/V1_0/IccIoResult.java",
-        "android/hardware/radio/V1_0/ImsSmsMessage.java",
-        "android/hardware/radio/V1_0/IndicationFilter.java",
-        "android/hardware/radio/V1_0/LastCallFailCause.java",
-        "android/hardware/radio/V1_0/LastCallFailCauseInfo.java",
-        "android/hardware/radio/V1_0/LceDataInfo.java",
-        "android/hardware/radio/V1_0/LceStatus.java",
-        "android/hardware/radio/V1_0/LceStatusInfo.java",
-        "android/hardware/radio/V1_0/LteSignalStrength.java",
-        "android/hardware/radio/V1_0/MvnoType.java",
-        "android/hardware/radio/V1_0/NeighboringCell.java",
-        "android/hardware/radio/V1_0/NvItem.java",
-        "android/hardware/radio/V1_0/NvWriteItem.java",
-        "android/hardware/radio/V1_0/OperatorInfo.java",
-        "android/hardware/radio/V1_0/OperatorStatus.java",
-        "android/hardware/radio/V1_0/P2Constant.java",
-        "android/hardware/radio/V1_0/PcoDataInfo.java",
-        "android/hardware/radio/V1_0/PersoSubstate.java",
-        "android/hardware/radio/V1_0/PhoneRestrictedState.java",
-        "android/hardware/radio/V1_0/PinState.java",
-        "android/hardware/radio/V1_0/PreferredNetworkType.java",
-        "android/hardware/radio/V1_0/RadioAccessFamily.java",
-        "android/hardware/radio/V1_0/RadioBandMode.java",
-        "android/hardware/radio/V1_0/RadioCapability.java",
-        "android/hardware/radio/V1_0/RadioCapabilityPhase.java",
-        "android/hardware/radio/V1_0/RadioCapabilityStatus.java",
-        "android/hardware/radio/V1_0/RadioCdmaSmsConst.java",
-        "android/hardware/radio/V1_0/RadioConst.java",
-        "android/hardware/radio/V1_0/RadioError.java",
-        "android/hardware/radio/V1_0/RadioIndicationType.java",
-        "android/hardware/radio/V1_0/RadioResponseInfo.java",
-        "android/hardware/radio/V1_0/RadioResponseType.java",
-        "android/hardware/radio/V1_0/RadioState.java",
-        "android/hardware/radio/V1_0/RadioTechnology.java",
-        "android/hardware/radio/V1_0/RadioTechnologyFamily.java",
-        "android/hardware/radio/V1_0/RegState.java",
-        "android/hardware/radio/V1_0/ResetNvType.java",
-        "android/hardware/radio/V1_0/RestrictedState.java",
-        "android/hardware/radio/V1_0/SapApduType.java",
-        "android/hardware/radio/V1_0/SapConnectRsp.java",
-        "android/hardware/radio/V1_0/SapDisconnectType.java",
-        "android/hardware/radio/V1_0/SapResultCode.java",
-        "android/hardware/radio/V1_0/SapStatus.java",
-        "android/hardware/radio/V1_0/SapTransferProtocol.java",
-        "android/hardware/radio/V1_0/SelectUiccSub.java",
-        "android/hardware/radio/V1_0/SendSmsResult.java",
-        "android/hardware/radio/V1_0/SetupDataCallResult.java",
-        "android/hardware/radio/V1_0/SignalStrength.java",
-        "android/hardware/radio/V1_0/SimApdu.java",
-        "android/hardware/radio/V1_0/SimRefreshResult.java",
-        "android/hardware/radio/V1_0/SimRefreshType.java",
-        "android/hardware/radio/V1_0/SmsAcknowledgeFailCause.java",
-        "android/hardware/radio/V1_0/SmsWriteArgs.java",
-        "android/hardware/radio/V1_0/SmsWriteArgsStatus.java",
-        "android/hardware/radio/V1_0/SrvccState.java",
-        "android/hardware/radio/V1_0/SsInfoData.java",
-        "android/hardware/radio/V1_0/SsRequestType.java",
-        "android/hardware/radio/V1_0/SsServiceType.java",
-        "android/hardware/radio/V1_0/SsTeleserviceType.java",
-        "android/hardware/radio/V1_0/StkCcUnsolSsResult.java",
-        "android/hardware/radio/V1_0/SubscriptionType.java",
-        "android/hardware/radio/V1_0/SuppServiceClass.java",
-        "android/hardware/radio/V1_0/SuppSvcNotification.java",
-        "android/hardware/radio/V1_0/TdScdmaSignalStrength.java",
-        "android/hardware/radio/V1_0/TimeStampType.java",
-        "android/hardware/radio/V1_0/TtyMode.java",
-        "android/hardware/radio/V1_0/UiccSubActStatus.java",
-        "android/hardware/radio/V1_0/UssdModeType.java",
-        "android/hardware/radio/V1_0/UusDcs.java",
-        "android/hardware/radio/V1_0/UusInfo.java",
-        "android/hardware/radio/V1_0/UusType.java",
-        "android/hardware/radio/V1_0/VoiceRegStateResult.java",
-        "android/hardware/radio/V1_0/WcdmaSignalStrength.java",
-        "android/hardware/radio/V1_0/IRadio.java",
-        "android/hardware/radio/V1_0/IRadioIndication.java",
-        "android/hardware/radio/V1_0/IRadioResponse.java",
-        "android/hardware/radio/V1_0/ISap.java",
-        "android/hardware/radio/V1_0/ISapCallback.java",
-    ],
-}
-
-java_library {
-    name: "android.hardware.radio-V1.0-java",
-    no_framework_libs: true,
-    defaults: ["hidl-java-module-defaults"],
-    srcs: [":android.hardware.radio-V1.0-java_gen_java"],
-    libs: [
-        "hwbinder",
-        "android.hidl.base-V1.0-java",
-    ]
-}
-
-// This package does not export any types. Not creating java constants export.
-
-
-genrule {
-    name: "android.hardware.radio@1.0-adapter-helper_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.radio@1.0",
-    srcs: [
-        ":android.hardware.radio@1.0_hal",
-    ],
-    out: [
-        "android/hardware/radio/1.0/ARadio.cpp",
-        "android/hardware/radio/1.0/ARadioIndication.cpp",
-        "android/hardware/radio/1.0/ARadioResponse.cpp",
-        "android/hardware/radio/1.0/ASap.cpp",
-        "android/hardware/radio/1.0/ASapCallback.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.radio@1.0-adapter-helper_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.radio@1.0",
-    srcs: [
-        ":android.hardware.radio@1.0_hal",
-    ],
-    out: [
-        "android/hardware/radio/1.0/ARadio.h",
-        "android/hardware/radio/1.0/ARadioIndication.h",
-        "android/hardware/radio/1.0/ARadioResponse.h",
-        "android/hardware/radio/1.0/ASap.h",
-        "android/hardware/radio/1.0/ASapCallback.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.radio@1.0-adapter-helper",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.radio@1.0-adapter-helper_genc++"],
-    generated_headers: ["android.hardware.radio@1.0-adapter-helper_genc++_headers"],
-    export_generated_headers: ["android.hardware.radio@1.0-adapter-helper_genc++_headers"],
-    vendor_available: true,
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-        "libhidladapter",
-        "android.hardware.radio@1.0",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-        "libhidladapter",
-        "android.hardware.radio@1.0",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-}
-
-genrule {
-    name: "android.hardware.radio@1.0-adapter_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-main -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.radio@1.0",
-    out: ["main.cpp"]
-}
-
-cc_test {
-    name: "android.hardware.radio@1.0-adapter",
-    defaults: ["hidl-module-defaults"],
-    shared_libs: [
-        "libhidladapter",
-        "libhidlbase",
-        "libhidltransport",
-        "libutils",
-        "android.hardware.radio@1.0",
-        "android.hardware.radio@1.0-adapter-helper",
-    ],
-    generated_sources: ["android.hardware.radio@1.0-adapter_genc++"],
-}
diff --git a/radio/1.0/vts/functional/Android.bp b/radio/1.0/vts/functional/Android.bp
index 61136ae..afbb1c4 100644
--- a/radio/1.0/vts/functional/Android.bp
+++ b/radio/1.0/vts/functional/Android.bp
@@ -50,10 +50,13 @@
 
 cc_library_static {
     name: "RadioVtsTestUtilBase",
-    defaults: ["hidl_defaults"],
+    defaults: ["VtsHalTargetTestDefaults"],
     srcs : [
         "vts_test_util.cpp"
     ],
+    shared_libs: [
+        "android.hardware.radio@1.0",
+    ],
 }
 
 cc_library_headers {
diff --git a/radio/1.0/vts/functional/radio_hidl_hal_cell_broadcast.cpp b/radio/1.0/vts/functional/radio_hidl_hal_cell_broadcast.cpp
index a81861d..8c4ccf6 100644
--- a/radio/1.0/vts/functional/radio_hidl_hal_cell_broadcast.cpp
+++ b/radio/1.0/vts/functional/radio_hidl_hal_cell_broadcast.cpp
@@ -74,11 +74,10 @@
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(CheckGeneralError() ||
-                    radioRsp->rspInfo.error == RadioError::INVALID_ARGUMENTS ||
-                    radioRsp->rspInfo.error == RadioError::INVALID_STATE ||
-                    radioRsp->rspInfo.error == RadioError::NONE ||
-                    radioRsp->rspInfo.error == RadioError::INVALID_MODEM_STATE);
+        ASSERT_TRUE(CheckAnyOfErrors(radioRsp->rspInfo.error,
+                                     {RadioError::NONE, RadioError::INVALID_ARGUMENTS,
+                                      RadioError::INVALID_MODEM_STATE, RadioError::INVALID_STATE},
+                                     CHECK_GENERAL_ERROR));
     }
 }
 
@@ -95,9 +94,10 @@
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(CheckGeneralError() || radioRsp->rspInfo.error == RadioError::INVALID_STATE ||
-                    radioRsp->rspInfo.error == RadioError::NONE ||
-                    radioRsp->rspInfo.error == RadioError::INVALID_MODEM_STATE);
+        ASSERT_TRUE(CheckAnyOfErrors(
+            radioRsp->rspInfo.error,
+            {RadioError::NONE, RadioError::INVALID_MODEM_STATE, RadioError::INVALID_STATE},
+            CHECK_GENERAL_ERROR));
     }
 }
 
@@ -122,9 +122,9 @@
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(CheckGeneralError() ||
-                    radioRsp->rspInfo.error == RadioError::INVALID_ARGUMENTS ||
-                    radioRsp->rspInfo.error == RadioError::NONE);
+        ASSERT_TRUE(CheckAnyOfErrors(radioRsp->rspInfo.error,
+                                     {RadioError::NONE, RadioError::INVALID_MODEM_STATE},
+                                     CHECK_GENERAL_ERROR));
     }
 }
 
@@ -141,7 +141,8 @@
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(CheckGeneralError() || radioRsp->rspInfo.error == RadioError::NONE);
+        ASSERT_TRUE(
+            CheckAnyOfErrors(radioRsp->rspInfo.error, {RadioError::NONE}, CHECK_GENERAL_ERROR));
     }
 }
 
@@ -159,9 +160,9 @@
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(CheckGeneralError() ||
-                    radioRsp->rspInfo.error == RadioError::INVALID_ARGUMENTS ||
-                    radioRsp->rspInfo.error == RadioError::NONE);
+        ASSERT_TRUE(CheckAnyOfErrors(radioRsp->rspInfo.error,
+                                     {RadioError::NONE, RadioError::INVALID_ARGUMENTS},
+                                     CHECK_GENERAL_ERROR));
     }
 }
 
@@ -179,11 +180,10 @@
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(CheckGeneralError() ||
-                    radioRsp->rspInfo.error == RadioError::INVALID_ARGUMENTS ||
-                    radioRsp->rspInfo.error == RadioError::INVALID_STATE ||
-                    radioRsp->rspInfo.error == RadioError::NONE ||
-                    radioRsp->rspInfo.error == RadioError::OPERATION_NOT_ALLOWED ||
-                    radioRsp->rspInfo.error == RadioError::INVALID_MODEM_STATE);
+        ASSERT_TRUE(CheckAnyOfErrors(
+            radioRsp->rspInfo.error,
+            {RadioError::NONE, RadioError::INVALID_ARGUMENTS, RadioError::INVALID_MODEM_STATE,
+             RadioError::INVALID_STATE, RadioError::OPERATION_NOT_ALLOWED},
+            CHECK_GENERAL_ERROR));
     }
 }
diff --git a/radio/1.0/vts/functional/radio_hidl_hal_data.cpp b/radio/1.0/vts/functional/radio_hidl_hal_data.cpp
index 4684e0f..9496688 100644
--- a/radio/1.0/vts/functional/radio_hidl_hal_data.cpp
+++ b/radio/1.0/vts/functional/radio_hidl_hal_data.cpp
@@ -75,11 +75,11 @@
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::NONE ||
-                    radioRsp->rspInfo.error == RadioError::RADIO_NOT_AVAILABLE ||
-                    radioRsp->rspInfo.error == RadioError::OP_NOT_ALLOWED_BEFORE_REG_TO_NW ||
-                    radioRsp->rspInfo.error == RadioError::OP_NOT_ALLOWED_DURING_VOICE_CALL ||
-                    radioRsp->rspInfo.error == RadioError::SIM_ABSENT || CheckOEMError());
+        ASSERT_TRUE(CheckAnyOfErrors(radioRsp->rspInfo.error,
+                                     {RadioError::NONE, RadioError::OP_NOT_ALLOWED_BEFORE_REG_TO_NW,
+                                      RadioError::OP_NOT_ALLOWED_DURING_VOICE_CALL,
+                                      RadioError::RADIO_NOT_AVAILABLE, RadioError::SIM_ABSENT},
+                                     CHECK_OEM_ERROR));
     }
 }
 
@@ -98,10 +98,10 @@
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::NONE ||
-                    radioRsp->rspInfo.error == RadioError::INVALID_CALL_ID ||
-                    radioRsp->rspInfo.error == RadioError::SIM_ABSENT || CheckOEMError() ||
-                    radioRsp->rspInfo.error == RadioError::RADIO_NOT_AVAILABLE);
+        ASSERT_TRUE(CheckAnyOfErrors(radioRsp->rspInfo.error,
+                                     {RadioError::NONE, RadioError::RADIO_NOT_AVAILABLE,
+                                      RadioError::SIM_ABSENT, RadioError::INVALID_CALL_ID},
+                                     CHECK_OEM_ERROR));
     }
 }
 
@@ -118,9 +118,9 @@
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::NONE ||
-                    radioRsp->rspInfo.error == RadioError::RADIO_NOT_AVAILABLE ||
-                    radioRsp->rspInfo.error == RadioError::SIM_ABSENT);
+        ASSERT_TRUE(CheckAnyOfErrors(
+            radioRsp->rspInfo.error,
+            {RadioError::NONE, RadioError::RADIO_NOT_AVAILABLE, RadioError::SIM_ABSENT}));
     }
 }
 
@@ -160,10 +160,10 @@
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::NONE ||
-                    radioRsp->rspInfo.error == RadioError::RADIO_NOT_AVAILABLE ||
-                    radioRsp->rspInfo.error == RadioError::SUBSCRIPTION_NOT_AVAILABLE ||
-                    CheckOEMError());
+        ASSERT_TRUE(CheckAnyOfErrors(radioRsp->rspInfo.error,
+                                     {RadioError::NONE, RadioError::RADIO_NOT_AVAILABLE,
+                                      RadioError::SUBSCRIPTION_NOT_AVAILABLE},
+                                     CHECK_OEM_ERROR));
     }
 }
 
@@ -224,9 +224,8 @@
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::NONE ||
-                    radioRsp->rspInfo.error == RadioError::RADIO_NOT_AVAILABLE ||
-                    radioRsp->rspInfo.error == RadioError::SIM_ABSENT ||
-                    radioRsp->rspInfo.error == RadioError::REQUEST_NOT_SUPPORTED);
+        ASSERT_TRUE(CheckAnyOfErrors(radioRsp->rspInfo.error,
+                                     {RadioError::NONE, RadioError::RADIO_NOT_AVAILABLE,
+                                      RadioError::SIM_ABSENT, RadioError::REQUEST_NOT_SUPPORTED}));
     }
 }
diff --git a/radio/1.0/vts/functional/radio_hidl_hal_icc.cpp b/radio/1.0/vts/functional/radio_hidl_hal_icc.cpp
index eb5d337..566a516 100644
--- a/radio/1.0/vts/functional/radio_hidl_hal_icc.cpp
+++ b/radio/1.0/vts/functional/radio_hidl_hal_icc.cpp
@@ -310,14 +310,10 @@
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::NONE ||
-                    radioRsp->rspInfo.error == RadioError::SYSTEM_ERR ||
-                    radioRsp->rspInfo.error == RadioError::NO_MEMORY ||
-                    radioRsp->rspInfo.error == RadioError::MODEM_ERR ||
-                    radioRsp->rspInfo.error == RadioError::INVALID_ARGUMENTS ||
-                    radioRsp->rspInfo.error == RadioError::INVALID_SIM_STATE ||
-                    radioRsp->rspInfo.error == RadioError::PASSWORD_INCORRECT ||
-                    radioRsp->rspInfo.error == RadioError::INTERNAL_ERR ||
-                    radioRsp->rspInfo.error == RadioError::SIM_ABSENT);
+        ASSERT_TRUE(CheckAnyOfErrors(
+            radioRsp->rspInfo.error,
+            {RadioError::NONE, RadioError::INVALID_ARGUMENTS, RadioError::INTERNAL_ERR,
+             RadioError::INVALID_SIM_STATE, RadioError::MODEM_ERR, RadioError::NO_MEMORY,
+             RadioError::PASSWORD_INCORRECT, RadioError::SIM_ABSENT, RadioError::SYSTEM_ERR}));
     }
 }
diff --git a/radio/1.0/vts/functional/radio_hidl_hal_ims.cpp b/radio/1.0/vts/functional/radio_hidl_hal_ims.cpp
index aa9d987..4574678 100644
--- a/radio/1.0/vts/functional/radio_hidl_hal_ims.cpp
+++ b/radio/1.0/vts/functional/radio_hidl_hal_ims.cpp
@@ -31,7 +31,8 @@
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(CheckGeneralError() || radioRsp->rspInfo.error == RadioError::MODEM_ERR);
+        ASSERT_TRUE(CheckAnyOfErrors(radioRsp->rspInfo.error, {RadioError::MODEM_ERR},
+                                     CHECK_GENERAL_ERROR));
     }
 }
 
@@ -70,9 +71,9 @@
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(CheckGeneralError() ||
-                    radioRsp->rspInfo.error == RadioError::INVALID_ARGUMENTS ||
-                    radioRsp->rspInfo.error == RadioError::MODEM_ERR);
+        ASSERT_TRUE(CheckAnyOfErrors(radioRsp->rspInfo.error,
+                                     {RadioError::INVALID_ARGUMENTS, RadioError::MODEM_ERR},
+                                     CHECK_GENERAL_ERROR));
     }
 }
 
@@ -94,9 +95,9 @@
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(CheckGeneralError() ||
-                    radioRsp->rspInfo.error == RadioError::INVALID_ARGUMENTS ||
-                    radioRsp->rspInfo.error == RadioError::MODEM_ERR);
+        ASSERT_TRUE(CheckAnyOfErrors(radioRsp->rspInfo.error,
+                                     {RadioError::INVALID_ARGUMENTS, RadioError::MODEM_ERR},
+                                     CHECK_GENERAL_ERROR));
     }
 }
 
@@ -116,11 +117,10 @@
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(CheckGeneralError() ||
-                    radioRsp->rspInfo.error == RadioError::INVALID_ARGUMENTS ||
-                    radioRsp->rspInfo.error == RadioError::NONE ||
-                    radioRsp->rspInfo.error == RadioError::MODEM_ERR ||
-                    radioRsp->rspInfo.error == RadioError::FDN_CHECK_FAILURE);
+        ASSERT_TRUE(CheckAnyOfErrors(radioRsp->rspInfo.error,
+                                     {RadioError::NONE, RadioError::FDN_CHECK_FAILURE,
+                                      RadioError::INVALID_ARGUMENTS, RadioError::MODEM_ERR},
+                                     CHECK_GENERAL_ERROR));
     }
 }
 
@@ -137,7 +137,8 @@
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(CheckGeneralError() || radioRsp->rspInfo.error == RadioError::MODEM_ERR);
+        ASSERT_TRUE(CheckAnyOfErrors(radioRsp->rspInfo.error, {RadioError::MODEM_ERR},
+                                     CHECK_GENERAL_ERROR));
     }
 }
 
@@ -155,8 +156,8 @@
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::NONE ||
-                    radioRsp->rspInfo.error == RadioError::SIM_ABSENT);
+        ASSERT_TRUE(
+            CheckAnyOfErrors(radioRsp->rspInfo.error, {RadioError::NONE, RadioError::SIM_ABSENT}));
     }
 }
 
@@ -174,7 +175,11 @@
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(CheckGeneralError() || radioRsp->rspInfo.error == RadioError::SIM_ABSENT);
+        ASSERT_TRUE(CheckAnyOfErrors(
+            radioRsp->rspInfo.error,
+            {RadioError::SIM_ABSENT, RadioError::INVALID_ARGUMENTS, RadioError::RADIO_NOT_AVAILABLE,
+             RadioError::NO_MEMORY, RadioError::SYSTEM_ERR, RadioError::REQUEST_NOT_SUPPORTED,
+             RadioError::CANCELLED}));
     }
 }
 
@@ -191,8 +196,9 @@
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(CheckGeneralError() || radioRsp->rspInfo.error == RadioError::NONE ||
-                    radioRsp->rspInfo.error == RadioError::MODEM_ERR ||
-                    radioRsp->rspInfo.error == RadioError::INVALID_MODEM_STATE);
+        ASSERT_TRUE(CheckAnyOfErrors(
+            radioRsp->rspInfo.error,
+            {RadioError::NONE, RadioError::MODEM_ERR, RadioError::INVALID_MODEM_STATE},
+            CHECK_GENERAL_ERROR));
     }
 }
diff --git a/radio/1.0/vts/functional/radio_hidl_hal_misc.cpp b/radio/1.0/vts/functional/radio_hidl_hal_misc.cpp
index f813532..cb0a730 100644
--- a/radio/1.0/vts/functional/radio_hidl_hal_misc.cpp
+++ b/radio/1.0/vts/functional/radio_hidl_hal_misc.cpp
@@ -28,7 +28,7 @@
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::NONE);
+        EXPECT_EQ(RadioError::NONE, radioRsp->rspInfo.error);
     }
 }
 
@@ -44,7 +44,7 @@
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::NONE);
+        EXPECT_EQ(RadioError::NONE, radioRsp->rspInfo.error);
     }
 }
 
@@ -60,7 +60,7 @@
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::NONE);
+        EXPECT_EQ(RadioError::NONE, radioRsp->rspInfo.error);
     }
 }
 
@@ -76,7 +76,7 @@
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::NONE);
+        EXPECT_EQ(RadioError::NONE, radioRsp->rspInfo.error);
     }
 }
 
@@ -92,7 +92,7 @@
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::NONE);
+        EXPECT_EQ(RadioError::NONE, radioRsp->rspInfo.error);
     }
 }
 
@@ -108,10 +108,10 @@
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(CheckGeneralError() ||
-                    radioRsp->rspInfo.error == RadioError::ILLEGAL_SIM_OR_ME ||
-                    radioRsp->rspInfo.error == RadioError::NONE ||
-                    radioRsp->rspInfo.error == RadioError::OPERATION_NOT_ALLOWED);
+        ASSERT_TRUE(CheckAnyOfErrors(
+            radioRsp->rspInfo.error,
+            {RadioError::NONE, RadioError::ILLEGAL_SIM_OR_ME, RadioError::OPERATION_NOT_ALLOWED},
+            CHECK_GENERAL_ERROR));
     }
 }
 
@@ -127,11 +127,10 @@
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(CheckGeneralError() ||
-                    radioRsp->rspInfo.error == RadioError::INVALID_ARGUMENTS ||
-                    radioRsp->rspInfo.error == RadioError::ILLEGAL_SIM_OR_ME ||
-                    radioRsp->rspInfo.error == RadioError::NONE ||
-                    radioRsp->rspInfo.error == RadioError::INVALID_STATE);
+        ASSERT_TRUE(CheckAnyOfErrors(radioRsp->rspInfo.error,
+                                     {RadioError::NONE, RadioError::ILLEGAL_SIM_OR_ME,
+                                      RadioError::INVALID_ARGUMENTS, RadioError::INVALID_STATE},
+                                     CHECK_GENERAL_ERROR));
     }
 }
 
@@ -142,17 +141,17 @@
     int serial = GetRandomSerialNumber();
 
     radio->getAvailableNetworks(serial);
-    EXPECT_EQ(std::cv_status::no_timeout, wait());
+    EXPECT_EQ(std::cv_status::no_timeout, wait(300));
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
     ASSERT_TRUE(radioRsp->rspInfo.type == RadioResponseType::SOLICITED ||
                 radioRsp->rspInfo.type == RadioResponseType::SOLICITED_ACK_EXP);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(CheckGeneralError() || radioRsp->rspInfo.error == RadioError::NONE ||
-                    radioRsp->rspInfo.error == RadioError::DEVICE_IN_USE ||
-                    radioRsp->rspInfo.error == RadioError::CANCELLED ||
-                    radioRsp->rspInfo.error == RadioError::OPERATION_NOT_ALLOWED ||
-                    radioRsp->rspInfo.error == RadioError::MODEM_ERR);
+        ASSERT_TRUE(
+            CheckAnyOfErrors(radioRsp->rspInfo.error,
+                             {RadioError::NONE, RadioError::CANCELLED, RadioError::DEVICE_IN_USE,
+                              RadioError::MODEM_ERR, RadioError::OPERATION_NOT_ALLOWED},
+                             CHECK_GENERAL_ERROR));
   }
 }
 
@@ -168,7 +167,7 @@
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::NONE);
+        EXPECT_EQ(RadioError::NONE, radioRsp->rspInfo.error);
     }
 }
 
@@ -184,7 +183,8 @@
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(CheckGeneralError() || radioRsp->rspInfo.error == RadioError::NONE);
+        ASSERT_TRUE(
+            CheckAnyOfErrors(radioRsp->rspInfo.error, {RadioError::NONE}, CHECK_GENERAL_ERROR));
     }
 }
 
@@ -200,7 +200,7 @@
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::NONE);
+        EXPECT_EQ(RadioError::NONE, radioRsp->rspInfo.error);
     }
 }
 
@@ -216,7 +216,8 @@
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(CheckGeneralError() || radioRsp->rspInfo.error == RadioError::NONE);
+        ASSERT_TRUE(
+            CheckAnyOfErrors(radioRsp->rspInfo.error, {RadioError::NONE}, CHECK_GENERAL_ERROR));
     }
 }
 
@@ -232,7 +233,7 @@
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::NONE);
+        EXPECT_EQ(RadioError::NONE, radioRsp->rspInfo.error);
     }
 }
 
@@ -248,8 +249,9 @@
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::NONE ||
-                    radioRsp->rspInfo.error == RadioError::SIM_ABSENT);
+        ASSERT_TRUE(CheckAnyOfErrors(radioRsp->rspInfo.error,
+                                     {RadioError::NONE, RadioError::SIM_ABSENT},
+                                     CHECK_GENERAL_ERROR));
     }
 }
 
@@ -265,8 +267,8 @@
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::NONE ||
-                    radioRsp->rspInfo.error == RadioError::SIM_ABSENT);
+        ASSERT_TRUE(
+            CheckAnyOfErrors(radioRsp->rspInfo.error, {RadioError::NONE, RadioError::SIM_ABSENT}));
     }
 }
 
@@ -282,9 +284,9 @@
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::NONE ||
-                    radioRsp->rspInfo.error == RadioError::REQUEST_NOT_SUPPORTED ||
-                    radioRsp->rspInfo.error == RadioError::SIM_ABSENT);
+        ASSERT_TRUE(CheckAnyOfErrors(
+            radioRsp->rspInfo.error,
+            {RadioError::NONE, RadioError::SIM_ABSENT, RadioError::REQUEST_NOT_SUPPORTED}));
     }
 }
 
@@ -300,9 +302,10 @@
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(CheckGeneralError() || radioRsp->rspInfo.error == RadioError::NONE ||
-                    radioRsp->rspInfo.error == RadioError::MODEM_ERR ||
-                    radioRsp->rspInfo.error == RadioError::SIM_ABSENT);
+        ASSERT_TRUE(
+            CheckAnyOfErrors(radioRsp->rspInfo.error,
+                             {RadioError::NONE, RadioError::SIM_ABSENT, RadioError::MODEM_ERR},
+                             CHECK_GENERAL_ERROR));
     }
 }
 
@@ -318,7 +321,7 @@
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::NONE);
+        EXPECT_EQ(RadioError::NONE, radioRsp->rspInfo.error);
     }
 }
 
@@ -334,7 +337,7 @@
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::NONE);
+        EXPECT_EQ(RadioError::NONE, radioRsp->rspInfo.error);
     }
 }
 
@@ -350,8 +353,8 @@
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::NONE ||
-                    radioRsp->rspInfo.error == RadioError::REQUEST_NOT_SUPPORTED);
+        ASSERT_TRUE(CheckAnyOfErrors(radioRsp->rspInfo.error,
+                                     {RadioError::NONE, RadioError::REQUEST_NOT_SUPPORTED}));
     }
 }
 
@@ -367,8 +370,8 @@
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::NONE ||
-                    radioRsp->rspInfo.error == RadioError::REQUEST_NOT_SUPPORTED);
+        ASSERT_TRUE(CheckAnyOfErrors(radioRsp->rspInfo.error,
+                                     {RadioError::NONE, RadioError::REQUEST_NOT_SUPPORTED}));
     }
 }
 
@@ -384,9 +387,9 @@
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::NONE ||
-                    radioRsp->rspInfo.error == RadioError::REQUEST_NOT_SUPPORTED ||
-                    radioRsp->rspInfo.error == RadioError::SIM_ABSENT);
+        ASSERT_TRUE(CheckAnyOfErrors(
+            radioRsp->rspInfo.error,
+            {RadioError::NONE, RadioError::REQUEST_NOT_SUPPORTED, RadioError::SIM_ABSENT}));
     }
 }
 
@@ -402,8 +405,8 @@
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::NONE ||
-                    radioRsp->rspInfo.error == RadioError::EMPTY_RECORD);
+        ASSERT_TRUE(CheckAnyOfErrors(radioRsp->rspInfo.error,
+                                     {RadioError::NONE, RadioError::EMPTY_RECORD}));
     }
 }
 
@@ -419,9 +422,9 @@
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::NONE ||
-                    radioRsp->rspInfo.error == RadioError::REQUEST_NOT_SUPPORTED ||
-                    radioRsp->rspInfo.error == RadioError::SIM_ABSENT);
+        ASSERT_TRUE(CheckAnyOfErrors(
+            radioRsp->rspInfo.error,
+            {RadioError::NONE, RadioError::REQUEST_NOT_SUPPORTED, RadioError::SIM_ABSENT}));
     }
 }
 
@@ -437,9 +440,9 @@
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::NONE ||
-                    radioRsp->rspInfo.error == RadioError::REQUEST_NOT_SUPPORTED ||
-                    radioRsp->rspInfo.error == RadioError::SIM_ABSENT);
+        ASSERT_TRUE(CheckAnyOfErrors(
+            radioRsp->rspInfo.error,
+            {RadioError::NONE, RadioError::REQUEST_NOT_SUPPORTED, RadioError::SIM_ABSENT}));
     }
 }
 
@@ -455,10 +458,10 @@
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        std::cout << static_cast<int>(radioRsp->rspInfo.error) << std::endl;
-        ASSERT_TRUE(CheckGeneralError() || radioRsp->rspInfo.error == RadioError::SIM_ABSENT ||
-                    radioRsp->rspInfo.error == RadioError::SUBSCRIPTION_NOT_AVAILABLE ||
-                    radioRsp->rspInfo.error == RadioError::NONE);
+        ASSERT_TRUE(CheckAnyOfErrors(
+            radioRsp->rspInfo.error,
+            {RadioError::NONE, RadioError::SIM_ABSENT, RadioError::SUBSCRIPTION_NOT_AVAILABLE},
+            CHECK_GENERAL_ERROR));
     }
 }
 
@@ -474,7 +477,7 @@
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::NONE);
+        EXPECT_EQ(RadioError::NONE, radioRsp->rspInfo.error);
     }
 }
 
@@ -490,8 +493,9 @@
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(CheckGeneralError() || radioRsp->rspInfo.error == RadioError::NONE ||
-                    radioRsp->rspInfo.error == RadioError::NO_NETWORK_FOUND);
+        ASSERT_TRUE(CheckAnyOfErrors(radioRsp->rspInfo.error,
+                                     {RadioError::NONE, RadioError::NO_NETWORK_FOUND},
+                                     CHECK_GENERAL_ERROR));
     }
 }
 
@@ -508,8 +512,8 @@
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::NONE ||
-                    radioRsp->rspInfo.error == RadioError::REQUEST_NOT_SUPPORTED);
+        ASSERT_TRUE(CheckAnyOfErrors(radioRsp->rspInfo.error,
+                                     {RadioError::NONE, RadioError::REQUEST_NOT_SUPPORTED}));
     }
 }
 
@@ -525,7 +529,8 @@
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(CheckGeneralError() || radioRsp->rspInfo.error == RadioError::NONE);
+        ASSERT_TRUE(
+            CheckAnyOfErrors(radioRsp->rspInfo.error, {RadioError::NONE}, CHECK_GENERAL_ERROR));
     }
 }
 
@@ -544,7 +549,8 @@
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(CheckGeneralError() || radioRsp->rspInfo.error == RadioError::NONE);
+        ASSERT_TRUE(
+            CheckAnyOfErrors(radioRsp->rspInfo.error, {RadioError::NONE}, CHECK_GENERAL_ERROR));
     }
 }
 
@@ -561,7 +567,8 @@
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(CheckGeneralError() || radioRsp->rspInfo.error == RadioError::NONE);
+        ASSERT_TRUE(
+            CheckAnyOfErrors(radioRsp->rspInfo.error, {RadioError::NONE}, CHECK_GENERAL_ERROR));
     }
 }
 
@@ -577,8 +584,8 @@
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::NONE ||
-                    radioRsp->rspInfo.error == RadioError::REQUEST_NOT_SUPPORTED);
+        ASSERT_TRUE(CheckAnyOfErrors(radioRsp->rspInfo.error,
+                                     {RadioError::NONE, RadioError::REQUEST_NOT_SUPPORTED}));
     }
 }
 
@@ -596,11 +603,11 @@
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(CheckGeneralError() ||
-                    radioRsp->rspInfo.error == RadioError::INVALID_ARGUMENTS ||
-                    radioRsp->rspInfo.error == RadioError::NONE ||
-                    radioRsp->rspInfo.error == RadioError::SUBSCRIPTION_NOT_SUPPORTED ||
-                    radioRsp->rspInfo.error == RadioError::MODEM_ERR);
+        ASSERT_TRUE(
+            CheckAnyOfErrors(radioRsp->rspInfo.error,
+                             {RadioError::NONE, RadioError::INVALID_ARGUMENTS,
+                              RadioError::MODEM_ERR, RadioError::SUBSCRIPTION_NOT_SUPPORTED},
+                             CHECK_GENERAL_ERROR));
     }
 }
 
@@ -616,7 +623,8 @@
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(CheckGeneralError() || radioRsp->rspInfo.error == RadioError::NONE);
+        ASSERT_TRUE(
+            CheckAnyOfErrors(radioRsp->rspInfo.error, {RadioError::NONE}, CHECK_GENERAL_ERROR));
     }
 }
 
@@ -632,7 +640,8 @@
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(CheckGeneralError() || radioRsp->rspInfo.error == RadioError::NONE);
+        ASSERT_TRUE(
+            CheckAnyOfErrors(radioRsp->rspInfo.error, {RadioError::NONE}, CHECK_GENERAL_ERROR));
     }
 }
 
@@ -648,7 +657,7 @@
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::NONE);
+        EXPECT_EQ(RadioError::NONE, radioRsp->rspInfo.error);
     }
 }
 
@@ -667,9 +676,9 @@
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(CheckGeneralError() ||
-                    radioRsp->rspInfo.error == RadioError::INVALID_ARGUMENTS ||
-                    radioRsp->rspInfo.error == RadioError::INVALID_STATE);
+        ASSERT_TRUE(CheckAnyOfErrors(radioRsp->rspInfo.error,
+                                     {RadioError::INVALID_ARGUMENTS, RadioError::INVALID_STATE},
+                                     CHECK_GENERAL_ERROR));
     }
 }
 
@@ -685,10 +694,9 @@
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::RADIO_NOT_AVAILABLE ||
-                    radioRsp->rspInfo.error == RadioError::LCE_NOT_SUPPORTED ||
-                    radioRsp->rspInfo.error == RadioError::INTERNAL_ERR ||
-                    radioRsp->rspInfo.error == RadioError::SIM_ABSENT);
+        ASSERT_TRUE(CheckAnyOfErrors(radioRsp->rspInfo.error,
+                                     {RadioError::INTERNAL_ERR, RadioError::LCE_NOT_SUPPORTED,
+                                      RadioError::RADIO_NOT_AVAILABLE, RadioError::SIM_ABSENT}));
     }
 }
 
@@ -704,10 +712,9 @@
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::NONE ||
-                    radioRsp->rspInfo.error == RadioError::LCE_NOT_SUPPORTED ||
-                    radioRsp->rspInfo.error == RadioError::REQUEST_NOT_SUPPORTED ||
-                    radioRsp->rspInfo.error == RadioError::SIM_ABSENT);
+        ASSERT_TRUE(CheckAnyOfErrors(radioRsp->rspInfo.error,
+                                     {RadioError::NONE, RadioError::LCE_NOT_SUPPORTED,
+                                      RadioError::REQUEST_NOT_SUPPORTED, RadioError::SIM_ABSENT}));
     }
 }
 
@@ -723,9 +730,10 @@
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::RADIO_NOT_AVAILABLE || CheckOEMError() ||
-                    radioRsp->rspInfo.error == RadioError::INTERNAL_ERR ||
-                    radioRsp->rspInfo.error == RadioError::NONE);
+        ASSERT_TRUE(CheckAnyOfErrors(
+            radioRsp->rspInfo.error,
+            {RadioError::NONE, RadioError::INTERNAL_ERR, RadioError::RADIO_NOT_AVAILABLE},
+            CHECK_OEM_ERROR));
     }
 }
 
@@ -741,8 +749,8 @@
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::NONE ||
-                    radioRsp->rspInfo.error == RadioError::REQUEST_NOT_SUPPORTED);
+        ASSERT_TRUE(CheckAnyOfErrors(radioRsp->rspInfo.error,
+                                     {RadioError::NONE, RadioError::REQUEST_NOT_SUPPORTED}));
     }
 }
 
@@ -766,8 +774,8 @@
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::NONE ||
-                    radioRsp->rspInfo.error == RadioError::REQUEST_NOT_SUPPORTED);
+        ASSERT_TRUE(CheckAnyOfErrors(radioRsp->rspInfo.error,
+                                     {RadioError::NONE, RadioError::REQUEST_NOT_SUPPORTED}));
     }
 
     /* Reset back to no carrier restriction */
@@ -781,8 +789,8 @@
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::NONE ||
-                    radioRsp->rspInfo.error == RadioError::REQUEST_NOT_SUPPORTED);
+        ASSERT_TRUE(CheckAnyOfErrors(radioRsp->rspInfo.error,
+                                     {RadioError::NONE, RadioError::REQUEST_NOT_SUPPORTED}));
     }
 }
 
@@ -798,8 +806,8 @@
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::NONE ||
-                    radioRsp->rspInfo.error == RadioError::REQUEST_NOT_SUPPORTED);
+        ASSERT_TRUE(CheckAnyOfErrors(radioRsp->rspInfo.error,
+                                     {RadioError::NONE, RadioError::REQUEST_NOT_SUPPORTED}));
     }
 }
 
@@ -817,8 +825,8 @@
     std::cout << static_cast<int>(radioRsp->rspInfo.error) << std::endl;
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::NONE ||
-                    radioRsp->rspInfo.error == RadioError::REQUEST_NOT_SUPPORTED);
+        ASSERT_TRUE(CheckAnyOfErrors(radioRsp->rspInfo.error,
+                                     {RadioError::NONE, RadioError::REQUEST_NOT_SUPPORTED}));
     }
 }
 
@@ -836,8 +844,8 @@
     std::cout << static_cast<int>(radioRsp->rspInfo.error) << std::endl;
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::NONE ||
-                    radioRsp->rspInfo.error == RadioError::REQUEST_NOT_SUPPORTED);
+        ASSERT_TRUE(CheckAnyOfErrors(radioRsp->rspInfo.error,
+                                     {RadioError::NONE, RadioError::REQUEST_NOT_SUPPORTED}));
     }
 }
 
@@ -853,7 +861,7 @@
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::NONE ||
-                    radioRsp->rspInfo.error == RadioError::REQUEST_NOT_SUPPORTED);
+        ASSERT_TRUE(CheckAnyOfErrors(radioRsp->rspInfo.error,
+                                     {RadioError::NONE, RadioError::REQUEST_NOT_SUPPORTED}));
     }
 }
diff --git a/radio/1.0/vts/functional/radio_hidl_hal_sms.cpp b/radio/1.0/vts/functional/radio_hidl_hal_sms.cpp
index 7d74703..469f03a 100644
--- a/radio/1.0/vts/functional/radio_hidl_hal_sms.cpp
+++ b/radio/1.0/vts/functional/radio_hidl_hal_sms.cpp
@@ -34,10 +34,10 @@
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(CheckGeneralError() ||
-                    radioRsp->rspInfo.error == RadioError::INVALID_ARGUMENTS ||
-                    radioRsp->rspInfo.error == RadioError::INVALID_STATE ||
-                    radioRsp->rspInfo.error == RadioError::SIM_ABSENT);
+        ASSERT_TRUE(CheckAnyOfErrors(
+            radioRsp->rspInfo.error,
+            {RadioError::INVALID_ARGUMENTS, RadioError::INVALID_STATE, RadioError::SIM_ABSENT},
+            CHECK_GENERAL_ERROR));
         EXPECT_EQ(0, radioRsp->sendSmsResult.errorCode);
     }
 }
@@ -61,10 +61,10 @@
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(CheckGeneralError() ||
-                    radioRsp->rspInfo.error == RadioError::INVALID_ARGUMENTS ||
-                    radioRsp->rspInfo.error == RadioError::INVALID_STATE ||
-                    radioRsp->rspInfo.error == RadioError::SIM_ABSENT);
+        ASSERT_TRUE(CheckAnyOfErrors(
+            radioRsp->rspInfo.error,
+            {RadioError::INVALID_ARGUMENTS, RadioError::INVALID_STATE, RadioError::SIM_ABSENT},
+            CHECK_GENERAL_ERROR));
     }
 }
 
@@ -83,9 +83,9 @@
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(CheckGeneralError() ||
-                    radioRsp->rspInfo.error == RadioError::INVALID_ARGUMENTS ||
-                    radioRsp->rspInfo.error == RadioError::INVALID_STATE);
+        ASSERT_TRUE(CheckAnyOfErrors(radioRsp->rspInfo.error,
+                                     {RadioError::INVALID_ARGUMENTS, RadioError::INVALID_STATE},
+                                     CHECK_GENERAL_ERROR));
     }
 }
 
@@ -145,10 +145,10 @@
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(CheckGeneralError() ||
-                    radioRsp->rspInfo.error == RadioError::INVALID_ARGUMENTS ||
-                    radioRsp->rspInfo.error == RadioError::INVALID_STATE ||
-                    radioRsp->rspInfo.error == RadioError::SIM_ABSENT);
+        ASSERT_TRUE(CheckAnyOfErrors(
+            radioRsp->rspInfo.error,
+            {RadioError::INVALID_ARGUMENTS, RadioError::INVALID_STATE, RadioError::SIM_ABSENT},
+            CHECK_GENERAL_ERROR));
     }
 }
 
@@ -170,9 +170,9 @@
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(CheckGeneralError() ||
-                    radioRsp->rspInfo.error == RadioError::INVALID_ARGUMENTS ||
-                    radioRsp->rspInfo.error == RadioError::NO_SMS_TO_ACK);
+        ASSERT_TRUE(CheckAnyOfErrors(radioRsp->rspInfo.error,
+                                     {RadioError::INVALID_ARGUMENTS, RadioError::NO_SMS_TO_ACK},
+                                     CHECK_GENERAL_ERROR));
     }
 }
 
@@ -221,8 +221,8 @@
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(CheckGeneralError() ||
-                    radioRsp->rspInfo.error == RadioError::INVALID_ARGUMENTS);
+        ASSERT_TRUE(CheckAnyOfErrors(radioRsp->rspInfo.error, {RadioError::INVALID_ARGUMENTS},
+                                     CHECK_GENERAL_ERROR));
     }
 }
 
@@ -239,9 +239,10 @@
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(CheckGeneralError() || radioRsp->rspInfo.error == RadioError::INVALID_STATE ||
-                    radioRsp->rspInfo.error == RadioError::INVALID_MODEM_STATE ||
-                    radioRsp->rspInfo.error == RadioError::SIM_ABSENT);
+        ASSERT_TRUE(CheckAnyOfErrors(
+            radioRsp->rspInfo.error,
+            {RadioError::INVALID_MODEM_STATE, RadioError::INVALID_STATE, RadioError::SIM_ABSENT},
+            CHECK_GENERAL_ERROR));
     }
 }
 
@@ -259,10 +260,10 @@
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(CheckGeneralError() ||
-                    radioRsp->rspInfo.error == RadioError::INVALID_ARGUMENTS ||
-                    radioRsp->rspInfo.error == RadioError::INVALID_SMS_FORMAT ||
-                    radioRsp->rspInfo.error == RadioError::SIM_ABSENT);
+        ASSERT_TRUE(CheckAnyOfErrors(
+            radioRsp->rspInfo.error,
+            {RadioError::INVALID_ARGUMENTS, RadioError::INVALID_SMS_FORMAT, RadioError::SIM_ABSENT},
+            CHECK_GENERAL_ERROR));
     }
 }
 
@@ -283,15 +284,12 @@
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(CheckGeneralError() ||
-                    radioRsp->rspInfo.error == RadioError::INVALID_ARGUMENTS ||
-                    radioRsp->rspInfo.error == RadioError::NONE ||
-                    radioRsp->rspInfo.error == RadioError::MODEM_ERR ||
-                    radioRsp->rspInfo.error == RadioError::ENCODING_ERR ||
-                    radioRsp->rspInfo.error == RadioError::NO_RESOURCES ||
-                    radioRsp->rspInfo.error == RadioError::NETWORK_NOT_READY ||
-                    radioRsp->rspInfo.error == RadioError::INVALID_SMSC_ADDRESS ||
-                    radioRsp->rspInfo.error == RadioError::SIM_ABSENT);
+        ASSERT_TRUE(CheckAnyOfErrors(
+            radioRsp->rspInfo.error,
+            {RadioError::NONE, RadioError::ENCODING_ERR, RadioError::INVALID_ARGUMENTS,
+             RadioError::INVALID_SMSC_ADDRESS, RadioError::MODEM_ERR, RadioError::NETWORK_NOT_READY,
+             RadioError::NO_RESOURCES, RadioError::SIM_ABSENT},
+            CHECK_GENERAL_ERROR));
     }
 }
 
@@ -309,13 +307,12 @@
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(CheckGeneralError() ||
-                    radioRsp->rspInfo.error == RadioError::INVALID_ARGUMENTS ||
-                    radioRsp->rspInfo.error == RadioError::NONE ||
-                    radioRsp->rspInfo.error == RadioError::MODEM_ERR ||
-                    radioRsp->rspInfo.error == RadioError::NO_SUCH_ENTRY ||
-                    radioRsp->rspInfo.error == RadioError::INVALID_MODEM_STATE ||
-                    radioRsp->rspInfo.error == RadioError::SIM_ABSENT);
+        ASSERT_TRUE(CheckAnyOfErrors(
+            radioRsp->rspInfo.error,
+            {RadioError::NONE, RadioError::ENCODING_ERR, RadioError::INVALID_ARGUMENTS,
+             RadioError::INVALID_MODEM_STATE, RadioError::NO_SUCH_ENTRY, RadioError::MODEM_ERR,
+             RadioError::SIM_ABSENT},
+            CHECK_GENERAL_ERROR));
     }
 }
 
@@ -361,15 +358,12 @@
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(CheckGeneralError() ||
-                    radioRsp->rspInfo.error == RadioError::INVALID_ARGUMENTS ||
-                    radioRsp->rspInfo.error == RadioError::INVALID_STATE ||
-                    radioRsp->rspInfo.error == RadioError::INVALID_SMS_FORMAT ||
-                    radioRsp->rspInfo.error == RadioError::NONE ||
-                    radioRsp->rspInfo.error == RadioError::MODEM_ERR ||
-                    radioRsp->rspInfo.error == RadioError::NO_SUCH_ENTRY ||
-                    radioRsp->rspInfo.error == RadioError::INVALID_SMSC_ADDRESS ||
-                    radioRsp->rspInfo.error == RadioError::SIM_ABSENT);
+        ASSERT_TRUE(CheckAnyOfErrors(
+            radioRsp->rspInfo.error,
+            {RadioError::NONE, RadioError::INVALID_ARGUMENTS, RadioError::INVALID_SMS_FORMAT,
+             RadioError::INVALID_SMSC_ADDRESS, RadioError::INVALID_STATE, RadioError::MODEM_ERR,
+             RadioError::NO_SUCH_ENTRY, RadioError::SIM_ABSENT},
+            CHECK_GENERAL_ERROR));
     }
 }
 
@@ -416,13 +410,11 @@
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(CheckGeneralError() ||
-                    radioRsp->rspInfo.error == RadioError::INVALID_ARGUMENTS ||
-                    radioRsp->rspInfo.error == RadioError::NONE ||
-                    radioRsp->rspInfo.error == RadioError::MODEM_ERR ||
-                    radioRsp->rspInfo.error == RadioError::NO_SUCH_ENTRY ||
-                    radioRsp->rspInfo.error == RadioError::INVALID_MODEM_STATE ||
-                    radioRsp->rspInfo.error == RadioError::SIM_ABSENT);
+        ASSERT_TRUE(CheckAnyOfErrors(
+            radioRsp->rspInfo.error,
+            {RadioError::NONE, RadioError::INVALID_ARGUMENTS, RadioError::INVALID_MODEM_STATE,
+             RadioError::MODEM_ERR, RadioError::NO_SUCH_ENTRY, RadioError::SIM_ABSENT},
+            CHECK_GENERAL_ERROR));
     }
 }
 
@@ -440,10 +432,9 @@
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(CheckGeneralError() ||
-                    radioRsp->rspInfo.error == RadioError::INVALID_ARGUMENTS ||
-                    radioRsp->rspInfo.error == RadioError::INVALID_STATE ||
-                    radioRsp->rspInfo.error == RadioError::MODEM_ERR ||
-                    radioRsp->rspInfo.error == RadioError::SIM_ABSENT);
+        ASSERT_TRUE(CheckAnyOfErrors(radioRsp->rspInfo.error,
+                                     {RadioError::INVALID_ARGUMENTS, RadioError::INVALID_STATE,
+                                      RadioError::MODEM_ERR, RadioError::SIM_ABSENT},
+                                     CHECK_GENERAL_ERROR));
     }
 }
diff --git a/radio/1.0/vts/functional/radio_hidl_hal_stk.cpp b/radio/1.0/vts/functional/radio_hidl_hal_stk.cpp
index 611867a..411d74c 100644
--- a/radio/1.0/vts/functional/radio_hidl_hal_stk.cpp
+++ b/radio/1.0/vts/functional/radio_hidl_hal_stk.cpp
@@ -34,12 +34,10 @@
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        std::cout << static_cast<int>(radioRsp->rspInfo.error) << std::endl;
-        ASSERT_TRUE(CheckGeneralError() ||
-                    radioRsp->rspInfo.error == RadioError::INVALID_ARGUMENTS ||
-                    radioRsp->rspInfo.error == RadioError::NONE ||
-                    radioRsp->rspInfo.error == RadioError::MODEM_ERR ||
-                    radioRsp->rspInfo.error == RadioError::SIM_ABSENT);
+        ASSERT_TRUE(CheckAnyOfErrors(radioRsp->rspInfo.error,
+                                     {RadioError::NONE, RadioError::INVALID_ARGUMENTS,
+                                      RadioError::MODEM_ERR, RadioError::SIM_ABSENT},
+                                     CHECK_GENERAL_ERROR));
     }
 }
 
@@ -59,11 +57,10 @@
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        std::cout << static_cast<int>(radioRsp->rspInfo.error) << std::endl;
-        ASSERT_TRUE(CheckGeneralError() ||
-                    radioRsp->rspInfo.error == RadioError::INVALID_ARGUMENTS ||
-                    radioRsp->rspInfo.error == RadioError::NONE ||
-                    radioRsp->rspInfo.error == RadioError::SIM_ABSENT);
+        ASSERT_TRUE(CheckAnyOfErrors(
+            radioRsp->rspInfo.error,
+            {RadioError::NONE, RadioError::INVALID_ARGUMENTS, RadioError::SIM_ABSENT},
+            CHECK_GENERAL_ERROR));
     }
 }
 
@@ -81,10 +78,10 @@
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(CheckGeneralError() || radioRsp->rspInfo.error == RadioError::NONE ||
-                    radioRsp->rspInfo.error == RadioError::MODEM_ERR ||
-                    radioRsp->rspInfo.error == RadioError::INVALID_ARGUMENTS ||
-                    radioRsp->rspInfo.error == RadioError::SIM_ABSENT);
+        ASSERT_TRUE(CheckAnyOfErrors(radioRsp->rspInfo.error,
+                                     {RadioError::NONE, RadioError::INVALID_ARGUMENTS,
+                                      RadioError::MODEM_ERR, RadioError::SIM_ABSENT},
+                                     CHECK_GENERAL_ERROR));
     }
 }
 
@@ -101,7 +98,8 @@
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(CheckGeneralError() || radioRsp->rspInfo.error == RadioError::NONE);
+        ASSERT_TRUE(
+            CheckAnyOfErrors(radioRsp->rspInfo.error, {RadioError::NONE}, CHECK_GENERAL_ERROR));
     }
 }
 
@@ -122,9 +120,9 @@
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(CheckGeneralError() ||
-                    radioRsp->rspInfo.error == RadioError::INVALID_ARGUMENTS ||
-                    radioRsp->rspInfo.error == RadioError::MODEM_ERR ||
-                    radioRsp->rspInfo.error == RadioError::SIM_ABSENT);
+        ASSERT_TRUE(CheckAnyOfErrors(
+            radioRsp->rspInfo.error,
+            {RadioError::INVALID_ARGUMENTS, RadioError::MODEM_ERR, RadioError::SIM_ABSENT},
+            CHECK_GENERAL_ERROR));
     }
 }
diff --git a/radio/1.0/vts/functional/radio_hidl_hal_test.cpp b/radio/1.0/vts/functional/radio_hidl_hal_test.cpp
index ed2c6bb..27d19cb 100644
--- a/radio/1.0/vts/functional/radio_hidl_hal_test.cpp
+++ b/radio/1.0/vts/functional/radio_hidl_hal_test.cpp
@@ -51,31 +51,17 @@
     cv.notify_one();
 }
 
-std::cv_status RadioHidlTest::wait() {
+std::cv_status RadioHidlTest::wait(int sec) {
     std::unique_lock<std::mutex> lock(mtx);
 
     std::cv_status status = std::cv_status::no_timeout;
     auto now = std::chrono::system_clock::now();
     while (count == 0) {
-        status = cv.wait_until(lock, now + std::chrono::seconds(TIMEOUT_PERIOD));
+        status = cv.wait_until(lock, now + std::chrono::seconds(sec));
         if (status == std::cv_status::timeout) {
             return status;
         }
     }
     count--;
     return status;
-}
-
-bool RadioHidlTest::CheckGeneralError() {
-    return (radioRsp->rspInfo.error == RadioError::RADIO_NOT_AVAILABLE ||
-            radioRsp->rspInfo.error == RadioError::NO_MEMORY ||
-            radioRsp->rspInfo.error == RadioError::INTERNAL_ERR ||
-            radioRsp->rspInfo.error == RadioError::SYSTEM_ERR ||
-            radioRsp->rspInfo.error == RadioError::REQUEST_NOT_SUPPORTED ||
-            radioRsp->rspInfo.error == RadioError::CANCELLED);
-}
-
-bool RadioHidlTest::CheckOEMError() {
-    return (radioRsp->rspInfo.error >= RadioError::OEM_ERROR_1 &&
-            radioRsp->rspInfo.error <= RadioError::OEM_ERROR_25);
-}
+}
\ No newline at end of file
diff --git a/radio/1.0/vts/functional/radio_hidl_hal_utils_v1_0.h b/radio/1.0/vts/functional/radio_hidl_hal_utils_v1_0.h
index b60887c..a5e8701 100644
--- a/radio/1.0/vts/functional/radio_hidl_hal_utils_v1_0.h
+++ b/radio/1.0/vts/functional/radio_hidl_hal_utils_v1_0.h
@@ -527,15 +527,9 @@
     void notify();
 
     /* Test code calls this function to wait for response */
-    std::cv_status wait();
-
-    /* Used for checking General Errors */
-    bool CheckGeneralError();
-
-    /* Used for checking OEM Errors */
-    bool CheckOEMError();
+    std::cv_status wait(int sec = TIMEOUT_PERIOD);
 
     sp<IRadio> radio;
     sp<RadioResponse> radioRsp;
     sp<RadioIndication> radioInd;
-};
\ No newline at end of file
+};
diff --git a/radio/1.0/vts/functional/radio_hidl_hal_voice.cpp b/radio/1.0/vts/functional/radio_hidl_hal_voice.cpp
index 1d2f199..b3d5648 100644
--- a/radio/1.0/vts/functional/radio_hidl_hal_voice.cpp
+++ b/radio/1.0/vts/functional/radio_hidl_hal_voice.cpp
@@ -28,7 +28,7 @@
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::NONE);
+        EXPECT_EQ(RadioError::NONE, radioRsp->rspInfo.error);
     }
 }
 
@@ -48,18 +48,14 @@
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(CheckGeneralError() ||
-                    radioRsp->rspInfo.error == RadioError::INVALID_ARGUMENTS ||
-                    radioRsp->rspInfo.error == RadioError::INVALID_STATE ||
-                    radioRsp->rspInfo.error == RadioError::MODEM_ERR ||
-                    radioRsp->rspInfo.error == RadioError::FDN_CHECK_FAILURE ||
-                    radioRsp->rspInfo.error == RadioError::NO_SUBSCRIPTION ||
-                    radioRsp->rspInfo.error == RadioError::NO_NETWORK_FOUND ||
-                    radioRsp->rspInfo.error == RadioError::INVALID_CALL_ID ||
-                    radioRsp->rspInfo.error == RadioError::DEVICE_IN_USE ||
-                    radioRsp->rspInfo.error == RadioError::OPERATION_NOT_ALLOWED ||
-                    radioRsp->rspInfo.error == RadioError::INVALID_MODEM_STATE ||
-                    radioRsp->rspInfo.error == RadioError::CANCELLED);
+        ASSERT_TRUE(CheckAnyOfErrors(
+            radioRsp->rspInfo.error,
+            {RadioError::CANCELLED, RadioError::DEVICE_IN_USE, RadioError::FDN_CHECK_FAILURE,
+             RadioError::INVALID_ARGUMENTS, RadioError::INVALID_CALL_ID,
+             RadioError::INVALID_MODEM_STATE, RadioError::INVALID_STATE, RadioError::MODEM_ERR,
+             RadioError::NO_NETWORK_FOUND, RadioError::NO_SUBSCRIPTION,
+             RadioError::OPERATION_NOT_ALLOWED},
+            CHECK_GENERAL_ERROR));
     }
 }
 
@@ -75,10 +71,10 @@
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(CheckGeneralError() ||
-                    radioRsp->rspInfo.error == RadioError::INVALID_ARGUMENTS ||
-                    radioRsp->rspInfo.error == RadioError::INVALID_STATE ||
-                    radioRsp->rspInfo.error == RadioError::MODEM_ERR);
+        ASSERT_TRUE(CheckAnyOfErrors(
+            radioRsp->rspInfo.error,
+            {RadioError::INVALID_ARGUMENTS, RadioError::INVALID_STATE, RadioError::MODEM_ERR},
+            CHECK_GENERAL_ERROR));
     }
 }
 
@@ -94,8 +90,9 @@
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(CheckGeneralError() || radioRsp->rspInfo.error == RadioError::INVALID_STATE ||
-                    radioRsp->rspInfo.error == RadioError::MODEM_ERR);
+        ASSERT_TRUE(CheckAnyOfErrors(radioRsp->rspInfo.error,
+                                     {RadioError::INVALID_STATE, RadioError::MODEM_ERR},
+                                     CHECK_GENERAL_ERROR));
     }
 }
 
@@ -111,8 +108,9 @@
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(CheckGeneralError() || radioRsp->rspInfo.error == RadioError::INVALID_STATE ||
-                    radioRsp->rspInfo.error == RadioError::MODEM_ERR);
+        ASSERT_TRUE(CheckAnyOfErrors(radioRsp->rspInfo.error,
+                                     {RadioError::INVALID_STATE, RadioError::MODEM_ERR},
+                                     CHECK_GENERAL_ERROR));
     }
 }
 
@@ -128,8 +126,9 @@
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(CheckGeneralError() || radioRsp->rspInfo.error == RadioError::INVALID_STATE ||
-                    radioRsp->rspInfo.error == RadioError::MODEM_ERR);
+        ASSERT_TRUE(CheckAnyOfErrors(radioRsp->rspInfo.error,
+                                     {RadioError::INVALID_STATE, RadioError::MODEM_ERR},
+                                     CHECK_GENERAL_ERROR));
     }
 }
 
@@ -145,8 +144,9 @@
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(CheckGeneralError() || radioRsp->rspInfo.error == RadioError::INVALID_STATE ||
-                    radioRsp->rspInfo.error == RadioError::MODEM_ERR);
+        ASSERT_TRUE(CheckAnyOfErrors(radioRsp->rspInfo.error,
+                                     {RadioError::INVALID_STATE, RadioError::MODEM_ERR},
+                                     CHECK_GENERAL_ERROR));
     }
 }
 
@@ -162,8 +162,9 @@
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(CheckGeneralError() || radioRsp->rspInfo.error == RadioError::INVALID_STATE ||
-                    radioRsp->rspInfo.error == RadioError::MODEM_ERR);
+        ASSERT_TRUE(CheckAnyOfErrors(radioRsp->rspInfo.error,
+                                     {RadioError::INVALID_STATE, RadioError::MODEM_ERR},
+                                     CHECK_GENERAL_ERROR));
     }
 }
 
@@ -179,7 +180,8 @@
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(CheckGeneralError() || radioRsp->rspInfo.error == RadioError::NONE);
+        ASSERT_TRUE(
+            CheckAnyOfErrors(radioRsp->rspInfo.error, {RadioError::NONE}, CHECK_GENERAL_ERROR));
     }
 }
 
@@ -194,10 +196,10 @@
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(CheckGeneralError() ||
-                    radioRsp->rspInfo.error == RadioError::INVALID_ARGUMENTS ||
-                    radioRsp->rspInfo.error == RadioError::INVALID_STATE ||
-                    radioRsp->rspInfo.error == RadioError::MODEM_ERR);
+        ASSERT_TRUE(CheckAnyOfErrors(
+            radioRsp->rspInfo.error,
+            {RadioError::INVALID_ARGUMENTS, RadioError::INVALID_STATE, RadioError::MODEM_ERR},
+            CHECK_GENERAL_ERROR));
     }
 }
 
@@ -213,9 +215,10 @@
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(CheckGeneralError() || radioRsp->rspInfo.error == RadioError::INVALID_STATE ||
-                    radioRsp->rspInfo.error == RadioError::MODEM_ERR ||
-                    radioRsp->rspInfo.error == RadioError::NONE);
+        ASSERT_TRUE(
+            CheckAnyOfErrors(radioRsp->rspInfo.error,
+                             {RadioError::NONE, RadioError::INVALID_STATE, RadioError::MODEM_ERR},
+                             CHECK_GENERAL_ERROR));
     }
 }
 
@@ -234,10 +237,10 @@
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(CheckGeneralError() ||
-                    radioRsp->rspInfo.error == RadioError::INVALID_ARGUMENTS ||
-                    radioRsp->rspInfo.error == RadioError::INVALID_STATE ||
-                    radioRsp->rspInfo.error == RadioError::MODEM_ERR);
+        ASSERT_TRUE(CheckAnyOfErrors(
+            radioRsp->rspInfo.error,
+            {RadioError::INVALID_ARGUMENTS, RadioError::INVALID_STATE, RadioError::MODEM_ERR},
+            CHECK_GENERAL_ERROR));
     }
 }
 
@@ -256,10 +259,10 @@
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(CheckGeneralError() ||
-                    radioRsp->rspInfo.error == RadioError::INVALID_ARGUMENTS ||
-                    radioRsp->rspInfo.error == RadioError::INVALID_STATE ||
-                    radioRsp->rspInfo.error == RadioError::MODEM_ERR);
+        ASSERT_TRUE(CheckAnyOfErrors(
+            radioRsp->rspInfo.error,
+            {RadioError::INVALID_ARGUMENTS, RadioError::INVALID_STATE, RadioError::MODEM_ERR},
+            CHECK_GENERAL_ERROR));
     }
 }
 
@@ -275,10 +278,10 @@
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(CheckGeneralError() ||
-                    radioRsp->rspInfo.error == RadioError::INVALID_ARGUMENTS ||
-                    radioRsp->rspInfo.error == RadioError::NONE ||
-                    radioRsp->rspInfo.error == RadioError::MODEM_ERR);
+        ASSERT_TRUE(CheckAnyOfErrors(
+            radioRsp->rspInfo.error,
+            {RadioError::NONE, RadioError::INVALID_ARGUMENTS, RadioError::MODEM_ERR},
+            CHECK_GENERAL_ERROR));
     }
 }
 
@@ -294,10 +297,10 @@
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(CheckGeneralError() ||
-                    radioRsp->rspInfo.error == RadioError::INVALID_ARGUMENTS ||
-                    radioRsp->rspInfo.error == RadioError::INVALID_STATE ||
-                    radioRsp->rspInfo.error == RadioError::MODEM_ERR);
+        ASSERT_TRUE(CheckAnyOfErrors(
+            radioRsp->rspInfo.error,
+            {RadioError::INVALID_ARGUMENTS, RadioError::INVALID_STATE, RadioError::MODEM_ERR},
+            CHECK_GENERAL_ERROR));
     }
 }
 
@@ -313,8 +316,9 @@
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(CheckGeneralError() || radioRsp->rspInfo.error == RadioError::INVALID_STATE ||
-                    radioRsp->rspInfo.error == RadioError::MODEM_ERR);
+        ASSERT_TRUE(CheckAnyOfErrors(radioRsp->rspInfo.error,
+                                     {RadioError::INVALID_STATE, RadioError::MODEM_ERR},
+                                     CHECK_GENERAL_ERROR));
     }
 }
 
@@ -330,10 +334,10 @@
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(CheckGeneralError() ||
-                    radioRsp->rspInfo.error == RadioError::INVALID_ARGUMENTS ||
-                    radioRsp->rspInfo.error == RadioError::INVALID_STATE ||
-                    radioRsp->rspInfo.error == RadioError::MODEM_ERR);
+        ASSERT_TRUE(CheckAnyOfErrors(
+            radioRsp->rspInfo.error,
+            {RadioError::INVALID_ARGUMENTS, RadioError::INVALID_STATE, RadioError::MODEM_ERR},
+            CHECK_GENERAL_ERROR));
     }
 }
 
@@ -349,8 +353,9 @@
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(CheckGeneralError() || radioRsp->rspInfo.error == RadioError::INVALID_STATE ||
-                    radioRsp->rspInfo.error == RadioError::MODEM_ERR);
+        ASSERT_TRUE(CheckAnyOfErrors(radioRsp->rspInfo.error,
+                                     {RadioError::INVALID_STATE, RadioError::MODEM_ERR},
+                                     CHECK_GENERAL_ERROR));
     }
 }
 
@@ -366,14 +371,11 @@
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        std::cout << static_cast<int>(radioRsp->rspInfo.error) << std::endl;
-        ASSERT_TRUE(CheckGeneralError() ||
-                    radioRsp->rspInfo.error == RadioError::INVALID_ARGUMENTS ||
-                    radioRsp->rspInfo.error == RadioError::NONE ||
-                    radioRsp->rspInfo.error == RadioError::INVALID_CALL_ID ||
-                    radioRsp->rspInfo.error == RadioError::INVALID_MODEM_STATE ||
-                    radioRsp->rspInfo.error == RadioError::MODEM_ERR ||
-                    radioRsp->rspInfo.error == RadioError::OPERATION_NOT_ALLOWED);
+        ASSERT_TRUE(CheckAnyOfErrors(radioRsp->rspInfo.error,
+                                     {RadioError::NONE, RadioError::INVALID_ARGUMENTS,
+                                      RadioError::INVALID_CALL_ID, RadioError::INVALID_MODEM_STATE,
+                                      RadioError::MODEM_ERR, RadioError::OPERATION_NOT_ALLOWED},
+                                     CHECK_GENERAL_ERROR));
     }
 }
 
@@ -389,12 +391,11 @@
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(CheckGeneralError() ||
-                    radioRsp->rspInfo.error == RadioError::INVALID_ARGUMENTS ||
-                    radioRsp->rspInfo.error == RadioError::NONE ||
-                    radioRsp->rspInfo.error == RadioError::INVALID_CALL_ID ||
-                    radioRsp->rspInfo.error == RadioError::MODEM_ERR ||
-                    radioRsp->rspInfo.error == RadioError::INVALID_MODEM_STATE);
+        ASSERT_TRUE(CheckAnyOfErrors(
+            radioRsp->rspInfo.error,
+            {RadioError::NONE, RadioError::INVALID_ARGUMENTS, RadioError::INVALID_CALL_ID,
+             RadioError::INVALID_MODEM_STATE, RadioError::MODEM_ERR},
+            CHECK_GENERAL_ERROR));
     }
 }
 
@@ -410,12 +411,11 @@
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(CheckGeneralError() ||
-                    radioRsp->rspInfo.error == RadioError::INVALID_ARGUMENTS ||
-                    radioRsp->rspInfo.error == RadioError::NONE ||
-                    radioRsp->rspInfo.error == RadioError::INVALID_CALL_ID ||
-                    radioRsp->rspInfo.error == RadioError::MODEM_ERR ||
-                    radioRsp->rspInfo.error == RadioError::INVALID_MODEM_STATE);
+        ASSERT_TRUE(CheckAnyOfErrors(
+            radioRsp->rspInfo.error,
+            {RadioError::NONE, RadioError::INVALID_ARGUMENTS, RadioError::INVALID_CALL_ID,
+             RadioError::INVALID_MODEM_STATE, RadioError::MODEM_ERR},
+            CHECK_GENERAL_ERROR));
     }
 }
 
@@ -431,10 +431,10 @@
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(CheckGeneralError() || radioRsp->rspInfo.error == RadioError::NONE ||
-                    radioRsp->rspInfo.error == RadioError::INVALID_CALL_ID ||
-                    radioRsp->rspInfo.error == RadioError::MODEM_ERR ||
-                    radioRsp->rspInfo.error == RadioError::INVALID_MODEM_STATE);
+        ASSERT_TRUE(CheckAnyOfErrors(radioRsp->rspInfo.error,
+                                     {RadioError::NONE, RadioError::INVALID_CALL_ID,
+                                      RadioError::INVALID_MODEM_STATE, RadioError::MODEM_ERR},
+                                     CHECK_GENERAL_ERROR));
     }
 }
 
@@ -450,9 +450,9 @@
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(CheckGeneralError() ||
-                    radioRsp->rspInfo.error == RadioError::INVALID_ARGUMENTS ||
-                    radioRsp->rspInfo.error == RadioError::NONE);
+        ASSERT_TRUE(CheckAnyOfErrors(radioRsp->rspInfo.error,
+                                     {RadioError::NONE, RadioError::INVALID_ARGUMENTS},
+                                     CHECK_GENERAL_ERROR));
     }
 }
 
@@ -468,7 +468,7 @@
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::NONE);
+        EXPECT_EQ(RadioError::NONE, radioRsp->rspInfo.error);
     }
 }
 
@@ -484,10 +484,9 @@
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(CheckGeneralError() ||
-                    radioRsp->rspInfo.error == RadioError::INVALID_ARGUMENTS ||
-                    radioRsp->rspInfo.error == RadioError::INVALID_STATE ||
-                    radioRsp->rspInfo.error == RadioError::MODEM_ERR ||
-                    radioRsp->rspInfo.error == RadioError::OPERATION_NOT_ALLOWED);
+        ASSERT_TRUE(CheckAnyOfErrors(radioRsp->rspInfo.error,
+                                     {RadioError::INVALID_ARGUMENTS, RadioError::INVALID_STATE,
+                                      RadioError::MODEM_ERR, RadioError::OPERATION_NOT_ALLOWED},
+                                     CHECK_GENERAL_ERROR));
     }
 }
\ No newline at end of file
diff --git a/radio/1.0/vts/functional/sap_hidl_hal_api.cpp b/radio/1.0/vts/functional/sap_hidl_hal_api.cpp
index bb61487..d0788dd 100644
--- a/radio/1.0/vts/functional/sap_hidl_hal_api.cpp
+++ b/radio/1.0/vts/functional/sap_hidl_hal_api.cpp
@@ -51,10 +51,10 @@
     EXPECT_EQ(std::cv_status::no_timeout, wait());
     EXPECT_EQ(sapCb->sapResponseToken, token);
 
-    ASSERT_TRUE(SapResultCode::GENERIC_FAILURE == sapCb->sapResultCode ||
-                SapResultCode::CARD_NOT_ACCESSSIBLE == sapCb->sapResultCode ||
-                SapResultCode::CARD_ALREADY_POWERED_OFF == sapCb->sapResultCode ||
-                SapResultCode::CARD_REMOVED == sapCb->sapResultCode);
+    ASSERT_TRUE(
+        CheckAnyOfErrors(sapCb->sapResultCode,
+                         {SapResultCode::GENERIC_FAILURE, SapResultCode::CARD_ALREADY_POWERED_OFF,
+                          SapResultCode::CARD_NOT_ACCESSSIBLE, SapResultCode::CARD_REMOVED}));
 }
 
 /*
@@ -67,10 +67,10 @@
     EXPECT_EQ(std::cv_status::no_timeout, wait());
     EXPECT_EQ(sapCb->sapResponseToken, token);
 
-    ASSERT_TRUE(SapResultCode::GENERIC_FAILURE == sapCb->sapResultCode ||
-                SapResultCode::DATA_NOT_AVAILABLE == sapCb->sapResultCode ||
-                SapResultCode::CARD_ALREADY_POWERED_OFF == sapCb->sapResultCode ||
-                SapResultCode::CARD_REMOVED == sapCb->sapResultCode);
+    ASSERT_TRUE(
+        CheckAnyOfErrors(sapCb->sapResultCode,
+                         {SapResultCode::GENERIC_FAILURE, SapResultCode::DATA_NOT_AVAILABLE,
+                          SapResultCode::CARD_ALREADY_POWERED_OFF, SapResultCode::CARD_REMOVED}));
 }
 
 /*
@@ -84,11 +84,10 @@
     EXPECT_EQ(std::cv_status::no_timeout, wait());
     EXPECT_EQ(sapCb->sapResponseToken, token);
 
-    ASSERT_TRUE(SapResultCode::GENERIC_FAILURE == sapCb->sapResultCode ||
-                SapResultCode::CARD_NOT_ACCESSSIBLE == sapCb->sapResultCode ||
-                SapResultCode::CARD_ALREADY_POWERED_OFF == sapCb->sapResultCode ||
-                SapResultCode::CARD_REMOVED == sapCb->sapResultCode ||
-                SapResultCode::CARD_ALREADY_POWERED_ON == sapCb->sapResultCode);
+    ASSERT_TRUE(CheckAnyOfErrors(
+        sapCb->sapResultCode, {SapResultCode::GENERIC_FAILURE, SapResultCode::CARD_NOT_ACCESSSIBLE,
+                               SapResultCode::CARD_ALREADY_POWERED_OFF, SapResultCode::CARD_REMOVED,
+                               SapResultCode::CARD_ALREADY_POWERED_ON}));
 }
 
 /*
@@ -101,10 +100,10 @@
     EXPECT_EQ(std::cv_status::no_timeout, wait());
     EXPECT_EQ(sapCb->sapResponseToken, token);
 
-    ASSERT_TRUE(SapResultCode::GENERIC_FAILURE == sapCb->sapResultCode ||
-                SapResultCode::CARD_NOT_ACCESSSIBLE == sapCb->sapResultCode ||
-                SapResultCode::CARD_ALREADY_POWERED_OFF == sapCb->sapResultCode ||
-                SapResultCode::CARD_REMOVED == sapCb->sapResultCode);
+    ASSERT_TRUE(
+        CheckAnyOfErrors(sapCb->sapResultCode,
+                         {SapResultCode::GENERIC_FAILURE, SapResultCode::CARD_NOT_ACCESSSIBLE,
+                          SapResultCode::CARD_ALREADY_POWERED_OFF, SapResultCode::CARD_REMOVED}));
 }
 
 /*
@@ -117,8 +116,8 @@
     EXPECT_EQ(std::cv_status::no_timeout, wait());
     EXPECT_EQ(sapCb->sapResponseToken, token);
 
-    ASSERT_TRUE(SapResultCode::GENERIC_FAILURE == sapCb->sapResultCode ||
-                SapResultCode::DATA_NOT_AVAILABLE == sapCb->sapResultCode);
+    ASSERT_TRUE(CheckAnyOfErrors(
+        sapCb->sapResultCode, {SapResultCode::GENERIC_FAILURE, SapResultCode::DATA_NOT_AVAILABLE}));
 }
 
 /*
diff --git a/radio/1.0/vts/functional/vts_test_util.cpp b/radio/1.0/vts/functional/vts_test_util.cpp
index c6d1f9f..7d15f35 100644
--- a/radio/1.0/vts/functional/vts_test_util.cpp
+++ b/radio/1.0/vts/functional/vts_test_util.cpp
@@ -15,8 +15,42 @@
  */
 #include <vts_test_util.h>
 #include <iostream>
-using namespace std;
 
 int GetRandomSerialNumber() {
     return rand();
-}
\ No newline at end of file
+}
+
+::testing::AssertionResult CheckAnyOfErrors(RadioError err, std::vector<RadioError> errors,
+                                            CheckFlag flag) {
+    const static vector<RadioError> generalErrors = {
+        RadioError::RADIO_NOT_AVAILABLE,   RadioError::NO_MEMORY,
+        RadioError::INTERNAL_ERR,          RadioError::SYSTEM_ERR,
+        RadioError::REQUEST_NOT_SUPPORTED, RadioError::CANCELLED};
+    if (flag == CHECK_GENERAL_ERROR || flag == CHECK_OEM_AND_GENERAL_ERROR) {
+        for (size_t i = 0; i < generalErrors.size(); i++) {
+            if (err == generalErrors[i]) {
+                return testing::AssertionSuccess();
+            }
+        }
+    }
+    if (flag == CHECK_OEM_ERROR || flag == CHECK_OEM_AND_GENERAL_ERROR) {
+        if (err >= RadioError::OEM_ERROR_1 && err <= RadioError::OEM_ERROR_25) {
+            return testing::AssertionSuccess();
+        }
+    }
+    for (size_t i = 0; i < errors.size(); i++) {
+        if (err == errors[i]) {
+            return testing::AssertionSuccess();
+        }
+    }
+    return testing::AssertionFailure() << "RadioError:" + toString(err) + " is returned";
+}
+
+::testing::AssertionResult CheckAnyOfErrors(SapResultCode err, std::vector<SapResultCode> errors) {
+    for (size_t i = 0; i < errors.size(); i++) {
+        if (err == errors[i]) {
+            return testing::AssertionSuccess();
+        }
+    }
+    return testing::AssertionFailure() << "SapError:" + toString(err) + " is returned";
+}
diff --git a/radio/1.0/vts/functional/vts_test_util.h b/radio/1.0/vts/functional/vts_test_util.h
index 939013f..826f0de 100644
--- a/radio/1.0/vts/functional/vts_test_util.h
+++ b/radio/1.0/vts/functional/vts_test_util.h
@@ -14,4 +14,37 @@
  * limitations under the License.
  */
 
-int GetRandomSerialNumber();
\ No newline at end of file
+#include <android-base/logging.h>
+
+#include <VtsHalHidlTargetTestBase.h>
+
+#include <android/hardware/radio/1.0/types.h>
+
+using ::android::hardware::radio::V1_0::RadioError;
+using ::android::hardware::radio::V1_0::SapResultCode;
+using namespace std;
+
+enum CheckFlag {
+    CHECK_DEFAULT = 0,
+    CHECK_GENERAL_ERROR = 1,
+    CHECK_OEM_ERROR = 2,
+    CHECK_OEM_AND_GENERAL_ERROR = 3,
+    CHECK_SAP_ERROR = 4,
+};
+
+/*
+ * Generate random serial number for radio test
+ */
+int GetRandomSerialNumber();
+
+/*
+ * Check multiple radio error codes which are possibly returned because of the different
+ * vendor/devices implementations. It allows optional checks for general errors or/and oem errors.
+ */
+::testing::AssertionResult CheckAnyOfErrors(RadioError err, std::vector<RadioError> generalError,
+                                            CheckFlag flag = CHECK_DEFAULT);
+/*
+ * Check multiple sap error codes which are possibly returned because of the different
+ * vendor/devices implementations.
+ */
+::testing::AssertionResult CheckAnyOfErrors(SapResultCode err, std::vector<SapResultCode> errors);
diff --git a/radio/1.1/Android.bp b/radio/1.1/Android.bp
index 623ec21..5eecb31 100644
--- a/radio/1.1/Android.bp
+++ b/radio/1.1/Android.bp
@@ -1,7 +1,11 @@
-// This file is autogenerated by hidl-gen. Do not edit manually.
+// This file is autogenerated by hidl-gen -Landroidbp.
 
-filegroup {
-    name: "android.hardware.radio@1.1_hal",
+hidl_interface {
+    name: "android.hardware.radio@1.1",
+    root: "android.hardware",
+    vndk: {
+        enabled: true,
+    },
     srcs: [
         "types.hal",
         "IRadio.hal",
@@ -9,211 +13,27 @@
         "IRadioResponse.hal",
         "ISap.hal",
     ],
-}
-
-genrule {
-    name: "android.hardware.radio@1.1_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.radio@1.1",
-    srcs: [
-        ":android.hardware.radio@1.1_hal",
-    ],
-    out: [
-        "android/hardware/radio/1.1/types.cpp",
-        "android/hardware/radio/1.1/RadioAll.cpp",
-        "android/hardware/radio/1.1/RadioIndicationAll.cpp",
-        "android/hardware/radio/1.1/RadioResponseAll.cpp",
-        "android/hardware/radio/1.1/SapAll.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.radio@1.1_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.radio@1.1",
-    srcs: [
-        ":android.hardware.radio@1.1_hal",
-    ],
-    out: [
-        "android/hardware/radio/1.1/types.h",
-        "android/hardware/radio/1.1/hwtypes.h",
-        "android/hardware/radio/1.1/IRadio.h",
-        "android/hardware/radio/1.1/IHwRadio.h",
-        "android/hardware/radio/1.1/BnHwRadio.h",
-        "android/hardware/radio/1.1/BpHwRadio.h",
-        "android/hardware/radio/1.1/BsRadio.h",
-        "android/hardware/radio/1.1/IRadioIndication.h",
-        "android/hardware/radio/1.1/IHwRadioIndication.h",
-        "android/hardware/radio/1.1/BnHwRadioIndication.h",
-        "android/hardware/radio/1.1/BpHwRadioIndication.h",
-        "android/hardware/radio/1.1/BsRadioIndication.h",
-        "android/hardware/radio/1.1/IRadioResponse.h",
-        "android/hardware/radio/1.1/IHwRadioResponse.h",
-        "android/hardware/radio/1.1/BnHwRadioResponse.h",
-        "android/hardware/radio/1.1/BpHwRadioResponse.h",
-        "android/hardware/radio/1.1/BsRadioResponse.h",
-        "android/hardware/radio/1.1/ISap.h",
-        "android/hardware/radio/1.1/IHwSap.h",
-        "android/hardware/radio/1.1/BnHwSap.h",
-        "android/hardware/radio/1.1/BpHwSap.h",
-        "android/hardware/radio/1.1/BsSap.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.radio@1.1",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.radio@1.1_genc++"],
-    generated_headers: ["android.hardware.radio@1.1_genc++_headers"],
-    export_generated_headers: ["android.hardware.radio@1.1_genc++_headers"],
-    vendor_available: true,
-    vndk: {
-        enabled: true,
-    },
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
+    interfaces: [
         "android.hardware.radio@1.0",
+        "android.hidl.base@1.0",
     ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-        "android.hardware.radio@1.0",
+    types: [
+        "CardPowerState",
+        "EutranBands",
+        "GeranBands",
+        "ImsiEncryptionInfo",
+        "KeepaliveRequest",
+        "KeepaliveStatus",
+        "KeepaliveStatusCode",
+        "KeepaliveType",
+        "NetworkScanRequest",
+        "NetworkScanResult",
+        "RadioAccessNetworks",
+        "RadioAccessSpecifier",
+        "ScanStatus",
+        "ScanType",
+        "UtranBands",
     ],
+    gen_java: true,
 }
 
-genrule {
-    name: "android.hardware.radio-V1.1-java_gen_java",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Ljava -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.radio@1.1",
-    srcs: [
-        ":android.hardware.radio@1.1_hal",
-    ],
-    out: [
-        "android/hardware/radio/V1_1/CardPowerState.java",
-        "android/hardware/radio/V1_1/EutranBands.java",
-        "android/hardware/radio/V1_1/GeranBands.java",
-        "android/hardware/radio/V1_1/ImsiEncryptionInfo.java",
-        "android/hardware/radio/V1_1/KeepaliveRequest.java",
-        "android/hardware/radio/V1_1/KeepaliveStatus.java",
-        "android/hardware/radio/V1_1/KeepaliveStatusCode.java",
-        "android/hardware/radio/V1_1/KeepaliveType.java",
-        "android/hardware/radio/V1_1/NetworkScanRequest.java",
-        "android/hardware/radio/V1_1/NetworkScanResult.java",
-        "android/hardware/radio/V1_1/RadioAccessNetworks.java",
-        "android/hardware/radio/V1_1/RadioAccessSpecifier.java",
-        "android/hardware/radio/V1_1/ScanStatus.java",
-        "android/hardware/radio/V1_1/ScanType.java",
-        "android/hardware/radio/V1_1/UtranBands.java",
-        "android/hardware/radio/V1_1/IRadio.java",
-        "android/hardware/radio/V1_1/IRadioIndication.java",
-        "android/hardware/radio/V1_1/IRadioResponse.java",
-        "android/hardware/radio/V1_1/ISap.java",
-    ],
-}
-
-java_library {
-    name: "android.hardware.radio-V1.1-java",
-    no_framework_libs: true,
-    defaults: ["hidl-java-module-defaults"],
-    srcs: [":android.hardware.radio-V1.1-java_gen_java"],
-    libs: [
-        "hwbinder",
-        "android.hardware.radio-V1.0-java",
-        "android.hidl.base-V1.0-java",
-    ]
-}
-
-// This package does not export any types. Not creating java constants export.
-
-
-genrule {
-    name: "android.hardware.radio@1.1-adapter-helper_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.radio@1.1",
-    srcs: [
-        ":android.hardware.radio@1.1_hal",
-    ],
-    out: [
-        "android/hardware/radio/1.1/ARadio.cpp",
-        "android/hardware/radio/1.1/ARadioIndication.cpp",
-        "android/hardware/radio/1.1/ARadioResponse.cpp",
-        "android/hardware/radio/1.1/ASap.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.radio@1.1-adapter-helper_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.radio@1.1",
-    srcs: [
-        ":android.hardware.radio@1.1_hal",
-    ],
-    out: [
-        "android/hardware/radio/1.1/ARadio.h",
-        "android/hardware/radio/1.1/ARadioIndication.h",
-        "android/hardware/radio/1.1/ARadioResponse.h",
-        "android/hardware/radio/1.1/ASap.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.radio@1.1-adapter-helper",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.radio@1.1-adapter-helper_genc++"],
-    generated_headers: ["android.hardware.radio@1.1-adapter-helper_genc++_headers"],
-    export_generated_headers: ["android.hardware.radio@1.1-adapter-helper_genc++_headers"],
-    vendor_available: true,
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-        "libhidladapter",
-        "android.hardware.radio@1.0",
-        "android.hardware.radio@1.1",
-        "android.hardware.radio@1.0-adapter-helper",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-        "libhidladapter",
-        "android.hardware.radio@1.0",
-        "android.hardware.radio@1.1",
-        "android.hardware.radio@1.0-adapter-helper",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-}
-
-genrule {
-    name: "android.hardware.radio@1.1-adapter_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-main -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.radio@1.1",
-    out: ["main.cpp"]
-}
-
-cc_test {
-    name: "android.hardware.radio@1.1-adapter",
-    defaults: ["hidl-module-defaults"],
-    shared_libs: [
-        "libhidladapter",
-        "libhidlbase",
-        "libhidltransport",
-        "libutils",
-        "android.hardware.radio@1.0",
-        "android.hardware.radio@1.1",
-        "android.hardware.radio@1.1-adapter-helper",
-    ],
-    generated_sources: ["android.hardware.radio@1.1-adapter_genc++"],
-}
diff --git a/radio/1.1/vts/functional/radio_hidl_hal_api.cpp b/radio/1.1/vts/functional/radio_hidl_hal_api.cpp
index 10f8f62..17c2a83 100644
--- a/radio/1.1/vts/functional/radio_hidl_hal_api.cpp
+++ b/radio/1.1/vts/functional/radio_hidl_hal_api.cpp
@@ -29,10 +29,10 @@
     EXPECT_EQ(serial, radioRsp_v1_1->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(radioRsp_v1_1->rspInfo.error == RadioError::NONE ||
-                    radioRsp_v1_1->rspInfo.error == RadioError::REQUEST_NOT_SUPPORTED ||
-                    radioRsp_v1_1->rspInfo.error == RadioError::INVALID_ARGUMENTS ||
-                    radioRsp_v1_1->rspInfo.error == RadioError::RADIO_NOT_AVAILABLE);
+        ASSERT_TRUE(
+            CheckAnyOfErrors(radioRsp_v1_1->rspInfo.error,
+                             {RadioError::NONE, RadioError::REQUEST_NOT_SUPPORTED,
+                              RadioError::INVALID_ARGUMENTS, RadioError::RADIO_NOT_AVAILABLE}));
     }
 }
 
@@ -63,11 +63,10 @@
 
     if (cardStatus.cardState == CardState::ABSENT) {
         ALOGI("startNetworkScan, rspInfo.error = %d\n", (int32_t)radioRsp_v1_1->rspInfo.error);
-        ASSERT_TRUE(radioRsp_v1_1->rspInfo.error == RadioError::NONE ||
-                    radioRsp_v1_1->rspInfo.error == RadioError::SIM_ABSENT ||
-                    radioRsp_v1_1->rspInfo.error == RadioError::INVALID_ARGUMENTS ||
-                    radioRsp_v1_1->rspInfo.error == RadioError::REQUEST_NOT_SUPPORTED ||
-                    radioRsp_v1_1->rspInfo.error == RadioError::OPERATION_NOT_ALLOWED);
+        ASSERT_TRUE(CheckAnyOfErrors(
+            radioRsp_v1_1->rspInfo.error,
+            {RadioError::NONE, RadioError::REQUEST_NOT_SUPPORTED, RadioError::INVALID_ARGUMENTS,
+             RadioError::SIM_ABSENT, RadioError::OPERATION_NOT_ALLOWED}));
     }
 }
 
@@ -89,9 +88,9 @@
     if (cardStatus.cardState == CardState::ABSENT) {
         ALOGI("startNetworkScan_InvalidArgument, rspInfo.error = %d\n",
               (int32_t)radioRsp_v1_1->rspInfo.error);
-        ASSERT_TRUE(radioRsp_v1_1->rspInfo.error == RadioError::INVALID_ARGUMENTS ||
-                    radioRsp_v1_1->rspInfo.error == RadioError::SIM_ABSENT ||
-                    radioRsp_v1_1->rspInfo.error == RadioError::REQUEST_NOT_SUPPORTED);
+        ASSERT_TRUE(CheckAnyOfErrors(radioRsp_v1_1->rspInfo.error,
+                                     {RadioError::INVALID_ARGUMENTS, RadioError::SIM_ABSENT,
+                                      RadioError::REQUEST_NOT_SUPPORTED}));
     }
 }
 
@@ -108,9 +107,9 @@
 
     if (cardStatus.cardState == CardState::ABSENT) {
         ALOGI("stopNetworkScan rspInfo.error = %d\n", (int32_t)radioRsp_v1_1->rspInfo.error);
-        ASSERT_TRUE(radioRsp_v1_1->rspInfo.error == RadioError::NONE ||
-                    radioRsp_v1_1->rspInfo.error == RadioError::SIM_ABSENT ||
-                    radioRsp_v1_1->rspInfo.error == RadioError::REQUEST_NOT_SUPPORTED);
+        ASSERT_TRUE(CheckAnyOfErrors(
+            radioRsp_v1_1->rspInfo.error,
+            {RadioError::NONE, RadioError::SIM_ABSENT, RadioError::REQUEST_NOT_SUPPORTED}));
     }
 }
 
@@ -132,8 +131,8 @@
     EXPECT_EQ(serial, radioRsp_v1_1->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(radioRsp_v1_1->rspInfo.error == RadioError::NONE ||
-                    radioRsp_v1_1->rspInfo.error == RadioError::REQUEST_NOT_SUPPORTED);
+        ASSERT_TRUE(CheckAnyOfErrors(radioRsp_v1_1->rspInfo.error,
+                                     {RadioError::NONE, RadioError::REQUEST_NOT_SUPPORTED}));
     }
 }
 
@@ -229,8 +228,9 @@
         EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_v1_1->rspInfo.type);
         EXPECT_EQ(serial, radioRsp_v1_1->rspInfo.serial);
 
-        ASSERT_TRUE(radioRsp_v1_1->rspInfo.error == RadioError::INVALID_ARGUMENTS ||
-                    radioRsp_v1_1->rspInfo.error == RadioError::REQUEST_NOT_SUPPORTED);
+        ASSERT_TRUE(
+            CheckAnyOfErrors(radioRsp_v1_1->rspInfo.error,
+                             {RadioError::INVALID_ARGUMENTS, RadioError::REQUEST_NOT_SUPPORTED}));
     }
 }
 
@@ -245,6 +245,7 @@
     EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_v1_1->rspInfo.type);
     EXPECT_EQ(serial, radioRsp_v1_1->rspInfo.serial);
 
-    ASSERT_TRUE(radioRsp_v1_1->rspInfo.error == RadioError::INVALID_ARGUMENTS ||
-                radioRsp_v1_1->rspInfo.error == RadioError::REQUEST_NOT_SUPPORTED);
+    ASSERT_TRUE(
+        CheckAnyOfErrors(radioRsp_v1_1->rspInfo.error,
+                         {RadioError::INVALID_ARGUMENTS, RadioError::REQUEST_NOT_SUPPORTED}));
 }
diff --git a/radio/1.1/vts/functional/radio_hidl_hal_test.cpp b/radio/1.1/vts/functional/radio_hidl_hal_test.cpp
index e0b1ad4..c4bf1cc 100644
--- a/radio/1.1/vts/functional/radio_hidl_hal_test.cpp
+++ b/radio/1.1/vts/functional/radio_hidl_hal_test.cpp
@@ -52,13 +52,13 @@
     cv.notify_one();
 }
 
-std::cv_status RadioHidlTest_v1_1::wait() {
+std::cv_status RadioHidlTest_v1_1::wait(int sec) {
     std::unique_lock<std::mutex> lock(mtx);
 
     std::cv_status status = std::cv_status::no_timeout;
     auto now = std::chrono::system_clock::now();
     while (count == 0) {
-        status = cv.wait_until(lock, now + std::chrono::seconds(TIMEOUT_PERIOD));
+        status = cv.wait_until(lock, now + std::chrono::seconds(sec));
         if (status == std::cv_status::timeout) {
             return status;
         }
@@ -66,17 +66,3 @@
     count--;
     return status;
 }
-
-bool RadioHidlTest_v1_1::CheckGeneralError() {
-    return (radioRsp_v1_1->rspInfo.error == RadioError::RADIO_NOT_AVAILABLE ||
-            radioRsp_v1_1->rspInfo.error == RadioError::NO_MEMORY ||
-            radioRsp_v1_1->rspInfo.error == RadioError::INTERNAL_ERR ||
-            radioRsp_v1_1->rspInfo.error == RadioError::SYSTEM_ERR ||
-            radioRsp_v1_1->rspInfo.error == RadioError::REQUEST_NOT_SUPPORTED ||
-            radioRsp_v1_1->rspInfo.error == RadioError::CANCELLED);
-}
-
-bool RadioHidlTest_v1_1::CheckOEMError() {
-    return (radioRsp_v1_1->rspInfo.error >= RadioError::OEM_ERROR_1 &&
-            radioRsp_v1_1->rspInfo.error <= RadioError::OEM_ERROR_25);
-}
diff --git a/radio/1.1/vts/functional/radio_hidl_hal_utils_v1_1.h b/radio/1.1/vts/functional/radio_hidl_hal_utils_v1_1.h
index 3e31459..523b9ba 100644
--- a/radio/1.1/vts/functional/radio_hidl_hal_utils_v1_1.h
+++ b/radio/1.1/vts/functional/radio_hidl_hal_utils_v1_1.h
@@ -550,7 +550,7 @@
     void notify();
 
     /* Test code calls this function to wait for response */
-    std::cv_status wait();
+    std::cv_status wait(int sec = TIMEOUT_PERIOD);
 
     /* Used for checking General Errors */
     bool CheckGeneralError();
@@ -561,4 +561,4 @@
     sp<::android::hardware::radio::V1_1::IRadio> radio_v1_1;
     sp<RadioResponse_v1_1> radioRsp_v1_1;
     sp<RadioIndication_v1_1> radioInd_v1_1;
-};
\ No newline at end of file
+};
diff --git a/radio/1.2/Android.bp b/radio/1.2/Android.bp
index dc78749..cdb9bf6 100644
--- a/radio/1.2/Android.bp
+++ b/radio/1.2/Android.bp
@@ -1,7 +1,11 @@
-// This file is autogenerated by hidl-gen. Do not edit manually.
+// This file is autogenerated by hidl-gen -Landroidbp.
 
-filegroup {
-    name: "android.hardware.radio@1.2_hal",
+hidl_interface {
+    name: "android.hardware.radio@1.2",
+    root: "android.hardware",
+    vndk: {
+        enabled: true,
+    },
     srcs: [
         "types.hal",
         "IRadio.hal",
@@ -9,220 +13,29 @@
         "IRadioResponse.hal",
         "ISap.hal",
     ],
-}
-
-genrule {
-    name: "android.hardware.radio@1.2_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.radio@1.2",
-    srcs: [
-        ":android.hardware.radio@1.2_hal",
-    ],
-    out: [
-        "android/hardware/radio/1.2/types.cpp",
-        "android/hardware/radio/1.2/RadioAll.cpp",
-        "android/hardware/radio/1.2/RadioIndicationAll.cpp",
-        "android/hardware/radio/1.2/RadioResponseAll.cpp",
-        "android/hardware/radio/1.2/SapAll.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.radio@1.2_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.radio@1.2",
-    srcs: [
-        ":android.hardware.radio@1.2_hal",
-    ],
-    out: [
-        "android/hardware/radio/1.2/types.h",
-        "android/hardware/radio/1.2/hwtypes.h",
-        "android/hardware/radio/1.2/IRadio.h",
-        "android/hardware/radio/1.2/IHwRadio.h",
-        "android/hardware/radio/1.2/BnHwRadio.h",
-        "android/hardware/radio/1.2/BpHwRadio.h",
-        "android/hardware/radio/1.2/BsRadio.h",
-        "android/hardware/radio/1.2/IRadioIndication.h",
-        "android/hardware/radio/1.2/IHwRadioIndication.h",
-        "android/hardware/radio/1.2/BnHwRadioIndication.h",
-        "android/hardware/radio/1.2/BpHwRadioIndication.h",
-        "android/hardware/radio/1.2/BsRadioIndication.h",
-        "android/hardware/radio/1.2/IRadioResponse.h",
-        "android/hardware/radio/1.2/IHwRadioResponse.h",
-        "android/hardware/radio/1.2/BnHwRadioResponse.h",
-        "android/hardware/radio/1.2/BpHwRadioResponse.h",
-        "android/hardware/radio/1.2/BsRadioResponse.h",
-        "android/hardware/radio/1.2/ISap.h",
-        "android/hardware/radio/1.2/IHwSap.h",
-        "android/hardware/radio/1.2/BnHwSap.h",
-        "android/hardware/radio/1.2/BpHwSap.h",
-        "android/hardware/radio/1.2/BsSap.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.radio@1.2",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.radio@1.2_genc++"],
-    generated_headers: ["android.hardware.radio@1.2_genc++_headers"],
-    export_generated_headers: ["android.hardware.radio@1.2_genc++_headers"],
-    vendor_available: true,
-    vndk: {
-        enabled: true,
-    },
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
+    interfaces: [
         "android.hardware.radio@1.0",
         "android.hardware.radio@1.1",
+        "android.hidl.base@1.0",
     ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-        "android.hardware.radio@1.0",
-        "android.hardware.radio@1.1",
+    types: [
+        "CellIdentityCdma",
+        "CellIdentityGsm",
+        "CellIdentityLte",
+        "CellIdentityOperatorNames",
+        "CellIdentityWcdma",
+        "CellInfo",
+        "CellInfoCdma",
+        "CellInfoGsm",
+        "CellInfoLte",
+        "CellInfoWcdma",
+        "IncrementalResultsPeriodicityRange",
+        "MaxSearchTimeRange",
+        "NetworkScanRequest",
+        "NetworkScanResult",
+        "RadioConst",
+        "ScanIntervalRange",
     ],
+    gen_java: true,
 }
 
-genrule {
-    name: "android.hardware.radio-V1.2-java_gen_java",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Ljava -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.radio@1.2",
-    srcs: [
-        ":android.hardware.radio@1.2_hal",
-    ],
-    out: [
-        "android/hardware/radio/V1_2/CellIdentityCdma.java",
-        "android/hardware/radio/V1_2/CellIdentityGsm.java",
-        "android/hardware/radio/V1_2/CellIdentityLte.java",
-        "android/hardware/radio/V1_2/CellIdentityOperatorNames.java",
-        "android/hardware/radio/V1_2/CellIdentityWcdma.java",
-        "android/hardware/radio/V1_2/CellInfo.java",
-        "android/hardware/radio/V1_2/CellInfoCdma.java",
-        "android/hardware/radio/V1_2/CellInfoGsm.java",
-        "android/hardware/radio/V1_2/CellInfoLte.java",
-        "android/hardware/radio/V1_2/CellInfoWcdma.java",
-        "android/hardware/radio/V1_2/IncrementalResultsPeriodicityRange.java",
-        "android/hardware/radio/V1_2/MaxSearchTimeRange.java",
-        "android/hardware/radio/V1_2/NetworkScanRequest.java",
-        "android/hardware/radio/V1_2/NetworkScanResult.java",
-        "android/hardware/radio/V1_2/RadioConst.java",
-        "android/hardware/radio/V1_2/ScanIntervalRange.java",
-        "android/hardware/radio/V1_2/IRadio.java",
-        "android/hardware/radio/V1_2/IRadioIndication.java",
-        "android/hardware/radio/V1_2/IRadioResponse.java",
-        "android/hardware/radio/V1_2/ISap.java",
-    ],
-}
-
-java_library {
-    name: "android.hardware.radio-V1.2-java",
-    no_framework_libs: true,
-    defaults: ["hidl-java-module-defaults"],
-    srcs: [":android.hardware.radio-V1.2-java_gen_java"],
-    libs: [
-        "hwbinder",
-        "android.hardware.radio-V1.0-java",
-        "android.hardware.radio-V1.1-java",
-        "android.hidl.base-V1.0-java",
-    ]
-}
-
-// This package does not export any types. Not creating java constants export.
-
-
-genrule {
-    name: "android.hardware.radio@1.2-adapter-helper_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.radio@1.2",
-    srcs: [
-        ":android.hardware.radio@1.2_hal",
-    ],
-    out: [
-        "android/hardware/radio/1.2/ARadio.cpp",
-        "android/hardware/radio/1.2/ARadioIndication.cpp",
-        "android/hardware/radio/1.2/ARadioResponse.cpp",
-        "android/hardware/radio/1.2/ASap.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.radio@1.2-adapter-helper_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.radio@1.2",
-    srcs: [
-        ":android.hardware.radio@1.2_hal",
-    ],
-    out: [
-        "android/hardware/radio/1.2/ARadio.h",
-        "android/hardware/radio/1.2/ARadioIndication.h",
-        "android/hardware/radio/1.2/ARadioResponse.h",
-        "android/hardware/radio/1.2/ASap.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.radio@1.2-adapter-helper",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.radio@1.2-adapter-helper_genc++"],
-    generated_headers: ["android.hardware.radio@1.2-adapter-helper_genc++_headers"],
-    export_generated_headers: ["android.hardware.radio@1.2-adapter-helper_genc++_headers"],
-    vendor_available: true,
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-        "libhidladapter",
-        "android.hardware.radio@1.0",
-        "android.hardware.radio@1.1",
-        "android.hardware.radio@1.2",
-        "android.hardware.radio@1.0-adapter-helper",
-        "android.hardware.radio@1.1-adapter-helper",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-        "libhidladapter",
-        "android.hardware.radio@1.0",
-        "android.hardware.radio@1.1",
-        "android.hardware.radio@1.2",
-        "android.hardware.radio@1.0-adapter-helper",
-        "android.hardware.radio@1.1-adapter-helper",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-}
-
-genrule {
-    name: "android.hardware.radio@1.2-adapter_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-main -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.radio@1.2",
-    out: ["main.cpp"]
-}
-
-cc_test {
-    name: "android.hardware.radio@1.2-adapter",
-    defaults: ["hidl-module-defaults"],
-    shared_libs: [
-        "libhidladapter",
-        "libhidlbase",
-        "libhidltransport",
-        "libutils",
-        "android.hardware.radio@1.0",
-        "android.hardware.radio@1.1",
-        "android.hardware.radio@1.2",
-        "android.hardware.radio@1.2-adapter-helper",
-    ],
-    generated_sources: ["android.hardware.radio@1.2-adapter_genc++"],
-}
diff --git a/radio/1.2/vts/functional/radio_hidl_hal_api.cpp b/radio/1.2/vts/functional/radio_hidl_hal_api.cpp
index a4f3571..64a598a 100644
--- a/radio/1.2/vts/functional/radio_hidl_hal_api.cpp
+++ b/radio/1.2/vts/functional/radio_hidl_hal_api.cpp
@@ -43,13 +43,13 @@
 
     ALOGI("startNetworkScan, rspInfo.error = %s\n", toString(radioRsp_v1_2->rspInfo.error).c_str());
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(radioRsp_v1_2->rspInfo.error == RadioError::SIM_ABSENT ||
-                    radioRsp_v1_2->rspInfo.error == RadioError::REQUEST_NOT_SUPPORTED ||
-                    radioRsp_v1_2->rspInfo.error == RadioError::OPERATION_NOT_ALLOWED);
+        ASSERT_TRUE(CheckAnyOfErrors(radioRsp_v1_2->rspInfo.error,
+                                     {RadioError::SIM_ABSENT, RadioError::REQUEST_NOT_SUPPORTED,
+                                      RadioError::OPERATION_NOT_ALLOWED}));
     } else if (cardStatus.cardState == CardState::PRESENT) {
-        ASSERT_TRUE(radioRsp_v1_2->rspInfo.error == RadioError::NONE ||
-                    radioRsp_v1_2->rspInfo.error == RadioError::REQUEST_NOT_SUPPORTED ||
-                    radioRsp_v1_2->rspInfo.error == RadioError::OPERATION_NOT_ALLOWED);
+        ASSERT_TRUE(CheckAnyOfErrors(radioRsp_v1_2->rspInfo.error,
+                                     {RadioError::NONE, RadioError::REQUEST_NOT_SUPPORTED,
+                                      RadioError::OPERATION_NOT_ALLOWED}));
     }
 }
 
@@ -72,12 +72,13 @@
     ALOGI("startNetworkScan_InvalidArgument, rspInfo.error = %s\n",
           toString(radioRsp_v1_2->rspInfo.error).c_str());
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(radioRsp_v1_2->rspInfo.error == RadioError::INVALID_ARGUMENTS ||
-                    radioRsp_v1_2->rspInfo.error == RadioError::SIM_ABSENT ||
-                    radioRsp_v1_2->rspInfo.error == RadioError::REQUEST_NOT_SUPPORTED);
+        ASSERT_TRUE(CheckAnyOfErrors(radioRsp_v1_2->rspInfo.error,
+                                     {RadioError::SIM_ABSENT, RadioError::REQUEST_NOT_SUPPORTED,
+                                      RadioError::INVALID_ARGUMENTS}));
     } else if (cardStatus.cardState == CardState::PRESENT) {
-        ASSERT_TRUE(radioRsp_v1_2->rspInfo.error == RadioError::INVALID_ARGUMENTS ||
-                    radioRsp_v1_2->rspInfo.error == RadioError::REQUEST_NOT_SUPPORTED);
+        ASSERT_TRUE(
+            CheckAnyOfErrors(radioRsp_v1_2->rspInfo.error,
+                             {RadioError::INVALID_ARGUMENTS, RadioError::REQUEST_NOT_SUPPORTED}));
     }
 }
 
@@ -109,14 +110,15 @@
     ALOGI("startNetworkScan_InvalidInterval1, rspInfo.error = %s\n",
           toString(radioRsp_v1_2->rspInfo.error).c_str());
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(radioRsp_v1_2->rspInfo.error == RadioError::INVALID_ARGUMENTS ||
-                    radioRsp_v1_2->rspInfo.error == RadioError::SIM_ABSENT ||
-                    radioRsp_v1_2->rspInfo.error == RadioError::OPERATION_NOT_ALLOWED ||
-                    radioRsp_v1_2->rspInfo.error == RadioError::REQUEST_NOT_SUPPORTED);
+        ASSERT_TRUE(CheckAnyOfErrors(
+            radioRsp_v1_2->rspInfo.error,
+            {RadioError::SIM_ABSENT, RadioError::INVALID_ARGUMENTS,
+             RadioError::REQUEST_NOT_SUPPORTED, RadioError::OPERATION_NOT_ALLOWED}));
     } else if (cardStatus.cardState == CardState::PRESENT) {
-        ASSERT_TRUE(radioRsp_v1_2->rspInfo.error == RadioError::INVALID_ARGUMENTS ||
-                    radioRsp_v1_2->rspInfo.error == RadioError::OPERATION_NOT_ALLOWED ||
-                    radioRsp_v1_2->rspInfo.error == RadioError::REQUEST_NOT_SUPPORTED);
+        ASSERT_TRUE(
+            CheckAnyOfErrors(radioRsp_v1_2->rspInfo.error,
+                             {RadioError::INVALID_ARGUMENTS, RadioError::REQUEST_NOT_SUPPORTED,
+                              RadioError::OPERATION_NOT_ALLOWED}));
     }
 }
 
@@ -148,14 +150,15 @@
     ALOGI("startNetworkScan_InvalidInterval2, rspInfo.error = %s\n",
           toString(radioRsp_v1_2->rspInfo.error).c_str());
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(radioRsp_v1_2->rspInfo.error == RadioError::INVALID_ARGUMENTS ||
-                    radioRsp_v1_2->rspInfo.error == RadioError::SIM_ABSENT ||
-                    radioRsp_v1_2->rspInfo.error == RadioError::OPERATION_NOT_ALLOWED ||
-                    radioRsp_v1_2->rspInfo.error == RadioError::REQUEST_NOT_SUPPORTED);
+        ASSERT_TRUE(CheckAnyOfErrors(
+            radioRsp_v1_2->rspInfo.error,
+            {RadioError::SIM_ABSENT, RadioError::INVALID_ARGUMENTS,
+             RadioError::REQUEST_NOT_SUPPORTED, RadioError::OPERATION_NOT_ALLOWED}));
     } else if (cardStatus.cardState == CardState::PRESENT) {
-        ASSERT_TRUE(radioRsp_v1_2->rspInfo.error == RadioError::INVALID_ARGUMENTS ||
-                    radioRsp_v1_2->rspInfo.error == RadioError::OPERATION_NOT_ALLOWED ||
-                    radioRsp_v1_2->rspInfo.error == RadioError::REQUEST_NOT_SUPPORTED);
+        ASSERT_TRUE(
+            CheckAnyOfErrors(radioRsp_v1_2->rspInfo.error,
+                             {RadioError::INVALID_ARGUMENTS, RadioError::REQUEST_NOT_SUPPORTED,
+                              RadioError::OPERATION_NOT_ALLOWED}));
     }
 }
 
@@ -187,14 +190,15 @@
     ALOGI("startNetworkScan_InvalidMaxSearchTime1, rspInfo.error = %s\n",
           toString(radioRsp_v1_2->rspInfo.error).c_str());
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(radioRsp_v1_2->rspInfo.error == RadioError::INVALID_ARGUMENTS ||
-                    radioRsp_v1_2->rspInfo.error == RadioError::SIM_ABSENT ||
-                    radioRsp_v1_2->rspInfo.error == RadioError::OPERATION_NOT_ALLOWED ||
-                    radioRsp_v1_2->rspInfo.error == RadioError::REQUEST_NOT_SUPPORTED);
+        ASSERT_TRUE(CheckAnyOfErrors(
+            radioRsp_v1_2->rspInfo.error,
+            {RadioError::SIM_ABSENT, RadioError::INVALID_ARGUMENTS,
+             RadioError::REQUEST_NOT_SUPPORTED, RadioError::OPERATION_NOT_ALLOWED}));
     } else if (cardStatus.cardState == CardState::PRESENT) {
-        ASSERT_TRUE(radioRsp_v1_2->rspInfo.error == RadioError::INVALID_ARGUMENTS ||
-                    radioRsp_v1_2->rspInfo.error == RadioError::OPERATION_NOT_ALLOWED ||
-                    radioRsp_v1_2->rspInfo.error == RadioError::REQUEST_NOT_SUPPORTED);
+        ASSERT_TRUE(
+            CheckAnyOfErrors(radioRsp_v1_2->rspInfo.error,
+                             {RadioError::INVALID_ARGUMENTS, RadioError::REQUEST_NOT_SUPPORTED,
+                              RadioError::OPERATION_NOT_ALLOWED}));
     }
 }
 
@@ -226,14 +230,15 @@
     ALOGI("startNetworkScan_InvalidMaxSearchTime2, rspInfo.error = %s\n",
           toString(radioRsp_v1_2->rspInfo.error).c_str());
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(radioRsp_v1_2->rspInfo.error == RadioError::INVALID_ARGUMENTS ||
-                    radioRsp_v1_2->rspInfo.error == RadioError::SIM_ABSENT ||
-                    radioRsp_v1_2->rspInfo.error == RadioError::OPERATION_NOT_ALLOWED ||
-                    radioRsp_v1_2->rspInfo.error == RadioError::REQUEST_NOT_SUPPORTED);
+        ASSERT_TRUE(CheckAnyOfErrors(
+            radioRsp_v1_2->rspInfo.error,
+            {RadioError::SIM_ABSENT, RadioError::INVALID_ARGUMENTS,
+             RadioError::REQUEST_NOT_SUPPORTED, RadioError::OPERATION_NOT_ALLOWED}));
     } else if (cardStatus.cardState == CardState::PRESENT) {
-        ASSERT_TRUE(radioRsp_v1_2->rspInfo.error == RadioError::INVALID_ARGUMENTS ||
-                    radioRsp_v1_2->rspInfo.error == RadioError::OPERATION_NOT_ALLOWED ||
-                    radioRsp_v1_2->rspInfo.error == RadioError::REQUEST_NOT_SUPPORTED);
+        ASSERT_TRUE(
+            CheckAnyOfErrors(radioRsp_v1_2->rspInfo.error,
+                             {RadioError::INVALID_ARGUMENTS, RadioError::REQUEST_NOT_SUPPORTED,
+                              RadioError::OPERATION_NOT_ALLOWED}));
     }
 }
 
@@ -265,14 +270,15 @@
     ALOGI("startNetworkScan_InvalidPeriodicity1, rspInfo.error = %s\n",
           toString(radioRsp_v1_2->rspInfo.error).c_str());
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(radioRsp_v1_2->rspInfo.error == RadioError::INVALID_ARGUMENTS ||
-                    radioRsp_v1_2->rspInfo.error == RadioError::SIM_ABSENT ||
-                    radioRsp_v1_2->rspInfo.error == RadioError::OPERATION_NOT_ALLOWED ||
-                    radioRsp_v1_2->rspInfo.error == RadioError::REQUEST_NOT_SUPPORTED);
+        ASSERT_TRUE(CheckAnyOfErrors(
+            radioRsp_v1_2->rspInfo.error,
+            {RadioError::SIM_ABSENT, RadioError::INVALID_ARGUMENTS,
+             RadioError::REQUEST_NOT_SUPPORTED, RadioError::OPERATION_NOT_ALLOWED}));
     } else if (cardStatus.cardState == CardState::PRESENT) {
-        ASSERT_TRUE(radioRsp_v1_2->rspInfo.error == RadioError::INVALID_ARGUMENTS ||
-                    radioRsp_v1_2->rspInfo.error == RadioError::OPERATION_NOT_ALLOWED ||
-                    radioRsp_v1_2->rspInfo.error == RadioError::REQUEST_NOT_SUPPORTED);
+        ASSERT_TRUE(
+            CheckAnyOfErrors(radioRsp_v1_2->rspInfo.error,
+                             {RadioError::INVALID_ARGUMENTS, RadioError::REQUEST_NOT_SUPPORTED,
+                              RadioError::OPERATION_NOT_ALLOWED}));
     }
 }
 
@@ -304,14 +310,15 @@
     ALOGI("startNetworkScan_InvalidPeriodicity2, rspInfo.error = %s\n",
           toString(radioRsp_v1_2->rspInfo.error).c_str());
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(radioRsp_v1_2->rspInfo.error == RadioError::INVALID_ARGUMENTS ||
-                    radioRsp_v1_2->rspInfo.error == RadioError::SIM_ABSENT ||
-                    radioRsp_v1_2->rspInfo.error == RadioError::OPERATION_NOT_ALLOWED ||
-                    radioRsp_v1_2->rspInfo.error == RadioError::REQUEST_NOT_SUPPORTED);
+        ASSERT_TRUE(CheckAnyOfErrors(
+            radioRsp_v1_2->rspInfo.error,
+            {RadioError::SIM_ABSENT, RadioError::INVALID_ARGUMENTS,
+             RadioError::REQUEST_NOT_SUPPORTED, RadioError::OPERATION_NOT_ALLOWED}));
     } else if (cardStatus.cardState == CardState::PRESENT) {
-        ASSERT_TRUE(radioRsp_v1_2->rspInfo.error == RadioError::INVALID_ARGUMENTS ||
-                    radioRsp_v1_2->rspInfo.error == RadioError::OPERATION_NOT_ALLOWED ||
-                    radioRsp_v1_2->rspInfo.error == RadioError::REQUEST_NOT_SUPPORTED);
+        ASSERT_TRUE(
+            CheckAnyOfErrors(radioRsp_v1_2->rspInfo.error,
+                             {RadioError::INVALID_ARGUMENTS, RadioError::REQUEST_NOT_SUPPORTED,
+                              RadioError::OPERATION_NOT_ALLOWED}));
     }
 }
 
@@ -343,14 +350,14 @@
     ALOGI("startNetworkScan_InvalidArgument, rspInfo.error = %s\n",
           toString(radioRsp_v1_2->rspInfo.error).c_str());
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(radioRsp_v1_2->rspInfo.error == RadioError::NONE ||
-                    radioRsp_v1_2->rspInfo.error == RadioError::SIM_ABSENT ||
-                    radioRsp_v1_2->rspInfo.error == RadioError::OPERATION_NOT_ALLOWED ||
-                    radioRsp_v1_2->rspInfo.error == RadioError::REQUEST_NOT_SUPPORTED);
+        ASSERT_TRUE(CheckAnyOfErrors(
+            radioRsp_v1_2->rspInfo.error,
+            {RadioError::NONE, RadioError::SIM_ABSENT, RadioError::REQUEST_NOT_SUPPORTED,
+             RadioError::OPERATION_NOT_ALLOWED}));
     } else if (cardStatus.cardState == CardState::PRESENT) {
-        ASSERT_TRUE(radioRsp_v1_2->rspInfo.error == RadioError::NONE ||
-                    radioRsp_v1_2->rspInfo.error == RadioError::OPERATION_NOT_ALLOWED ||
-                    radioRsp_v1_2->rspInfo.error == RadioError::REQUEST_NOT_SUPPORTED);
+        ASSERT_TRUE(CheckAnyOfErrors(radioRsp_v1_2->rspInfo.error,
+                                     {RadioError::NONE, RadioError::REQUEST_NOT_SUPPORTED,
+                                      RadioError::OPERATION_NOT_ALLOWED}));
     }
 }
 
@@ -383,13 +390,13 @@
     ALOGI("startNetworkScan_InvalidArgument, rspInfo.error = %s\n",
           toString(radioRsp_v1_2->rspInfo.error).c_str());
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(radioRsp_v1_2->rspInfo.error == RadioError::NONE ||
-                    radioRsp_v1_2->rspInfo.error == RadioError::SIM_ABSENT ||
-                    radioRsp_v1_2->rspInfo.error == RadioError::OPERATION_NOT_ALLOWED ||
-                    radioRsp_v1_2->rspInfo.error == RadioError::REQUEST_NOT_SUPPORTED);
+        ASSERT_TRUE(CheckAnyOfErrors(
+            radioRsp_v1_2->rspInfo.error,
+            {RadioError::NONE, RadioError::SIM_ABSENT, RadioError::REQUEST_NOT_SUPPORTED,
+             RadioError::OPERATION_NOT_ALLOWED}));
     } else if (cardStatus.cardState == CardState::PRESENT) {
-        ASSERT_TRUE(radioRsp_v1_2->rspInfo.error == RadioError::NONE ||
-                    radioRsp_v1_2->rspInfo.error == RadioError::OPERATION_NOT_ALLOWED ||
-                    radioRsp_v1_2->rspInfo.error == RadioError::REQUEST_NOT_SUPPORTED);
+        ASSERT_TRUE(CheckAnyOfErrors(radioRsp_v1_2->rspInfo.error,
+                                     {RadioError::NONE, RadioError::REQUEST_NOT_SUPPORTED,
+                                      RadioError::OPERATION_NOT_ALLOWED}));
     }
 }
diff --git a/radio/deprecated/1.0/Android.bp b/radio/deprecated/1.0/Android.bp
index 937e42c..c9f86f0 100644
--- a/radio/deprecated/1.0/Android.bp
+++ b/radio/deprecated/1.0/Android.bp
@@ -1,190 +1,20 @@
-// This file is autogenerated by hidl-gen. Do not edit manually.
+// This file is autogenerated by hidl-gen -Landroidbp.
 
-filegroup {
-    name: "android.hardware.radio.deprecated@1.0_hal",
+hidl_interface {
+    name: "android.hardware.radio.deprecated@1.0",
+    root: "android.hardware",
+    vndk: {
+        enabled: true,
+    },
     srcs: [
         "IOemHook.hal",
         "IOemHookIndication.hal",
         "IOemHookResponse.hal",
     ],
-}
-
-genrule {
-    name: "android.hardware.radio.deprecated@1.0_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.radio.deprecated@1.0",
-    srcs: [
-        ":android.hardware.radio.deprecated@1.0_hal",
-    ],
-    out: [
-        "android/hardware/radio/deprecated/1.0/OemHookAll.cpp",
-        "android/hardware/radio/deprecated/1.0/OemHookIndicationAll.cpp",
-        "android/hardware/radio/deprecated/1.0/OemHookResponseAll.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.radio.deprecated@1.0_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.radio.deprecated@1.0",
-    srcs: [
-        ":android.hardware.radio.deprecated@1.0_hal",
-    ],
-    out: [
-        "android/hardware/radio/deprecated/1.0/IOemHook.h",
-        "android/hardware/radio/deprecated/1.0/IHwOemHook.h",
-        "android/hardware/radio/deprecated/1.0/BnHwOemHook.h",
-        "android/hardware/radio/deprecated/1.0/BpHwOemHook.h",
-        "android/hardware/radio/deprecated/1.0/BsOemHook.h",
-        "android/hardware/radio/deprecated/1.0/IOemHookIndication.h",
-        "android/hardware/radio/deprecated/1.0/IHwOemHookIndication.h",
-        "android/hardware/radio/deprecated/1.0/BnHwOemHookIndication.h",
-        "android/hardware/radio/deprecated/1.0/BpHwOemHookIndication.h",
-        "android/hardware/radio/deprecated/1.0/BsOemHookIndication.h",
-        "android/hardware/radio/deprecated/1.0/IOemHookResponse.h",
-        "android/hardware/radio/deprecated/1.0/IHwOemHookResponse.h",
-        "android/hardware/radio/deprecated/1.0/BnHwOemHookResponse.h",
-        "android/hardware/radio/deprecated/1.0/BpHwOemHookResponse.h",
-        "android/hardware/radio/deprecated/1.0/BsOemHookResponse.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.radio.deprecated@1.0",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.radio.deprecated@1.0_genc++"],
-    generated_headers: ["android.hardware.radio.deprecated@1.0_genc++_headers"],
-    export_generated_headers: ["android.hardware.radio.deprecated@1.0_genc++_headers"],
-    vendor_available: true,
-    vndk: {
-        enabled: true,
-    },
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
+    interfaces: [
         "android.hardware.radio@1.0",
+        "android.hidl.base@1.0",
     ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-        "android.hardware.radio@1.0",
-    ],
+    gen_java: true,
 }
 
-genrule {
-    name: "android.hardware.radio.deprecated-V1.0-java_gen_java",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Ljava -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.radio.deprecated@1.0",
-    srcs: [
-        ":android.hardware.radio.deprecated@1.0_hal",
-    ],
-    out: [
-        "android/hardware/radio/deprecated/V1_0/IOemHook.java",
-        "android/hardware/radio/deprecated/V1_0/IOemHookIndication.java",
-        "android/hardware/radio/deprecated/V1_0/IOemHookResponse.java",
-    ],
-}
-
-java_library {
-    name: "android.hardware.radio.deprecated-V1.0-java",
-    no_framework_libs: true,
-    defaults: ["hidl-java-module-defaults"],
-    srcs: [":android.hardware.radio.deprecated-V1.0-java_gen_java"],
-    libs: [
-        "hwbinder",
-        "android.hardware.radio-V1.0-java",
-        "android.hidl.base-V1.0-java",
-    ]
-}
-
-// This package does not export any types. Not creating java constants export.
-
-
-genrule {
-    name: "android.hardware.radio.deprecated@1.0-adapter-helper_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.radio.deprecated@1.0",
-    srcs: [
-        ":android.hardware.radio.deprecated@1.0_hal",
-    ],
-    out: [
-        "android/hardware/radio/deprecated/1.0/AOemHook.cpp",
-        "android/hardware/radio/deprecated/1.0/AOemHookIndication.cpp",
-        "android/hardware/radio/deprecated/1.0/AOemHookResponse.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.radio.deprecated@1.0-adapter-helper_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.radio.deprecated@1.0",
-    srcs: [
-        ":android.hardware.radio.deprecated@1.0_hal",
-    ],
-    out: [
-        "android/hardware/radio/deprecated/1.0/AOemHook.h",
-        "android/hardware/radio/deprecated/1.0/AOemHookIndication.h",
-        "android/hardware/radio/deprecated/1.0/AOemHookResponse.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.radio.deprecated@1.0-adapter-helper",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.radio.deprecated@1.0-adapter-helper_genc++"],
-    generated_headers: ["android.hardware.radio.deprecated@1.0-adapter-helper_genc++_headers"],
-    export_generated_headers: ["android.hardware.radio.deprecated@1.0-adapter-helper_genc++_headers"],
-    vendor_available: true,
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-        "libhidladapter",
-        "android.hardware.radio.deprecated@1.0",
-        "android.hardware.radio@1.0",
-        "android.hardware.radio@1.0-adapter-helper",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-        "libhidladapter",
-        "android.hardware.radio.deprecated@1.0",
-        "android.hardware.radio@1.0",
-        "android.hardware.radio@1.0-adapter-helper",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-}
-
-genrule {
-    name: "android.hardware.radio.deprecated@1.0-adapter_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-main -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.radio.deprecated@1.0",
-    out: ["main.cpp"]
-}
-
-cc_test {
-    name: "android.hardware.radio.deprecated@1.0-adapter",
-    defaults: ["hidl-module-defaults"],
-    shared_libs: [
-        "libhidladapter",
-        "libhidlbase",
-        "libhidltransport",
-        "libutils",
-        "android.hardware.radio.deprecated@1.0",
-        "android.hardware.radio@1.0",
-        "android.hardware.radio.deprecated@1.0-adapter-helper",
-    ],
-    generated_sources: ["android.hardware.radio.deprecated@1.0-adapter_genc++"],
-}
diff --git a/renderscript/1.0/Android.bp b/renderscript/1.0/Android.bp
index 9b6f7a8..79b2ff7 100644
--- a/renderscript/1.0/Android.bp
+++ b/renderscript/1.0/Android.bp
@@ -1,171 +1,38 @@
-// This file is autogenerated by hidl-gen. Do not edit manually.
+// This file is autogenerated by hidl-gen -Landroidbp.
 
-filegroup {
-    name: "android.hardware.renderscript@1.0_hal",
+hidl_interface {
+    name: "android.hardware.renderscript@1.0",
+    root: "android.hardware",
+    vndk: {
+        enabled: true,
+        support_system_process: true,
+    },
     srcs: [
         "types.hal",
         "IContext.hal",
         "IDevice.hal",
     ],
+    interfaces: [
+        "android.hidl.base@1.0",
+    ],
+    types: [
+        "AllocationCubemapFace",
+        "AllocationMipmapControl",
+        "AllocationUsageType",
+        "ContextFlags",
+        "ContextType",
+        "DataKind",
+        "DataType",
+        "ForEachStrategy",
+        "MessageToClientType",
+        "MetadataSignatureBitval",
+        "SamplerValue",
+        "ScriptCall",
+        "ScriptIntrinsicID",
+        "ThreadPriorities",
+        "YuvFormat",
+    ],
+    gen_java: false,
+    gen_java_constants: true,
 }
 
-genrule {
-    name: "android.hardware.renderscript@1.0_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.renderscript@1.0",
-    srcs: [
-        ":android.hardware.renderscript@1.0_hal",
-    ],
-    out: [
-        "android/hardware/renderscript/1.0/types.cpp",
-        "android/hardware/renderscript/1.0/ContextAll.cpp",
-        "android/hardware/renderscript/1.0/DeviceAll.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.renderscript@1.0_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.renderscript@1.0",
-    srcs: [
-        ":android.hardware.renderscript@1.0_hal",
-    ],
-    out: [
-        "android/hardware/renderscript/1.0/types.h",
-        "android/hardware/renderscript/1.0/hwtypes.h",
-        "android/hardware/renderscript/1.0/IContext.h",
-        "android/hardware/renderscript/1.0/IHwContext.h",
-        "android/hardware/renderscript/1.0/BnHwContext.h",
-        "android/hardware/renderscript/1.0/BpHwContext.h",
-        "android/hardware/renderscript/1.0/BsContext.h",
-        "android/hardware/renderscript/1.0/IDevice.h",
-        "android/hardware/renderscript/1.0/IHwDevice.h",
-        "android/hardware/renderscript/1.0/BnHwDevice.h",
-        "android/hardware/renderscript/1.0/BpHwDevice.h",
-        "android/hardware/renderscript/1.0/BsDevice.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.renderscript@1.0",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.renderscript@1.0_genc++"],
-    generated_headers: ["android.hardware.renderscript@1.0_genc++_headers"],
-    export_generated_headers: ["android.hardware.renderscript@1.0_genc++_headers"],
-    vendor_available: true,
-    vndk: {
-        enabled: true,
-        support_system_process: true,
-    },
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-    ],
-}
-
-// This package is not java compatible. Not creating java target.
-
-genrule {
-    name: "android.hardware.renderscript-V1.0-java-constants_gen_java",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Ljava-constants -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.renderscript@1.0",
-    srcs: [
-        ":android.hardware.renderscript@1.0_hal",
-    ],
-    out: [
-        "android/hardware/renderscript/V1_0/Constants.java",
-    ],
-}
-
-java_library {
-    name: "android.hardware.renderscript-V1.0-java-constants",
-    no_framework_libs: true,
-    defaults: ["hidl-java-module-defaults"],
-    srcs: [":android.hardware.renderscript-V1.0-java-constants_gen_java"],
-}
-
-genrule {
-    name: "android.hardware.renderscript@1.0-adapter-helper_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.renderscript@1.0",
-    srcs: [
-        ":android.hardware.renderscript@1.0_hal",
-    ],
-    out: [
-        "android/hardware/renderscript/1.0/AContext.cpp",
-        "android/hardware/renderscript/1.0/ADevice.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.renderscript@1.0-adapter-helper_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.renderscript@1.0",
-    srcs: [
-        ":android.hardware.renderscript@1.0_hal",
-    ],
-    out: [
-        "android/hardware/renderscript/1.0/AContext.h",
-        "android/hardware/renderscript/1.0/ADevice.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.renderscript@1.0-adapter-helper",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.renderscript@1.0-adapter-helper_genc++"],
-    generated_headers: ["android.hardware.renderscript@1.0-adapter-helper_genc++_headers"],
-    export_generated_headers: ["android.hardware.renderscript@1.0-adapter-helper_genc++_headers"],
-    vendor_available: true,
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-        "libhidladapter",
-        "android.hardware.renderscript@1.0",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-        "libhidladapter",
-        "android.hardware.renderscript@1.0",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-}
-
-genrule {
-    name: "android.hardware.renderscript@1.0-adapter_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-main -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.renderscript@1.0",
-    out: ["main.cpp"]
-}
-
-cc_test {
-    name: "android.hardware.renderscript@1.0-adapter",
-    defaults: ["hidl-module-defaults"],
-    shared_libs: [
-        "libhidladapter",
-        "libhidlbase",
-        "libhidltransport",
-        "libutils",
-        "android.hardware.renderscript@1.0",
-        "android.hardware.renderscript@1.0-adapter-helper",
-    ],
-    generated_sources: ["android.hardware.renderscript@1.0-adapter_genc++"],
-}
diff --git a/renderscript/1.0/vts/functional/VtsHalRenderscriptV1_0TargetTest.cpp b/renderscript/1.0/vts/functional/VtsHalRenderscriptV1_0TargetTest.cpp
index c6eecd6..0636cf9 100644
--- a/renderscript/1.0/vts/functional/VtsHalRenderscriptV1_0TargetTest.cpp
+++ b/renderscript/1.0/vts/functional/VtsHalRenderscriptV1_0TargetTest.cpp
@@ -18,7 +18,8 @@
 
 // The main test class for RENDERSCRIPT HIDL HAL.
 void RenderscriptHidlTest::SetUp() {
-    device = ::testing::VtsHalHidlTargetTestBase::getService<IDevice>();
+    device = ::testing::VtsHalHidlTargetTestBase::getService<IDevice>(
+        RenderscriptHidlEnvironment::Instance()->getServiceName<IDevice>());
     ASSERT_NE(nullptr, device.get());
 
     uint32_t version = 0;
@@ -34,17 +35,10 @@
     }
 }
 
-// A class for test environment setup (kept since this file is a template).
-class RenderscriptHidlEnvironment : public ::testing::Environment {
-public:
-    virtual void SetUp() {}
-    virtual void TearDown() {}
-};
-
-
 int main(int argc, char** argv) {
-    ::testing::AddGlobalTestEnvironment(new RenderscriptHidlEnvironment);
+    ::testing::AddGlobalTestEnvironment(RenderscriptHidlEnvironment::Instance());
     ::testing::InitGoogleTest(&argc, argv);
+    RenderscriptHidlEnvironment::Instance()->init(&argc, argv);
     int status = RUN_ALL_TESTS();
     LOG(INFO) << "Test result = " << status;
     return status;
diff --git a/renderscript/1.0/vts/functional/VtsHalRenderscriptV1_0TargetTest.h b/renderscript/1.0/vts/functional/VtsHalRenderscriptV1_0TargetTest.h
index 527fef0..e11ab92 100644
--- a/renderscript/1.0/vts/functional/VtsHalRenderscriptV1_0TargetTest.h
+++ b/renderscript/1.0/vts/functional/VtsHalRenderscriptV1_0TargetTest.h
@@ -25,6 +25,7 @@
 #include <android/hardware/renderscript/1.0/types.h>
 
 #include <VtsHalHidlTargetTestBase.h>
+#include <VtsHalHidlTargetTestEnvBase.h>
 #include <gtest/gtest.h>
 
 using ::android::hardware::renderscript::V1_0::Allocation;
@@ -99,4 +100,16 @@
     sp<IDevice>    device;
 };
 
+// Test environment for RENDERSCRIPT HIDL HAL.
+class RenderscriptHidlEnvironment : public ::testing::VtsHalHidlTargetTestEnvBase {
+   public:
+    // get the test environment singleton
+    static RenderscriptHidlEnvironment* Instance() {
+        static RenderscriptHidlEnvironment* instance = new RenderscriptHidlEnvironment;
+        return instance;
+    }
+
+    virtual void registerTestServices() override { registerTestService<IDevice>(); }
+};
+
 #endif // VTS_HAL_RENDERSCRIPT_V1_0_TARGET_TESTS_H
diff --git a/sensors/1.0/Android.bp b/sensors/1.0/Android.bp
index 6f9df6f..92c3c1b 100644
--- a/sensors/1.0/Android.bp
+++ b/sensors/1.0/Android.bp
@@ -1,161 +1,44 @@
-// This file is autogenerated by hidl-gen. Do not edit manually.
+// This file is autogenerated by hidl-gen -Landroidbp.
 
-filegroup {
-    name: "android.hardware.sensors@1.0_hal",
+hidl_interface {
+    name: "android.hardware.sensors@1.0",
+    root: "android.hardware",
+    vndk: {
+        enabled: true,
+    },
     srcs: [
         "types.hal",
         "ISensors.hal",
     ],
+    interfaces: [
+        "android.hidl.base@1.0",
+    ],
+    types: [
+        "AdditionalInfo",
+        "AdditionalInfoType",
+        "DynamicSensorInfo",
+        "Event",
+        "EventPayload",
+        "HeartRate",
+        "MetaData",
+        "MetaDataEventType",
+        "OperationMode",
+        "RateLevel",
+        "Result",
+        "SensorFlagBits",
+        "SensorFlagShift",
+        "SensorInfo",
+        "SensorStatus",
+        "SensorType",
+        "SensorsEventFormatOffset",
+        "SharedMemFormat",
+        "SharedMemInfo",
+        "SharedMemType",
+        "Uncal",
+        "Vec3",
+        "Vec4",
+    ],
+    gen_java: false,
+    gen_java_constants: true,
 }
 
-genrule {
-    name: "android.hardware.sensors@1.0_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.sensors@1.0",
-    srcs: [
-        ":android.hardware.sensors@1.0_hal",
-    ],
-    out: [
-        "android/hardware/sensors/1.0/types.cpp",
-        "android/hardware/sensors/1.0/SensorsAll.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.sensors@1.0_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.sensors@1.0",
-    srcs: [
-        ":android.hardware.sensors@1.0_hal",
-    ],
-    out: [
-        "android/hardware/sensors/1.0/types.h",
-        "android/hardware/sensors/1.0/hwtypes.h",
-        "android/hardware/sensors/1.0/ISensors.h",
-        "android/hardware/sensors/1.0/IHwSensors.h",
-        "android/hardware/sensors/1.0/BnHwSensors.h",
-        "android/hardware/sensors/1.0/BpHwSensors.h",
-        "android/hardware/sensors/1.0/BsSensors.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.sensors@1.0",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.sensors@1.0_genc++"],
-    generated_headers: ["android.hardware.sensors@1.0_genc++_headers"],
-    export_generated_headers: ["android.hardware.sensors@1.0_genc++_headers"],
-    vendor_available: true,
-    vndk: {
-        enabled: true,
-    },
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-    ],
-}
-
-// This package is not java compatible. Not creating java target.
-
-genrule {
-    name: "android.hardware.sensors-V1.0-java-constants_gen_java",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Ljava-constants -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.sensors@1.0",
-    srcs: [
-        ":android.hardware.sensors@1.0_hal",
-    ],
-    out: [
-        "android/hardware/sensors/V1_0/Constants.java",
-    ],
-}
-
-java_library {
-    name: "android.hardware.sensors-V1.0-java-constants",
-    no_framework_libs: true,
-    defaults: ["hidl-java-module-defaults"],
-    srcs: [":android.hardware.sensors-V1.0-java-constants_gen_java"],
-}
-
-genrule {
-    name: "android.hardware.sensors@1.0-adapter-helper_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.sensors@1.0",
-    srcs: [
-        ":android.hardware.sensors@1.0_hal",
-    ],
-    out: [
-        "android/hardware/sensors/1.0/ASensors.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.sensors@1.0-adapter-helper_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.sensors@1.0",
-    srcs: [
-        ":android.hardware.sensors@1.0_hal",
-    ],
-    out: [
-        "android/hardware/sensors/1.0/ASensors.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.sensors@1.0-adapter-helper",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.sensors@1.0-adapter-helper_genc++"],
-    generated_headers: ["android.hardware.sensors@1.0-adapter-helper_genc++_headers"],
-    export_generated_headers: ["android.hardware.sensors@1.0-adapter-helper_genc++_headers"],
-    vendor_available: true,
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-        "libhidladapter",
-        "android.hardware.sensors@1.0",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-        "libhidladapter",
-        "android.hardware.sensors@1.0",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-}
-
-genrule {
-    name: "android.hardware.sensors@1.0-adapter_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-main -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.sensors@1.0",
-    out: ["main.cpp"]
-}
-
-cc_test {
-    name: "android.hardware.sensors@1.0-adapter",
-    defaults: ["hidl-module-defaults"],
-    shared_libs: [
-        "libhidladapter",
-        "libhidlbase",
-        "libhidltransport",
-        "libutils",
-        "android.hardware.sensors@1.0",
-        "android.hardware.sensors@1.0-adapter-helper",
-    ],
-    generated_sources: ["android.hardware.sensors@1.0-adapter_genc++"],
-}
diff --git a/soundtrigger/2.0/Android.bp b/soundtrigger/2.0/Android.bp
index 64e98a2..92f031a 100644
--- a/soundtrigger/2.0/Android.bp
+++ b/soundtrigger/2.0/Android.bp
@@ -1,159 +1,26 @@
-// This file is autogenerated by hidl-gen. Do not edit manually.
+// This file is autogenerated by hidl-gen -Landroidbp.
 
-filegroup {
-    name: "android.hardware.soundtrigger@2.0_hal",
+hidl_interface {
+    name: "android.hardware.soundtrigger@2.0",
+    root: "android.hardware",
+    vndk: {
+        enabled: true,
+    },
     srcs: [
         "types.hal",
         "ISoundTriggerHw.hal",
         "ISoundTriggerHwCallback.hal",
     ],
-}
-
-genrule {
-    name: "android.hardware.soundtrigger@2.0_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.soundtrigger@2.0",
-    srcs: [
-        ":android.hardware.soundtrigger@2.0_hal",
-    ],
-    out: [
-        "android/hardware/soundtrigger/2.0/types.cpp",
-        "android/hardware/soundtrigger/2.0/SoundTriggerHwAll.cpp",
-        "android/hardware/soundtrigger/2.0/SoundTriggerHwCallbackAll.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.soundtrigger@2.0_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.soundtrigger@2.0",
-    srcs: [
-        ":android.hardware.soundtrigger@2.0_hal",
-    ],
-    out: [
-        "android/hardware/soundtrigger/2.0/types.h",
-        "android/hardware/soundtrigger/2.0/hwtypes.h",
-        "android/hardware/soundtrigger/2.0/ISoundTriggerHw.h",
-        "android/hardware/soundtrigger/2.0/IHwSoundTriggerHw.h",
-        "android/hardware/soundtrigger/2.0/BnHwSoundTriggerHw.h",
-        "android/hardware/soundtrigger/2.0/BpHwSoundTriggerHw.h",
-        "android/hardware/soundtrigger/2.0/BsSoundTriggerHw.h",
-        "android/hardware/soundtrigger/2.0/ISoundTriggerHwCallback.h",
-        "android/hardware/soundtrigger/2.0/IHwSoundTriggerHwCallback.h",
-        "android/hardware/soundtrigger/2.0/BnHwSoundTriggerHwCallback.h",
-        "android/hardware/soundtrigger/2.0/BpHwSoundTriggerHwCallback.h",
-        "android/hardware/soundtrigger/2.0/BsSoundTriggerHwCallback.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.soundtrigger@2.0",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.soundtrigger@2.0_genc++"],
-    generated_headers: ["android.hardware.soundtrigger@2.0_genc++_headers"],
-    export_generated_headers: ["android.hardware.soundtrigger@2.0_genc++_headers"],
-    vendor_available: true,
-    vndk: {
-        enabled: true,
-    },
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
+    interfaces: [
         "android.hardware.audio.common@2.0",
+        "android.hidl.base@1.0",
     ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-        "android.hardware.audio.common@2.0",
+    types: [
+        "ConfidenceLevel",
+        "PhraseRecognitionExtra",
+        "RecognitionMode",
+        "SoundModelType",
     ],
+    gen_java: false,
 }
 
-// This package is not java compatible. Not creating java target.
-
-// This package does not export any types. Not creating java constants export.
-
-
-genrule {
-    name: "android.hardware.soundtrigger@2.0-adapter-helper_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.soundtrigger@2.0",
-    srcs: [
-        ":android.hardware.soundtrigger@2.0_hal",
-    ],
-    out: [
-        "android/hardware/soundtrigger/2.0/ASoundTriggerHw.cpp",
-        "android/hardware/soundtrigger/2.0/ASoundTriggerHwCallback.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.soundtrigger@2.0-adapter-helper_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.soundtrigger@2.0",
-    srcs: [
-        ":android.hardware.soundtrigger@2.0_hal",
-    ],
-    out: [
-        "android/hardware/soundtrigger/2.0/ASoundTriggerHw.h",
-        "android/hardware/soundtrigger/2.0/ASoundTriggerHwCallback.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.soundtrigger@2.0-adapter-helper",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.soundtrigger@2.0-adapter-helper_genc++"],
-    generated_headers: ["android.hardware.soundtrigger@2.0-adapter-helper_genc++_headers"],
-    export_generated_headers: ["android.hardware.soundtrigger@2.0-adapter-helper_genc++_headers"],
-    vendor_available: true,
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-        "libhidladapter",
-        "android.hardware.audio.common@2.0",
-        "android.hardware.soundtrigger@2.0",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-        "libhidladapter",
-        "android.hardware.audio.common@2.0",
-        "android.hardware.soundtrigger@2.0",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-}
-
-genrule {
-    name: "android.hardware.soundtrigger@2.0-adapter_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-main -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.soundtrigger@2.0",
-    out: ["main.cpp"]
-}
-
-cc_test {
-    name: "android.hardware.soundtrigger@2.0-adapter",
-    defaults: ["hidl-module-defaults"],
-    shared_libs: [
-        "libhidladapter",
-        "libhidlbase",
-        "libhidltransport",
-        "libutils",
-        "android.hardware.audio.common@2.0",
-        "android.hardware.soundtrigger@2.0",
-        "android.hardware.soundtrigger@2.0-adapter-helper",
-    ],
-    generated_sources: ["android.hardware.soundtrigger@2.0-adapter_genc++"],
-}
diff --git a/tests/bar/1.0/Android.bp b/tests/bar/1.0/Android.bp
index be286b5..45c84bc 100644
--- a/tests/bar/1.0/Android.bp
+++ b/tests/bar/1.0/Android.bp
@@ -1,7 +1,8 @@
-// This file is autogenerated by hidl-gen. Do not edit manually.
+// This file is autogenerated by hidl-gen -Landroidbp.
 
-filegroup {
-    name: "android.hardware.tests.bar@1.0_hal",
+hidl_interface {
+    name: "android.hardware.tests.bar@1.0",
+    root: "android.hardware",
     srcs: [
         "types.hal",
         "IBar.hal",
@@ -10,176 +11,13 @@
         "IImportRules.hal",
         "IImportTypes.hal",
     ],
-}
-
-genrule {
-    name: "android.hardware.tests.bar@1.0_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.bar@1.0",
-    srcs: [
-        ":android.hardware.tests.bar@1.0_hal",
-    ],
-    out: [
-        "android/hardware/tests/bar/1.0/types.cpp",
-        "android/hardware/tests/bar/1.0/BarAll.cpp",
-        "android/hardware/tests/bar/1.0/ComplicatedAll.cpp",
-        "android/hardware/tests/bar/1.0/FooCallbackAll.cpp",
-        "android/hardware/tests/bar/1.0/ImportRulesAll.cpp",
-        "android/hardware/tests/bar/1.0/ImportTypesAll.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.tests.bar@1.0_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.bar@1.0",
-    srcs: [
-        ":android.hardware.tests.bar@1.0_hal",
-    ],
-    out: [
-        "android/hardware/tests/bar/1.0/types.h",
-        "android/hardware/tests/bar/1.0/hwtypes.h",
-        "android/hardware/tests/bar/1.0/IBar.h",
-        "android/hardware/tests/bar/1.0/IHwBar.h",
-        "android/hardware/tests/bar/1.0/BnHwBar.h",
-        "android/hardware/tests/bar/1.0/BpHwBar.h",
-        "android/hardware/tests/bar/1.0/BsBar.h",
-        "android/hardware/tests/bar/1.0/IComplicated.h",
-        "android/hardware/tests/bar/1.0/IHwComplicated.h",
-        "android/hardware/tests/bar/1.0/BnHwComplicated.h",
-        "android/hardware/tests/bar/1.0/BpHwComplicated.h",
-        "android/hardware/tests/bar/1.0/BsComplicated.h",
-        "android/hardware/tests/bar/1.0/IFooCallback.h",
-        "android/hardware/tests/bar/1.0/IHwFooCallback.h",
-        "android/hardware/tests/bar/1.0/BnHwFooCallback.h",
-        "android/hardware/tests/bar/1.0/BpHwFooCallback.h",
-        "android/hardware/tests/bar/1.0/BsFooCallback.h",
-        "android/hardware/tests/bar/1.0/IImportRules.h",
-        "android/hardware/tests/bar/1.0/IHwImportRules.h",
-        "android/hardware/tests/bar/1.0/BnHwImportRules.h",
-        "android/hardware/tests/bar/1.0/BpHwImportRules.h",
-        "android/hardware/tests/bar/1.0/BsImportRules.h",
-        "android/hardware/tests/bar/1.0/IImportTypes.h",
-        "android/hardware/tests/bar/1.0/IHwImportTypes.h",
-        "android/hardware/tests/bar/1.0/BnHwImportTypes.h",
-        "android/hardware/tests/bar/1.0/BpHwImportTypes.h",
-        "android/hardware/tests/bar/1.0/BsImportTypes.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.tests.bar@1.0",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.tests.bar@1.0_genc++"],
-    generated_headers: ["android.hardware.tests.bar@1.0_genc++_headers"],
-    export_generated_headers: ["android.hardware.tests.bar@1.0_genc++_headers"],
-    vendor_available: true,
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
+    interfaces: [
         "android.hardware.tests.foo@1.0",
+        "android.hidl.base@1.0",
     ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-        "android.hardware.tests.foo@1.0",
+    types: [
+        "Def",
     ],
+    gen_java: false,
 }
 
-// This package is not java compatible. Not creating java target.
-
-// This package does not export any types. Not creating java constants export.
-
-
-genrule {
-    name: "android.hardware.tests.bar@1.0-adapter-helper_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.bar@1.0",
-    srcs: [
-        ":android.hardware.tests.bar@1.0_hal",
-    ],
-    out: [
-        "android/hardware/tests/bar/1.0/ABar.cpp",
-        "android/hardware/tests/bar/1.0/AComplicated.cpp",
-        "android/hardware/tests/bar/1.0/AFooCallback.cpp",
-        "android/hardware/tests/bar/1.0/AImportRules.cpp",
-        "android/hardware/tests/bar/1.0/AImportTypes.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.tests.bar@1.0-adapter-helper_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.bar@1.0",
-    srcs: [
-        ":android.hardware.tests.bar@1.0_hal",
-    ],
-    out: [
-        "android/hardware/tests/bar/1.0/ABar.h",
-        "android/hardware/tests/bar/1.0/AComplicated.h",
-        "android/hardware/tests/bar/1.0/AFooCallback.h",
-        "android/hardware/tests/bar/1.0/AImportRules.h",
-        "android/hardware/tests/bar/1.0/AImportTypes.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.tests.bar@1.0-adapter-helper",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.tests.bar@1.0-adapter-helper_genc++"],
-    generated_headers: ["android.hardware.tests.bar@1.0-adapter-helper_genc++_headers"],
-    export_generated_headers: ["android.hardware.tests.bar@1.0-adapter-helper_genc++_headers"],
-    vendor_available: true,
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-        "libhidladapter",
-        "android.hardware.tests.bar@1.0",
-        "android.hardware.tests.foo@1.0",
-        "android.hardware.tests.foo@1.0-adapter-helper",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-        "libhidladapter",
-        "android.hardware.tests.bar@1.0",
-        "android.hardware.tests.foo@1.0",
-        "android.hardware.tests.foo@1.0-adapter-helper",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-}
-
-genrule {
-    name: "android.hardware.tests.bar@1.0-adapter_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-main -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.bar@1.0",
-    out: ["main.cpp"]
-}
-
-cc_test {
-    name: "android.hardware.tests.bar@1.0-adapter",
-    defaults: ["hidl-module-defaults"],
-    shared_libs: [
-        "libhidladapter",
-        "libhidlbase",
-        "libhidltransport",
-        "libutils",
-        "android.hardware.tests.bar@1.0",
-        "android.hardware.tests.foo@1.0",
-        "android.hardware.tests.bar@1.0-adapter-helper",
-    ],
-    generated_sources: ["android.hardware.tests.bar@1.0-adapter_genc++"],
-}
diff --git a/tests/baz/1.0/Android.bp b/tests/baz/1.0/Android.bp
index 6281ddc..edf8fe6 100644
--- a/tests/baz/1.0/Android.bp
+++ b/tests/baz/1.0/Android.bp
@@ -1,7 +1,8 @@
-// This file is autogenerated by hidl-gen. Do not edit manually.
+// This file is autogenerated by hidl-gen -Landroidbp.
 
-filegroup {
-    name: "android.hardware.tests.baz@1.0_hal",
+hidl_interface {
+    name: "android.hardware.tests.baz@1.0",
+    root: "android.hardware",
     srcs: [
         "types.hal",
         "IBase.hal",
@@ -9,185 +10,11 @@
         "IBazCallback.hal",
         "IQuux.hal",
     ],
+    interfaces: [
+        "android.hidl.base@1.0",
+    ],
+    types: [
+    ],
+    gen_java: true,
 }
 
-genrule {
-    name: "android.hardware.tests.baz@1.0_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.baz@1.0",
-    srcs: [
-        ":android.hardware.tests.baz@1.0_hal",
-    ],
-    out: [
-        "android/hardware/tests/baz/1.0/types.cpp",
-        "android/hardware/tests/baz/1.0/BaseAll.cpp",
-        "android/hardware/tests/baz/1.0/BazAll.cpp",
-        "android/hardware/tests/baz/1.0/BazCallbackAll.cpp",
-        "android/hardware/tests/baz/1.0/QuuxAll.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.tests.baz@1.0_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.baz@1.0",
-    srcs: [
-        ":android.hardware.tests.baz@1.0_hal",
-    ],
-    out: [
-        "android/hardware/tests/baz/1.0/types.h",
-        "android/hardware/tests/baz/1.0/hwtypes.h",
-        "android/hardware/tests/baz/1.0/IBase.h",
-        "android/hardware/tests/baz/1.0/IHwBase.h",
-        "android/hardware/tests/baz/1.0/BnHwBase.h",
-        "android/hardware/tests/baz/1.0/BpHwBase.h",
-        "android/hardware/tests/baz/1.0/BsBase.h",
-        "android/hardware/tests/baz/1.0/IBaz.h",
-        "android/hardware/tests/baz/1.0/IHwBaz.h",
-        "android/hardware/tests/baz/1.0/BnHwBaz.h",
-        "android/hardware/tests/baz/1.0/BpHwBaz.h",
-        "android/hardware/tests/baz/1.0/BsBaz.h",
-        "android/hardware/tests/baz/1.0/IBazCallback.h",
-        "android/hardware/tests/baz/1.0/IHwBazCallback.h",
-        "android/hardware/tests/baz/1.0/BnHwBazCallback.h",
-        "android/hardware/tests/baz/1.0/BpHwBazCallback.h",
-        "android/hardware/tests/baz/1.0/BsBazCallback.h",
-        "android/hardware/tests/baz/1.0/IQuux.h",
-        "android/hardware/tests/baz/1.0/IHwQuux.h",
-        "android/hardware/tests/baz/1.0/BnHwQuux.h",
-        "android/hardware/tests/baz/1.0/BpHwQuux.h",
-        "android/hardware/tests/baz/1.0/BsQuux.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.tests.baz@1.0",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.tests.baz@1.0_genc++"],
-    generated_headers: ["android.hardware.tests.baz@1.0_genc++_headers"],
-    export_generated_headers: ["android.hardware.tests.baz@1.0_genc++_headers"],
-    vendor_available: true,
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-    ],
-}
-
-genrule {
-    name: "android.hardware.tests.baz-V1.0-java_gen_java",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Ljava -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.baz@1.0",
-    srcs: [
-        ":android.hardware.tests.baz@1.0_hal",
-    ],
-    out: [
-        "android/hardware/tests/baz/V1_0/IBase.java",
-        "android/hardware/tests/baz/V1_0/IBaz.java",
-        "android/hardware/tests/baz/V1_0/IBazCallback.java",
-        "android/hardware/tests/baz/V1_0/IQuux.java",
-    ],
-}
-
-java_library {
-    name: "android.hardware.tests.baz-V1.0-java",
-    no_framework_libs: true,
-    defaults: ["hidl-java-module-defaults"],
-    srcs: [":android.hardware.tests.baz-V1.0-java_gen_java"],
-    libs: [
-        "hwbinder",
-        "android.hidl.base-V1.0-java",
-    ]
-}
-
-// This package does not export any types. Not creating java constants export.
-
-
-genrule {
-    name: "android.hardware.tests.baz@1.0-adapter-helper_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.baz@1.0",
-    srcs: [
-        ":android.hardware.tests.baz@1.0_hal",
-    ],
-    out: [
-        "android/hardware/tests/baz/1.0/ABase.cpp",
-        "android/hardware/tests/baz/1.0/ABaz.cpp",
-        "android/hardware/tests/baz/1.0/ABazCallback.cpp",
-        "android/hardware/tests/baz/1.0/AQuux.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.tests.baz@1.0-adapter-helper_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.baz@1.0",
-    srcs: [
-        ":android.hardware.tests.baz@1.0_hal",
-    ],
-    out: [
-        "android/hardware/tests/baz/1.0/ABase.h",
-        "android/hardware/tests/baz/1.0/ABaz.h",
-        "android/hardware/tests/baz/1.0/ABazCallback.h",
-        "android/hardware/tests/baz/1.0/AQuux.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.tests.baz@1.0-adapter-helper",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.tests.baz@1.0-adapter-helper_genc++"],
-    generated_headers: ["android.hardware.tests.baz@1.0-adapter-helper_genc++_headers"],
-    export_generated_headers: ["android.hardware.tests.baz@1.0-adapter-helper_genc++_headers"],
-    vendor_available: true,
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-        "libhidladapter",
-        "android.hardware.tests.baz@1.0",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-        "libhidladapter",
-        "android.hardware.tests.baz@1.0",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-}
-
-genrule {
-    name: "android.hardware.tests.baz@1.0-adapter_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-main -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.baz@1.0",
-    out: ["main.cpp"]
-}
-
-cc_test {
-    name: "android.hardware.tests.baz@1.0-adapter",
-    defaults: ["hidl-module-defaults"],
-    shared_libs: [
-        "libhidladapter",
-        "libhidlbase",
-        "libhidltransport",
-        "libutils",
-        "android.hardware.tests.baz@1.0",
-        "android.hardware.tests.baz@1.0-adapter-helper",
-    ],
-    generated_sources: ["android.hardware.tests.baz@1.0-adapter_genc++"],
-}
diff --git a/tests/expression/1.0/Android.bp b/tests/expression/1.0/Android.bp
index 6209549..61ca6ac 100644
--- a/tests/expression/1.0/Android.bp
+++ b/tests/expression/1.0/Android.bp
@@ -1,169 +1,15 @@
-// This file is autogenerated by hidl-gen. Do not edit manually.
+// This file is autogenerated by hidl-gen -Landroidbp.
 
-filegroup {
-    name: "android.hardware.tests.expression@1.0_hal",
+hidl_interface {
+    name: "android.hardware.tests.expression@1.0",
+    root: "android.hardware",
     srcs: [
         "IExpression.hal",
         "IExpressionExt.hal",
     ],
+    interfaces: [
+        "android.hidl.base@1.0",
+    ],
+    gen_java: true,
 }
 
-genrule {
-    name: "android.hardware.tests.expression@1.0_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.expression@1.0",
-    srcs: [
-        ":android.hardware.tests.expression@1.0_hal",
-    ],
-    out: [
-        "android/hardware/tests/expression/1.0/ExpressionAll.cpp",
-        "android/hardware/tests/expression/1.0/ExpressionExtAll.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.tests.expression@1.0_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.expression@1.0",
-    srcs: [
-        ":android.hardware.tests.expression@1.0_hal",
-    ],
-    out: [
-        "android/hardware/tests/expression/1.0/IExpression.h",
-        "android/hardware/tests/expression/1.0/IHwExpression.h",
-        "android/hardware/tests/expression/1.0/BnHwExpression.h",
-        "android/hardware/tests/expression/1.0/BpHwExpression.h",
-        "android/hardware/tests/expression/1.0/BsExpression.h",
-        "android/hardware/tests/expression/1.0/IExpressionExt.h",
-        "android/hardware/tests/expression/1.0/IHwExpressionExt.h",
-        "android/hardware/tests/expression/1.0/BnHwExpressionExt.h",
-        "android/hardware/tests/expression/1.0/BpHwExpressionExt.h",
-        "android/hardware/tests/expression/1.0/BsExpressionExt.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.tests.expression@1.0",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.tests.expression@1.0_genc++"],
-    generated_headers: ["android.hardware.tests.expression@1.0_genc++_headers"],
-    export_generated_headers: ["android.hardware.tests.expression@1.0_genc++_headers"],
-    vendor_available: true,
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-    ],
-}
-
-genrule {
-    name: "android.hardware.tests.expression-V1.0-java_gen_java",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Ljava -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.expression@1.0",
-    srcs: [
-        ":android.hardware.tests.expression@1.0_hal",
-    ],
-    out: [
-        "android/hardware/tests/expression/V1_0/IExpression.java",
-        "android/hardware/tests/expression/V1_0/IExpressionExt.java",
-    ],
-}
-
-java_library {
-    name: "android.hardware.tests.expression-V1.0-java",
-    no_framework_libs: true,
-    defaults: ["hidl-java-module-defaults"],
-    srcs: [":android.hardware.tests.expression-V1.0-java_gen_java"],
-    libs: [
-        "hwbinder",
-        "android.hidl.base-V1.0-java",
-    ]
-}
-
-// This package does not export any types. Not creating java constants export.
-
-
-genrule {
-    name: "android.hardware.tests.expression@1.0-adapter-helper_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.expression@1.0",
-    srcs: [
-        ":android.hardware.tests.expression@1.0_hal",
-    ],
-    out: [
-        "android/hardware/tests/expression/1.0/AExpression.cpp",
-        "android/hardware/tests/expression/1.0/AExpressionExt.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.tests.expression@1.0-adapter-helper_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.expression@1.0",
-    srcs: [
-        ":android.hardware.tests.expression@1.0_hal",
-    ],
-    out: [
-        "android/hardware/tests/expression/1.0/AExpression.h",
-        "android/hardware/tests/expression/1.0/AExpressionExt.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.tests.expression@1.0-adapter-helper",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.tests.expression@1.0-adapter-helper_genc++"],
-    generated_headers: ["android.hardware.tests.expression@1.0-adapter-helper_genc++_headers"],
-    export_generated_headers: ["android.hardware.tests.expression@1.0-adapter-helper_genc++_headers"],
-    vendor_available: true,
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-        "libhidladapter",
-        "android.hardware.tests.expression@1.0",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-        "libhidladapter",
-        "android.hardware.tests.expression@1.0",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-}
-
-genrule {
-    name: "android.hardware.tests.expression@1.0-adapter_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-main -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.expression@1.0",
-    out: ["main.cpp"]
-}
-
-cc_test {
-    name: "android.hardware.tests.expression@1.0-adapter",
-    defaults: ["hidl-module-defaults"],
-    shared_libs: [
-        "libhidladapter",
-        "libhidlbase",
-        "libhidltransport",
-        "libutils",
-        "android.hardware.tests.expression@1.0",
-        "android.hardware.tests.expression@1.0-adapter-helper",
-    ],
-    generated_sources: ["android.hardware.tests.expression@1.0-adapter_genc++"],
-}
diff --git a/tests/extension/light/2.0/Android.bp b/tests/extension/light/2.0/Android.bp
index 612c2d6..58c8392 100644
--- a/tests/extension/light/2.0/Android.bp
+++ b/tests/extension/light/2.0/Android.bp
@@ -1,174 +1,21 @@
-// This file is autogenerated by hidl-gen. Do not edit manually.
+// This file is autogenerated by hidl-gen -Landroidbp.
 
-filegroup {
-    name: "android.hardware.tests.extension.light@2.0_hal",
+hidl_interface {
+    name: "android.hardware.tests.extension.light@2.0",
+    root: "android.hardware",
     srcs: [
         "types.hal",
         "ILight.hal",
     ],
-}
-
-genrule {
-    name: "android.hardware.tests.extension.light@2.0_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.extension.light@2.0",
-    srcs: [
-        ":android.hardware.tests.extension.light@2.0_hal",
-    ],
-    out: [
-        "android/hardware/tests/extension/light/2.0/types.cpp",
-        "android/hardware/tests/extension/light/2.0/LightAll.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.tests.extension.light@2.0_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.extension.light@2.0",
-    srcs: [
-        ":android.hardware.tests.extension.light@2.0_hal",
-    ],
-    out: [
-        "android/hardware/tests/extension/light/2.0/types.h",
-        "android/hardware/tests/extension/light/2.0/hwtypes.h",
-        "android/hardware/tests/extension/light/2.0/ILight.h",
-        "android/hardware/tests/extension/light/2.0/IHwLight.h",
-        "android/hardware/tests/extension/light/2.0/BnHwLight.h",
-        "android/hardware/tests/extension/light/2.0/BpHwLight.h",
-        "android/hardware/tests/extension/light/2.0/BsLight.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.tests.extension.light@2.0",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.tests.extension.light@2.0_genc++"],
-    generated_headers: ["android.hardware.tests.extension.light@2.0_genc++_headers"],
-    export_generated_headers: ["android.hardware.tests.extension.light@2.0_genc++_headers"],
-    vendor_available: true,
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
+    interfaces: [
         "android.hardware.light@2.0",
+        "android.hidl.base@1.0",
     ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-        "android.hardware.light@2.0",
+    types: [
+        "Brightness",
+        "Default",
+        "LightState",
     ],
+    gen_java: true,
 }
 
-genrule {
-    name: "android.hardware.tests.extension.light-V2.0-java_gen_java",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Ljava -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.extension.light@2.0",
-    srcs: [
-        ":android.hardware.tests.extension.light@2.0_hal",
-    ],
-    out: [
-        "android/hardware/tests/extension/light/V2_0/Brightness.java",
-        "android/hardware/tests/extension/light/V2_0/Default.java",
-        "android/hardware/tests/extension/light/V2_0/LightState.java",
-        "android/hardware/tests/extension/light/V2_0/ILight.java",
-    ],
-}
-
-java_library {
-    name: "android.hardware.tests.extension.light-V2.0-java",
-    no_framework_libs: true,
-    defaults: ["hidl-java-module-defaults"],
-    srcs: [":android.hardware.tests.extension.light-V2.0-java_gen_java"],
-    libs: [
-        "hwbinder",
-        "android.hardware.light-V2.0-java",
-        "android.hidl.base-V1.0-java",
-    ]
-}
-
-// This package does not export any types. Not creating java constants export.
-
-
-genrule {
-    name: "android.hardware.tests.extension.light@2.0-adapter-helper_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.extension.light@2.0",
-    srcs: [
-        ":android.hardware.tests.extension.light@2.0_hal",
-    ],
-    out: [
-        "android/hardware/tests/extension/light/2.0/ALight.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.tests.extension.light@2.0-adapter-helper_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.extension.light@2.0",
-    srcs: [
-        ":android.hardware.tests.extension.light@2.0_hal",
-    ],
-    out: [
-        "android/hardware/tests/extension/light/2.0/ALight.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.tests.extension.light@2.0-adapter-helper",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.tests.extension.light@2.0-adapter-helper_genc++"],
-    generated_headers: ["android.hardware.tests.extension.light@2.0-adapter-helper_genc++_headers"],
-    export_generated_headers: ["android.hardware.tests.extension.light@2.0-adapter-helper_genc++_headers"],
-    vendor_available: true,
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-        "libhidladapter",
-        "android.hardware.light@2.0",
-        "android.hardware.tests.extension.light@2.0",
-        "android.hardware.light@2.0-adapter-helper",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-        "libhidladapter",
-        "android.hardware.light@2.0",
-        "android.hardware.tests.extension.light@2.0",
-        "android.hardware.light@2.0-adapter-helper",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-}
-
-genrule {
-    name: "android.hardware.tests.extension.light@2.0-adapter_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-main -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.extension.light@2.0",
-    out: ["main.cpp"]
-}
-
-cc_test {
-    name: "android.hardware.tests.extension.light@2.0-adapter",
-    defaults: ["hidl-module-defaults"],
-    shared_libs: [
-        "libhidladapter",
-        "libhidlbase",
-        "libhidltransport",
-        "libutils",
-        "android.hardware.light@2.0",
-        "android.hardware.tests.extension.light@2.0",
-        "android.hardware.tests.extension.light@2.0-adapter-helper",
-    ],
-    generated_sources: ["android.hardware.tests.extension.light@2.0-adapter_genc++"],
-}
diff --git a/tests/foo/1.0/Android.bp b/tests/foo/1.0/Android.bp
index 3130270..986115c 100644
--- a/tests/foo/1.0/Android.bp
+++ b/tests/foo/1.0/Android.bp
@@ -1,7 +1,8 @@
-// This file is autogenerated by hidl-gen. Do not edit manually.
+// This file is autogenerated by hidl-gen -Landroidbp.
 
-filegroup {
-    name: "android.hardware.tests.foo@1.0_hal",
+hidl_interface {
+    name: "android.hardware.tests.foo@1.0",
+    root: "android.hardware",
     srcs: [
         "types.hal",
         "IFoo.hal",
@@ -10,169 +11,15 @@
         "ISimple.hal",
         "ITheirTypes.hal",
     ],
+    interfaces: [
+        "android.hidl.base@1.0",
+    ],
+    types: [
+        "Abc",
+        "Def",
+        "Outer",
+        "Unrelated",
+    ],
+    gen_java: false,
 }
 
-genrule {
-    name: "android.hardware.tests.foo@1.0_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.foo@1.0",
-    srcs: [
-        ":android.hardware.tests.foo@1.0_hal",
-    ],
-    out: [
-        "android/hardware/tests/foo/1.0/types.cpp",
-        "android/hardware/tests/foo/1.0/FooAll.cpp",
-        "android/hardware/tests/foo/1.0/FooCallbackAll.cpp",
-        "android/hardware/tests/foo/1.0/MyTypesAll.cpp",
-        "android/hardware/tests/foo/1.0/SimpleAll.cpp",
-        "android/hardware/tests/foo/1.0/TheirTypesAll.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.tests.foo@1.0_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.foo@1.0",
-    srcs: [
-        ":android.hardware.tests.foo@1.0_hal",
-    ],
-    out: [
-        "android/hardware/tests/foo/1.0/types.h",
-        "android/hardware/tests/foo/1.0/hwtypes.h",
-        "android/hardware/tests/foo/1.0/IFoo.h",
-        "android/hardware/tests/foo/1.0/IHwFoo.h",
-        "android/hardware/tests/foo/1.0/BnHwFoo.h",
-        "android/hardware/tests/foo/1.0/BpHwFoo.h",
-        "android/hardware/tests/foo/1.0/BsFoo.h",
-        "android/hardware/tests/foo/1.0/IFooCallback.h",
-        "android/hardware/tests/foo/1.0/IHwFooCallback.h",
-        "android/hardware/tests/foo/1.0/BnHwFooCallback.h",
-        "android/hardware/tests/foo/1.0/BpHwFooCallback.h",
-        "android/hardware/tests/foo/1.0/BsFooCallback.h",
-        "android/hardware/tests/foo/1.0/IMyTypes.h",
-        "android/hardware/tests/foo/1.0/IHwMyTypes.h",
-        "android/hardware/tests/foo/1.0/BnHwMyTypes.h",
-        "android/hardware/tests/foo/1.0/BpHwMyTypes.h",
-        "android/hardware/tests/foo/1.0/BsMyTypes.h",
-        "android/hardware/tests/foo/1.0/ISimple.h",
-        "android/hardware/tests/foo/1.0/IHwSimple.h",
-        "android/hardware/tests/foo/1.0/BnHwSimple.h",
-        "android/hardware/tests/foo/1.0/BpHwSimple.h",
-        "android/hardware/tests/foo/1.0/BsSimple.h",
-        "android/hardware/tests/foo/1.0/ITheirTypes.h",
-        "android/hardware/tests/foo/1.0/IHwTheirTypes.h",
-        "android/hardware/tests/foo/1.0/BnHwTheirTypes.h",
-        "android/hardware/tests/foo/1.0/BpHwTheirTypes.h",
-        "android/hardware/tests/foo/1.0/BsTheirTypes.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.tests.foo@1.0",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.tests.foo@1.0_genc++"],
-    generated_headers: ["android.hardware.tests.foo@1.0_genc++_headers"],
-    export_generated_headers: ["android.hardware.tests.foo@1.0_genc++_headers"],
-    vendor_available: true,
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-    ],
-}
-
-// This package is not java compatible. Not creating java target.
-
-// This package does not export any types. Not creating java constants export.
-
-
-genrule {
-    name: "android.hardware.tests.foo@1.0-adapter-helper_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.foo@1.0",
-    srcs: [
-        ":android.hardware.tests.foo@1.0_hal",
-    ],
-    out: [
-        "android/hardware/tests/foo/1.0/AFoo.cpp",
-        "android/hardware/tests/foo/1.0/AFooCallback.cpp",
-        "android/hardware/tests/foo/1.0/AMyTypes.cpp",
-        "android/hardware/tests/foo/1.0/ASimple.cpp",
-        "android/hardware/tests/foo/1.0/ATheirTypes.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.tests.foo@1.0-adapter-helper_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.foo@1.0",
-    srcs: [
-        ":android.hardware.tests.foo@1.0_hal",
-    ],
-    out: [
-        "android/hardware/tests/foo/1.0/AFoo.h",
-        "android/hardware/tests/foo/1.0/AFooCallback.h",
-        "android/hardware/tests/foo/1.0/AMyTypes.h",
-        "android/hardware/tests/foo/1.0/ASimple.h",
-        "android/hardware/tests/foo/1.0/ATheirTypes.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.tests.foo@1.0-adapter-helper",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.tests.foo@1.0-adapter-helper_genc++"],
-    generated_headers: ["android.hardware.tests.foo@1.0-adapter-helper_genc++_headers"],
-    export_generated_headers: ["android.hardware.tests.foo@1.0-adapter-helper_genc++_headers"],
-    vendor_available: true,
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-        "libhidladapter",
-        "android.hardware.tests.foo@1.0",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-        "libhidladapter",
-        "android.hardware.tests.foo@1.0",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-}
-
-genrule {
-    name: "android.hardware.tests.foo@1.0-adapter_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-main -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.foo@1.0",
-    out: ["main.cpp"]
-}
-
-cc_test {
-    name: "android.hardware.tests.foo@1.0-adapter",
-    defaults: ["hidl-module-defaults"],
-    shared_libs: [
-        "libhidladapter",
-        "libhidlbase",
-        "libhidltransport",
-        "libutils",
-        "android.hardware.tests.foo@1.0",
-        "android.hardware.tests.foo@1.0-adapter-helper",
-    ],
-    generated_sources: ["android.hardware.tests.foo@1.0-adapter_genc++"],
-}
diff --git a/tests/hash/1.0/Android.bp b/tests/hash/1.0/Android.bp
index 3d5822f..20334cd 100644
--- a/tests/hash/1.0/Android.bp
+++ b/tests/hash/1.0/Android.bp
@@ -1,159 +1,14 @@
-// This file is autogenerated by hidl-gen. Do not edit manually.
+// This file is autogenerated by hidl-gen -Landroidbp.
 
-filegroup {
-    name: "android.hardware.tests.hash@1.0_hal",
+hidl_interface {
+    name: "android.hardware.tests.hash@1.0",
+    root: "android.hardware",
     srcs: [
         "IHash.hal",
     ],
+    interfaces: [
+        "android.hidl.base@1.0",
+    ],
+    gen_java: true,
 }
 
-genrule {
-    name: "android.hardware.tests.hash@1.0_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.hash@1.0",
-    srcs: [
-        ":android.hardware.tests.hash@1.0_hal",
-    ],
-    out: [
-        "android/hardware/tests/hash/1.0/HashAll.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.tests.hash@1.0_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.hash@1.0",
-    srcs: [
-        ":android.hardware.tests.hash@1.0_hal",
-    ],
-    out: [
-        "android/hardware/tests/hash/1.0/IHash.h",
-        "android/hardware/tests/hash/1.0/IHwHash.h",
-        "android/hardware/tests/hash/1.0/BnHwHash.h",
-        "android/hardware/tests/hash/1.0/BpHwHash.h",
-        "android/hardware/tests/hash/1.0/BsHash.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.tests.hash@1.0",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.tests.hash@1.0_genc++"],
-    generated_headers: ["android.hardware.tests.hash@1.0_genc++_headers"],
-    export_generated_headers: ["android.hardware.tests.hash@1.0_genc++_headers"],
-    vendor_available: true,
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-    ],
-}
-
-genrule {
-    name: "android.hardware.tests.hash-V1.0-java_gen_java",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Ljava -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.hash@1.0",
-    srcs: [
-        ":android.hardware.tests.hash@1.0_hal",
-    ],
-    out: [
-        "android/hardware/tests/hash/V1_0/IHash.java",
-    ],
-}
-
-java_library {
-    name: "android.hardware.tests.hash-V1.0-java",
-    no_framework_libs: true,
-    defaults: ["hidl-java-module-defaults"],
-    srcs: [":android.hardware.tests.hash-V1.0-java_gen_java"],
-    libs: [
-        "hwbinder",
-        "android.hidl.base-V1.0-java",
-    ]
-}
-
-// This package does not export any types. Not creating java constants export.
-
-
-genrule {
-    name: "android.hardware.tests.hash@1.0-adapter-helper_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.hash@1.0",
-    srcs: [
-        ":android.hardware.tests.hash@1.0_hal",
-    ],
-    out: [
-        "android/hardware/tests/hash/1.0/AHash.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.tests.hash@1.0-adapter-helper_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.hash@1.0",
-    srcs: [
-        ":android.hardware.tests.hash@1.0_hal",
-    ],
-    out: [
-        "android/hardware/tests/hash/1.0/AHash.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.tests.hash@1.0-adapter-helper",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.tests.hash@1.0-adapter-helper_genc++"],
-    generated_headers: ["android.hardware.tests.hash@1.0-adapter-helper_genc++_headers"],
-    export_generated_headers: ["android.hardware.tests.hash@1.0-adapter-helper_genc++_headers"],
-    vendor_available: true,
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-        "libhidladapter",
-        "android.hardware.tests.hash@1.0",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-        "libhidladapter",
-        "android.hardware.tests.hash@1.0",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-}
-
-genrule {
-    name: "android.hardware.tests.hash@1.0-adapter_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-main -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.hash@1.0",
-    out: ["main.cpp"]
-}
-
-cc_test {
-    name: "android.hardware.tests.hash@1.0-adapter",
-    defaults: ["hidl-module-defaults"],
-    shared_libs: [
-        "libhidladapter",
-        "libhidlbase",
-        "libhidltransport",
-        "libutils",
-        "android.hardware.tests.hash@1.0",
-        "android.hardware.tests.hash@1.0-adapter-helper",
-    ],
-    generated_sources: ["android.hardware.tests.hash@1.0-adapter_genc++"],
-}
diff --git a/tests/inheritance/1.0/Android.bp b/tests/inheritance/1.0/Android.bp
index 6b8c27e..1d36d07 100644
--- a/tests/inheritance/1.0/Android.bp
+++ b/tests/inheritance/1.0/Android.bp
@@ -1,189 +1,17 @@
-// This file is autogenerated by hidl-gen. Do not edit manually.
+// This file is autogenerated by hidl-gen -Landroidbp.
 
-filegroup {
-    name: "android.hardware.tests.inheritance@1.0_hal",
+hidl_interface {
+    name: "android.hardware.tests.inheritance@1.0",
+    root: "android.hardware",
     srcs: [
         "IChild.hal",
         "IFetcher.hal",
         "IGrandparent.hal",
         "IParent.hal",
     ],
+    interfaces: [
+        "android.hidl.base@1.0",
+    ],
+    gen_java: true,
 }
 
-genrule {
-    name: "android.hardware.tests.inheritance@1.0_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.inheritance@1.0",
-    srcs: [
-        ":android.hardware.tests.inheritance@1.0_hal",
-    ],
-    out: [
-        "android/hardware/tests/inheritance/1.0/ChildAll.cpp",
-        "android/hardware/tests/inheritance/1.0/FetcherAll.cpp",
-        "android/hardware/tests/inheritance/1.0/GrandparentAll.cpp",
-        "android/hardware/tests/inheritance/1.0/ParentAll.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.tests.inheritance@1.0_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.inheritance@1.0",
-    srcs: [
-        ":android.hardware.tests.inheritance@1.0_hal",
-    ],
-    out: [
-        "android/hardware/tests/inheritance/1.0/IChild.h",
-        "android/hardware/tests/inheritance/1.0/IHwChild.h",
-        "android/hardware/tests/inheritance/1.0/BnHwChild.h",
-        "android/hardware/tests/inheritance/1.0/BpHwChild.h",
-        "android/hardware/tests/inheritance/1.0/BsChild.h",
-        "android/hardware/tests/inheritance/1.0/IFetcher.h",
-        "android/hardware/tests/inheritance/1.0/IHwFetcher.h",
-        "android/hardware/tests/inheritance/1.0/BnHwFetcher.h",
-        "android/hardware/tests/inheritance/1.0/BpHwFetcher.h",
-        "android/hardware/tests/inheritance/1.0/BsFetcher.h",
-        "android/hardware/tests/inheritance/1.0/IGrandparent.h",
-        "android/hardware/tests/inheritance/1.0/IHwGrandparent.h",
-        "android/hardware/tests/inheritance/1.0/BnHwGrandparent.h",
-        "android/hardware/tests/inheritance/1.0/BpHwGrandparent.h",
-        "android/hardware/tests/inheritance/1.0/BsGrandparent.h",
-        "android/hardware/tests/inheritance/1.0/IParent.h",
-        "android/hardware/tests/inheritance/1.0/IHwParent.h",
-        "android/hardware/tests/inheritance/1.0/BnHwParent.h",
-        "android/hardware/tests/inheritance/1.0/BpHwParent.h",
-        "android/hardware/tests/inheritance/1.0/BsParent.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.tests.inheritance@1.0",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.tests.inheritance@1.0_genc++"],
-    generated_headers: ["android.hardware.tests.inheritance@1.0_genc++_headers"],
-    export_generated_headers: ["android.hardware.tests.inheritance@1.0_genc++_headers"],
-    vendor_available: true,
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-    ],
-}
-
-genrule {
-    name: "android.hardware.tests.inheritance-V1.0-java_gen_java",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Ljava -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.inheritance@1.0",
-    srcs: [
-        ":android.hardware.tests.inheritance@1.0_hal",
-    ],
-    out: [
-        "android/hardware/tests/inheritance/V1_0/IChild.java",
-        "android/hardware/tests/inheritance/V1_0/IFetcher.java",
-        "android/hardware/tests/inheritance/V1_0/IGrandparent.java",
-        "android/hardware/tests/inheritance/V1_0/IParent.java",
-    ],
-}
-
-java_library {
-    name: "android.hardware.tests.inheritance-V1.0-java",
-    no_framework_libs: true,
-    defaults: ["hidl-java-module-defaults"],
-    srcs: [":android.hardware.tests.inheritance-V1.0-java_gen_java"],
-    libs: [
-        "hwbinder",
-        "android.hidl.base-V1.0-java",
-    ]
-}
-
-// This package does not export any types. Not creating java constants export.
-
-
-genrule {
-    name: "android.hardware.tests.inheritance@1.0-adapter-helper_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.inheritance@1.0",
-    srcs: [
-        ":android.hardware.tests.inheritance@1.0_hal",
-    ],
-    out: [
-        "android/hardware/tests/inheritance/1.0/AChild.cpp",
-        "android/hardware/tests/inheritance/1.0/AFetcher.cpp",
-        "android/hardware/tests/inheritance/1.0/AGrandparent.cpp",
-        "android/hardware/tests/inheritance/1.0/AParent.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.tests.inheritance@1.0-adapter-helper_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.inheritance@1.0",
-    srcs: [
-        ":android.hardware.tests.inheritance@1.0_hal",
-    ],
-    out: [
-        "android/hardware/tests/inheritance/1.0/AChild.h",
-        "android/hardware/tests/inheritance/1.0/AFetcher.h",
-        "android/hardware/tests/inheritance/1.0/AGrandparent.h",
-        "android/hardware/tests/inheritance/1.0/AParent.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.tests.inheritance@1.0-adapter-helper",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.tests.inheritance@1.0-adapter-helper_genc++"],
-    generated_headers: ["android.hardware.tests.inheritance@1.0-adapter-helper_genc++_headers"],
-    export_generated_headers: ["android.hardware.tests.inheritance@1.0-adapter-helper_genc++_headers"],
-    vendor_available: true,
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-        "libhidladapter",
-        "android.hardware.tests.inheritance@1.0",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-        "libhidladapter",
-        "android.hardware.tests.inheritance@1.0",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-}
-
-genrule {
-    name: "android.hardware.tests.inheritance@1.0-adapter_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-main -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.inheritance@1.0",
-    out: ["main.cpp"]
-}
-
-cc_test {
-    name: "android.hardware.tests.inheritance@1.0-adapter",
-    defaults: ["hidl-module-defaults"],
-    shared_libs: [
-        "libhidladapter",
-        "libhidlbase",
-        "libhidltransport",
-        "libutils",
-        "android.hardware.tests.inheritance@1.0",
-        "android.hardware.tests.inheritance@1.0-adapter-helper",
-    ],
-    generated_sources: ["android.hardware.tests.inheritance@1.0-adapter_genc++"],
-}
diff --git a/tests/libhwbinder/1.0/Android.bp b/tests/libhwbinder/1.0/Android.bp
index 0aff0e9..d561002 100644
--- a/tests/libhwbinder/1.0/Android.bp
+++ b/tests/libhwbinder/1.0/Android.bp
@@ -1,169 +1,15 @@
-// This file is autogenerated by hidl-gen. Do not edit manually.
+// This file is autogenerated by hidl-gen -Landroidbp.
 
-filegroup {
-    name: "android.hardware.tests.libhwbinder@1.0_hal",
+hidl_interface {
+    name: "android.hardware.tests.libhwbinder@1.0",
+    root: "android.hardware",
     srcs: [
         "IBenchmark.hal",
         "IScheduleTest.hal",
     ],
+    interfaces: [
+        "android.hidl.base@1.0",
+    ],
+    gen_java: true,
 }
 
-genrule {
-    name: "android.hardware.tests.libhwbinder@1.0_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.libhwbinder@1.0",
-    srcs: [
-        ":android.hardware.tests.libhwbinder@1.0_hal",
-    ],
-    out: [
-        "android/hardware/tests/libhwbinder/1.0/BenchmarkAll.cpp",
-        "android/hardware/tests/libhwbinder/1.0/ScheduleTestAll.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.tests.libhwbinder@1.0_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.libhwbinder@1.0",
-    srcs: [
-        ":android.hardware.tests.libhwbinder@1.0_hal",
-    ],
-    out: [
-        "android/hardware/tests/libhwbinder/1.0/IBenchmark.h",
-        "android/hardware/tests/libhwbinder/1.0/IHwBenchmark.h",
-        "android/hardware/tests/libhwbinder/1.0/BnHwBenchmark.h",
-        "android/hardware/tests/libhwbinder/1.0/BpHwBenchmark.h",
-        "android/hardware/tests/libhwbinder/1.0/BsBenchmark.h",
-        "android/hardware/tests/libhwbinder/1.0/IScheduleTest.h",
-        "android/hardware/tests/libhwbinder/1.0/IHwScheduleTest.h",
-        "android/hardware/tests/libhwbinder/1.0/BnHwScheduleTest.h",
-        "android/hardware/tests/libhwbinder/1.0/BpHwScheduleTest.h",
-        "android/hardware/tests/libhwbinder/1.0/BsScheduleTest.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.tests.libhwbinder@1.0",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.tests.libhwbinder@1.0_genc++"],
-    generated_headers: ["android.hardware.tests.libhwbinder@1.0_genc++_headers"],
-    export_generated_headers: ["android.hardware.tests.libhwbinder@1.0_genc++_headers"],
-    vendor_available: true,
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-    ],
-}
-
-genrule {
-    name: "android.hardware.tests.libhwbinder-V1.0-java_gen_java",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Ljava -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.libhwbinder@1.0",
-    srcs: [
-        ":android.hardware.tests.libhwbinder@1.0_hal",
-    ],
-    out: [
-        "android/hardware/tests/libhwbinder/V1_0/IBenchmark.java",
-        "android/hardware/tests/libhwbinder/V1_0/IScheduleTest.java",
-    ],
-}
-
-java_library {
-    name: "android.hardware.tests.libhwbinder-V1.0-java",
-    no_framework_libs: true,
-    defaults: ["hidl-java-module-defaults"],
-    srcs: [":android.hardware.tests.libhwbinder-V1.0-java_gen_java"],
-    libs: [
-        "hwbinder",
-        "android.hidl.base-V1.0-java",
-    ]
-}
-
-// This package does not export any types. Not creating java constants export.
-
-
-genrule {
-    name: "android.hardware.tests.libhwbinder@1.0-adapter-helper_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.libhwbinder@1.0",
-    srcs: [
-        ":android.hardware.tests.libhwbinder@1.0_hal",
-    ],
-    out: [
-        "android/hardware/tests/libhwbinder/1.0/ABenchmark.cpp",
-        "android/hardware/tests/libhwbinder/1.0/AScheduleTest.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.tests.libhwbinder@1.0-adapter-helper_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.libhwbinder@1.0",
-    srcs: [
-        ":android.hardware.tests.libhwbinder@1.0_hal",
-    ],
-    out: [
-        "android/hardware/tests/libhwbinder/1.0/ABenchmark.h",
-        "android/hardware/tests/libhwbinder/1.0/AScheduleTest.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.tests.libhwbinder@1.0-adapter-helper",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.tests.libhwbinder@1.0-adapter-helper_genc++"],
-    generated_headers: ["android.hardware.tests.libhwbinder@1.0-adapter-helper_genc++_headers"],
-    export_generated_headers: ["android.hardware.tests.libhwbinder@1.0-adapter-helper_genc++_headers"],
-    vendor_available: true,
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-        "libhidladapter",
-        "android.hardware.tests.libhwbinder@1.0",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-        "libhidladapter",
-        "android.hardware.tests.libhwbinder@1.0",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-}
-
-genrule {
-    name: "android.hardware.tests.libhwbinder@1.0-adapter_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-main -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.libhwbinder@1.0",
-    out: ["main.cpp"]
-}
-
-cc_test {
-    name: "android.hardware.tests.libhwbinder@1.0-adapter",
-    defaults: ["hidl-module-defaults"],
-    shared_libs: [
-        "libhidladapter",
-        "libhidlbase",
-        "libhidltransport",
-        "libutils",
-        "android.hardware.tests.libhwbinder@1.0",
-        "android.hardware.tests.libhwbinder@1.0-adapter-helper",
-    ],
-    generated_sources: ["android.hardware.tests.libhwbinder@1.0-adapter_genc++"],
-}
diff --git a/tests/memory/1.0/Android.bp b/tests/memory/1.0/Android.bp
index 0af8b65..cd97fe4 100644
--- a/tests/memory/1.0/Android.bp
+++ b/tests/memory/1.0/Android.bp
@@ -1,138 +1,14 @@
-// This file is autogenerated by hidl-gen. Do not edit manually.
+// This file is autogenerated by hidl-gen -Landroidbp.
 
-filegroup {
-    name: "android.hardware.tests.memory@1.0_hal",
+hidl_interface {
+    name: "android.hardware.tests.memory@1.0",
+    root: "android.hardware",
     srcs: [
         "IMemoryTest.hal",
     ],
+    interfaces: [
+        "android.hidl.base@1.0",
+    ],
+    gen_java: false,
 }
 
-genrule {
-    name: "android.hardware.tests.memory@1.0_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.memory@1.0",
-    srcs: [
-        ":android.hardware.tests.memory@1.0_hal",
-    ],
-    out: [
-        "android/hardware/tests/memory/1.0/MemoryTestAll.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.tests.memory@1.0_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.memory@1.0",
-    srcs: [
-        ":android.hardware.tests.memory@1.0_hal",
-    ],
-    out: [
-        "android/hardware/tests/memory/1.0/IMemoryTest.h",
-        "android/hardware/tests/memory/1.0/IHwMemoryTest.h",
-        "android/hardware/tests/memory/1.0/BnHwMemoryTest.h",
-        "android/hardware/tests/memory/1.0/BpHwMemoryTest.h",
-        "android/hardware/tests/memory/1.0/BsMemoryTest.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.tests.memory@1.0",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.tests.memory@1.0_genc++"],
-    generated_headers: ["android.hardware.tests.memory@1.0_genc++_headers"],
-    export_generated_headers: ["android.hardware.tests.memory@1.0_genc++_headers"],
-    vendor_available: true,
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-    ],
-}
-
-// This package is not java compatible. Not creating java target.
-
-// This package does not export any types. Not creating java constants export.
-
-
-genrule {
-    name: "android.hardware.tests.memory@1.0-adapter-helper_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.memory@1.0",
-    srcs: [
-        ":android.hardware.tests.memory@1.0_hal",
-    ],
-    out: [
-        "android/hardware/tests/memory/1.0/AMemoryTest.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.tests.memory@1.0-adapter-helper_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.memory@1.0",
-    srcs: [
-        ":android.hardware.tests.memory@1.0_hal",
-    ],
-    out: [
-        "android/hardware/tests/memory/1.0/AMemoryTest.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.tests.memory@1.0-adapter-helper",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.tests.memory@1.0-adapter-helper_genc++"],
-    generated_headers: ["android.hardware.tests.memory@1.0-adapter-helper_genc++_headers"],
-    export_generated_headers: ["android.hardware.tests.memory@1.0-adapter-helper_genc++_headers"],
-    vendor_available: true,
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-        "libhidladapter",
-        "android.hardware.tests.memory@1.0",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-        "libhidladapter",
-        "android.hardware.tests.memory@1.0",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-}
-
-genrule {
-    name: "android.hardware.tests.memory@1.0-adapter_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-main -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.memory@1.0",
-    out: ["main.cpp"]
-}
-
-cc_test {
-    name: "android.hardware.tests.memory@1.0-adapter",
-    defaults: ["hidl-module-defaults"],
-    shared_libs: [
-        "libhidladapter",
-        "libhidlbase",
-        "libhidltransport",
-        "libutils",
-        "android.hardware.tests.memory@1.0",
-        "android.hardware.tests.memory@1.0-adapter-helper",
-    ],
-    generated_sources: ["android.hardware.tests.memory@1.0-adapter_genc++"],
-}
diff --git a/tests/msgq/1.0/Android.bp b/tests/msgq/1.0/Android.bp
index c30553d..2d8d565 100644
--- a/tests/msgq/1.0/Android.bp
+++ b/tests/msgq/1.0/Android.bp
@@ -1,147 +1,15 @@
-// This file is autogenerated by hidl-gen. Do not edit manually.
+// This file is autogenerated by hidl-gen -Landroidbp.
 
-filegroup {
-    name: "android.hardware.tests.msgq@1.0_hal",
+hidl_interface {
+    name: "android.hardware.tests.msgq@1.0",
+    root: "android.hardware",
     srcs: [
         "IBenchmarkMsgQ.hal",
         "ITestMsgQ.hal",
     ],
+    interfaces: [
+        "android.hidl.base@1.0",
+    ],
+    gen_java: false,
 }
 
-genrule {
-    name: "android.hardware.tests.msgq@1.0_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.msgq@1.0",
-    srcs: [
-        ":android.hardware.tests.msgq@1.0_hal",
-    ],
-    out: [
-        "android/hardware/tests/msgq/1.0/BenchmarkMsgQAll.cpp",
-        "android/hardware/tests/msgq/1.0/TestMsgQAll.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.tests.msgq@1.0_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.msgq@1.0",
-    srcs: [
-        ":android.hardware.tests.msgq@1.0_hal",
-    ],
-    out: [
-        "android/hardware/tests/msgq/1.0/IBenchmarkMsgQ.h",
-        "android/hardware/tests/msgq/1.0/IHwBenchmarkMsgQ.h",
-        "android/hardware/tests/msgq/1.0/BnHwBenchmarkMsgQ.h",
-        "android/hardware/tests/msgq/1.0/BpHwBenchmarkMsgQ.h",
-        "android/hardware/tests/msgq/1.0/BsBenchmarkMsgQ.h",
-        "android/hardware/tests/msgq/1.0/ITestMsgQ.h",
-        "android/hardware/tests/msgq/1.0/IHwTestMsgQ.h",
-        "android/hardware/tests/msgq/1.0/BnHwTestMsgQ.h",
-        "android/hardware/tests/msgq/1.0/BpHwTestMsgQ.h",
-        "android/hardware/tests/msgq/1.0/BsTestMsgQ.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.tests.msgq@1.0",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.tests.msgq@1.0_genc++"],
-    generated_headers: ["android.hardware.tests.msgq@1.0_genc++_headers"],
-    export_generated_headers: ["android.hardware.tests.msgq@1.0_genc++_headers"],
-    vendor_available: true,
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-    ],
-}
-
-// This package is not java compatible. Not creating java target.
-
-// This package does not export any types. Not creating java constants export.
-
-
-genrule {
-    name: "android.hardware.tests.msgq@1.0-adapter-helper_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.msgq@1.0",
-    srcs: [
-        ":android.hardware.tests.msgq@1.0_hal",
-    ],
-    out: [
-        "android/hardware/tests/msgq/1.0/ABenchmarkMsgQ.cpp",
-        "android/hardware/tests/msgq/1.0/ATestMsgQ.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.tests.msgq@1.0-adapter-helper_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.msgq@1.0",
-    srcs: [
-        ":android.hardware.tests.msgq@1.0_hal",
-    ],
-    out: [
-        "android/hardware/tests/msgq/1.0/ABenchmarkMsgQ.h",
-        "android/hardware/tests/msgq/1.0/ATestMsgQ.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.tests.msgq@1.0-adapter-helper",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.tests.msgq@1.0-adapter-helper_genc++"],
-    generated_headers: ["android.hardware.tests.msgq@1.0-adapter-helper_genc++_headers"],
-    export_generated_headers: ["android.hardware.tests.msgq@1.0-adapter-helper_genc++_headers"],
-    vendor_available: true,
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-        "libhidladapter",
-        "android.hardware.tests.msgq@1.0",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-        "libhidladapter",
-        "android.hardware.tests.msgq@1.0",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-}
-
-genrule {
-    name: "android.hardware.tests.msgq@1.0-adapter_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-main -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.msgq@1.0",
-    out: ["main.cpp"]
-}
-
-cc_test {
-    name: "android.hardware.tests.msgq@1.0-adapter",
-    defaults: ["hidl-module-defaults"],
-    shared_libs: [
-        "libhidladapter",
-        "libhidlbase",
-        "libhidltransport",
-        "libutils",
-        "android.hardware.tests.msgq@1.0",
-        "android.hardware.tests.msgq@1.0-adapter-helper",
-    ],
-    generated_sources: ["android.hardware.tests.msgq@1.0-adapter_genc++"],
-}
diff --git a/tests/multithread/1.0/Android.bp b/tests/multithread/1.0/Android.bp
index cebf90e..0d21b1b 100644
--- a/tests/multithread/1.0/Android.bp
+++ b/tests/multithread/1.0/Android.bp
@@ -1,159 +1,14 @@
-// This file is autogenerated by hidl-gen. Do not edit manually.
+// This file is autogenerated by hidl-gen -Landroidbp.
 
-filegroup {
-    name: "android.hardware.tests.multithread@1.0_hal",
+hidl_interface {
+    name: "android.hardware.tests.multithread@1.0",
+    root: "android.hardware",
     srcs: [
         "IMultithread.hal",
     ],
+    interfaces: [
+        "android.hidl.base@1.0",
+    ],
+    gen_java: true,
 }
 
-genrule {
-    name: "android.hardware.tests.multithread@1.0_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.multithread@1.0",
-    srcs: [
-        ":android.hardware.tests.multithread@1.0_hal",
-    ],
-    out: [
-        "android/hardware/tests/multithread/1.0/MultithreadAll.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.tests.multithread@1.0_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.multithread@1.0",
-    srcs: [
-        ":android.hardware.tests.multithread@1.0_hal",
-    ],
-    out: [
-        "android/hardware/tests/multithread/1.0/IMultithread.h",
-        "android/hardware/tests/multithread/1.0/IHwMultithread.h",
-        "android/hardware/tests/multithread/1.0/BnHwMultithread.h",
-        "android/hardware/tests/multithread/1.0/BpHwMultithread.h",
-        "android/hardware/tests/multithread/1.0/BsMultithread.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.tests.multithread@1.0",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.tests.multithread@1.0_genc++"],
-    generated_headers: ["android.hardware.tests.multithread@1.0_genc++_headers"],
-    export_generated_headers: ["android.hardware.tests.multithread@1.0_genc++_headers"],
-    vendor_available: true,
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-    ],
-}
-
-genrule {
-    name: "android.hardware.tests.multithread-V1.0-java_gen_java",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Ljava -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.multithread@1.0",
-    srcs: [
-        ":android.hardware.tests.multithread@1.0_hal",
-    ],
-    out: [
-        "android/hardware/tests/multithread/V1_0/IMultithread.java",
-    ],
-}
-
-java_library {
-    name: "android.hardware.tests.multithread-V1.0-java",
-    no_framework_libs: true,
-    defaults: ["hidl-java-module-defaults"],
-    srcs: [":android.hardware.tests.multithread-V1.0-java_gen_java"],
-    libs: [
-        "hwbinder",
-        "android.hidl.base-V1.0-java",
-    ]
-}
-
-// This package does not export any types. Not creating java constants export.
-
-
-genrule {
-    name: "android.hardware.tests.multithread@1.0-adapter-helper_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.multithread@1.0",
-    srcs: [
-        ":android.hardware.tests.multithread@1.0_hal",
-    ],
-    out: [
-        "android/hardware/tests/multithread/1.0/AMultithread.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.tests.multithread@1.0-adapter-helper_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.multithread@1.0",
-    srcs: [
-        ":android.hardware.tests.multithread@1.0_hal",
-    ],
-    out: [
-        "android/hardware/tests/multithread/1.0/AMultithread.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.tests.multithread@1.0-adapter-helper",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.tests.multithread@1.0-adapter-helper_genc++"],
-    generated_headers: ["android.hardware.tests.multithread@1.0-adapter-helper_genc++_headers"],
-    export_generated_headers: ["android.hardware.tests.multithread@1.0-adapter-helper_genc++_headers"],
-    vendor_available: true,
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-        "libhidladapter",
-        "android.hardware.tests.multithread@1.0",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-        "libhidladapter",
-        "android.hardware.tests.multithread@1.0",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-}
-
-genrule {
-    name: "android.hardware.tests.multithread@1.0-adapter_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-main -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.multithread@1.0",
-    out: ["main.cpp"]
-}
-
-cc_test {
-    name: "android.hardware.tests.multithread@1.0-adapter",
-    defaults: ["hidl-module-defaults"],
-    shared_libs: [
-        "libhidladapter",
-        "libhidlbase",
-        "libhidltransport",
-        "libutils",
-        "android.hardware.tests.multithread@1.0",
-        "android.hardware.tests.multithread@1.0-adapter-helper",
-    ],
-    generated_sources: ["android.hardware.tests.multithread@1.0-adapter_genc++"],
-}
diff --git a/tests/pointer/1.0/Android.bp b/tests/pointer/1.0/Android.bp
index 34cbaa9..3dc8e8a 100644
--- a/tests/pointer/1.0/Android.bp
+++ b/tests/pointer/1.0/Android.bp
@@ -1,147 +1,15 @@
-// This file is autogenerated by hidl-gen. Do not edit manually.
+// This file is autogenerated by hidl-gen -Landroidbp.
 
-filegroup {
-    name: "android.hardware.tests.pointer@1.0_hal",
+hidl_interface {
+    name: "android.hardware.tests.pointer@1.0",
+    root: "android.hardware",
     srcs: [
         "IGraph.hal",
         "IPointer.hal",
     ],
+    interfaces: [
+        "android.hidl.base@1.0",
+    ],
+    gen_java: false,
 }
 
-genrule {
-    name: "android.hardware.tests.pointer@1.0_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.pointer@1.0",
-    srcs: [
-        ":android.hardware.tests.pointer@1.0_hal",
-    ],
-    out: [
-        "android/hardware/tests/pointer/1.0/GraphAll.cpp",
-        "android/hardware/tests/pointer/1.0/PointerAll.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.tests.pointer@1.0_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.pointer@1.0",
-    srcs: [
-        ":android.hardware.tests.pointer@1.0_hal",
-    ],
-    out: [
-        "android/hardware/tests/pointer/1.0/IGraph.h",
-        "android/hardware/tests/pointer/1.0/IHwGraph.h",
-        "android/hardware/tests/pointer/1.0/BnHwGraph.h",
-        "android/hardware/tests/pointer/1.0/BpHwGraph.h",
-        "android/hardware/tests/pointer/1.0/BsGraph.h",
-        "android/hardware/tests/pointer/1.0/IPointer.h",
-        "android/hardware/tests/pointer/1.0/IHwPointer.h",
-        "android/hardware/tests/pointer/1.0/BnHwPointer.h",
-        "android/hardware/tests/pointer/1.0/BpHwPointer.h",
-        "android/hardware/tests/pointer/1.0/BsPointer.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.tests.pointer@1.0",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.tests.pointer@1.0_genc++"],
-    generated_headers: ["android.hardware.tests.pointer@1.0_genc++_headers"],
-    export_generated_headers: ["android.hardware.tests.pointer@1.0_genc++_headers"],
-    vendor_available: true,
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-    ],
-}
-
-// This package is not java compatible. Not creating java target.
-
-// This package does not export any types. Not creating java constants export.
-
-
-genrule {
-    name: "android.hardware.tests.pointer@1.0-adapter-helper_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.pointer@1.0",
-    srcs: [
-        ":android.hardware.tests.pointer@1.0_hal",
-    ],
-    out: [
-        "android/hardware/tests/pointer/1.0/AGraph.cpp",
-        "android/hardware/tests/pointer/1.0/APointer.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.tests.pointer@1.0-adapter-helper_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.pointer@1.0",
-    srcs: [
-        ":android.hardware.tests.pointer@1.0_hal",
-    ],
-    out: [
-        "android/hardware/tests/pointer/1.0/AGraph.h",
-        "android/hardware/tests/pointer/1.0/APointer.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.tests.pointer@1.0-adapter-helper",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.tests.pointer@1.0-adapter-helper_genc++"],
-    generated_headers: ["android.hardware.tests.pointer@1.0-adapter-helper_genc++_headers"],
-    export_generated_headers: ["android.hardware.tests.pointer@1.0-adapter-helper_genc++_headers"],
-    vendor_available: true,
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-        "libhidladapter",
-        "android.hardware.tests.pointer@1.0",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-        "libhidladapter",
-        "android.hardware.tests.pointer@1.0",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-}
-
-genrule {
-    name: "android.hardware.tests.pointer@1.0-adapter_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-main -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.pointer@1.0",
-    out: ["main.cpp"]
-}
-
-cc_test {
-    name: "android.hardware.tests.pointer@1.0-adapter",
-    defaults: ["hidl-module-defaults"],
-    shared_libs: [
-        "libhidladapter",
-        "libhidlbase",
-        "libhidltransport",
-        "libutils",
-        "android.hardware.tests.pointer@1.0",
-        "android.hardware.tests.pointer@1.0-adapter-helper",
-    ],
-    generated_sources: ["android.hardware.tests.pointer@1.0-adapter_genc++"],
-}
diff --git a/tests/trie/1.0/Android.bp b/tests/trie/1.0/Android.bp
index be45d12..870a350 100644
--- a/tests/trie/1.0/Android.bp
+++ b/tests/trie/1.0/Android.bp
@@ -1,142 +1,24 @@
-// This file is autogenerated by hidl-gen. Do not edit manually.
+// This file is autogenerated by hidl-gen -Landroidbp.
 
-filegroup {
-    name: "android.hardware.tests.trie@1.0_hal",
+hidl_interface {
+    name: "android.hardware.tests.trie@1.0",
+    root: "android.hardware",
     srcs: [
         "types.hal",
         "ITrie.hal",
     ],
+    interfaces: [
+        "android.hidl.base@1.0",
+    ],
+    types: [
+        "A",
+        "B",
+        "E1",
+        "E2",
+        "S",
+        "TrieEdge",
+        "TrieNode",
+    ],
+    gen_java: false,
 }
 
-genrule {
-    name: "android.hardware.tests.trie@1.0_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.trie@1.0",
-    srcs: [
-        ":android.hardware.tests.trie@1.0_hal",
-    ],
-    out: [
-        "android/hardware/tests/trie/1.0/types.cpp",
-        "android/hardware/tests/trie/1.0/TrieAll.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.tests.trie@1.0_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.trie@1.0",
-    srcs: [
-        ":android.hardware.tests.trie@1.0_hal",
-    ],
-    out: [
-        "android/hardware/tests/trie/1.0/types.h",
-        "android/hardware/tests/trie/1.0/hwtypes.h",
-        "android/hardware/tests/trie/1.0/ITrie.h",
-        "android/hardware/tests/trie/1.0/IHwTrie.h",
-        "android/hardware/tests/trie/1.0/BnHwTrie.h",
-        "android/hardware/tests/trie/1.0/BpHwTrie.h",
-        "android/hardware/tests/trie/1.0/BsTrie.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.tests.trie@1.0",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.tests.trie@1.0_genc++"],
-    generated_headers: ["android.hardware.tests.trie@1.0_genc++_headers"],
-    export_generated_headers: ["android.hardware.tests.trie@1.0_genc++_headers"],
-    vendor_available: true,
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-    ],
-}
-
-// This package is not java compatible. Not creating java target.
-
-// This package does not export any types. Not creating java constants export.
-
-
-genrule {
-    name: "android.hardware.tests.trie@1.0-adapter-helper_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.trie@1.0",
-    srcs: [
-        ":android.hardware.tests.trie@1.0_hal",
-    ],
-    out: [
-        "android/hardware/tests/trie/1.0/ATrie.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.tests.trie@1.0-adapter-helper_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.trie@1.0",
-    srcs: [
-        ":android.hardware.tests.trie@1.0_hal",
-    ],
-    out: [
-        "android/hardware/tests/trie/1.0/ATrie.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.tests.trie@1.0-adapter-helper",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.tests.trie@1.0-adapter-helper_genc++"],
-    generated_headers: ["android.hardware.tests.trie@1.0-adapter-helper_genc++_headers"],
-    export_generated_headers: ["android.hardware.tests.trie@1.0-adapter-helper_genc++_headers"],
-    vendor_available: true,
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-        "libhidladapter",
-        "android.hardware.tests.trie@1.0",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-        "libhidladapter",
-        "android.hardware.tests.trie@1.0",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-}
-
-genrule {
-    name: "android.hardware.tests.trie@1.0-adapter_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-main -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.trie@1.0",
-    out: ["main.cpp"]
-}
-
-cc_test {
-    name: "android.hardware.tests.trie@1.0-adapter",
-    defaults: ["hidl-module-defaults"],
-    shared_libs: [
-        "libhidladapter",
-        "libhidlbase",
-        "libhidltransport",
-        "libutils",
-        "android.hardware.tests.trie@1.0",
-        "android.hardware.tests.trie@1.0-adapter-helper",
-    ],
-    generated_sources: ["android.hardware.tests.trie@1.0-adapter_genc++"],
-}
diff --git a/tetheroffload/config/1.0/Android.bp b/tetheroffload/config/1.0/Android.bp
index e299ed2..9d0dc5f 100644
--- a/tetheroffload/config/1.0/Android.bp
+++ b/tetheroffload/config/1.0/Android.bp
@@ -1,141 +1,17 @@
-// This file is autogenerated by hidl-gen. Do not edit manually.
+// This file is autogenerated by hidl-gen -Landroidbp.
 
-filegroup {
-    name: "android.hardware.tetheroffload.config@1.0_hal",
-    srcs: [
-        "IOffloadConfig.hal",
-    ],
-}
-
-genrule {
-    name: "android.hardware.tetheroffload.config@1.0_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tetheroffload.config@1.0",
-    srcs: [
-        ":android.hardware.tetheroffload.config@1.0_hal",
-    ],
-    out: [
-        "android/hardware/tetheroffload/config/1.0/OffloadConfigAll.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.tetheroffload.config@1.0_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tetheroffload.config@1.0",
-    srcs: [
-        ":android.hardware.tetheroffload.config@1.0_hal",
-    ],
-    out: [
-        "android/hardware/tetheroffload/config/1.0/IOffloadConfig.h",
-        "android/hardware/tetheroffload/config/1.0/IHwOffloadConfig.h",
-        "android/hardware/tetheroffload/config/1.0/BnHwOffloadConfig.h",
-        "android/hardware/tetheroffload/config/1.0/BpHwOffloadConfig.h",
-        "android/hardware/tetheroffload/config/1.0/BsOffloadConfig.h",
-    ],
-}
-
-cc_library {
+hidl_interface {
     name: "android.hardware.tetheroffload.config@1.0",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.tetheroffload.config@1.0_genc++"],
-    generated_headers: ["android.hardware.tetheroffload.config@1.0_genc++_headers"],
-    export_generated_headers: ["android.hardware.tetheroffload.config@1.0_genc++_headers"],
-    vendor_available: true,
+    root: "android.hardware",
     vndk: {
         enabled: true,
     },
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-    ],
-}
-
-// This package is not java compatible. Not creating java target.
-
-// This package does not export any types. Not creating java constants export.
-
-
-genrule {
-    name: "android.hardware.tetheroffload.config@1.0-adapter-helper_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tetheroffload.config@1.0",
     srcs: [
-        ":android.hardware.tetheroffload.config@1.0_hal",
+        "IOffloadConfig.hal",
     ],
-    out: [
-        "android/hardware/tetheroffload/config/1.0/AOffloadConfig.cpp",
+    interfaces: [
+        "android.hidl.base@1.0",
     ],
+    gen_java: false,
 }
 
-genrule {
-    name: "android.hardware.tetheroffload.config@1.0-adapter-helper_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tetheroffload.config@1.0",
-    srcs: [
-        ":android.hardware.tetheroffload.config@1.0_hal",
-    ],
-    out: [
-        "android/hardware/tetheroffload/config/1.0/AOffloadConfig.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.tetheroffload.config@1.0-adapter-helper",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.tetheroffload.config@1.0-adapter-helper_genc++"],
-    generated_headers: ["android.hardware.tetheroffload.config@1.0-adapter-helper_genc++_headers"],
-    export_generated_headers: ["android.hardware.tetheroffload.config@1.0-adapter-helper_genc++_headers"],
-    vendor_available: true,
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-        "libhidladapter",
-        "android.hardware.tetheroffload.config@1.0",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-        "libhidladapter",
-        "android.hardware.tetheroffload.config@1.0",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-}
-
-genrule {
-    name: "android.hardware.tetheroffload.config@1.0-adapter_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-main -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tetheroffload.config@1.0",
-    out: ["main.cpp"]
-}
-
-cc_test {
-    name: "android.hardware.tetheroffload.config@1.0-adapter",
-    defaults: ["hidl-module-defaults"],
-    shared_libs: [
-        "libhidladapter",
-        "libhidlbase",
-        "libhidltransport",
-        "libutils",
-        "android.hardware.tetheroffload.config@1.0",
-        "android.hardware.tetheroffload.config@1.0-adapter-helper",
-    ],
-    generated_sources: ["android.hardware.tetheroffload.config@1.0-adapter_genc++"],
-}
diff --git a/tetheroffload/control/1.0/Android.bp b/tetheroffload/control/1.0/Android.bp
index f9ea7e0..8e3fd27 100644
--- a/tetheroffload/control/1.0/Android.bp
+++ b/tetheroffload/control/1.0/Android.bp
@@ -1,180 +1,25 @@
-// This file is autogenerated by hidl-gen. Do not edit manually.
+// This file is autogenerated by hidl-gen -Landroidbp.
 
-filegroup {
-    name: "android.hardware.tetheroffload.control@1.0_hal",
+hidl_interface {
+    name: "android.hardware.tetheroffload.control@1.0",
+    root: "android.hardware",
+    vndk: {
+        enabled: true,
+    },
     srcs: [
         "types.hal",
         "IOffloadControl.hal",
         "ITetheringOffloadCallback.hal",
     ],
+    interfaces: [
+        "android.hidl.base@1.0",
+    ],
+    types: [
+        "IPv4AddrPortPair",
+        "NatTimeoutUpdate",
+        "NetworkProtocol",
+        "OffloadCallbackEvent",
+    ],
+    gen_java: true,
 }
 
-genrule {
-    name: "android.hardware.tetheroffload.control@1.0_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tetheroffload.control@1.0",
-    srcs: [
-        ":android.hardware.tetheroffload.control@1.0_hal",
-    ],
-    out: [
-        "android/hardware/tetheroffload/control/1.0/types.cpp",
-        "android/hardware/tetheroffload/control/1.0/OffloadControlAll.cpp",
-        "android/hardware/tetheroffload/control/1.0/TetheringOffloadCallbackAll.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.tetheroffload.control@1.0_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tetheroffload.control@1.0",
-    srcs: [
-        ":android.hardware.tetheroffload.control@1.0_hal",
-    ],
-    out: [
-        "android/hardware/tetheroffload/control/1.0/types.h",
-        "android/hardware/tetheroffload/control/1.0/hwtypes.h",
-        "android/hardware/tetheroffload/control/1.0/IOffloadControl.h",
-        "android/hardware/tetheroffload/control/1.0/IHwOffloadControl.h",
-        "android/hardware/tetheroffload/control/1.0/BnHwOffloadControl.h",
-        "android/hardware/tetheroffload/control/1.0/BpHwOffloadControl.h",
-        "android/hardware/tetheroffload/control/1.0/BsOffloadControl.h",
-        "android/hardware/tetheroffload/control/1.0/ITetheringOffloadCallback.h",
-        "android/hardware/tetheroffload/control/1.0/IHwTetheringOffloadCallback.h",
-        "android/hardware/tetheroffload/control/1.0/BnHwTetheringOffloadCallback.h",
-        "android/hardware/tetheroffload/control/1.0/BpHwTetheringOffloadCallback.h",
-        "android/hardware/tetheroffload/control/1.0/BsTetheringOffloadCallback.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.tetheroffload.control@1.0",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.tetheroffload.control@1.0_genc++"],
-    generated_headers: ["android.hardware.tetheroffload.control@1.0_genc++_headers"],
-    export_generated_headers: ["android.hardware.tetheroffload.control@1.0_genc++_headers"],
-    vendor_available: true,
-    vndk: {
-        enabled: true,
-    },
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-    ],
-}
-
-genrule {
-    name: "android.hardware.tetheroffload.control-V1.0-java_gen_java",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Ljava -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tetheroffload.control@1.0",
-    srcs: [
-        ":android.hardware.tetheroffload.control@1.0_hal",
-    ],
-    out: [
-        "android/hardware/tetheroffload/control/V1_0/IPv4AddrPortPair.java",
-        "android/hardware/tetheroffload/control/V1_0/NatTimeoutUpdate.java",
-        "android/hardware/tetheroffload/control/V1_0/NetworkProtocol.java",
-        "android/hardware/tetheroffload/control/V1_0/OffloadCallbackEvent.java",
-        "android/hardware/tetheroffload/control/V1_0/IOffloadControl.java",
-        "android/hardware/tetheroffload/control/V1_0/ITetheringOffloadCallback.java",
-    ],
-}
-
-java_library {
-    name: "android.hardware.tetheroffload.control-V1.0-java",
-    no_framework_libs: true,
-    defaults: ["hidl-java-module-defaults"],
-    srcs: [":android.hardware.tetheroffload.control-V1.0-java_gen_java"],
-    libs: [
-        "hwbinder",
-        "android.hidl.base-V1.0-java",
-    ]
-}
-
-// This package does not export any types. Not creating java constants export.
-
-
-genrule {
-    name: "android.hardware.tetheroffload.control@1.0-adapter-helper_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tetheroffload.control@1.0",
-    srcs: [
-        ":android.hardware.tetheroffload.control@1.0_hal",
-    ],
-    out: [
-        "android/hardware/tetheroffload/control/1.0/AOffloadControl.cpp",
-        "android/hardware/tetheroffload/control/1.0/ATetheringOffloadCallback.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.tetheroffload.control@1.0-adapter-helper_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tetheroffload.control@1.0",
-    srcs: [
-        ":android.hardware.tetheroffload.control@1.0_hal",
-    ],
-    out: [
-        "android/hardware/tetheroffload/control/1.0/AOffloadControl.h",
-        "android/hardware/tetheroffload/control/1.0/ATetheringOffloadCallback.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.tetheroffload.control@1.0-adapter-helper",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.tetheroffload.control@1.0-adapter-helper_genc++"],
-    generated_headers: ["android.hardware.tetheroffload.control@1.0-adapter-helper_genc++_headers"],
-    export_generated_headers: ["android.hardware.tetheroffload.control@1.0-adapter-helper_genc++_headers"],
-    vendor_available: true,
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-        "libhidladapter",
-        "android.hardware.tetheroffload.control@1.0",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-        "libhidladapter",
-        "android.hardware.tetheroffload.control@1.0",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-}
-
-genrule {
-    name: "android.hardware.tetheroffload.control@1.0-adapter_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-main -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tetheroffload.control@1.0",
-    out: ["main.cpp"]
-}
-
-cc_test {
-    name: "android.hardware.tetheroffload.control@1.0-adapter",
-    defaults: ["hidl-module-defaults"],
-    shared_libs: [
-        "libhidladapter",
-        "libhidlbase",
-        "libhidltransport",
-        "libutils",
-        "android.hardware.tetheroffload.control@1.0",
-        "android.hardware.tetheroffload.control@1.0-adapter-helper",
-    ],
-    generated_sources: ["android.hardware.tetheroffload.control@1.0-adapter_genc++"],
-}
diff --git a/thermal/1.0/Android.bp b/thermal/1.0/Android.bp
index 43a0f68..e764e28 100644
--- a/thermal/1.0/Android.bp
+++ b/thermal/1.0/Android.bp
@@ -1,189 +1,28 @@
-// This file is autogenerated by hidl-gen. Do not edit manually.
+// This file is autogenerated by hidl-gen -Landroidbp.
 
-filegroup {
-    name: "android.hardware.thermal@1.0_hal",
+hidl_interface {
+    name: "android.hardware.thermal@1.0",
+    root: "android.hardware",
+    vndk: {
+        enabled: true,
+    },
     srcs: [
         "types.hal",
         "IThermal.hal",
     ],
+    interfaces: [
+        "android.hidl.base@1.0",
+    ],
+    types: [
+        "CoolingDevice",
+        "CoolingType",
+        "CpuUsage",
+        "Temperature",
+        "TemperatureType",
+        "ThermalStatus",
+        "ThermalStatusCode",
+    ],
+    gen_java: true,
+    gen_java_constants: true,
 }
 
-genrule {
-    name: "android.hardware.thermal@1.0_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.thermal@1.0",
-    srcs: [
-        ":android.hardware.thermal@1.0_hal",
-    ],
-    out: [
-        "android/hardware/thermal/1.0/types.cpp",
-        "android/hardware/thermal/1.0/ThermalAll.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.thermal@1.0_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.thermal@1.0",
-    srcs: [
-        ":android.hardware.thermal@1.0_hal",
-    ],
-    out: [
-        "android/hardware/thermal/1.0/types.h",
-        "android/hardware/thermal/1.0/hwtypes.h",
-        "android/hardware/thermal/1.0/IThermal.h",
-        "android/hardware/thermal/1.0/IHwThermal.h",
-        "android/hardware/thermal/1.0/BnHwThermal.h",
-        "android/hardware/thermal/1.0/BpHwThermal.h",
-        "android/hardware/thermal/1.0/BsThermal.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.thermal@1.0",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.thermal@1.0_genc++"],
-    generated_headers: ["android.hardware.thermal@1.0_genc++_headers"],
-    export_generated_headers: ["android.hardware.thermal@1.0_genc++_headers"],
-    vendor_available: true,
-    vndk: {
-        enabled: true,
-    },
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-    ],
-}
-
-genrule {
-    name: "android.hardware.thermal-V1.0-java_gen_java",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Ljava -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.thermal@1.0",
-    srcs: [
-        ":android.hardware.thermal@1.0_hal",
-    ],
-    out: [
-        "android/hardware/thermal/V1_0/CoolingDevice.java",
-        "android/hardware/thermal/V1_0/CoolingType.java",
-        "android/hardware/thermal/V1_0/CpuUsage.java",
-        "android/hardware/thermal/V1_0/Temperature.java",
-        "android/hardware/thermal/V1_0/TemperatureType.java",
-        "android/hardware/thermal/V1_0/ThermalStatus.java",
-        "android/hardware/thermal/V1_0/ThermalStatusCode.java",
-        "android/hardware/thermal/V1_0/IThermal.java",
-    ],
-}
-
-java_library {
-    name: "android.hardware.thermal-V1.0-java",
-    no_framework_libs: true,
-    defaults: ["hidl-java-module-defaults"],
-    srcs: [":android.hardware.thermal-V1.0-java_gen_java"],
-    libs: [
-        "hwbinder",
-        "android.hidl.base-V1.0-java",
-    ]
-}
-
-genrule {
-    name: "android.hardware.thermal-V1.0-java-constants_gen_java",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Ljava-constants -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.thermal@1.0",
-    srcs: [
-        ":android.hardware.thermal@1.0_hal",
-    ],
-    out: [
-        "android/hardware/thermal/V1_0/Constants.java",
-    ],
-}
-
-java_library {
-    name: "android.hardware.thermal-V1.0-java-constants",
-    no_framework_libs: true,
-    defaults: ["hidl-java-module-defaults"],
-    srcs: [":android.hardware.thermal-V1.0-java-constants_gen_java"],
-}
-
-genrule {
-    name: "android.hardware.thermal@1.0-adapter-helper_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.thermal@1.0",
-    srcs: [
-        ":android.hardware.thermal@1.0_hal",
-    ],
-    out: [
-        "android/hardware/thermal/1.0/AThermal.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.thermal@1.0-adapter-helper_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.thermal@1.0",
-    srcs: [
-        ":android.hardware.thermal@1.0_hal",
-    ],
-    out: [
-        "android/hardware/thermal/1.0/AThermal.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.thermal@1.0-adapter-helper",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.thermal@1.0-adapter-helper_genc++"],
-    generated_headers: ["android.hardware.thermal@1.0-adapter-helper_genc++_headers"],
-    export_generated_headers: ["android.hardware.thermal@1.0-adapter-helper_genc++_headers"],
-    vendor_available: true,
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-        "libhidladapter",
-        "android.hardware.thermal@1.0",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-        "libhidladapter",
-        "android.hardware.thermal@1.0",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-}
-
-genrule {
-    name: "android.hardware.thermal@1.0-adapter_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-main -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.thermal@1.0",
-    out: ["main.cpp"]
-}
-
-cc_test {
-    name: "android.hardware.thermal@1.0-adapter",
-    defaults: ["hidl-module-defaults"],
-    shared_libs: [
-        "libhidladapter",
-        "libhidlbase",
-        "libhidltransport",
-        "libutils",
-        "android.hardware.thermal@1.0",
-        "android.hardware.thermal@1.0-adapter-helper",
-    ],
-    generated_sources: ["android.hardware.thermal@1.0-adapter_genc++"],
-}
diff --git a/thermal/1.1/Android.bp b/thermal/1.1/Android.bp
index 5926993..8c0f1f9 100644
--- a/thermal/1.1/Android.bp
+++ b/thermal/1.1/Android.bp
@@ -1,180 +1,19 @@
-// This file is autogenerated by hidl-gen. Do not edit manually.
+// This file is autogenerated by hidl-gen -Landroidbp.
 
-filegroup {
-    name: "android.hardware.thermal@1.1_hal",
+hidl_interface {
+    name: "android.hardware.thermal@1.1",
+    root: "android.hardware",
+    vndk: {
+        enabled: true,
+    },
     srcs: [
         "IThermal.hal",
         "IThermalCallback.hal",
     ],
-}
-
-genrule {
-    name: "android.hardware.thermal@1.1_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.thermal@1.1",
-    srcs: [
-        ":android.hardware.thermal@1.1_hal",
-    ],
-    out: [
-        "android/hardware/thermal/1.1/ThermalAll.cpp",
-        "android/hardware/thermal/1.1/ThermalCallbackAll.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.thermal@1.1_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.thermal@1.1",
-    srcs: [
-        ":android.hardware.thermal@1.1_hal",
-    ],
-    out: [
-        "android/hardware/thermal/1.1/IThermal.h",
-        "android/hardware/thermal/1.1/IHwThermal.h",
-        "android/hardware/thermal/1.1/BnHwThermal.h",
-        "android/hardware/thermal/1.1/BpHwThermal.h",
-        "android/hardware/thermal/1.1/BsThermal.h",
-        "android/hardware/thermal/1.1/IThermalCallback.h",
-        "android/hardware/thermal/1.1/IHwThermalCallback.h",
-        "android/hardware/thermal/1.1/BnHwThermalCallback.h",
-        "android/hardware/thermal/1.1/BpHwThermalCallback.h",
-        "android/hardware/thermal/1.1/BsThermalCallback.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.thermal@1.1",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.thermal@1.1_genc++"],
-    generated_headers: ["android.hardware.thermal@1.1_genc++_headers"],
-    export_generated_headers: ["android.hardware.thermal@1.1_genc++_headers"],
-    vendor_available: true,
-    vndk: {
-        enabled: true,
-    },
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
+    interfaces: [
         "android.hardware.thermal@1.0",
+        "android.hidl.base@1.0",
     ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-        "android.hardware.thermal@1.0",
-    ],
+    gen_java: true,
 }
 
-genrule {
-    name: "android.hardware.thermal-V1.1-java_gen_java",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Ljava -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.thermal@1.1",
-    srcs: [
-        ":android.hardware.thermal@1.1_hal",
-    ],
-    out: [
-        "android/hardware/thermal/V1_1/IThermal.java",
-        "android/hardware/thermal/V1_1/IThermalCallback.java",
-    ],
-}
-
-java_library {
-    name: "android.hardware.thermal-V1.1-java",
-    no_framework_libs: true,
-    defaults: ["hidl-java-module-defaults"],
-    srcs: [":android.hardware.thermal-V1.1-java_gen_java"],
-    libs: [
-        "hwbinder",
-        "android.hardware.thermal-V1.0-java",
-        "android.hidl.base-V1.0-java",
-    ]
-}
-
-// This package does not export any types. Not creating java constants export.
-
-
-genrule {
-    name: "android.hardware.thermal@1.1-adapter-helper_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.thermal@1.1",
-    srcs: [
-        ":android.hardware.thermal@1.1_hal",
-    ],
-    out: [
-        "android/hardware/thermal/1.1/AThermal.cpp",
-        "android/hardware/thermal/1.1/AThermalCallback.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.thermal@1.1-adapter-helper_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.thermal@1.1",
-    srcs: [
-        ":android.hardware.thermal@1.1_hal",
-    ],
-    out: [
-        "android/hardware/thermal/1.1/AThermal.h",
-        "android/hardware/thermal/1.1/AThermalCallback.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.thermal@1.1-adapter-helper",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.thermal@1.1-adapter-helper_genc++"],
-    generated_headers: ["android.hardware.thermal@1.1-adapter-helper_genc++_headers"],
-    export_generated_headers: ["android.hardware.thermal@1.1-adapter-helper_genc++_headers"],
-    vendor_available: true,
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-        "libhidladapter",
-        "android.hardware.thermal@1.0",
-        "android.hardware.thermal@1.1",
-        "android.hardware.thermal@1.0-adapter-helper",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-        "libhidladapter",
-        "android.hardware.thermal@1.0",
-        "android.hardware.thermal@1.1",
-        "android.hardware.thermal@1.0-adapter-helper",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-}
-
-genrule {
-    name: "android.hardware.thermal@1.1-adapter_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-main -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.thermal@1.1",
-    out: ["main.cpp"]
-}
-
-cc_test {
-    name: "android.hardware.thermal@1.1-adapter",
-    defaults: ["hidl-module-defaults"],
-    shared_libs: [
-        "libhidladapter",
-        "libhidlbase",
-        "libhidltransport",
-        "libutils",
-        "android.hardware.thermal@1.0",
-        "android.hardware.thermal@1.1",
-        "android.hardware.thermal@1.1-adapter-helper",
-    ],
-    generated_sources: ["android.hardware.thermal@1.1-adapter_genc++"],
-}
diff --git a/tv/cec/1.0/Android.bp b/tv/cec/1.0/Android.bp
index 8c538c5..2aa155e 100644
--- a/tv/cec/1.0/Android.bp
+++ b/tv/cec/1.0/Android.bp
@@ -1,188 +1,33 @@
-// This file is autogenerated by hidl-gen. Do not edit manually.
+// This file is autogenerated by hidl-gen -Landroidbp.
 
-filegroup {
-    name: "android.hardware.tv.cec@1.0_hal",
+hidl_interface {
+    name: "android.hardware.tv.cec@1.0",
+    root: "android.hardware",
+    vndk: {
+        enabled: true,
+    },
     srcs: [
         "types.hal",
         "IHdmiCec.hal",
         "IHdmiCecCallback.hal",
     ],
+    interfaces: [
+        "android.hidl.base@1.0",
+    ],
+    types: [
+        "AbortReason",
+        "CecDeviceType",
+        "CecLogicalAddress",
+        "CecMessage",
+        "CecMessageType",
+        "HdmiPortInfo",
+        "HdmiPortType",
+        "HotplugEvent",
+        "MaxLength",
+        "OptionKey",
+        "Result",
+        "SendMessageResult",
+    ],
+    gen_java: true,
 }
 
-genrule {
-    name: "android.hardware.tv.cec@1.0_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tv.cec@1.0",
-    srcs: [
-        ":android.hardware.tv.cec@1.0_hal",
-    ],
-    out: [
-        "android/hardware/tv/cec/1.0/types.cpp",
-        "android/hardware/tv/cec/1.0/HdmiCecAll.cpp",
-        "android/hardware/tv/cec/1.0/HdmiCecCallbackAll.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.tv.cec@1.0_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tv.cec@1.0",
-    srcs: [
-        ":android.hardware.tv.cec@1.0_hal",
-    ],
-    out: [
-        "android/hardware/tv/cec/1.0/types.h",
-        "android/hardware/tv/cec/1.0/hwtypes.h",
-        "android/hardware/tv/cec/1.0/IHdmiCec.h",
-        "android/hardware/tv/cec/1.0/IHwHdmiCec.h",
-        "android/hardware/tv/cec/1.0/BnHwHdmiCec.h",
-        "android/hardware/tv/cec/1.0/BpHwHdmiCec.h",
-        "android/hardware/tv/cec/1.0/BsHdmiCec.h",
-        "android/hardware/tv/cec/1.0/IHdmiCecCallback.h",
-        "android/hardware/tv/cec/1.0/IHwHdmiCecCallback.h",
-        "android/hardware/tv/cec/1.0/BnHwHdmiCecCallback.h",
-        "android/hardware/tv/cec/1.0/BpHwHdmiCecCallback.h",
-        "android/hardware/tv/cec/1.0/BsHdmiCecCallback.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.tv.cec@1.0",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.tv.cec@1.0_genc++"],
-    generated_headers: ["android.hardware.tv.cec@1.0_genc++_headers"],
-    export_generated_headers: ["android.hardware.tv.cec@1.0_genc++_headers"],
-    vendor_available: true,
-    vndk: {
-        enabled: true,
-    },
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-    ],
-}
-
-genrule {
-    name: "android.hardware.tv.cec-V1.0-java_gen_java",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Ljava -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tv.cec@1.0",
-    srcs: [
-        ":android.hardware.tv.cec@1.0_hal",
-    ],
-    out: [
-        "android/hardware/tv/cec/V1_0/AbortReason.java",
-        "android/hardware/tv/cec/V1_0/CecDeviceType.java",
-        "android/hardware/tv/cec/V1_0/CecLogicalAddress.java",
-        "android/hardware/tv/cec/V1_0/CecMessage.java",
-        "android/hardware/tv/cec/V1_0/CecMessageType.java",
-        "android/hardware/tv/cec/V1_0/HdmiPortInfo.java",
-        "android/hardware/tv/cec/V1_0/HdmiPortType.java",
-        "android/hardware/tv/cec/V1_0/HotplugEvent.java",
-        "android/hardware/tv/cec/V1_0/MaxLength.java",
-        "android/hardware/tv/cec/V1_0/OptionKey.java",
-        "android/hardware/tv/cec/V1_0/Result.java",
-        "android/hardware/tv/cec/V1_0/SendMessageResult.java",
-        "android/hardware/tv/cec/V1_0/IHdmiCec.java",
-        "android/hardware/tv/cec/V1_0/IHdmiCecCallback.java",
-    ],
-}
-
-java_library {
-    name: "android.hardware.tv.cec-V1.0-java",
-    no_framework_libs: true,
-    defaults: ["hidl-java-module-defaults"],
-    srcs: [":android.hardware.tv.cec-V1.0-java_gen_java"],
-    libs: [
-        "hwbinder",
-        "android.hidl.base-V1.0-java",
-    ]
-}
-
-// This package does not export any types. Not creating java constants export.
-
-
-genrule {
-    name: "android.hardware.tv.cec@1.0-adapter-helper_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tv.cec@1.0",
-    srcs: [
-        ":android.hardware.tv.cec@1.0_hal",
-    ],
-    out: [
-        "android/hardware/tv/cec/1.0/AHdmiCec.cpp",
-        "android/hardware/tv/cec/1.0/AHdmiCecCallback.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.tv.cec@1.0-adapter-helper_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tv.cec@1.0",
-    srcs: [
-        ":android.hardware.tv.cec@1.0_hal",
-    ],
-    out: [
-        "android/hardware/tv/cec/1.0/AHdmiCec.h",
-        "android/hardware/tv/cec/1.0/AHdmiCecCallback.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.tv.cec@1.0-adapter-helper",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.tv.cec@1.0-adapter-helper_genc++"],
-    generated_headers: ["android.hardware.tv.cec@1.0-adapter-helper_genc++_headers"],
-    export_generated_headers: ["android.hardware.tv.cec@1.0-adapter-helper_genc++_headers"],
-    vendor_available: true,
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-        "libhidladapter",
-        "android.hardware.tv.cec@1.0",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-        "libhidladapter",
-        "android.hardware.tv.cec@1.0",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-}
-
-genrule {
-    name: "android.hardware.tv.cec@1.0-adapter_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-main -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tv.cec@1.0",
-    out: ["main.cpp"]
-}
-
-cc_test {
-    name: "android.hardware.tv.cec@1.0-adapter",
-    defaults: ["hidl-module-defaults"],
-    shared_libs: [
-        "libhidladapter",
-        "libhidlbase",
-        "libhidltransport",
-        "libutils",
-        "android.hardware.tv.cec@1.0",
-        "android.hardware.tv.cec@1.0-adapter-helper",
-    ],
-    generated_sources: ["android.hardware.tv.cec@1.0-adapter_genc++"],
-}
diff --git a/tv/input/1.0/Android.bp b/tv/input/1.0/Android.bp
index 3ec81e8..1bf3930 100644
--- a/tv/input/1.0/Android.bp
+++ b/tv/input/1.0/Android.bp
@@ -1,175 +1,30 @@
-// This file is autogenerated by hidl-gen. Do not edit manually.
+// This file is autogenerated by hidl-gen -Landroidbp.
 
-filegroup {
-    name: "android.hardware.tv.input@1.0_hal",
+hidl_interface {
+    name: "android.hardware.tv.input@1.0",
+    root: "android.hardware",
+    vndk: {
+        enabled: true,
+    },
     srcs: [
         "types.hal",
         "ITvInput.hal",
         "ITvInputCallback.hal",
     ],
-}
-
-genrule {
-    name: "android.hardware.tv.input@1.0_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tv.input@1.0",
-    srcs: [
-        ":android.hardware.tv.input@1.0_hal",
-    ],
-    out: [
-        "android/hardware/tv/input/1.0/types.cpp",
-        "android/hardware/tv/input/1.0/TvInputAll.cpp",
-        "android/hardware/tv/input/1.0/TvInputCallbackAll.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.tv.input@1.0_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tv.input@1.0",
-    srcs: [
-        ":android.hardware.tv.input@1.0_hal",
-    ],
-    out: [
-        "android/hardware/tv/input/1.0/types.h",
-        "android/hardware/tv/input/1.0/hwtypes.h",
-        "android/hardware/tv/input/1.0/ITvInput.h",
-        "android/hardware/tv/input/1.0/IHwTvInput.h",
-        "android/hardware/tv/input/1.0/BnHwTvInput.h",
-        "android/hardware/tv/input/1.0/BpHwTvInput.h",
-        "android/hardware/tv/input/1.0/BsTvInput.h",
-        "android/hardware/tv/input/1.0/ITvInputCallback.h",
-        "android/hardware/tv/input/1.0/IHwTvInputCallback.h",
-        "android/hardware/tv/input/1.0/BnHwTvInputCallback.h",
-        "android/hardware/tv/input/1.0/BpHwTvInputCallback.h",
-        "android/hardware/tv/input/1.0/BsTvInputCallback.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.tv.input@1.0",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.tv.input@1.0_genc++"],
-    generated_headers: ["android.hardware.tv.input@1.0_genc++_headers"],
-    export_generated_headers: ["android.hardware.tv.input@1.0_genc++_headers"],
-    vendor_available: true,
-    vndk: {
-        enabled: true,
-    },
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
+    interfaces: [
         "android.hardware.audio.common@2.0",
+        "android.hidl.base@1.0",
     ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-        "android.hardware.audio.common@2.0",
+    types: [
+        "CableConnectionStatus",
+        "Result",
+        "TvInputDeviceInfo",
+        "TvInputEvent",
+        "TvInputEventType",
+        "TvInputType",
+        "TvStreamConfig",
     ],
+    gen_java: false,
+    gen_java_constants: true,
 }
 
-// This package is not java compatible. Not creating java target.
-
-genrule {
-    name: "android.hardware.tv.input-V1.0-java-constants_gen_java",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Ljava-constants -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tv.input@1.0",
-    srcs: [
-        ":android.hardware.tv.input@1.0_hal",
-    ],
-    out: [
-        "android/hardware/tv/input/V1_0/Constants.java",
-    ],
-}
-
-java_library {
-    name: "android.hardware.tv.input-V1.0-java-constants",
-    no_framework_libs: true,
-    defaults: ["hidl-java-module-defaults"],
-    srcs: [":android.hardware.tv.input-V1.0-java-constants_gen_java"],
-}
-
-genrule {
-    name: "android.hardware.tv.input@1.0-adapter-helper_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tv.input@1.0",
-    srcs: [
-        ":android.hardware.tv.input@1.0_hal",
-    ],
-    out: [
-        "android/hardware/tv/input/1.0/ATvInput.cpp",
-        "android/hardware/tv/input/1.0/ATvInputCallback.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.tv.input@1.0-adapter-helper_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tv.input@1.0",
-    srcs: [
-        ":android.hardware.tv.input@1.0_hal",
-    ],
-    out: [
-        "android/hardware/tv/input/1.0/ATvInput.h",
-        "android/hardware/tv/input/1.0/ATvInputCallback.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.tv.input@1.0-adapter-helper",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.tv.input@1.0-adapter-helper_genc++"],
-    generated_headers: ["android.hardware.tv.input@1.0-adapter-helper_genc++_headers"],
-    export_generated_headers: ["android.hardware.tv.input@1.0-adapter-helper_genc++_headers"],
-    vendor_available: true,
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-        "libhidladapter",
-        "android.hardware.audio.common@2.0",
-        "android.hardware.tv.input@1.0",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-        "libhidladapter",
-        "android.hardware.audio.common@2.0",
-        "android.hardware.tv.input@1.0",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-}
-
-genrule {
-    name: "android.hardware.tv.input@1.0-adapter_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-main -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tv.input@1.0",
-    out: ["main.cpp"]
-}
-
-cc_test {
-    name: "android.hardware.tv.input@1.0-adapter",
-    defaults: ["hidl-module-defaults"],
-    shared_libs: [
-        "libhidladapter",
-        "libhidlbase",
-        "libhidltransport",
-        "libutils",
-        "android.hardware.audio.common@2.0",
-        "android.hardware.tv.input@1.0",
-        "android.hardware.tv.input@1.0-adapter-helper",
-    ],
-    generated_sources: ["android.hardware.tv.input@1.0-adapter_genc++"],
-}
diff --git a/usb/1.0/Android.bp b/usb/1.0/Android.bp
index f733e36..6676fa5 100644
--- a/usb/1.0/Android.bp
+++ b/usb/1.0/Android.bp
@@ -1,199 +1,29 @@
-// This file is autogenerated by hidl-gen. Do not edit manually.
+// This file is autogenerated by hidl-gen -Landroidbp.
 
-filegroup {
-    name: "android.hardware.usb@1.0_hal",
+hidl_interface {
+    name: "android.hardware.usb@1.0",
+    root: "android.hardware",
+    vndk: {
+        enabled: true,
+    },
     srcs: [
         "types.hal",
         "IUsb.hal",
         "IUsbCallback.hal",
     ],
+    interfaces: [
+        "android.hidl.base@1.0",
+    ],
+    types: [
+        "PortDataRole",
+        "PortMode",
+        "PortPowerRole",
+        "PortRole",
+        "PortRoleType",
+        "PortStatus",
+        "Status",
+    ],
+    gen_java: true,
+    gen_java_constants: true,
 }
 
-genrule {
-    name: "android.hardware.usb@1.0_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.usb@1.0",
-    srcs: [
-        ":android.hardware.usb@1.0_hal",
-    ],
-    out: [
-        "android/hardware/usb/1.0/types.cpp",
-        "android/hardware/usb/1.0/UsbAll.cpp",
-        "android/hardware/usb/1.0/UsbCallbackAll.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.usb@1.0_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.usb@1.0",
-    srcs: [
-        ":android.hardware.usb@1.0_hal",
-    ],
-    out: [
-        "android/hardware/usb/1.0/types.h",
-        "android/hardware/usb/1.0/hwtypes.h",
-        "android/hardware/usb/1.0/IUsb.h",
-        "android/hardware/usb/1.0/IHwUsb.h",
-        "android/hardware/usb/1.0/BnHwUsb.h",
-        "android/hardware/usb/1.0/BpHwUsb.h",
-        "android/hardware/usb/1.0/BsUsb.h",
-        "android/hardware/usb/1.0/IUsbCallback.h",
-        "android/hardware/usb/1.0/IHwUsbCallback.h",
-        "android/hardware/usb/1.0/BnHwUsbCallback.h",
-        "android/hardware/usb/1.0/BpHwUsbCallback.h",
-        "android/hardware/usb/1.0/BsUsbCallback.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.usb@1.0",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.usb@1.0_genc++"],
-    generated_headers: ["android.hardware.usb@1.0_genc++_headers"],
-    export_generated_headers: ["android.hardware.usb@1.0_genc++_headers"],
-    vendor_available: true,
-    vndk: {
-        enabled: true,
-    },
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-    ],
-}
-
-genrule {
-    name: "android.hardware.usb-V1.0-java_gen_java",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Ljava -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.usb@1.0",
-    srcs: [
-        ":android.hardware.usb@1.0_hal",
-    ],
-    out: [
-        "android/hardware/usb/V1_0/PortDataRole.java",
-        "android/hardware/usb/V1_0/PortMode.java",
-        "android/hardware/usb/V1_0/PortPowerRole.java",
-        "android/hardware/usb/V1_0/PortRole.java",
-        "android/hardware/usb/V1_0/PortRoleType.java",
-        "android/hardware/usb/V1_0/PortStatus.java",
-        "android/hardware/usb/V1_0/Status.java",
-        "android/hardware/usb/V1_0/IUsb.java",
-        "android/hardware/usb/V1_0/IUsbCallback.java",
-    ],
-}
-
-java_library {
-    name: "android.hardware.usb-V1.0-java",
-    no_framework_libs: true,
-    defaults: ["hidl-java-module-defaults"],
-    srcs: [":android.hardware.usb-V1.0-java_gen_java"],
-    libs: [
-        "hwbinder",
-        "android.hidl.base-V1.0-java",
-    ]
-}
-
-genrule {
-    name: "android.hardware.usb-V1.0-java-constants_gen_java",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Ljava-constants -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.usb@1.0",
-    srcs: [
-        ":android.hardware.usb@1.0_hal",
-    ],
-    out: [
-        "android/hardware/usb/V1_0/Constants.java",
-    ],
-}
-
-java_library {
-    name: "android.hardware.usb-V1.0-java-constants",
-    no_framework_libs: true,
-    defaults: ["hidl-java-module-defaults"],
-    srcs: [":android.hardware.usb-V1.0-java-constants_gen_java"],
-}
-
-genrule {
-    name: "android.hardware.usb@1.0-adapter-helper_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.usb@1.0",
-    srcs: [
-        ":android.hardware.usb@1.0_hal",
-    ],
-    out: [
-        "android/hardware/usb/1.0/AUsb.cpp",
-        "android/hardware/usb/1.0/AUsbCallback.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.usb@1.0-adapter-helper_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.usb@1.0",
-    srcs: [
-        ":android.hardware.usb@1.0_hal",
-    ],
-    out: [
-        "android/hardware/usb/1.0/AUsb.h",
-        "android/hardware/usb/1.0/AUsbCallback.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.usb@1.0-adapter-helper",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.usb@1.0-adapter-helper_genc++"],
-    generated_headers: ["android.hardware.usb@1.0-adapter-helper_genc++_headers"],
-    export_generated_headers: ["android.hardware.usb@1.0-adapter-helper_genc++_headers"],
-    vendor_available: true,
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-        "libhidladapter",
-        "android.hardware.usb@1.0",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-        "libhidladapter",
-        "android.hardware.usb@1.0",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-}
-
-genrule {
-    name: "android.hardware.usb@1.0-adapter_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-main -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.usb@1.0",
-    out: ["main.cpp"]
-}
-
-cc_test {
-    name: "android.hardware.usb@1.0-adapter",
-    defaults: ["hidl-module-defaults"],
-    shared_libs: [
-        "libhidladapter",
-        "libhidlbase",
-        "libhidltransport",
-        "libutils",
-        "android.hardware.usb@1.0",
-        "android.hardware.usb@1.0-adapter-helper",
-    ],
-    generated_sources: ["android.hardware.usb@1.0-adapter_genc++"],
-}
diff --git a/usb/1.1/Android.bp b/usb/1.1/Android.bp
index 67bc0a6..c398f94 100644
--- a/usb/1.1/Android.bp
+++ b/usb/1.1/Android.bp
@@ -1,202 +1,25 @@
-// This file is autogenerated by hidl-gen. Do not edit manually.
+// This file is autogenerated by hidl-gen -Landroidbp.
 
-filegroup {
-    name: "android.hardware.usb@1.1_hal",
+hidl_interface {
+    name: "android.hardware.usb@1.1",
+    root: "android.hardware",
+    vndk: {
+        enabled: true,
+    },
     srcs: [
         "types.hal",
         "IUsb.hal",
         "IUsbCallback.hal",
     ],
-}
-
-genrule {
-    name: "android.hardware.usb@1.1_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.usb@1.1",
-    srcs: [
-        ":android.hardware.usb@1.1_hal",
-    ],
-    out: [
-        "android/hardware/usb/1.1/types.cpp",
-        "android/hardware/usb/1.1/UsbAll.cpp",
-        "android/hardware/usb/1.1/UsbCallbackAll.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.usb@1.1_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.usb@1.1",
-    srcs: [
-        ":android.hardware.usb@1.1_hal",
-    ],
-    out: [
-        "android/hardware/usb/1.1/types.h",
-        "android/hardware/usb/1.1/hwtypes.h",
-        "android/hardware/usb/1.1/IUsb.h",
-        "android/hardware/usb/1.1/IHwUsb.h",
-        "android/hardware/usb/1.1/BnHwUsb.h",
-        "android/hardware/usb/1.1/BpHwUsb.h",
-        "android/hardware/usb/1.1/BsUsb.h",
-        "android/hardware/usb/1.1/IUsbCallback.h",
-        "android/hardware/usb/1.1/IHwUsbCallback.h",
-        "android/hardware/usb/1.1/BnHwUsbCallback.h",
-        "android/hardware/usb/1.1/BpHwUsbCallback.h",
-        "android/hardware/usb/1.1/BsUsbCallback.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.usb@1.1",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.usb@1.1_genc++"],
-    generated_headers: ["android.hardware.usb@1.1_genc++_headers"],
-    export_generated_headers: ["android.hardware.usb@1.1_genc++_headers"],
-    vendor_available: true,
-    vndk: {
-        enabled: true,
-    },
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
+    interfaces: [
         "android.hardware.usb@1.0",
+        "android.hidl.base@1.0",
     ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-        "android.hardware.usb@1.0",
+    types: [
+        "PortMode_1_1",
+        "PortStatus_1_1",
     ],
+    gen_java: true,
+    gen_java_constants: true,
 }
 
-genrule {
-    name: "android.hardware.usb-V1.1-java_gen_java",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Ljava -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.usb@1.1",
-    srcs: [
-        ":android.hardware.usb@1.1_hal",
-    ],
-    out: [
-        "android/hardware/usb/V1_1/PortMode_1_1.java",
-        "android/hardware/usb/V1_1/PortStatus_1_1.java",
-        "android/hardware/usb/V1_1/IUsb.java",
-        "android/hardware/usb/V1_1/IUsbCallback.java",
-    ],
-}
-
-java_library {
-    name: "android.hardware.usb-V1.1-java",
-    no_framework_libs: true,
-    defaults: ["hidl-java-module-defaults"],
-    srcs: [":android.hardware.usb-V1.1-java_gen_java"],
-    libs: [
-        "hwbinder",
-        "android.hardware.usb-V1.0-java",
-        "android.hidl.base-V1.0-java",
-    ]
-}
-
-genrule {
-    name: "android.hardware.usb-V1.1-java-constants_gen_java",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Ljava-constants -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.usb@1.1",
-    srcs: [
-        ":android.hardware.usb@1.1_hal",
-    ],
-    out: [
-        "android/hardware/usb/V1_1/Constants.java",
-    ],
-}
-
-java_library {
-    name: "android.hardware.usb-V1.1-java-constants",
-    no_framework_libs: true,
-    defaults: ["hidl-java-module-defaults"],
-    srcs: [":android.hardware.usb-V1.1-java-constants_gen_java"],
-}
-
-genrule {
-    name: "android.hardware.usb@1.1-adapter-helper_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.usb@1.1",
-    srcs: [
-        ":android.hardware.usb@1.1_hal",
-    ],
-    out: [
-        "android/hardware/usb/1.1/AUsb.cpp",
-        "android/hardware/usb/1.1/AUsbCallback.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.usb@1.1-adapter-helper_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.usb@1.1",
-    srcs: [
-        ":android.hardware.usb@1.1_hal",
-    ],
-    out: [
-        "android/hardware/usb/1.1/AUsb.h",
-        "android/hardware/usb/1.1/AUsbCallback.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.usb@1.1-adapter-helper",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.usb@1.1-adapter-helper_genc++"],
-    generated_headers: ["android.hardware.usb@1.1-adapter-helper_genc++_headers"],
-    export_generated_headers: ["android.hardware.usb@1.1-adapter-helper_genc++_headers"],
-    vendor_available: true,
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-        "libhidladapter",
-        "android.hardware.usb@1.0",
-        "android.hardware.usb@1.1",
-        "android.hardware.usb@1.0-adapter-helper",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-        "libhidladapter",
-        "android.hardware.usb@1.0",
-        "android.hardware.usb@1.1",
-        "android.hardware.usb@1.0-adapter-helper",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-}
-
-genrule {
-    name: "android.hardware.usb@1.1-adapter_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-main -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.usb@1.1",
-    out: ["main.cpp"]
-}
-
-cc_test {
-    name: "android.hardware.usb@1.1-adapter",
-    defaults: ["hidl-module-defaults"],
-    shared_libs: [
-        "libhidladapter",
-        "libhidlbase",
-        "libhidltransport",
-        "libutils",
-        "android.hardware.usb@1.0",
-        "android.hardware.usb@1.1",
-        "android.hardware.usb@1.1-adapter-helper",
-    ],
-    generated_sources: ["android.hardware.usb@1.1-adapter_genc++"],
-}
diff --git a/vibrator/1.0/Android.bp b/vibrator/1.0/Android.bp
index 9055c5e..6913c88 100644
--- a/vibrator/1.0/Android.bp
+++ b/vibrator/1.0/Android.bp
@@ -1,185 +1,24 @@
-// This file is autogenerated by hidl-gen. Do not edit manually.
+// This file is autogenerated by hidl-gen -Landroidbp.
 
-filegroup {
-    name: "android.hardware.vibrator@1.0_hal",
+hidl_interface {
+    name: "android.hardware.vibrator@1.0",
+    root: "android.hardware",
+    vndk: {
+        enabled: true,
+    },
     srcs: [
         "types.hal",
         "IVibrator.hal",
     ],
+    interfaces: [
+        "android.hidl.base@1.0",
+    ],
+    types: [
+        "Effect",
+        "EffectStrength",
+        "Status",
+    ],
+    gen_java: true,
+    gen_java_constants: true,
 }
 
-genrule {
-    name: "android.hardware.vibrator@1.0_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.vibrator@1.0",
-    srcs: [
-        ":android.hardware.vibrator@1.0_hal",
-    ],
-    out: [
-        "android/hardware/vibrator/1.0/types.cpp",
-        "android/hardware/vibrator/1.0/VibratorAll.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.vibrator@1.0_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.vibrator@1.0",
-    srcs: [
-        ":android.hardware.vibrator@1.0_hal",
-    ],
-    out: [
-        "android/hardware/vibrator/1.0/types.h",
-        "android/hardware/vibrator/1.0/hwtypes.h",
-        "android/hardware/vibrator/1.0/IVibrator.h",
-        "android/hardware/vibrator/1.0/IHwVibrator.h",
-        "android/hardware/vibrator/1.0/BnHwVibrator.h",
-        "android/hardware/vibrator/1.0/BpHwVibrator.h",
-        "android/hardware/vibrator/1.0/BsVibrator.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.vibrator@1.0",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.vibrator@1.0_genc++"],
-    generated_headers: ["android.hardware.vibrator@1.0_genc++_headers"],
-    export_generated_headers: ["android.hardware.vibrator@1.0_genc++_headers"],
-    vendor_available: true,
-    vndk: {
-        enabled: true,
-    },
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-    ],
-}
-
-genrule {
-    name: "android.hardware.vibrator-V1.0-java_gen_java",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Ljava -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.vibrator@1.0",
-    srcs: [
-        ":android.hardware.vibrator@1.0_hal",
-    ],
-    out: [
-        "android/hardware/vibrator/V1_0/Effect.java",
-        "android/hardware/vibrator/V1_0/EffectStrength.java",
-        "android/hardware/vibrator/V1_0/Status.java",
-        "android/hardware/vibrator/V1_0/IVibrator.java",
-    ],
-}
-
-java_library {
-    name: "android.hardware.vibrator-V1.0-java",
-    no_framework_libs: true,
-    defaults: ["hidl-java-module-defaults"],
-    srcs: [":android.hardware.vibrator-V1.0-java_gen_java"],
-    libs: [
-        "hwbinder",
-        "android.hidl.base-V1.0-java",
-    ]
-}
-
-genrule {
-    name: "android.hardware.vibrator-V1.0-java-constants_gen_java",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Ljava-constants -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.vibrator@1.0",
-    srcs: [
-        ":android.hardware.vibrator@1.0_hal",
-    ],
-    out: [
-        "android/hardware/vibrator/V1_0/Constants.java",
-    ],
-}
-
-java_library {
-    name: "android.hardware.vibrator-V1.0-java-constants",
-    no_framework_libs: true,
-    defaults: ["hidl-java-module-defaults"],
-    srcs: [":android.hardware.vibrator-V1.0-java-constants_gen_java"],
-}
-
-genrule {
-    name: "android.hardware.vibrator@1.0-adapter-helper_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.vibrator@1.0",
-    srcs: [
-        ":android.hardware.vibrator@1.0_hal",
-    ],
-    out: [
-        "android/hardware/vibrator/1.0/AVibrator.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.vibrator@1.0-adapter-helper_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.vibrator@1.0",
-    srcs: [
-        ":android.hardware.vibrator@1.0_hal",
-    ],
-    out: [
-        "android/hardware/vibrator/1.0/AVibrator.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.vibrator@1.0-adapter-helper",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.vibrator@1.0-adapter-helper_genc++"],
-    generated_headers: ["android.hardware.vibrator@1.0-adapter-helper_genc++_headers"],
-    export_generated_headers: ["android.hardware.vibrator@1.0-adapter-helper_genc++_headers"],
-    vendor_available: true,
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-        "libhidladapter",
-        "android.hardware.vibrator@1.0",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-        "libhidladapter",
-        "android.hardware.vibrator@1.0",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-}
-
-genrule {
-    name: "android.hardware.vibrator@1.0-adapter_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-main -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.vibrator@1.0",
-    out: ["main.cpp"]
-}
-
-cc_test {
-    name: "android.hardware.vibrator@1.0-adapter",
-    defaults: ["hidl-module-defaults"],
-    shared_libs: [
-        "libhidladapter",
-        "libhidlbase",
-        "libhidltransport",
-        "libutils",
-        "android.hardware.vibrator@1.0",
-        "android.hardware.vibrator@1.0-adapter-helper",
-    ],
-    generated_sources: ["android.hardware.vibrator@1.0-adapter_genc++"],
-}
diff --git a/vibrator/1.1/Android.bp b/vibrator/1.1/Android.bp
index 11985fd..810797b 100644
--- a/vibrator/1.1/Android.bp
+++ b/vibrator/1.1/Android.bp
@@ -1,191 +1,23 @@
-// This file is autogenerated by hidl-gen. Do not edit manually.
+// This file is autogenerated by hidl-gen -Landroidbp.
 
-filegroup {
-    name: "android.hardware.vibrator@1.1_hal",
+hidl_interface {
+    name: "android.hardware.vibrator@1.1",
+    root: "android.hardware",
+    vndk: {
+        enabled: true,
+    },
     srcs: [
         "types.hal",
         "IVibrator.hal",
     ],
-}
-
-genrule {
-    name: "android.hardware.vibrator@1.1_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.vibrator@1.1",
-    srcs: [
-        ":android.hardware.vibrator@1.1_hal",
-    ],
-    out: [
-        "android/hardware/vibrator/1.1/types.cpp",
-        "android/hardware/vibrator/1.1/VibratorAll.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.vibrator@1.1_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.vibrator@1.1",
-    srcs: [
-        ":android.hardware.vibrator@1.1_hal",
-    ],
-    out: [
-        "android/hardware/vibrator/1.1/types.h",
-        "android/hardware/vibrator/1.1/hwtypes.h",
-        "android/hardware/vibrator/1.1/IVibrator.h",
-        "android/hardware/vibrator/1.1/IHwVibrator.h",
-        "android/hardware/vibrator/1.1/BnHwVibrator.h",
-        "android/hardware/vibrator/1.1/BpHwVibrator.h",
-        "android/hardware/vibrator/1.1/BsVibrator.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.vibrator@1.1",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.vibrator@1.1_genc++"],
-    generated_headers: ["android.hardware.vibrator@1.1_genc++_headers"],
-    export_generated_headers: ["android.hardware.vibrator@1.1_genc++_headers"],
-    vendor_available: true,
-    vndk: {
-        enabled: true,
-    },
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
+    interfaces: [
         "android.hardware.vibrator@1.0",
+        "android.hidl.base@1.0",
     ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-        "android.hardware.vibrator@1.0",
+    types: [
+        "Effect_1_1",
     ],
+    gen_java: true,
+    gen_java_constants: true,
 }
 
-genrule {
-    name: "android.hardware.vibrator-V1.1-java_gen_java",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Ljava -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.vibrator@1.1",
-    srcs: [
-        ":android.hardware.vibrator@1.1_hal",
-    ],
-    out: [
-        "android/hardware/vibrator/V1_1/Effect_1_1.java",
-        "android/hardware/vibrator/V1_1/IVibrator.java",
-    ],
-}
-
-java_library {
-    name: "android.hardware.vibrator-V1.1-java",
-    no_framework_libs: true,
-    defaults: ["hidl-java-module-defaults"],
-    srcs: [":android.hardware.vibrator-V1.1-java_gen_java"],
-    libs: [
-        "hwbinder",
-        "android.hardware.vibrator-V1.0-java",
-        "android.hidl.base-V1.0-java",
-    ]
-}
-
-genrule {
-    name: "android.hardware.vibrator-V1.1-java-constants_gen_java",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Ljava-constants -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.vibrator@1.1",
-    srcs: [
-        ":android.hardware.vibrator@1.1_hal",
-    ],
-    out: [
-        "android/hardware/vibrator/V1_1/Constants.java",
-    ],
-}
-
-java_library {
-    name: "android.hardware.vibrator-V1.1-java-constants",
-    no_framework_libs: true,
-    defaults: ["hidl-java-module-defaults"],
-    srcs: [":android.hardware.vibrator-V1.1-java-constants_gen_java"],
-}
-
-genrule {
-    name: "android.hardware.vibrator@1.1-adapter-helper_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.vibrator@1.1",
-    srcs: [
-        ":android.hardware.vibrator@1.1_hal",
-    ],
-    out: [
-        "android/hardware/vibrator/1.1/AVibrator.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.vibrator@1.1-adapter-helper_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.vibrator@1.1",
-    srcs: [
-        ":android.hardware.vibrator@1.1_hal",
-    ],
-    out: [
-        "android/hardware/vibrator/1.1/AVibrator.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.vibrator@1.1-adapter-helper",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.vibrator@1.1-adapter-helper_genc++"],
-    generated_headers: ["android.hardware.vibrator@1.1-adapter-helper_genc++_headers"],
-    export_generated_headers: ["android.hardware.vibrator@1.1-adapter-helper_genc++_headers"],
-    vendor_available: true,
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-        "libhidladapter",
-        "android.hardware.vibrator@1.0",
-        "android.hardware.vibrator@1.1",
-        "android.hardware.vibrator@1.0-adapter-helper",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-        "libhidladapter",
-        "android.hardware.vibrator@1.0",
-        "android.hardware.vibrator@1.1",
-        "android.hardware.vibrator@1.0-adapter-helper",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-}
-
-genrule {
-    name: "android.hardware.vibrator@1.1-adapter_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-main -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.vibrator@1.1",
-    out: ["main.cpp"]
-}
-
-cc_test {
-    name: "android.hardware.vibrator@1.1-adapter",
-    defaults: ["hidl-module-defaults"],
-    shared_libs: [
-        "libhidladapter",
-        "libhidlbase",
-        "libhidltransport",
-        "libutils",
-        "android.hardware.vibrator@1.0",
-        "android.hardware.vibrator@1.1",
-        "android.hardware.vibrator@1.1-adapter-helper",
-    ],
-    generated_sources: ["android.hardware.vibrator@1.1-adapter_genc++"],
-}
diff --git a/vr/1.0/Android.bp b/vr/1.0/Android.bp
index f0a09bf..ca47a6e 100644
--- a/vr/1.0/Android.bp
+++ b/vr/1.0/Android.bp
@@ -1,162 +1,17 @@
-// This file is autogenerated by hidl-gen. Do not edit manually.
+// This file is autogenerated by hidl-gen -Landroidbp.
 
-filegroup {
-    name: "android.hardware.vr@1.0_hal",
-    srcs: [
-        "IVr.hal",
-    ],
-}
-
-genrule {
-    name: "android.hardware.vr@1.0_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.vr@1.0",
-    srcs: [
-        ":android.hardware.vr@1.0_hal",
-    ],
-    out: [
-        "android/hardware/vr/1.0/VrAll.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.vr@1.0_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.vr@1.0",
-    srcs: [
-        ":android.hardware.vr@1.0_hal",
-    ],
-    out: [
-        "android/hardware/vr/1.0/IVr.h",
-        "android/hardware/vr/1.0/IHwVr.h",
-        "android/hardware/vr/1.0/BnHwVr.h",
-        "android/hardware/vr/1.0/BpHwVr.h",
-        "android/hardware/vr/1.0/BsVr.h",
-    ],
-}
-
-cc_library {
+hidl_interface {
     name: "android.hardware.vr@1.0",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.vr@1.0_genc++"],
-    generated_headers: ["android.hardware.vr@1.0_genc++_headers"],
-    export_generated_headers: ["android.hardware.vr@1.0_genc++_headers"],
-    vendor_available: true,
+    root: "android.hardware",
     vndk: {
         enabled: true,
     },
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-    ],
-}
-
-genrule {
-    name: "android.hardware.vr-V1.0-java_gen_java",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Ljava -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.vr@1.0",
     srcs: [
-        ":android.hardware.vr@1.0_hal",
+        "IVr.hal",
     ],
-    out: [
-        "android/hardware/vr/V1_0/IVr.java",
+    interfaces: [
+        "android.hidl.base@1.0",
     ],
+    gen_java: true,
 }
 
-java_library {
-    name: "android.hardware.vr-V1.0-java",
-    no_framework_libs: true,
-    defaults: ["hidl-java-module-defaults"],
-    srcs: [":android.hardware.vr-V1.0-java_gen_java"],
-    libs: [
-        "hwbinder",
-        "android.hidl.base-V1.0-java",
-    ]
-}
-
-// This package does not export any types. Not creating java constants export.
-
-
-genrule {
-    name: "android.hardware.vr@1.0-adapter-helper_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.vr@1.0",
-    srcs: [
-        ":android.hardware.vr@1.0_hal",
-    ],
-    out: [
-        "android/hardware/vr/1.0/AVr.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.vr@1.0-adapter-helper_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.vr@1.0",
-    srcs: [
-        ":android.hardware.vr@1.0_hal",
-    ],
-    out: [
-        "android/hardware/vr/1.0/AVr.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.vr@1.0-adapter-helper",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.vr@1.0-adapter-helper_genc++"],
-    generated_headers: ["android.hardware.vr@1.0-adapter-helper_genc++_headers"],
-    export_generated_headers: ["android.hardware.vr@1.0-adapter-helper_genc++_headers"],
-    vendor_available: true,
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-        "libhidladapter",
-        "android.hardware.vr@1.0",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-        "libhidladapter",
-        "android.hardware.vr@1.0",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-}
-
-genrule {
-    name: "android.hardware.vr@1.0-adapter_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-main -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.vr@1.0",
-    out: ["main.cpp"]
-}
-
-cc_test {
-    name: "android.hardware.vr@1.0-adapter",
-    defaults: ["hidl-module-defaults"],
-    shared_libs: [
-        "libhidladapter",
-        "libhidlbase",
-        "libhidltransport",
-        "libutils",
-        "android.hardware.vr@1.0",
-        "android.hardware.vr@1.0-adapter-helper",
-    ],
-    generated_sources: ["android.hardware.vr@1.0-adapter_genc++"],
-}
diff --git a/weaver/1.0/Android.bp b/weaver/1.0/Android.bp
index b7bf1fe..e088a16 100644
--- a/weaver/1.0/Android.bp
+++ b/weaver/1.0/Android.bp
@@ -1,170 +1,24 @@
-// This file is autogenerated by hidl-gen. Do not edit manually.
+// This file is autogenerated by hidl-gen -Landroidbp.
 
-filegroup {
-    name: "android.hardware.weaver@1.0_hal",
+hidl_interface {
+    name: "android.hardware.weaver@1.0",
+    root: "android.hardware",
+    vndk: {
+        enabled: true,
+    },
     srcs: [
         "types.hal",
         "IWeaver.hal",
     ],
+    interfaces: [
+        "android.hidl.base@1.0",
+    ],
+    types: [
+        "WeaverConfig",
+        "WeaverReadResponse",
+        "WeaverReadStatus",
+        "WeaverStatus",
+    ],
+    gen_java: true,
 }
 
-genrule {
-    name: "android.hardware.weaver@1.0_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.weaver@1.0",
-    srcs: [
-        ":android.hardware.weaver@1.0_hal",
-    ],
-    out: [
-        "android/hardware/weaver/1.0/types.cpp",
-        "android/hardware/weaver/1.0/WeaverAll.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.weaver@1.0_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.weaver@1.0",
-    srcs: [
-        ":android.hardware.weaver@1.0_hal",
-    ],
-    out: [
-        "android/hardware/weaver/1.0/types.h",
-        "android/hardware/weaver/1.0/hwtypes.h",
-        "android/hardware/weaver/1.0/IWeaver.h",
-        "android/hardware/weaver/1.0/IHwWeaver.h",
-        "android/hardware/weaver/1.0/BnHwWeaver.h",
-        "android/hardware/weaver/1.0/BpHwWeaver.h",
-        "android/hardware/weaver/1.0/BsWeaver.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.weaver@1.0",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.weaver@1.0_genc++"],
-    generated_headers: ["android.hardware.weaver@1.0_genc++_headers"],
-    export_generated_headers: ["android.hardware.weaver@1.0_genc++_headers"],
-    vendor_available: true,
-    vndk: {
-        enabled: true,
-    },
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-    ],
-}
-
-genrule {
-    name: "android.hardware.weaver-V1.0-java_gen_java",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Ljava -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.weaver@1.0",
-    srcs: [
-        ":android.hardware.weaver@1.0_hal",
-    ],
-    out: [
-        "android/hardware/weaver/V1_0/WeaverConfig.java",
-        "android/hardware/weaver/V1_0/WeaverReadResponse.java",
-        "android/hardware/weaver/V1_0/WeaverReadStatus.java",
-        "android/hardware/weaver/V1_0/WeaverStatus.java",
-        "android/hardware/weaver/V1_0/IWeaver.java",
-    ],
-}
-
-java_library {
-    name: "android.hardware.weaver-V1.0-java",
-    no_framework_libs: true,
-    defaults: ["hidl-java-module-defaults"],
-    srcs: [":android.hardware.weaver-V1.0-java_gen_java"],
-    libs: [
-        "hwbinder",
-        "android.hidl.base-V1.0-java",
-    ]
-}
-
-// This package does not export any types. Not creating java constants export.
-
-
-genrule {
-    name: "android.hardware.weaver@1.0-adapter-helper_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.weaver@1.0",
-    srcs: [
-        ":android.hardware.weaver@1.0_hal",
-    ],
-    out: [
-        "android/hardware/weaver/1.0/AWeaver.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.weaver@1.0-adapter-helper_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.weaver@1.0",
-    srcs: [
-        ":android.hardware.weaver@1.0_hal",
-    ],
-    out: [
-        "android/hardware/weaver/1.0/AWeaver.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.weaver@1.0-adapter-helper",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.weaver@1.0-adapter-helper_genc++"],
-    generated_headers: ["android.hardware.weaver@1.0-adapter-helper_genc++_headers"],
-    export_generated_headers: ["android.hardware.weaver@1.0-adapter-helper_genc++_headers"],
-    vendor_available: true,
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-        "libhidladapter",
-        "android.hardware.weaver@1.0",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-        "libhidladapter",
-        "android.hardware.weaver@1.0",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-}
-
-genrule {
-    name: "android.hardware.weaver@1.0-adapter_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-main -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.weaver@1.0",
-    out: ["main.cpp"]
-}
-
-cc_test {
-    name: "android.hardware.weaver@1.0-adapter",
-    defaults: ["hidl-module-defaults"],
-    shared_libs: [
-        "libhidladapter",
-        "libhidlbase",
-        "libhidltransport",
-        "libutils",
-        "android.hardware.weaver@1.0",
-        "android.hardware.weaver@1.0-adapter-helper",
-    ],
-    generated_sources: ["android.hardware.weaver@1.0-adapter_genc++"],
-}
diff --git a/wifi/1.0/Android.bp b/wifi/1.0/Android.bp
index 113b3ea..096fb6c 100644
--- a/wifi/1.0/Android.bp
+++ b/wifi/1.0/Android.bp
@@ -1,7 +1,11 @@
-// This file is autogenerated by hidl-gen. Do not edit manually.
+// This file is autogenerated by hidl-gen -Landroidbp.
 
-filegroup {
-    name: "android.hardware.wifi@1.0_hal",
+hidl_interface {
+    name: "android.hardware.wifi@1.0",
+    root: "android.hardware",
+    vndk: {
+        enabled: true,
+    },
     srcs: [
         "types.hal",
         "IWifi.hal",
@@ -18,367 +22,94 @@
         "IWifiStaIface.hal",
         "IWifiStaIfaceEventCallback.hal",
     ],
+    interfaces: [
+        "android.hidl.base@1.0",
+    ],
+    types: [
+        "IfaceType",
+        "NanBandIndex",
+        "NanBandSpecificConfig",
+        "NanCapabilities",
+        "NanCipherSuiteType",
+        "NanClusterEventInd",
+        "NanClusterEventType",
+        "NanConfigRequest",
+        "NanDataPathChannelCfg",
+        "NanDataPathConfirmInd",
+        "NanDataPathRequestInd",
+        "NanDataPathSecurityConfig",
+        "NanDataPathSecurityType",
+        "NanDebugConfig",
+        "NanDiscoveryCommonConfig",
+        "NanEnableRequest",
+        "NanFollowupReceivedInd",
+        "NanInitiateDataPathRequest",
+        "NanMatchAlg",
+        "NanMatchInd",
+        "NanParamSizeLimits",
+        "NanPublishRequest",
+        "NanPublishType",
+        "NanRangingIndication",
+        "NanRespondToDataPathIndicationRequest",
+        "NanSrfType",
+        "NanStatusType",
+        "NanSubscribeRequest",
+        "NanSubscribeType",
+        "NanTransmitFollowupRequest",
+        "NanTxType",
+        "RttBw",
+        "RttCapabilities",
+        "RttConfig",
+        "RttLciInformation",
+        "RttLcrInformation",
+        "RttMotionPattern",
+        "RttPeerType",
+        "RttPreamble",
+        "RttResponder",
+        "RttResult",
+        "RttStatus",
+        "RttType",
+        "StaApfPacketFilterCapabilities",
+        "StaBackgroundScanBucketEventReportSchemeMask",
+        "StaBackgroundScanBucketParameters",
+        "StaBackgroundScanCapabilities",
+        "StaBackgroundScanParameters",
+        "StaLinkLayerIfacePacketStats",
+        "StaLinkLayerIfaceStats",
+        "StaLinkLayerRadioStats",
+        "StaLinkLayerStats",
+        "StaRoamingCapabilities",
+        "StaRoamingConfig",
+        "StaRoamingState",
+        "StaScanData",
+        "StaScanDataFlagMask",
+        "StaScanLimits",
+        "StaScanResult",
+        "WifiBand",
+        "WifiChannelInfo",
+        "WifiChannelWidthInMhz",
+        "WifiDebugHostWakeReasonRxIcmpPacketDetails",
+        "WifiDebugHostWakeReasonRxMulticastPacketDetails",
+        "WifiDebugHostWakeReasonRxPacketDetails",
+        "WifiDebugHostWakeReasonStats",
+        "WifiDebugPacketFateFrameInfo",
+        "WifiDebugPacketFateFrameType",
+        "WifiDebugRingBufferFlags",
+        "WifiDebugRingBufferStatus",
+        "WifiDebugRingBufferVerboseLevel",
+        "WifiDebugRxPacketFate",
+        "WifiDebugRxPacketFateReport",
+        "WifiDebugTxPacketFate",
+        "WifiDebugTxPacketFateReport",
+        "WifiInformationElement",
+        "WifiNanStatus",
+        "WifiRateInfo",
+        "WifiRateNss",
+        "WifiRatePreamble",
+        "WifiStatus",
+        "WifiStatusCode",
+    ],
+    gen_java: true,
+    gen_java_constants: true,
 }
 
-genrule {
-    name: "android.hardware.wifi@1.0_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.wifi@1.0",
-    srcs: [
-        ":android.hardware.wifi@1.0_hal",
-    ],
-    out: [
-        "android/hardware/wifi/1.0/types.cpp",
-        "android/hardware/wifi/1.0/WifiAll.cpp",
-        "android/hardware/wifi/1.0/WifiApIfaceAll.cpp",
-        "android/hardware/wifi/1.0/WifiChipAll.cpp",
-        "android/hardware/wifi/1.0/WifiChipEventCallbackAll.cpp",
-        "android/hardware/wifi/1.0/WifiEventCallbackAll.cpp",
-        "android/hardware/wifi/1.0/WifiIfaceAll.cpp",
-        "android/hardware/wifi/1.0/WifiNanIfaceAll.cpp",
-        "android/hardware/wifi/1.0/WifiNanIfaceEventCallbackAll.cpp",
-        "android/hardware/wifi/1.0/WifiP2pIfaceAll.cpp",
-        "android/hardware/wifi/1.0/WifiRttControllerAll.cpp",
-        "android/hardware/wifi/1.0/WifiRttControllerEventCallbackAll.cpp",
-        "android/hardware/wifi/1.0/WifiStaIfaceAll.cpp",
-        "android/hardware/wifi/1.0/WifiStaIfaceEventCallbackAll.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.wifi@1.0_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.wifi@1.0",
-    srcs: [
-        ":android.hardware.wifi@1.0_hal",
-    ],
-    out: [
-        "android/hardware/wifi/1.0/types.h",
-        "android/hardware/wifi/1.0/hwtypes.h",
-        "android/hardware/wifi/1.0/IWifi.h",
-        "android/hardware/wifi/1.0/IHwWifi.h",
-        "android/hardware/wifi/1.0/BnHwWifi.h",
-        "android/hardware/wifi/1.0/BpHwWifi.h",
-        "android/hardware/wifi/1.0/BsWifi.h",
-        "android/hardware/wifi/1.0/IWifiApIface.h",
-        "android/hardware/wifi/1.0/IHwWifiApIface.h",
-        "android/hardware/wifi/1.0/BnHwWifiApIface.h",
-        "android/hardware/wifi/1.0/BpHwWifiApIface.h",
-        "android/hardware/wifi/1.0/BsWifiApIface.h",
-        "android/hardware/wifi/1.0/IWifiChip.h",
-        "android/hardware/wifi/1.0/IHwWifiChip.h",
-        "android/hardware/wifi/1.0/BnHwWifiChip.h",
-        "android/hardware/wifi/1.0/BpHwWifiChip.h",
-        "android/hardware/wifi/1.0/BsWifiChip.h",
-        "android/hardware/wifi/1.0/IWifiChipEventCallback.h",
-        "android/hardware/wifi/1.0/IHwWifiChipEventCallback.h",
-        "android/hardware/wifi/1.0/BnHwWifiChipEventCallback.h",
-        "android/hardware/wifi/1.0/BpHwWifiChipEventCallback.h",
-        "android/hardware/wifi/1.0/BsWifiChipEventCallback.h",
-        "android/hardware/wifi/1.0/IWifiEventCallback.h",
-        "android/hardware/wifi/1.0/IHwWifiEventCallback.h",
-        "android/hardware/wifi/1.0/BnHwWifiEventCallback.h",
-        "android/hardware/wifi/1.0/BpHwWifiEventCallback.h",
-        "android/hardware/wifi/1.0/BsWifiEventCallback.h",
-        "android/hardware/wifi/1.0/IWifiIface.h",
-        "android/hardware/wifi/1.0/IHwWifiIface.h",
-        "android/hardware/wifi/1.0/BnHwWifiIface.h",
-        "android/hardware/wifi/1.0/BpHwWifiIface.h",
-        "android/hardware/wifi/1.0/BsWifiIface.h",
-        "android/hardware/wifi/1.0/IWifiNanIface.h",
-        "android/hardware/wifi/1.0/IHwWifiNanIface.h",
-        "android/hardware/wifi/1.0/BnHwWifiNanIface.h",
-        "android/hardware/wifi/1.0/BpHwWifiNanIface.h",
-        "android/hardware/wifi/1.0/BsWifiNanIface.h",
-        "android/hardware/wifi/1.0/IWifiNanIfaceEventCallback.h",
-        "android/hardware/wifi/1.0/IHwWifiNanIfaceEventCallback.h",
-        "android/hardware/wifi/1.0/BnHwWifiNanIfaceEventCallback.h",
-        "android/hardware/wifi/1.0/BpHwWifiNanIfaceEventCallback.h",
-        "android/hardware/wifi/1.0/BsWifiNanIfaceEventCallback.h",
-        "android/hardware/wifi/1.0/IWifiP2pIface.h",
-        "android/hardware/wifi/1.0/IHwWifiP2pIface.h",
-        "android/hardware/wifi/1.0/BnHwWifiP2pIface.h",
-        "android/hardware/wifi/1.0/BpHwWifiP2pIface.h",
-        "android/hardware/wifi/1.0/BsWifiP2pIface.h",
-        "android/hardware/wifi/1.0/IWifiRttController.h",
-        "android/hardware/wifi/1.0/IHwWifiRttController.h",
-        "android/hardware/wifi/1.0/BnHwWifiRttController.h",
-        "android/hardware/wifi/1.0/BpHwWifiRttController.h",
-        "android/hardware/wifi/1.0/BsWifiRttController.h",
-        "android/hardware/wifi/1.0/IWifiRttControllerEventCallback.h",
-        "android/hardware/wifi/1.0/IHwWifiRttControllerEventCallback.h",
-        "android/hardware/wifi/1.0/BnHwWifiRttControllerEventCallback.h",
-        "android/hardware/wifi/1.0/BpHwWifiRttControllerEventCallback.h",
-        "android/hardware/wifi/1.0/BsWifiRttControllerEventCallback.h",
-        "android/hardware/wifi/1.0/IWifiStaIface.h",
-        "android/hardware/wifi/1.0/IHwWifiStaIface.h",
-        "android/hardware/wifi/1.0/BnHwWifiStaIface.h",
-        "android/hardware/wifi/1.0/BpHwWifiStaIface.h",
-        "android/hardware/wifi/1.0/BsWifiStaIface.h",
-        "android/hardware/wifi/1.0/IWifiStaIfaceEventCallback.h",
-        "android/hardware/wifi/1.0/IHwWifiStaIfaceEventCallback.h",
-        "android/hardware/wifi/1.0/BnHwWifiStaIfaceEventCallback.h",
-        "android/hardware/wifi/1.0/BpHwWifiStaIfaceEventCallback.h",
-        "android/hardware/wifi/1.0/BsWifiStaIfaceEventCallback.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.wifi@1.0",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.wifi@1.0_genc++"],
-    generated_headers: ["android.hardware.wifi@1.0_genc++_headers"],
-    export_generated_headers: ["android.hardware.wifi@1.0_genc++_headers"],
-    vendor_available: true,
-    vndk: {
-        enabled: true,
-    },
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-    ],
-}
-
-genrule {
-    name: "android.hardware.wifi-V1.0-java_gen_java",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Ljava -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.wifi@1.0",
-    srcs: [
-        ":android.hardware.wifi@1.0_hal",
-    ],
-    out: [
-        "android/hardware/wifi/V1_0/IfaceType.java",
-        "android/hardware/wifi/V1_0/NanBandIndex.java",
-        "android/hardware/wifi/V1_0/NanBandSpecificConfig.java",
-        "android/hardware/wifi/V1_0/NanCapabilities.java",
-        "android/hardware/wifi/V1_0/NanCipherSuiteType.java",
-        "android/hardware/wifi/V1_0/NanClusterEventInd.java",
-        "android/hardware/wifi/V1_0/NanClusterEventType.java",
-        "android/hardware/wifi/V1_0/NanConfigRequest.java",
-        "android/hardware/wifi/V1_0/NanDataPathChannelCfg.java",
-        "android/hardware/wifi/V1_0/NanDataPathConfirmInd.java",
-        "android/hardware/wifi/V1_0/NanDataPathRequestInd.java",
-        "android/hardware/wifi/V1_0/NanDataPathSecurityConfig.java",
-        "android/hardware/wifi/V1_0/NanDataPathSecurityType.java",
-        "android/hardware/wifi/V1_0/NanDebugConfig.java",
-        "android/hardware/wifi/V1_0/NanDiscoveryCommonConfig.java",
-        "android/hardware/wifi/V1_0/NanEnableRequest.java",
-        "android/hardware/wifi/V1_0/NanFollowupReceivedInd.java",
-        "android/hardware/wifi/V1_0/NanInitiateDataPathRequest.java",
-        "android/hardware/wifi/V1_0/NanMatchAlg.java",
-        "android/hardware/wifi/V1_0/NanMatchInd.java",
-        "android/hardware/wifi/V1_0/NanParamSizeLimits.java",
-        "android/hardware/wifi/V1_0/NanPublishRequest.java",
-        "android/hardware/wifi/V1_0/NanPublishType.java",
-        "android/hardware/wifi/V1_0/NanRangingIndication.java",
-        "android/hardware/wifi/V1_0/NanRespondToDataPathIndicationRequest.java",
-        "android/hardware/wifi/V1_0/NanSrfType.java",
-        "android/hardware/wifi/V1_0/NanStatusType.java",
-        "android/hardware/wifi/V1_0/NanSubscribeRequest.java",
-        "android/hardware/wifi/V1_0/NanSubscribeType.java",
-        "android/hardware/wifi/V1_0/NanTransmitFollowupRequest.java",
-        "android/hardware/wifi/V1_0/NanTxType.java",
-        "android/hardware/wifi/V1_0/RttBw.java",
-        "android/hardware/wifi/V1_0/RttCapabilities.java",
-        "android/hardware/wifi/V1_0/RttConfig.java",
-        "android/hardware/wifi/V1_0/RttLciInformation.java",
-        "android/hardware/wifi/V1_0/RttLcrInformation.java",
-        "android/hardware/wifi/V1_0/RttMotionPattern.java",
-        "android/hardware/wifi/V1_0/RttPeerType.java",
-        "android/hardware/wifi/V1_0/RttPreamble.java",
-        "android/hardware/wifi/V1_0/RttResponder.java",
-        "android/hardware/wifi/V1_0/RttResult.java",
-        "android/hardware/wifi/V1_0/RttStatus.java",
-        "android/hardware/wifi/V1_0/RttType.java",
-        "android/hardware/wifi/V1_0/StaApfPacketFilterCapabilities.java",
-        "android/hardware/wifi/V1_0/StaBackgroundScanBucketEventReportSchemeMask.java",
-        "android/hardware/wifi/V1_0/StaBackgroundScanBucketParameters.java",
-        "android/hardware/wifi/V1_0/StaBackgroundScanCapabilities.java",
-        "android/hardware/wifi/V1_0/StaBackgroundScanParameters.java",
-        "android/hardware/wifi/V1_0/StaLinkLayerIfacePacketStats.java",
-        "android/hardware/wifi/V1_0/StaLinkLayerIfaceStats.java",
-        "android/hardware/wifi/V1_0/StaLinkLayerRadioStats.java",
-        "android/hardware/wifi/V1_0/StaLinkLayerStats.java",
-        "android/hardware/wifi/V1_0/StaRoamingCapabilities.java",
-        "android/hardware/wifi/V1_0/StaRoamingConfig.java",
-        "android/hardware/wifi/V1_0/StaRoamingState.java",
-        "android/hardware/wifi/V1_0/StaScanData.java",
-        "android/hardware/wifi/V1_0/StaScanDataFlagMask.java",
-        "android/hardware/wifi/V1_0/StaScanLimits.java",
-        "android/hardware/wifi/V1_0/StaScanResult.java",
-        "android/hardware/wifi/V1_0/WifiBand.java",
-        "android/hardware/wifi/V1_0/WifiChannelInfo.java",
-        "android/hardware/wifi/V1_0/WifiChannelWidthInMhz.java",
-        "android/hardware/wifi/V1_0/WifiDebugHostWakeReasonRxIcmpPacketDetails.java",
-        "android/hardware/wifi/V1_0/WifiDebugHostWakeReasonRxMulticastPacketDetails.java",
-        "android/hardware/wifi/V1_0/WifiDebugHostWakeReasonRxPacketDetails.java",
-        "android/hardware/wifi/V1_0/WifiDebugHostWakeReasonStats.java",
-        "android/hardware/wifi/V1_0/WifiDebugPacketFateFrameInfo.java",
-        "android/hardware/wifi/V1_0/WifiDebugPacketFateFrameType.java",
-        "android/hardware/wifi/V1_0/WifiDebugRingBufferFlags.java",
-        "android/hardware/wifi/V1_0/WifiDebugRingBufferStatus.java",
-        "android/hardware/wifi/V1_0/WifiDebugRingBufferVerboseLevel.java",
-        "android/hardware/wifi/V1_0/WifiDebugRxPacketFate.java",
-        "android/hardware/wifi/V1_0/WifiDebugRxPacketFateReport.java",
-        "android/hardware/wifi/V1_0/WifiDebugTxPacketFate.java",
-        "android/hardware/wifi/V1_0/WifiDebugTxPacketFateReport.java",
-        "android/hardware/wifi/V1_0/WifiInformationElement.java",
-        "android/hardware/wifi/V1_0/WifiNanStatus.java",
-        "android/hardware/wifi/V1_0/WifiRateInfo.java",
-        "android/hardware/wifi/V1_0/WifiRateNss.java",
-        "android/hardware/wifi/V1_0/WifiRatePreamble.java",
-        "android/hardware/wifi/V1_0/WifiStatus.java",
-        "android/hardware/wifi/V1_0/WifiStatusCode.java",
-        "android/hardware/wifi/V1_0/IWifi.java",
-        "android/hardware/wifi/V1_0/IWifiApIface.java",
-        "android/hardware/wifi/V1_0/IWifiChip.java",
-        "android/hardware/wifi/V1_0/IWifiChipEventCallback.java",
-        "android/hardware/wifi/V1_0/IWifiEventCallback.java",
-        "android/hardware/wifi/V1_0/IWifiIface.java",
-        "android/hardware/wifi/V1_0/IWifiNanIface.java",
-        "android/hardware/wifi/V1_0/IWifiNanIfaceEventCallback.java",
-        "android/hardware/wifi/V1_0/IWifiP2pIface.java",
-        "android/hardware/wifi/V1_0/IWifiRttController.java",
-        "android/hardware/wifi/V1_0/IWifiRttControllerEventCallback.java",
-        "android/hardware/wifi/V1_0/IWifiStaIface.java",
-        "android/hardware/wifi/V1_0/IWifiStaIfaceEventCallback.java",
-    ],
-}
-
-java_library {
-    name: "android.hardware.wifi-V1.0-java",
-    no_framework_libs: true,
-    defaults: ["hidl-java-module-defaults"],
-    srcs: [":android.hardware.wifi-V1.0-java_gen_java"],
-    libs: [
-        "hwbinder",
-        "android.hidl.base-V1.0-java",
-    ]
-}
-
-genrule {
-    name: "android.hardware.wifi-V1.0-java-constants_gen_java",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Ljava-constants -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.wifi@1.0",
-    srcs: [
-        ":android.hardware.wifi@1.0_hal",
-    ],
-    out: [
-        "android/hardware/wifi/V1_0/Constants.java",
-    ],
-}
-
-java_library {
-    name: "android.hardware.wifi-V1.0-java-constants",
-    no_framework_libs: true,
-    defaults: ["hidl-java-module-defaults"],
-    srcs: [":android.hardware.wifi-V1.0-java-constants_gen_java"],
-}
-
-genrule {
-    name: "android.hardware.wifi@1.0-adapter-helper_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.wifi@1.0",
-    srcs: [
-        ":android.hardware.wifi@1.0_hal",
-    ],
-    out: [
-        "android/hardware/wifi/1.0/AWifi.cpp",
-        "android/hardware/wifi/1.0/AWifiApIface.cpp",
-        "android/hardware/wifi/1.0/AWifiChip.cpp",
-        "android/hardware/wifi/1.0/AWifiChipEventCallback.cpp",
-        "android/hardware/wifi/1.0/AWifiEventCallback.cpp",
-        "android/hardware/wifi/1.0/AWifiIface.cpp",
-        "android/hardware/wifi/1.0/AWifiNanIface.cpp",
-        "android/hardware/wifi/1.0/AWifiNanIfaceEventCallback.cpp",
-        "android/hardware/wifi/1.0/AWifiP2pIface.cpp",
-        "android/hardware/wifi/1.0/AWifiRttController.cpp",
-        "android/hardware/wifi/1.0/AWifiRttControllerEventCallback.cpp",
-        "android/hardware/wifi/1.0/AWifiStaIface.cpp",
-        "android/hardware/wifi/1.0/AWifiStaIfaceEventCallback.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.wifi@1.0-adapter-helper_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.wifi@1.0",
-    srcs: [
-        ":android.hardware.wifi@1.0_hal",
-    ],
-    out: [
-        "android/hardware/wifi/1.0/AWifi.h",
-        "android/hardware/wifi/1.0/AWifiApIface.h",
-        "android/hardware/wifi/1.0/AWifiChip.h",
-        "android/hardware/wifi/1.0/AWifiChipEventCallback.h",
-        "android/hardware/wifi/1.0/AWifiEventCallback.h",
-        "android/hardware/wifi/1.0/AWifiIface.h",
-        "android/hardware/wifi/1.0/AWifiNanIface.h",
-        "android/hardware/wifi/1.0/AWifiNanIfaceEventCallback.h",
-        "android/hardware/wifi/1.0/AWifiP2pIface.h",
-        "android/hardware/wifi/1.0/AWifiRttController.h",
-        "android/hardware/wifi/1.0/AWifiRttControllerEventCallback.h",
-        "android/hardware/wifi/1.0/AWifiStaIface.h",
-        "android/hardware/wifi/1.0/AWifiStaIfaceEventCallback.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.wifi@1.0-adapter-helper",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.wifi@1.0-adapter-helper_genc++"],
-    generated_headers: ["android.hardware.wifi@1.0-adapter-helper_genc++_headers"],
-    export_generated_headers: ["android.hardware.wifi@1.0-adapter-helper_genc++_headers"],
-    vendor_available: true,
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-        "libhidladapter",
-        "android.hardware.wifi@1.0",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-        "libhidladapter",
-        "android.hardware.wifi@1.0",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-}
-
-genrule {
-    name: "android.hardware.wifi@1.0-adapter_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-main -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.wifi@1.0",
-    out: ["main.cpp"]
-}
-
-cc_test {
-    name: "android.hardware.wifi@1.0-adapter",
-    defaults: ["hidl-module-defaults"],
-    shared_libs: [
-        "libhidladapter",
-        "libhidlbase",
-        "libhidltransport",
-        "libutils",
-        "android.hardware.wifi@1.0",
-        "android.hardware.wifi@1.0-adapter-helper",
-    ],
-    generated_sources: ["android.hardware.wifi@1.0-adapter_genc++"],
-}
diff --git a/wifi/1.0/vts/functional/wifi_chip_hidl_test.cpp b/wifi/1.0/vts/functional/wifi_chip_hidl_test.cpp
index 3c23135..0c5bd45 100644
--- a/wifi/1.0/vts/functional/wifi_chip_hidl_test.cpp
+++ b/wifi/1.0/vts/functional/wifi_chip_hidl_test.cpp
@@ -441,8 +441,8 @@
  * succeeds. The 2nd iface creation should be rejected.
  */
 TEST_F(WifiChipHidlTest, CreateNanIface) {
-    configureChipForIfaceType(IfaceType::NAN, gEnv->isNanOn);
     if (!gEnv->isNanOn) return;
+    configureChipForIfaceType(IfaceType::NAN, gEnv->isNanOn);
 
     sp<IWifiNanIface> iface;
     ASSERT_EQ(WifiStatusCode::SUCCESS, createNanIface(&iface));
@@ -458,8 +458,8 @@
  * iface name is returned via the list.
  */
 TEST_F(WifiChipHidlTest, GetNanIfaceNames) {
-    configureChipForIfaceType(IfaceType::NAN, gEnv->isNanOn);
     if (!gEnv->isNanOn) return;
+    configureChipForIfaceType(IfaceType::NAN, gEnv->isNanOn);
 
     const auto& status_and_iface_names1 =
         HIDL_INVOKE(wifi_chip_, getNanIfaceNames);
@@ -491,8 +491,8 @@
  * doesn't retrieve an iface object.
  */
 TEST_F(WifiChipHidlTest, GetNanIface) {
-    configureChipForIfaceType(IfaceType::NAN, gEnv->isNanOn);
     if (!gEnv->isNanOn) return;
+    configureChipForIfaceType(IfaceType::NAN, gEnv->isNanOn);
 
     sp<IWifiNanIface> nan_iface;
     EXPECT_EQ(WifiStatusCode::SUCCESS, createNanIface(&nan_iface));
@@ -518,8 +518,8 @@
  * doesn't remove the iface.
  */
 TEST_F(WifiChipHidlTest, RemoveNanIface) {
-    configureChipForIfaceType(IfaceType::NAN, gEnv->isNanOn);
     if (!gEnv->isNanOn) return;
+    configureChipForIfaceType(IfaceType::NAN, gEnv->isNanOn);
 
     sp<IWifiNanIface> nan_iface;
     EXPECT_EQ(WifiStatusCode::SUCCESS, createNanIface(&nan_iface));
diff --git a/wifi/1.0/vts/functional/wifi_sta_iface_hidl_test.cpp b/wifi/1.0/vts/functional/wifi_sta_iface_hidl_test.cpp
index 30235cf..a341028 100644
--- a/wifi/1.0/vts/functional/wifi_sta_iface_hidl_test.cpp
+++ b/wifi/1.0/vts/functional/wifi_sta_iface_hidl_test.cpp
@@ -234,6 +234,11 @@
  * status code.
  */
 TEST_F(WifiStaIfaceHidlTest, EnableNDOffload) {
+   if (!isCapabilitySupported(
+           IWifiStaIface::StaIfaceCapabilityMask::ND_OFFLOAD)) {
+        // No-op if nd offload is not supported.
+        return;
+    }
     EXPECT_EQ(WifiStatusCode::SUCCESS,
               HIDL_INVOKE(wifi_sta_iface_, enableNdOffload, true).code);
 }
@@ -256,6 +261,11 @@
  * packets will return a success status code.
  */
 TEST_F(WifiStaIfaceHidlTest, PacketFateMonitoring) {
+   if (!isCapabilitySupported(
+           IWifiStaIface::StaIfaceCapabilityMask::DEBUG_PACKET_FATE)) {
+        // No-op if packet fate monitor is not supported.
+        return;
+    }
     // Start packet fate monitoring.
     EXPECT_EQ(
         WifiStatusCode::SUCCESS,
diff --git a/wifi/1.1/Android.bp b/wifi/1.1/Android.bp
index 0878abc..a4499c8 100644
--- a/wifi/1.1/Android.bp
+++ b/wifi/1.1/Android.bp
@@ -1,180 +1,19 @@
-// This file is autogenerated by hidl-gen. Do not edit manually.
+// This file is autogenerated by hidl-gen -Landroidbp.
 
-filegroup {
-    name: "android.hardware.wifi@1.1_hal",
+hidl_interface {
+    name: "android.hardware.wifi@1.1",
+    root: "android.hardware",
+    vndk: {
+        enabled: true,
+    },
     srcs: [
         "IWifi.hal",
         "IWifiChip.hal",
     ],
-}
-
-genrule {
-    name: "android.hardware.wifi@1.1_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.wifi@1.1",
-    srcs: [
-        ":android.hardware.wifi@1.1_hal",
-    ],
-    out: [
-        "android/hardware/wifi/1.1/WifiAll.cpp",
-        "android/hardware/wifi/1.1/WifiChipAll.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.wifi@1.1_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.wifi@1.1",
-    srcs: [
-        ":android.hardware.wifi@1.1_hal",
-    ],
-    out: [
-        "android/hardware/wifi/1.1/IWifi.h",
-        "android/hardware/wifi/1.1/IHwWifi.h",
-        "android/hardware/wifi/1.1/BnHwWifi.h",
-        "android/hardware/wifi/1.1/BpHwWifi.h",
-        "android/hardware/wifi/1.1/BsWifi.h",
-        "android/hardware/wifi/1.1/IWifiChip.h",
-        "android/hardware/wifi/1.1/IHwWifiChip.h",
-        "android/hardware/wifi/1.1/BnHwWifiChip.h",
-        "android/hardware/wifi/1.1/BpHwWifiChip.h",
-        "android/hardware/wifi/1.1/BsWifiChip.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.wifi@1.1",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.wifi@1.1_genc++"],
-    generated_headers: ["android.hardware.wifi@1.1_genc++_headers"],
-    export_generated_headers: ["android.hardware.wifi@1.1_genc++_headers"],
-    vendor_available: true,
-    vndk: {
-        enabled: true,
-    },
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
+    interfaces: [
         "android.hardware.wifi@1.0",
+        "android.hidl.base@1.0",
     ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-        "android.hardware.wifi@1.0",
-    ],
+    gen_java: true,
 }
 
-genrule {
-    name: "android.hardware.wifi-V1.1-java_gen_java",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Ljava -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.wifi@1.1",
-    srcs: [
-        ":android.hardware.wifi@1.1_hal",
-    ],
-    out: [
-        "android/hardware/wifi/V1_1/IWifi.java",
-        "android/hardware/wifi/V1_1/IWifiChip.java",
-    ],
-}
-
-java_library {
-    name: "android.hardware.wifi-V1.1-java",
-    no_framework_libs: true,
-    defaults: ["hidl-java-module-defaults"],
-    srcs: [":android.hardware.wifi-V1.1-java_gen_java"],
-    libs: [
-        "hwbinder",
-        "android.hardware.wifi-V1.0-java",
-        "android.hidl.base-V1.0-java",
-    ]
-}
-
-// This package does not export any types. Not creating java constants export.
-
-
-genrule {
-    name: "android.hardware.wifi@1.1-adapter-helper_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.wifi@1.1",
-    srcs: [
-        ":android.hardware.wifi@1.1_hal",
-    ],
-    out: [
-        "android/hardware/wifi/1.1/AWifi.cpp",
-        "android/hardware/wifi/1.1/AWifiChip.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.wifi@1.1-adapter-helper_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.wifi@1.1",
-    srcs: [
-        ":android.hardware.wifi@1.1_hal",
-    ],
-    out: [
-        "android/hardware/wifi/1.1/AWifi.h",
-        "android/hardware/wifi/1.1/AWifiChip.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.wifi@1.1-adapter-helper",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.wifi@1.1-adapter-helper_genc++"],
-    generated_headers: ["android.hardware.wifi@1.1-adapter-helper_genc++_headers"],
-    export_generated_headers: ["android.hardware.wifi@1.1-adapter-helper_genc++_headers"],
-    vendor_available: true,
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-        "libhidladapter",
-        "android.hardware.wifi@1.0",
-        "android.hardware.wifi@1.1",
-        "android.hardware.wifi@1.0-adapter-helper",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-        "libhidladapter",
-        "android.hardware.wifi@1.0",
-        "android.hardware.wifi@1.1",
-        "android.hardware.wifi@1.0-adapter-helper",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-}
-
-genrule {
-    name: "android.hardware.wifi@1.1-adapter_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-main -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.wifi@1.1",
-    out: ["main.cpp"]
-}
-
-cc_test {
-    name: "android.hardware.wifi@1.1-adapter",
-    defaults: ["hidl-module-defaults"],
-    shared_libs: [
-        "libhidladapter",
-        "libhidlbase",
-        "libhidltransport",
-        "libutils",
-        "android.hardware.wifi@1.0",
-        "android.hardware.wifi@1.1",
-        "android.hardware.wifi@1.1-adapter-helper",
-    ],
-    generated_sources: ["android.hardware.wifi@1.1-adapter_genc++"],
-}
diff --git a/wifi/1.2/Android.bp b/wifi/1.2/Android.bp
index 7547848..49752a1 100644
--- a/wifi/1.2/Android.bp
+++ b/wifi/1.2/Android.bp
@@ -1,188 +1,20 @@
-// This file is autogenerated by hidl-gen. Do not edit manually.
+// This file is autogenerated by hidl-gen -Landroidbp.
 
-filegroup {
-    name: "android.hardware.wifi@1.2_hal",
+hidl_interface {
+    name: "android.hardware.wifi@1.2",
+    root: "android.hardware",
+    vndk: {
+        enabled: true,
+    },
     srcs: [
         "IWifi.hal",
         "IWifiChip.hal",
     ],
-}
-
-genrule {
-    name: "android.hardware.wifi@1.2_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.wifi@1.2",
-    srcs: [
-        ":android.hardware.wifi@1.2_hal",
-    ],
-    out: [
-        "android/hardware/wifi/1.2/WifiAll.cpp",
-        "android/hardware/wifi/1.2/WifiChipAll.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.wifi@1.2_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.wifi@1.2",
-    srcs: [
-        ":android.hardware.wifi@1.2_hal",
-    ],
-    out: [
-        "android/hardware/wifi/1.2/IWifi.h",
-        "android/hardware/wifi/1.2/IHwWifi.h",
-        "android/hardware/wifi/1.2/BnHwWifi.h",
-        "android/hardware/wifi/1.2/BpHwWifi.h",
-        "android/hardware/wifi/1.2/BsWifi.h",
-        "android/hardware/wifi/1.2/IWifiChip.h",
-        "android/hardware/wifi/1.2/IHwWifiChip.h",
-        "android/hardware/wifi/1.2/BnHwWifiChip.h",
-        "android/hardware/wifi/1.2/BpHwWifiChip.h",
-        "android/hardware/wifi/1.2/BsWifiChip.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.wifi@1.2",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.wifi@1.2_genc++"],
-    generated_headers: ["android.hardware.wifi@1.2_genc++_headers"],
-    export_generated_headers: ["android.hardware.wifi@1.2_genc++_headers"],
-    vendor_available: true,
-    vndk: {
-        enabled: true,
-    },
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
+    interfaces: [
         "android.hardware.wifi@1.0",
         "android.hardware.wifi@1.1",
+        "android.hidl.base@1.0",
     ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-        "android.hardware.wifi@1.0",
-        "android.hardware.wifi@1.1",
-    ],
+    gen_java: true,
 }
 
-genrule {
-    name: "android.hardware.wifi-V1.2-java_gen_java",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Ljava -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.wifi@1.2",
-    srcs: [
-        ":android.hardware.wifi@1.2_hal",
-    ],
-    out: [
-        "android/hardware/wifi/V1_2/IWifi.java",
-        "android/hardware/wifi/V1_2/IWifiChip.java",
-    ],
-}
-
-java_library {
-    name: "android.hardware.wifi-V1.2-java",
-    no_framework_libs: true,
-    defaults: ["hidl-java-module-defaults"],
-    srcs: [":android.hardware.wifi-V1.2-java_gen_java"],
-    libs: [
-        "hwbinder",
-        "android.hardware.wifi-V1.0-java",
-        "android.hardware.wifi-V1.1-java",
-        "android.hidl.base-V1.0-java",
-    ]
-}
-
-// This package does not export any types. Not creating java constants export.
-
-
-genrule {
-    name: "android.hardware.wifi@1.2-adapter-helper_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.wifi@1.2",
-    srcs: [
-        ":android.hardware.wifi@1.2_hal",
-    ],
-    out: [
-        "android/hardware/wifi/1.2/AWifi.cpp",
-        "android/hardware/wifi/1.2/AWifiChip.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.wifi@1.2-adapter-helper_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.wifi@1.2",
-    srcs: [
-        ":android.hardware.wifi@1.2_hal",
-    ],
-    out: [
-        "android/hardware/wifi/1.2/AWifi.h",
-        "android/hardware/wifi/1.2/AWifiChip.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.wifi@1.2-adapter-helper",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.wifi@1.2-adapter-helper_genc++"],
-    generated_headers: ["android.hardware.wifi@1.2-adapter-helper_genc++_headers"],
-    export_generated_headers: ["android.hardware.wifi@1.2-adapter-helper_genc++_headers"],
-    vendor_available: true,
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-        "libhidladapter",
-        "android.hardware.wifi@1.0",
-        "android.hardware.wifi@1.1",
-        "android.hardware.wifi@1.2",
-        "android.hardware.wifi@1.0-adapter-helper",
-        "android.hardware.wifi@1.1-adapter-helper",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-        "libhidladapter",
-        "android.hardware.wifi@1.0",
-        "android.hardware.wifi@1.1",
-        "android.hardware.wifi@1.2",
-        "android.hardware.wifi@1.0-adapter-helper",
-        "android.hardware.wifi@1.1-adapter-helper",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-}
-
-genrule {
-    name: "android.hardware.wifi@1.2-adapter_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-main -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.wifi@1.2",
-    out: ["main.cpp"]
-}
-
-cc_test {
-    name: "android.hardware.wifi@1.2-adapter",
-    defaults: ["hidl-module-defaults"],
-    shared_libs: [
-        "libhidladapter",
-        "libhidlbase",
-        "libhidltransport",
-        "libutils",
-        "android.hardware.wifi@1.0",
-        "android.hardware.wifi@1.1",
-        "android.hardware.wifi@1.2",
-        "android.hardware.wifi@1.2-adapter-helper",
-    ],
-    generated_sources: ["android.hardware.wifi@1.2-adapter_genc++"],
-}
diff --git a/wifi/1.2/default/Android.mk b/wifi/1.2/default/Android.mk
index 6ce5e89..b242cfc 100644
--- a/wifi/1.2/default/Android.mk
+++ b/wifi/1.2/default/Android.mk
@@ -37,9 +37,6 @@
     wifi_sta_iface.cpp \
     wifi_status_util.cpp
 LOCAL_SHARED_LIBRARIES := \
-    android.hardware.wifi@1.0 \
-    android.hardware.wifi@1.1 \
-    android.hardware.wifi@1.2 \
     libbase \
     libcutils \
     libhidlbase \
@@ -48,6 +45,9 @@
     libnl \
     libutils \
     libwifi-hal \
-    libwifi-system-iface
+    libwifi-system-iface \
+    android.hardware.wifi@1.0 \
+    android.hardware.wifi@1.1 \
+    android.hardware.wifi@1.2
 LOCAL_INIT_RC := android.hardware.wifi@1.0-service.rc
 include $(BUILD_EXECUTABLE)
diff --git a/wifi/offload/1.0/Android.bp b/wifi/offload/1.0/Android.bp
index 12b2ff6..c6c0e7a 100644
--- a/wifi/offload/1.0/Android.bp
+++ b/wifi/offload/1.0/Android.bp
@@ -1,154 +1,33 @@
-// This file is autogenerated by hidl-gen. Do not edit manually.
+// This file is autogenerated by hidl-gen -Landroidbp.
 
-filegroup {
-    name: "android.hardware.wifi.offload@1.0_hal",
+hidl_interface {
+    name: "android.hardware.wifi.offload@1.0",
+    root: "android.hardware",
+    vndk: {
+        enabled: true,
+    },
     srcs: [
         "types.hal",
         "IOffload.hal",
         "IOffloadCallback.hal",
     ],
+    interfaces: [
+        "android.hidl.base@1.0",
+    ],
+    types: [
+        "Capability",
+        "LogRecord",
+        "NetworkInfo",
+        "OffloadStatus",
+        "OffloadStatusCode",
+        "RecordName",
+        "ScanFilter",
+        "ScanParam",
+        "ScanRecord",
+        "ScanResult",
+        "ScanStats",
+        "SecurityMode",
+    ],
+    gen_java: false,
 }
 
-genrule {
-    name: "android.hardware.wifi.offload@1.0_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.wifi.offload@1.0",
-    srcs: [
-        ":android.hardware.wifi.offload@1.0_hal",
-    ],
-    out: [
-        "android/hardware/wifi/offload/1.0/types.cpp",
-        "android/hardware/wifi/offload/1.0/OffloadAll.cpp",
-        "android/hardware/wifi/offload/1.0/OffloadCallbackAll.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.wifi.offload@1.0_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.wifi.offload@1.0",
-    srcs: [
-        ":android.hardware.wifi.offload@1.0_hal",
-    ],
-    out: [
-        "android/hardware/wifi/offload/1.0/types.h",
-        "android/hardware/wifi/offload/1.0/hwtypes.h",
-        "android/hardware/wifi/offload/1.0/IOffload.h",
-        "android/hardware/wifi/offload/1.0/IHwOffload.h",
-        "android/hardware/wifi/offload/1.0/BnHwOffload.h",
-        "android/hardware/wifi/offload/1.0/BpHwOffload.h",
-        "android/hardware/wifi/offload/1.0/BsOffload.h",
-        "android/hardware/wifi/offload/1.0/IOffloadCallback.h",
-        "android/hardware/wifi/offload/1.0/IHwOffloadCallback.h",
-        "android/hardware/wifi/offload/1.0/BnHwOffloadCallback.h",
-        "android/hardware/wifi/offload/1.0/BpHwOffloadCallback.h",
-        "android/hardware/wifi/offload/1.0/BsOffloadCallback.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.wifi.offload@1.0",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.wifi.offload@1.0_genc++"],
-    generated_headers: ["android.hardware.wifi.offload@1.0_genc++_headers"],
-    export_generated_headers: ["android.hardware.wifi.offload@1.0_genc++_headers"],
-    vendor_available: true,
-    vndk: {
-        enabled: true,
-    },
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-    ],
-}
-
-// This package is not java compatible. Not creating java target.
-
-// This package does not export any types. Not creating java constants export.
-
-
-genrule {
-    name: "android.hardware.wifi.offload@1.0-adapter-helper_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.wifi.offload@1.0",
-    srcs: [
-        ":android.hardware.wifi.offload@1.0_hal",
-    ],
-    out: [
-        "android/hardware/wifi/offload/1.0/AOffload.cpp",
-        "android/hardware/wifi/offload/1.0/AOffloadCallback.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.wifi.offload@1.0-adapter-helper_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.wifi.offload@1.0",
-    srcs: [
-        ":android.hardware.wifi.offload@1.0_hal",
-    ],
-    out: [
-        "android/hardware/wifi/offload/1.0/AOffload.h",
-        "android/hardware/wifi/offload/1.0/AOffloadCallback.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.wifi.offload@1.0-adapter-helper",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.wifi.offload@1.0-adapter-helper_genc++"],
-    generated_headers: ["android.hardware.wifi.offload@1.0-adapter-helper_genc++_headers"],
-    export_generated_headers: ["android.hardware.wifi.offload@1.0-adapter-helper_genc++_headers"],
-    vendor_available: true,
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-        "libhidladapter",
-        "android.hardware.wifi.offload@1.0",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-        "libhidladapter",
-        "android.hardware.wifi.offload@1.0",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-}
-
-genrule {
-    name: "android.hardware.wifi.offload@1.0-adapter_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-main -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.wifi.offload@1.0",
-    out: ["main.cpp"]
-}
-
-cc_test {
-    name: "android.hardware.wifi.offload@1.0-adapter",
-    defaults: ["hidl-module-defaults"],
-    shared_libs: [
-        "libhidladapter",
-        "libhidlbase",
-        "libhidltransport",
-        "libutils",
-        "android.hardware.wifi.offload@1.0",
-        "android.hardware.wifi.offload@1.0-adapter-helper",
-    ],
-    generated_sources: ["android.hardware.wifi.offload@1.0-adapter_genc++"],
-}
diff --git a/wifi/supplicant/1.0/Android.bp b/wifi/supplicant/1.0/Android.bp
index 05286f1..fc7ce55 100644
--- a/wifi/supplicant/1.0/Android.bp
+++ b/wifi/supplicant/1.0/Android.bp
@@ -1,7 +1,11 @@
-// This file is autogenerated by hidl-gen. Do not edit manually.
+// This file is autogenerated by hidl-gen -Landroidbp.
 
-filegroup {
-    name: "android.hardware.wifi.supplicant@1.0_hal",
+hidl_interface {
+    name: "android.hardware.wifi.supplicant@1.0",
+    root: "android.hardware",
+    vndk: {
+        enabled: true,
+    },
     srcs: [
         "types.hal",
         "ISupplicant.hal",
@@ -17,265 +21,16 @@
         "ISupplicantStaNetwork.hal",
         "ISupplicantStaNetworkCallback.hal",
     ],
+    interfaces: [
+        "android.hidl.base@1.0",
+    ],
+    types: [
+        "IfaceType",
+        "P2pGroupCapabilityMask",
+        "SupplicantStatus",
+        "SupplicantStatusCode",
+        "WpsConfigMethods",
+    ],
+    gen_java: true,
 }
 
-genrule {
-    name: "android.hardware.wifi.supplicant@1.0_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.wifi.supplicant@1.0",
-    srcs: [
-        ":android.hardware.wifi.supplicant@1.0_hal",
-    ],
-    out: [
-        "android/hardware/wifi/supplicant/1.0/types.cpp",
-        "android/hardware/wifi/supplicant/1.0/SupplicantAll.cpp",
-        "android/hardware/wifi/supplicant/1.0/SupplicantCallbackAll.cpp",
-        "android/hardware/wifi/supplicant/1.0/SupplicantIfaceAll.cpp",
-        "android/hardware/wifi/supplicant/1.0/SupplicantNetworkAll.cpp",
-        "android/hardware/wifi/supplicant/1.0/SupplicantP2pIfaceAll.cpp",
-        "android/hardware/wifi/supplicant/1.0/SupplicantP2pIfaceCallbackAll.cpp",
-        "android/hardware/wifi/supplicant/1.0/SupplicantP2pNetworkAll.cpp",
-        "android/hardware/wifi/supplicant/1.0/SupplicantP2pNetworkCallbackAll.cpp",
-        "android/hardware/wifi/supplicant/1.0/SupplicantStaIfaceAll.cpp",
-        "android/hardware/wifi/supplicant/1.0/SupplicantStaIfaceCallbackAll.cpp",
-        "android/hardware/wifi/supplicant/1.0/SupplicantStaNetworkAll.cpp",
-        "android/hardware/wifi/supplicant/1.0/SupplicantStaNetworkCallbackAll.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.wifi.supplicant@1.0_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.wifi.supplicant@1.0",
-    srcs: [
-        ":android.hardware.wifi.supplicant@1.0_hal",
-    ],
-    out: [
-        "android/hardware/wifi/supplicant/1.0/types.h",
-        "android/hardware/wifi/supplicant/1.0/hwtypes.h",
-        "android/hardware/wifi/supplicant/1.0/ISupplicant.h",
-        "android/hardware/wifi/supplicant/1.0/IHwSupplicant.h",
-        "android/hardware/wifi/supplicant/1.0/BnHwSupplicant.h",
-        "android/hardware/wifi/supplicant/1.0/BpHwSupplicant.h",
-        "android/hardware/wifi/supplicant/1.0/BsSupplicant.h",
-        "android/hardware/wifi/supplicant/1.0/ISupplicantCallback.h",
-        "android/hardware/wifi/supplicant/1.0/IHwSupplicantCallback.h",
-        "android/hardware/wifi/supplicant/1.0/BnHwSupplicantCallback.h",
-        "android/hardware/wifi/supplicant/1.0/BpHwSupplicantCallback.h",
-        "android/hardware/wifi/supplicant/1.0/BsSupplicantCallback.h",
-        "android/hardware/wifi/supplicant/1.0/ISupplicantIface.h",
-        "android/hardware/wifi/supplicant/1.0/IHwSupplicantIface.h",
-        "android/hardware/wifi/supplicant/1.0/BnHwSupplicantIface.h",
-        "android/hardware/wifi/supplicant/1.0/BpHwSupplicantIface.h",
-        "android/hardware/wifi/supplicant/1.0/BsSupplicantIface.h",
-        "android/hardware/wifi/supplicant/1.0/ISupplicantNetwork.h",
-        "android/hardware/wifi/supplicant/1.0/IHwSupplicantNetwork.h",
-        "android/hardware/wifi/supplicant/1.0/BnHwSupplicantNetwork.h",
-        "android/hardware/wifi/supplicant/1.0/BpHwSupplicantNetwork.h",
-        "android/hardware/wifi/supplicant/1.0/BsSupplicantNetwork.h",
-        "android/hardware/wifi/supplicant/1.0/ISupplicantP2pIface.h",
-        "android/hardware/wifi/supplicant/1.0/IHwSupplicantP2pIface.h",
-        "android/hardware/wifi/supplicant/1.0/BnHwSupplicantP2pIface.h",
-        "android/hardware/wifi/supplicant/1.0/BpHwSupplicantP2pIface.h",
-        "android/hardware/wifi/supplicant/1.0/BsSupplicantP2pIface.h",
-        "android/hardware/wifi/supplicant/1.0/ISupplicantP2pIfaceCallback.h",
-        "android/hardware/wifi/supplicant/1.0/IHwSupplicantP2pIfaceCallback.h",
-        "android/hardware/wifi/supplicant/1.0/BnHwSupplicantP2pIfaceCallback.h",
-        "android/hardware/wifi/supplicant/1.0/BpHwSupplicantP2pIfaceCallback.h",
-        "android/hardware/wifi/supplicant/1.0/BsSupplicantP2pIfaceCallback.h",
-        "android/hardware/wifi/supplicant/1.0/ISupplicantP2pNetwork.h",
-        "android/hardware/wifi/supplicant/1.0/IHwSupplicantP2pNetwork.h",
-        "android/hardware/wifi/supplicant/1.0/BnHwSupplicantP2pNetwork.h",
-        "android/hardware/wifi/supplicant/1.0/BpHwSupplicantP2pNetwork.h",
-        "android/hardware/wifi/supplicant/1.0/BsSupplicantP2pNetwork.h",
-        "android/hardware/wifi/supplicant/1.0/ISupplicantP2pNetworkCallback.h",
-        "android/hardware/wifi/supplicant/1.0/IHwSupplicantP2pNetworkCallback.h",
-        "android/hardware/wifi/supplicant/1.0/BnHwSupplicantP2pNetworkCallback.h",
-        "android/hardware/wifi/supplicant/1.0/BpHwSupplicantP2pNetworkCallback.h",
-        "android/hardware/wifi/supplicant/1.0/BsSupplicantP2pNetworkCallback.h",
-        "android/hardware/wifi/supplicant/1.0/ISupplicantStaIface.h",
-        "android/hardware/wifi/supplicant/1.0/IHwSupplicantStaIface.h",
-        "android/hardware/wifi/supplicant/1.0/BnHwSupplicantStaIface.h",
-        "android/hardware/wifi/supplicant/1.0/BpHwSupplicantStaIface.h",
-        "android/hardware/wifi/supplicant/1.0/BsSupplicantStaIface.h",
-        "android/hardware/wifi/supplicant/1.0/ISupplicantStaIfaceCallback.h",
-        "android/hardware/wifi/supplicant/1.0/IHwSupplicantStaIfaceCallback.h",
-        "android/hardware/wifi/supplicant/1.0/BnHwSupplicantStaIfaceCallback.h",
-        "android/hardware/wifi/supplicant/1.0/BpHwSupplicantStaIfaceCallback.h",
-        "android/hardware/wifi/supplicant/1.0/BsSupplicantStaIfaceCallback.h",
-        "android/hardware/wifi/supplicant/1.0/ISupplicantStaNetwork.h",
-        "android/hardware/wifi/supplicant/1.0/IHwSupplicantStaNetwork.h",
-        "android/hardware/wifi/supplicant/1.0/BnHwSupplicantStaNetwork.h",
-        "android/hardware/wifi/supplicant/1.0/BpHwSupplicantStaNetwork.h",
-        "android/hardware/wifi/supplicant/1.0/BsSupplicantStaNetwork.h",
-        "android/hardware/wifi/supplicant/1.0/ISupplicantStaNetworkCallback.h",
-        "android/hardware/wifi/supplicant/1.0/IHwSupplicantStaNetworkCallback.h",
-        "android/hardware/wifi/supplicant/1.0/BnHwSupplicantStaNetworkCallback.h",
-        "android/hardware/wifi/supplicant/1.0/BpHwSupplicantStaNetworkCallback.h",
-        "android/hardware/wifi/supplicant/1.0/BsSupplicantStaNetworkCallback.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.wifi.supplicant@1.0",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.wifi.supplicant@1.0_genc++"],
-    generated_headers: ["android.hardware.wifi.supplicant@1.0_genc++_headers"],
-    export_generated_headers: ["android.hardware.wifi.supplicant@1.0_genc++_headers"],
-    vendor_available: true,
-    vndk: {
-        enabled: true,
-    },
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-    ],
-}
-
-genrule {
-    name: "android.hardware.wifi.supplicant-V1.0-java_gen_java",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Ljava -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.wifi.supplicant@1.0",
-    srcs: [
-        ":android.hardware.wifi.supplicant@1.0_hal",
-    ],
-    out: [
-        "android/hardware/wifi/supplicant/V1_0/IfaceType.java",
-        "android/hardware/wifi/supplicant/V1_0/P2pGroupCapabilityMask.java",
-        "android/hardware/wifi/supplicant/V1_0/SupplicantStatus.java",
-        "android/hardware/wifi/supplicant/V1_0/SupplicantStatusCode.java",
-        "android/hardware/wifi/supplicant/V1_0/WpsConfigMethods.java",
-        "android/hardware/wifi/supplicant/V1_0/ISupplicant.java",
-        "android/hardware/wifi/supplicant/V1_0/ISupplicantCallback.java",
-        "android/hardware/wifi/supplicant/V1_0/ISupplicantIface.java",
-        "android/hardware/wifi/supplicant/V1_0/ISupplicantNetwork.java",
-        "android/hardware/wifi/supplicant/V1_0/ISupplicantP2pIface.java",
-        "android/hardware/wifi/supplicant/V1_0/ISupplicantP2pIfaceCallback.java",
-        "android/hardware/wifi/supplicant/V1_0/ISupplicantP2pNetwork.java",
-        "android/hardware/wifi/supplicant/V1_0/ISupplicantP2pNetworkCallback.java",
-        "android/hardware/wifi/supplicant/V1_0/ISupplicantStaIface.java",
-        "android/hardware/wifi/supplicant/V1_0/ISupplicantStaIfaceCallback.java",
-        "android/hardware/wifi/supplicant/V1_0/ISupplicantStaNetwork.java",
-        "android/hardware/wifi/supplicant/V1_0/ISupplicantStaNetworkCallback.java",
-    ],
-}
-
-java_library {
-    name: "android.hardware.wifi.supplicant-V1.0-java",
-    no_framework_libs: true,
-    defaults: ["hidl-java-module-defaults"],
-    srcs: [":android.hardware.wifi.supplicant-V1.0-java_gen_java"],
-    libs: [
-        "hwbinder",
-        "android.hidl.base-V1.0-java",
-    ]
-}
-
-// This package does not export any types. Not creating java constants export.
-
-
-genrule {
-    name: "android.hardware.wifi.supplicant@1.0-adapter-helper_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.wifi.supplicant@1.0",
-    srcs: [
-        ":android.hardware.wifi.supplicant@1.0_hal",
-    ],
-    out: [
-        "android/hardware/wifi/supplicant/1.0/ASupplicant.cpp",
-        "android/hardware/wifi/supplicant/1.0/ASupplicantCallback.cpp",
-        "android/hardware/wifi/supplicant/1.0/ASupplicantIface.cpp",
-        "android/hardware/wifi/supplicant/1.0/ASupplicantNetwork.cpp",
-        "android/hardware/wifi/supplicant/1.0/ASupplicantP2pIface.cpp",
-        "android/hardware/wifi/supplicant/1.0/ASupplicantP2pIfaceCallback.cpp",
-        "android/hardware/wifi/supplicant/1.0/ASupplicantP2pNetwork.cpp",
-        "android/hardware/wifi/supplicant/1.0/ASupplicantP2pNetworkCallback.cpp",
-        "android/hardware/wifi/supplicant/1.0/ASupplicantStaIface.cpp",
-        "android/hardware/wifi/supplicant/1.0/ASupplicantStaIfaceCallback.cpp",
-        "android/hardware/wifi/supplicant/1.0/ASupplicantStaNetwork.cpp",
-        "android/hardware/wifi/supplicant/1.0/ASupplicantStaNetworkCallback.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.wifi.supplicant@1.0-adapter-helper_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.wifi.supplicant@1.0",
-    srcs: [
-        ":android.hardware.wifi.supplicant@1.0_hal",
-    ],
-    out: [
-        "android/hardware/wifi/supplicant/1.0/ASupplicant.h",
-        "android/hardware/wifi/supplicant/1.0/ASupplicantCallback.h",
-        "android/hardware/wifi/supplicant/1.0/ASupplicantIface.h",
-        "android/hardware/wifi/supplicant/1.0/ASupplicantNetwork.h",
-        "android/hardware/wifi/supplicant/1.0/ASupplicantP2pIface.h",
-        "android/hardware/wifi/supplicant/1.0/ASupplicantP2pIfaceCallback.h",
-        "android/hardware/wifi/supplicant/1.0/ASupplicantP2pNetwork.h",
-        "android/hardware/wifi/supplicant/1.0/ASupplicantP2pNetworkCallback.h",
-        "android/hardware/wifi/supplicant/1.0/ASupplicantStaIface.h",
-        "android/hardware/wifi/supplicant/1.0/ASupplicantStaIfaceCallback.h",
-        "android/hardware/wifi/supplicant/1.0/ASupplicantStaNetwork.h",
-        "android/hardware/wifi/supplicant/1.0/ASupplicantStaNetworkCallback.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.wifi.supplicant@1.0-adapter-helper",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.wifi.supplicant@1.0-adapter-helper_genc++"],
-    generated_headers: ["android.hardware.wifi.supplicant@1.0-adapter-helper_genc++_headers"],
-    export_generated_headers: ["android.hardware.wifi.supplicant@1.0-adapter-helper_genc++_headers"],
-    vendor_available: true,
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-        "libhidladapter",
-        "android.hardware.wifi.supplicant@1.0",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-        "libhidladapter",
-        "android.hardware.wifi.supplicant@1.0",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
-}
-
-genrule {
-    name: "android.hardware.wifi.supplicant@1.0-adapter_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-main -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.wifi.supplicant@1.0",
-    out: ["main.cpp"]
-}
-
-cc_test {
-    name: "android.hardware.wifi.supplicant@1.0-adapter",
-    defaults: ["hidl-module-defaults"],
-    shared_libs: [
-        "libhidladapter",
-        "libhidlbase",
-        "libhidltransport",
-        "libutils",
-        "android.hardware.wifi.supplicant@1.0",
-        "android.hardware.wifi.supplicant@1.0-adapter-helper",
-    ],
-    generated_sources: ["android.hardware.wifi.supplicant@1.0-adapter_genc++"],
-}
diff --git a/wifi/supplicant/1.1/Android.bp b/wifi/supplicant/1.1/Android.bp
index 9dc65ef..c8c8a32 100644
--- a/wifi/supplicant/1.1/Android.bp
+++ b/wifi/supplicant/1.1/Android.bp
@@ -1,170 +1,18 @@
-// This file is autogenerated by hidl-gen. Do not edit manually.
+// This file is autogenerated by hidl-gen -Landroidbp.
 
-filegroup {
-    name: "android.hardware.wifi.supplicant@1.1_hal",
-    srcs: [
-        "ISupplicant.hal",
-    ],
-}
-
-genrule {
-    name: "android.hardware.wifi.supplicant@1.1_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.wifi.supplicant@1.1",
-    srcs: [
-        ":android.hardware.wifi.supplicant@1.1_hal",
-    ],
-    out: [
-        "android/hardware/wifi/supplicant/1.1/SupplicantAll.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.wifi.supplicant@1.1_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.wifi.supplicant@1.1",
-    srcs: [
-        ":android.hardware.wifi.supplicant@1.1_hal",
-    ],
-    out: [
-        "android/hardware/wifi/supplicant/1.1/ISupplicant.h",
-        "android/hardware/wifi/supplicant/1.1/IHwSupplicant.h",
-        "android/hardware/wifi/supplicant/1.1/BnHwSupplicant.h",
-        "android/hardware/wifi/supplicant/1.1/BpHwSupplicant.h",
-        "android/hardware/wifi/supplicant/1.1/BsSupplicant.h",
-    ],
-}
-
-cc_library {
+hidl_interface {
     name: "android.hardware.wifi.supplicant@1.1",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.wifi.supplicant@1.1_genc++"],
-    generated_headers: ["android.hardware.wifi.supplicant@1.1_genc++_headers"],
-    export_generated_headers: ["android.hardware.wifi.supplicant@1.1_genc++_headers"],
-    vendor_available: true,
+    root: "android.hardware",
     vndk: {
         enabled: true,
     },
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-        "android.hardware.wifi.supplicant@1.0",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-        "android.hardware.wifi.supplicant@1.0",
-    ],
-}
-
-genrule {
-    name: "android.hardware.wifi.supplicant-V1.1-java_gen_java",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Ljava -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.wifi.supplicant@1.1",
     srcs: [
-        ":android.hardware.wifi.supplicant@1.1_hal",
+        "ISupplicant.hal",
     ],
-    out: [
-        "android/hardware/wifi/supplicant/V1_1/ISupplicant.java",
-    ],
-}
-
-java_library {
-    name: "android.hardware.wifi.supplicant-V1.1-java",
-    no_framework_libs: true,
-    defaults: ["hidl-java-module-defaults"],
-    srcs: [":android.hardware.wifi.supplicant-V1.1-java_gen_java"],
-    libs: [
-        "hwbinder",
-        "android.hardware.wifi.supplicant-V1.0-java",
-        "android.hidl.base-V1.0-java",
-    ]
-}
-
-// This package does not export any types. Not creating java constants export.
-
-
-genrule {
-    name: "android.hardware.wifi.supplicant@1.1-adapter-helper_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.wifi.supplicant@1.1",
-    srcs: [
-        ":android.hardware.wifi.supplicant@1.1_hal",
-    ],
-    out: [
-        "android/hardware/wifi/supplicant/1.1/ASupplicant.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.wifi.supplicant@1.1-adapter-helper_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.wifi.supplicant@1.1",
-    srcs: [
-        ":android.hardware.wifi.supplicant@1.1_hal",
-    ],
-    out: [
-        "android/hardware/wifi/supplicant/1.1/ASupplicant.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.wifi.supplicant@1.1-adapter-helper",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.wifi.supplicant@1.1-adapter-helper_genc++"],
-    generated_headers: ["android.hardware.wifi.supplicant@1.1-adapter-helper_genc++_headers"],
-    export_generated_headers: ["android.hardware.wifi.supplicant@1.1-adapter-helper_genc++_headers"],
-    vendor_available: true,
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-        "libhidladapter",
+    interfaces: [
         "android.hardware.wifi.supplicant@1.0",
-        "android.hardware.wifi.supplicant@1.1",
-        "android.hardware.wifi.supplicant@1.0-adapter-helper",
-        "android.hidl.base@1.0-adapter-helper",
+        "android.hidl.base@1.0",
     ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-        "libhidladapter",
-        "android.hardware.wifi.supplicant@1.0",
-        "android.hardware.wifi.supplicant@1.1",
-        "android.hardware.wifi.supplicant@1.0-adapter-helper",
-        "android.hidl.base@1.0-adapter-helper",
-    ],
+    gen_java: true,
 }
 
-genrule {
-    name: "android.hardware.wifi.supplicant@1.1-adapter_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-main -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.wifi.supplicant@1.1",
-    out: ["main.cpp"]
-}
-
-cc_test {
-    name: "android.hardware.wifi.supplicant@1.1-adapter",
-    defaults: ["hidl-module-defaults"],
-    shared_libs: [
-        "libhidladapter",
-        "libhidlbase",
-        "libhidltransport",
-        "libutils",
-        "android.hardware.wifi.supplicant@1.0",
-        "android.hardware.wifi.supplicant@1.1",
-        "android.hardware.wifi.supplicant@1.1-adapter-helper",
-    ],
-    generated_sources: ["android.hardware.wifi.supplicant@1.1-adapter_genc++"],
-}