Clone this repo:
  1. fbb5a09 Merge changes from topic 'hidl-better-tests' by Treehugger Robot · 19 hours ago master
  2. 0895211 Merge "Require manifest specification for HIDL devices." by Treehugger Robot · 2 days ago
  3. 4fdfa73 Negative tests for syntax errors. by Steven Moreland · 3 days ago
  4. 72a3234 hidl_hash_test: declare genrule srcs by Steven Moreland · 3 days ago
  5. d520c9d Positive/negative tests for versioning. by Steven Moreland · 3 days ago

hidl-gen user guide

1. Build

croot
make hidl-gen

2. Run

hidl-gen -o output-path -L language (-r interface-root) fqname

output-path: directory to store the output files.
language: output file for given language. e.g.c++, vts..

fqname: fully qualified name of the input files.
For singe file input, follow the format: package@version::fileName
For directory input, follow the format: package@version

interface-root(optional): prefix and root path for fqname.
If not set, use the default prefix: android.hardware and default root path
defined in $TOP.

examples:

croot
hidl-gen -o output -L c++ -r android.hardware:hardware/interfaces -r android.hidl:system/libhidl/transport android.hardware.nfc@1.0::INfc.hal
hidl-gen -o output -L vts -r android.hardware:hardware/interfaces -r android.hidl:system/libhidl/transport android.hardware.nfc@1.0
hidl-gen -o test -L c++ -r android.hardware:hardware/interfaces -r android.hidl:system/libhidl/transport android.hardware.nfc@1.0