|
5 | 5 | [](https://github.com/AndroidGoLab/binder/actions/workflows/ci.yml) |
6 | 6 | [](LICENSE) |
7 | 7 | [](go.mod) |
| 8 | +[](https://context7.com/androidgolab/binder) |
8 | 9 |
|
9 | 10 | Call Android system services from pure Go. Provides ~14,000 type-safe Go methods across 1,500+ Android interfaces — ActivityManager, PowerManager, SurfaceFlinger, PackageManager, audio, camera and sensor HALs, and more — by speaking the Binder IPC wire protocol directly via `/dev/binder` ioctl syscalls. No Java, no NDK, no cgo required. |
10 | 11 |
|
@@ -132,10 +133,10 @@ graph TD |
132 | 133 | CAPI -. "some use" .-> BINDER |
133 | 134 | ``` |
134 | 135 |
|
135 | | -| Library | Interface | Requires | Best for | |
136 | | -| ------------------------------------------------------------------ | ---------------------------- | ------------------- | --------------------------------------------------------------------------------------------------- | |
137 | | -| **[ndk](https://github.com/xaionaro-go/ndk)** | Android NDK C APIs | cgo + NDK toolchain | High-performance hardware access: camera, audio, sensors, OpenGL/Vulkan, media codecs | |
138 | | -| **[jni](https://github.com/xaionaro-go/jni)** | Java Android SDK via JNI | cgo + JNI + JVM/ART | Java-only APIs with no NDK equivalent: Bluetooth, WiFi, NFC, location, telephony, content providers | |
| 136 | +| Library | Interface | Requires | Best for | |
| 137 | +| ------------------------------------------------------------------- | ---------------------------- | ------------------- | --------------------------------------------------------------------------------------------------- | |
| 138 | +| **[ndk](https://github.com/xaionaro-go/ndk)** | Android NDK C APIs | cgo + NDK toolchain | High-performance hardware access: camera, audio, sensors, OpenGL/Vulkan, media codecs | |
| 139 | +| **[jni](https://github.com/xaionaro-go/jni)** | Java Android SDK via JNI | cgo + JNI + JVM/ART | Java-only APIs with no NDK equivalent: Bluetooth, WiFi, NFC, location, telephony, content providers | |
139 | 140 | | **[binder](https://github.com/AndroidGoLab/binder)** (this project) | Binder IPC (system services) | pure Go (no cgo) | Direct system service calls without Java: works on non-Android Linux with binder, minimal footprint | |
140 | 141 |
|
141 | 142 | ### When to use which |
@@ -477,20 +478,20 @@ See the full [bindercli reference](#bindercli) for all subcommands and more exam |
477 | 478 |
|
478 | 479 | ## Packages |
479 | 480 |
|
480 | | -| | Package | Description | Import Path | |
481 | | -| --------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------- | |
482 | | -| **AIDL Pipeline** ([`tools/pkg/`](tools/pkg/)) | | | | |
| 481 | +| | Package | Description | Import Path | |
| 482 | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------- | -------------------------------------------------------------------------------------- | --------------------------------------------------- | |
| 483 | +| **AIDL Pipeline** ([`tools/pkg/`](tools/pkg/)) | | | | |
483 | 484 | | [](https://pkg.go.dev/github.com/AndroidGoLab/binder/tools/pkg/parser) | `tools/pkg/parser` | Lexer and recursive-descent parser producing an AST from `.aidl` files | `github.com/AndroidGoLab/binder/tools/pkg/parser` | |
484 | 485 | | [](https://pkg.go.dev/github.com/AndroidGoLab/binder/tools/pkg/resolver) | `tools/pkg/resolver` | Import resolution across search paths with type registry and circular-import detection | `github.com/AndroidGoLab/binder/tools/pkg/resolver` | |
485 | 486 | | [](https://pkg.go.dev/github.com/AndroidGoLab/binder/tools/pkg/codegen) | `tools/pkg/codegen` | Go code generator for proxies, parcelables, enums, unions, and constants | `github.com/AndroidGoLab/binder/tools/pkg/codegen` | |
486 | 487 | | [](https://pkg.go.dev/github.com/AndroidGoLab/binder/tools/pkg/validate) | `tools/pkg/validate` | Semantic validation: type resolution, parameter directions, oneway constraints | `github.com/AndroidGoLab/binder/tools/pkg/validate` | |
487 | | -| **Runtime** | | | | |
| 488 | +| **Runtime** | | | | |
488 | 489 | | [](https://pkg.go.dev/github.com/AndroidGoLab/binder/binder) | `binder` | Binder IPC abstractions: `IBinder` interface, `Transact()`, status/exception handling | `github.com/AndroidGoLab/binder/binder` | |
489 | 490 | | [](https://pkg.go.dev/github.com/AndroidGoLab/binder/parcel) | `parcel` | Binder wire format: 4-byte aligned, little-endian serialization | `github.com/AndroidGoLab/binder/parcel` | |
490 | 491 | | [](https://pkg.go.dev/github.com/AndroidGoLab/binder/kernelbinder) | `kernelbinder` | Linux `/dev/binder` driver: open, mmap, ioctl, protocol negotiation | `github.com/AndroidGoLab/binder/kernelbinder` | |
491 | 492 | | [](https://pkg.go.dev/github.com/AndroidGoLab/binder/servicemanager) | `servicemanager` | Client for `android.os.IServiceManager`: `GetService()`, `ListServices()`, etc. | `github.com/AndroidGoLab/binder/servicemanager` | |
492 | 493 | | [](https://pkg.go.dev/github.com/AndroidGoLab/binder/errors) | `errors` | AIDL exception types: `ExceptionCode`, `StatusError` | `github.com/AndroidGoLab/binder/errors` | |
493 | | -| **Testing** | | | | |
| 494 | +| **Testing** | | | | |
494 | 495 | | [](https://pkg.go.dev/github.com/AndroidGoLab/binder/tools/pkg/testutil) | `tools/pkg/testutil` | Mock binder and reflection-based smoke testing for generated proxies | `github.com/AndroidGoLab/binder/tools/pkg/testutil` | |
495 | 496 |
|
496 | 497 | ### Generated AOSP Packages |
|
0 commit comments