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
docs: add ndkcli section with 17 usage examples to README
Covers: camera capture, audio record/play, sensors, thermal monitoring,
EGL/GL info, media codecs, config, image decode, fonts, permissions,
trace/logging, NNAPI, storage, looper, and window queries.
Each example shows the exact adb shell commands to run on a device.
Copy file name to clipboardExpand all lines: README.md
+273Lines changed: 273 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1019,6 +1019,279 @@ func main() {
1019
1019
1020
1020
</details>
1021
1021
1022
+
## ndkcli
1023
+
1024
+
`ndkcli` is a cobra-based CLI tool that exposes the full NDK surface from the command line. It is auto-generated by `tools/cmd/cligen/` and includes hand-written workflow commands for end-to-end operations.
1025
+
1026
+
### Build & deploy
1027
+
1028
+
```bash
1029
+
# Build for Android (requires NDK)
1030
+
make ndkcli
1031
+
1032
+
# Push to device
1033
+
adb push ndkcli /data/local/tmp/
1034
+
adb shell chmod +x /data/local/tmp/ndkcli
1035
+
```
1036
+
1037
+
### List all commands
1038
+
1039
+
```bash
1040
+
# From source (no Android needed):
1041
+
make ndkcli-commands
1042
+
1043
+
# On device:
1044
+
adb shell /data/local/tmp/ndkcli --help
1045
+
adb shell /data/local/tmp/ndkcli camera --help
1046
+
```
1047
+
1048
+
### Examples
1049
+
1050
+
<details>
1051
+
<summary>List available cameras and their characteristics</summary>
1052
+
1053
+
```bash
1054
+
# List camera IDs
1055
+
adb shell /data/local/tmp/ndkcli camera manager camera-id-list
1056
+
1057
+
# Show full details (lens facing, orientation, hardware level) for all cameras
1058
+
adb shell /data/local/tmp/ndkcli camera list-details
1059
+
1060
+
# Query characteristics for a specific camera
1061
+
adb shell /data/local/tmp/ndkcli camera manager get-camera-characteristics --camera-id 0
1062
+
```
1063
+
1064
+
</details>
1065
+
1066
+
<details>
1067
+
<summary>Capture raw frames from the camera</summary>
1068
+
1069
+
```bash
1070
+
# Capture 10 frames from camera 0 at 640x480 in RGBA format, save to file
0 commit comments