• Home
Name Date Size #Lines LOC

..--

build/04-Jul-2025-1,5691,243

c2hal/04-Jul-2025-4,2732,843

hashing/04-Jul-2025-261169

hidl2aidl/04-Jul-2025-4,7233,605

host_utils/04-Jul-2025-977633

lint/04-Jul-2025-3,3002,549

metadata/04-Jul-2025-213134

scripts/04-Jul-2025-188124

test/04-Jul-2025-11,3388,972

utils/04-Jul-2025-1,147697

.clang-formatD04-Jul-2025291

AST.cppD04-Jul-202532.7 KiB955701

AST.hD04-Jul-202513.7 KiB373187

Android.bpD04-Jul-20254.2 KiB175166

Annotation.cppD04-Jul-20253.1 KiB12879

Annotation.hD04-Jul-20252 KiB8140

ArrayType.cppD04-Jul-202514.8 KiB549429

ArrayType.hD04-Jul-20253.9 KiB13178

CleanSpec.mkD04-Jul-20252.2 KiB492

CompoundType.cppD04-Jul-202566.8 KiB2,0551,650

CompoundType.hD04-Jul-20256.5 KiB195125

ConstantExpression.cppD04-Jul-202529.5 KiB846569

ConstantExpression.hD04-Jul-20259 KiB247135

Coordinator.cppD04-Jul-202534.9 KiB1,068806

Coordinator.hD04-Jul-20258.2 KiB219104

DeathRecipientType.cppD04-Jul-20252.5 KiB8752

DeathRecipientType.hD04-Jul-20251.6 KiB5726

DocComment.cppD04-Jul-20253.3 KiB10664

DocComment.hD04-Jul-20252.1 KiB8140

EnumType.cppD04-Jul-202530.9 KiB989762

EnumType.hD04-Jul-20257.5 KiB240154

FmqType.cppD04-Jul-20254.7 KiB188140

FmqType.hD04-Jul-20252.3 KiB8147

FormattingConstants.hD04-Jul-2025717 235

HandleType.cppD04-Jul-20255 KiB193144

HandleType.hD04-Jul-20252.6 KiB9152

HidlTypeAssertion.cppD04-Jul-20251.6 KiB6134

HidlTypeAssertion.hD04-Jul-20251.3 KiB4715

Interface.cppD04-Jul-202533 KiB992823

Interface.hD04-Jul-20256.2 KiB184107

Location.cppD04-Jul-20253 KiB10970

Location.hD04-Jul-20252.3 KiB8743

MemoryType.cppD04-Jul-20257 KiB250197

MemoryType.hD04-Jul-20252.9 KiB9757

Method.cppD04-Jul-202510.2 KiB345268

Method.hD04-Jul-20254.4 KiB14389

NOTICED04-Jul-202511.1 KiB203169

NamedType.cppD04-Jul-20251.5 KiB5528

NamedType.hD04-Jul-20251.5 KiB6126

OWNERSD04-Jul-202597 75

PREUPLOAD.cfgD04-Jul-2025102 86

PointerType.cppD04-Jul-20252.8 KiB10365

PointerType.hD04-Jul-20252.1 KiB7440

README.mdD04-Jul-20251.6 KiB5940

Reference.hD04-Jul-20254.7 KiB169101

ScalarType.cppD04-Jul-20258.2 KiB340276

ScalarType.hD04-Jul-20253.2 KiB11874

Scope.cppD04-Jul-20258.5 KiB303222

Scope.hD04-Jul-20253.6 KiB12668

StringType.cppD04-Jul-20255.8 KiB227172

StringType.hD04-Jul-20252.7 KiB9253

TEST_MAPPINGD04-Jul-2025411 3130

Type.cppD04-Jul-202521 KiB794595

Type.hD04-Jul-202513.7 KiB391228

TypeDef.cppD04-Jul-20252.2 KiB8651

TypeDef.hD04-Jul-20251.6 KiB6127

VectorType.cppD04-Jul-202516.7 KiB662519

VectorType.hD04-Jul-20253.9 KiB12884

generateCpp.cppD04-Jul-202564.2 KiB1,9371,558

generateCppImpl.cppD04-Jul-20254.8 KiB168110

generateDependencies.cppD04-Jul-20251.2 KiB4321

generateFormattedHidl.cppD04-Jul-20251.4 KiB4521

generateInheritanceHierarchy.cppD04-Jul-20251.6 KiB5330

generateJava.cppD04-Jul-202518.7 KiB630483

generateJavaImpl.cppD04-Jul-20253.1 KiB9457

generateVts.cppD04-Jul-20252.9 KiB9659

hidl-gen_l.hD04-Jul-2025943 327

hidl-gen_l.llD04-Jul-20257.9 KiB223183

hidl-gen_y-helpers.hD04-Jul-20251 KiB3210

hidl-gen_y.yyD04-Jul-202535.6 KiB1,1561,022

main.cppD04-Jul-202548.2 KiB1,4521,185

update-all-google-makefiles.shD04-Jul-2025435 115

update-makefiles-helper.shD04-Jul-20253.1 KiB12277

README.md

1# hidl-gen
2
3Full documentation can be found here:
4<https://source.android.com/devices/architecture/hidl/>
5
6hidl-gen is a compiler for the HIDL (HAL Interface Design Language) which generates
7C++ and Java endpoints for RPC mechanisms. The main userspace libraries which this
8compiler uses can be found at system/libhidl.
9
10## 1. Build
11
12```
13m hidl-gen
14```
15
16## 2. Run
17
18Note that options for hidl-gen expected to be invoked by the build system
19are marked with 'internal' in the help menu.
20
21```
22hidl-gen -h
23
24hidl-gen -o output -L c++-impl -r android.hardware:hardware/interfaces -r android.hidl:system/libhidl/transport android.hardware.nfc@1.0
25```
26
27Some defaults for package roots are also provided
28
29```
30hidl-gen -o output -L c++-impl android.hardware.nfc@1.0
31hidl-gen -o output -L vts android.hardware.nfc@1.0
32hidl-gen -L hash android.hardware.nfc@1.0
33```
34
35Example command for vendor project
36
37```
38hidl-gen -L c++-impl -r vendor.foo:vendor/foo/interfaces vendor.foo.nfc@1.0
39```
40
41See update-makefiles-helper.sh and update-all-google-makefiles.sh for examples
42of how to generate HIDL makefiles (using the -Landroidbp option).
43
44> **_NOTE:_**  When using the -Landroidbp option, you can force generated
45> modules to be installed in `/system_ext` rather than other partition by putting a
46> marker file `.hidl_for_system_ext` alongside `*.hal` files.
47
48> **_NOTE:_**  You can also install the vendor variant of the generated modules
49> to be installed in `/odm` rather than `/vendor` by putting a marker file
50> `.hidl_for_odm` alongside `*.hal` files.
51
52# c2hal
53
54This is a helper tool to convert C headers to valid .hal files.
55
56```
57m c2hal && c2hal -h
58```
59