Skip to content

Commit 8e4aa65

Browse files
xaionaro@dx.centerxaionaro@dx.center
authored andcommitted
fix: README says 'interfaces' not 'system services', remove misleading count from bullet
1 parent 631597b commit 8e4aa65

2 files changed

Lines changed: 8 additions & 11 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@
66
[![License: CC0-1.0](https://img.shields.io/badge/License-CC0_1.0-lightgrey.svg)](LICENSE)
77
[![Go Version](https://img.shields.io/github/go-mod/go-version/AndroidGoLab/binder)](go.mod)
88

9-
Call Android system services from pure Go. Provides ~14,000 type-safe Go methods across 350+ Android system services — 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.
9+
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.
1010

1111
Includes a complete AIDL compiler that parses Android Interface Definition Language files and generates the Go proxies, a version-aware runtime that adapts transaction codes across Android API levels, and a CLI tool (`bindercli`) for interactive service discovery and invocation.
1212

1313
## What can it do?
1414

1515
- **Query system services** — battery level, GPS location, thermal status, running processes, installed packages
1616
- **Control hardware** — connect to WiFi, toggle flashlight, manage Bluetooth, configure audio
17-
- **Interact with any binder service** — ActivityManager, PowerManager, SurfaceFlinger, camera/sensor HALs, and 350+ more
17+
- **Interact with any binder service** — ActivityManager, PowerManager, SurfaceFlinger, camera/sensor HALs, and more
1818
- **No Java, no cgo** — pure Go, cross-compiles to a static binary, runs on Android or any Linux with `/dev/binder`
1919
- **CLI tool included**`bindercli` for interactive service discovery, method invocation, and debugging
2020

tools/cmd/spec2readme/main.go

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -584,7 +584,6 @@ func formatCount(n int) string {
584584
func updateInlineStats(content string, stats codebaseStats, packages []packageInfo) string {
585585
// Compute human-friendly rounded values.
586586
methodsRounded := roundDown(stats.methods, 1000) // e.g. 14454 -> 14000
587-
packagesRounded := roundDown(stats.packages, 50) // e.g. 399 -> 350
588587

589588
// Compute total spec-based interface count for the "N+ interfaces" pattern.
590589
totalInterfaces := 0
@@ -593,19 +592,17 @@ func updateInlineStats(content string, stats codebaseStats, packages []packageIn
593592
}
594593
interfacesRounded := roundDown(totalInterfaces, 100) // e.g. 1507 -> 1500
595594

596-
// Helper to compute the order of magnitude for "N+" display.
597-
// e.g. 14000 -> "~14,000", 350 -> "350+"
598595
replacements := []struct {
599596
pattern string
600597
replace string
601598
}{
602-
// Hero paragraph: "~12000 type-safe Go methods" or "~14,000 type-safe Go methods"
599+
// Hero paragraph: "~14,000 type-safe Go methods"
603600
{`~[\d,]+ type-safe Go methods`, fmt.Sprintf("~%s type-safe Go methods", formatCount(methodsRounded))},
604-
// Hero paragraph: "across 600+ Android system services" or similar
605-
{`across [\d,]+\+ Android system services`, fmt.Sprintf("across %s+ Android system services", formatCount(packagesRounded))},
606-
// Bullet point: "and 600+ more" or similar package count
607-
{`and [\d,]+\+ more`, fmt.Sprintf("and %s+ more", formatCount(packagesRounded))},
608-
// bindercli section: "1,500+ interfaces, 12,000+ methods"
601+
// Hero paragraph: "across 1,500+ Android interfaces"
602+
{`across [\d,]+\+ Android (?:system services|interfaces)`, fmt.Sprintf("across %s+ Android interfaces", formatCount(interfacesRounded))},
603+
// Bullet point: "and more" (no misleading count)
604+
{`and [\d,]+\+ more`, "and more"},
605+
// bindercli section: "1,500+ interfaces, 14,000+ methods"
609606
{`[\d,]+\+ interfaces, [\d,]+\+ methods`, fmt.Sprintf("%s+ interfaces, %s+ methods", formatCount(interfacesRounded), formatCount(methodsRounded))},
610607
// AOSP bulk generation: "**5,490 Go files** across **666 packages**"
611608
{`\*\*[\d,]+ Go files\*\* across \*\*[\d,]+ packages\*\*`,

0 commit comments

Comments
 (0)