You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
go run ./tools/cmd/aidlgen -I path/to/search/root -output . file1.aidl file2.aidl
2062
+
# Compile AIDL files to Go via bindercli:
2063
+
bindercli aidl compile -I path/to/search/root --output gen file1.aidl file2.aidl
2061
2064
```
2062
2065
2063
2066
### From AOSP (Bulk Generation)
@@ -2066,7 +2069,8 @@ With the AOSP submodules in `tools/pkg/3rdparty/`:
2066
2069
2067
2070
```bash
2068
2071
git submodule update --init --depth 1
2069
-
go run ./tools/cmd/aospgen -3rdparty tools/pkg/3rdparty -output . -smoke-tests
2072
+
go run ./tools/cmd/aidl2spec -3rdparty tools/pkg/3rdparty -output specs/
2073
+
go run ./tools/cmd/spec2go -specs specs/ -output . -smoke-tests
2070
2074
```
2071
2075
2072
2076
This discovers all AIDL files across `frameworks-base`, `frameworks-native`, `hardware-interfaces`, and `system-hardware-interfaces`, infers search roots from package declarations, and generates Go proxies for all AOSP services. The current AOSP snapshot produces **5,151 Go files** across **407 packages**.
@@ -2097,7 +2101,7 @@ go test ./tools/pkg/... ./binder/ ./parcel/
2097
2101
2098
2102
These test:
2099
2103
2100
-
-**Parser correctness**: Lexing/parsing of all AIDL constructs against [testdata](testdata/) fixtures (interfaces, parcelables, enums, unions, generics, constants, annotations)
2104
+
-**Parser correctness**: Lexing/parsing of all AIDL constructs against [testdata](tools/pkg/parser/testdata/) fixtures (interfaces, parcelables, enums, unions, generics, constants, annotations)
2101
2105
-**Code generation**: Each generator (`GenerateInterface`, `GenerateParcelable`, `GenerateEnum`, `GenerateUnion`) is tested by parsing AIDL input, generating Go, and verifying the output is valid `gofmt`-compliant Go source that contains expected identifiers (descriptors, transaction codes, type names, method signatures)
2102
2106
-**Import cycle detection**: Verifies the SCC algorithm correctly identifies and breaks cross-package import cycles
2103
2107
-**Marshal/unmarshal naming**: Maps from AIDL types to parcel read/write expressions
@@ -2119,8 +2123,8 @@ Walks all ~11,000 AIDL files, parses each, generates Go code, and verifies the o
2119
2123
Auto-generated tests that instantiate every proxy type with a mock binder and call every method with zero-value arguments:
2120
2124
2121
2125
```bash
2122
-
go run ./tools/gen_e2e_smoke
2123
-
go test-tags e2e ./tests/e2e/... # requires /dev/binder OR mock mode
2126
+
go run ./tools/cmd/spec2go -specs specs/ -output . -smoke-tests
2127
+
go test ./tests/e2e/... # requires /dev/binder OR mock mode
2124
2128
```
2125
2129
2126
2130
### 4. End-to-End Tests on Android
@@ -2290,7 +2294,8 @@ and run commands programmatically:
0 commit comments