Clone this repo:
  1. dee9a30 Merge "Create hidl_test_helper so that FMQ unit tests can use it as well" by Treehugger Robot · 3 hours ago master
  2. f96982f Merge "Add hwtypes.h to -Landroidbp" by Steven Moreland · 7 hours ago
  3. 11bd9dd Create hidl_test_helper so that FMQ unit tests can use it as well by Hridya Valsaraju · 4 days ago
  4. 937408a s/IMPL_HEADER/IMPL_INTERFACE/g by Steven Moreland · 7 days ago
  5. 9774d62 Add hwtypes.h to -Landroidbp by Steven Moreland · 3 days ago

hidl-gen user guide

1. Build

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.


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