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: fix Go syntax in README snippets, add missing examples, implement overlay specs
Fix invalid Go syntax in Toggle Flashlight and Server-Side Service README
snippets where method declarations appeared inside function-body context.
Split into separate code blocks with type definitions at top level.
Add Query Battery Level and Send a Raw Binder Transaction usage examples
to address documentation gaps. Add collapsible "Using other services"
guide for working with any binder service.
Implement overlay spec support: ReadAllSpecs now merges overlay.yaml
entries on top of auto-generated spec.yaml. Add auto-generated header
comment to WritePackageSpec. Create servicemanager overlay with 5 service
entries (batteryproperties, media.camera, mount, package, package_native).
Replace all magic service name strings in examples with generated
servicemanager constants. Minor cleanups: strings.Split instead of
custom splitLines, stderr for error output.
<summary><strong>Using other services</strong></summary>
505
+
506
+
The examples above cover specific subsystems, but the library supports **all** Android binder services — over 1,500 interfaces. To work with a service not shown above:
507
+
508
+
1.**Find the service name.** Run `bindercli service list` on the device, or check `servicemanager/service_names_gen.go` for well-known constants.
509
+
510
+
2.**Find the generated proxy.** Browse the `android/` and `com/` packages on [pkg.go.dev](https://pkg.go.dev/github.com/AndroidGoLab/binder) or use `grep`:
go run ./tools/cmd/aospgen -3rdparty tools/pkg/3rdparty -output . -smoke-tests
1839
1961
```
1840
1962
1841
-
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,092 Go files** across **399 packages**.
1963
+
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,097 Go files** across **399 packages**.
1842
1964
1843
1965
### Transaction Code Resolution
1844
1966
@@ -2130,7 +2252,7 @@ See the example app at [`examples/gomobile/`](examples/gomobile/).
0 commit comments