Platform Tools Release 29.0.5 (5949299)
Snap for 5925869 from a8be3493e82e6a64e1b7f11fe73944279b1593bf to sdk-release

Change-Id: Id6c746b4d346dadccbc7507fefd497edd53292c2
tree: c01b0904fa2c39a0e1f998661a944237dbd815e6
  1. build/
  2. c2hal/
  3. hashing/
  4. hidl2aidl/
  5. host_utils/
  6. lint/
  7. scripts/
  8. test/
  9. utils/
  10. Android.bp
  11. Annotation.cpp
  12. Annotation.h
  13. ArrayType.cpp
  14. ArrayType.h
  15. AST.cpp
  16. AST.h
  17. CleanSpec.mk
  18. CompoundType.cpp
  19. CompoundType.h
  20. ConstantExpression.cpp
  21. ConstantExpression.h
  22. Coordinator.cpp
  23. Coordinator.h
  24. DeathRecipientType.cpp
  25. DeathRecipientType.h
  26. DocComment.cpp
  27. DocComment.h
  28. EnumType.cpp
  29. EnumType.h
  30. FmqType.cpp
  31. FmqType.h
  32. FormattingConstants.h
  33. generateCpp.cpp
  34. generateCppAdapter.cpp
  35. generateCppImpl.cpp
  36. generateDependencies.cpp
  37. generateFormattedHidl.cpp
  38. generateInheritanceHierarchy.cpp
  39. generateJava.cpp
  40. generateJavaImpl.cpp
  41. generateVts.cpp
  42. HandleType.cpp
  43. HandleType.h
  44. hidl-gen_l.h
  45. hidl-gen_l.ll
  46. hidl-gen_y-helpers.h
  47. hidl-gen_y.yy
  48. HidlTypeAssertion.cpp
  49. HidlTypeAssertion.h
  50. Interface.cpp
  51. Interface.h
  52. Location.cpp
  53. Location.h
  54. main.cpp
  55. MemoryType.cpp
  56. MemoryType.h
  57. Method.cpp
  58. Method.h
  59. MODULE_LICENSE_APACHE2
  60. NamedType.cpp
  61. NamedType.h
  62. NOTICE
  63. OWNERS
  64. PointerType.cpp
  65. PointerType.h
  66. PREUPLOAD.cfg
  67. README.md
  68. Reference.h
  69. ScalarType.cpp
  70. ScalarType.h
  71. Scope.cpp
  72. Scope.h
  73. StringType.cpp
  74. StringType.h
  75. TEST_MAPPING
  76. Type.cpp
  77. Type.h
  78. TypeDef.cpp
  79. TypeDef.h
  80. update-all-google-makefiles.sh
  81. update-makefiles-helper.sh
  82. VectorType.cpp
  83. VectorType.h
README.md

hidl-gen

Full documentation can be found here: https://source.android.com/devices/architecture/hidl/

hidl-gen is a compiler for the HIDL (HAL Interface Design Language) which generates C++ and Java endpoints for RPC mechanisms. The main userspace libraries which this compiler uses can be found at system/libhidl.

1. Build

m hidl-gen

2. Run

Note that options for hidl-gen expected to be invoked by the build system are marked with ‘internal’ in the help menu.

hidl-gen -h

hidl-gen -o output -L c++-impl -r android.hardware:hardware/interfaces -r android.hidl:system/libhidl/transport android.hardware.nfc@1.0

Some defaults for package roots are also provided

hidl-gen -o output -L c++-impl android.hardware.nfc@1.0
hidl-gen -o output -L vts android.hardware.nfc@1.0
hidl-gen -L hash android.hardware.nfc@1.0

Example command for vendor project

hidl-gen -L c++-impl -r vendor.foo:vendor/foo/interfaces vendor.foo.nfc@1.0

See update-makefiles-helper.sh and update-all-google-makefiles.sh for examples of how to generate HIDL makefiles (using the -Landroidbp option).

c2hal

This is a helper tool to convert C headers to valid .hal files.

m c2hal && c2hal -h