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
Copy file name to clipboardExpand all lines: README.md
+310Lines changed: 310 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1168,6 +1168,316 @@ Requires access to `/dev/binder` on the target device (typically available as `s
1168
1168
|[`tools/cmd/gen_e2e_smoke`](tools/cmd/gen_e2e_smoke/)| Generates smoke tests exercising every proxy type in generated packages |
1169
1169
|[`tools/cmd/genreadme`](tools/cmd/genreadme/)| Regenerates the package table in this README from generated packages |
1170
1170
1171
+
## aidlcli
1172
+
1173
+
`aidlcli` is a unified command-line tool for interacting with Android Binder services and the AIDL compiler. It auto-generates subcommands for every AIDL interface in the project (1,500+ interfaces, 12,000+ methods), so you can call any Android system service method directly from the command line with typed flags.
1174
+
1175
+
Build and deploy:
1176
+
1177
+
```bash
1178
+
GOOS=linux GOARCH=arm64 go build -o aidlcli ./tools/cmd/aidlcli/
1179
+
adb push aidlcli /data/local/tmp/
1180
+
```
1181
+
1182
+
Core subcommands:
1183
+
1184
+
| Command | Description |
1185
+
|---|---|
1186
+
|`aidlcli service list`| List all registered binder services with alive/dead status |
1187
+
|`aidlcli service inspect <name>`| Show a service's handle, descriptor, and alive status |
1188
+
|`aidlcli service methods <name>`| List all methods available on a service |
1189
+
|`aidlcli service transact <name> <code> [hex]`| Send a raw binder transaction |
1190
+
|`aidlcli aidl compile [-I path] <files>`| Compile `.aidl` files to Go |
Note: Full camera capture requires a callback-driven session flow (open → configure streams → capture request → receive frames). The individual steps are available as commands, but the session orchestration needs a script or the Go API directly.
Note: Actual audio capture requires opening an input stream via `IModule.openInputStream()` with an audio configuration, then reading PCM data from the returned stream handle. Use the Go API for the full recording flow.
1292
+
1293
+
</details>
1294
+
1295
+
<details>
1296
+
<summary>Send a notification</summary>
1297
+
1298
+
```bash
1299
+
# Notifications are managed through the NotificationManager service.
Note: Posting a new notification requires building a `Notification` parcelable with icon, title, text, channel, and other fields. Use `aidlcli service transact` with a pre-built parcel or the Go API.
1325
+
1326
+
</details>
1327
+
1328
+
<details>
1329
+
<summary>Query battery and thermal status</summary>
The project has two major parts: a **compiler** that turns `.aidl` files into Go source code, and a **runtime** that implements the Binder IPC protocol for communicating with Android services.
0 commit comments