Skip to content

Commit 6a60dbe

Browse files
committed
Document all of current client services
1 parent f64f5b1 commit 6a60dbe

File tree

2 files changed

+20
-28
lines changed

2 files changed

+20
-28
lines changed

.github/FUNDING.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
github: agg23

README.md

Lines changed: 19 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,21 @@ This is the SDK for [PenumbraOS](https://github.com/PenumbraOS/), the full devel
99

1010
The PenumbraOS SDK exposes the following restricted interfaces on the Ai Pin:
1111

12+
- [DNS](sdk/src/main/java/com/penumbraos/sdk/api/DnsClient.kt) - Custom API implementation
1213
- [HTTP](sdk/src/main/java/com/penumbraos/sdk/api/HttpClient.kt) - Custom API implementation. Hopefully will add `OkHttp` handler soon
1314
- [WebSocket](sdk/src/main/java/com/penumbraos/sdk/api/WebSocketClient.kt) - Custom API implementation. Hopefully will add `OkHttp` handler soon
1415
- [Touchpad](sdk/src/main/java/com/penumbraos/sdk/api/TouchpadClient.kt)
16+
- [Hand Gestures](sdk/src/main/java/com/penumbraos/sdk/api/HandGestureClient.kt)
1517
- [Speech Recognition](sdk/src/main/java/com/penumbraos/sdk/api/SttClient.kt)
18+
- [Shell Tunnel](sdk/src/main/java/com/penumbraos/sdk/api/ShellClient.kt)
19+
- [eSIM Configuration](sdk/src/main/java/com/penumbraos/sdk/api/EsimClient.kt)
1620
- [Settings Management](bridge-settings/src/main/java/com/penumbraos/bridge_settings/) - System and app settings with dynamic web UI
1721

22+
Additionally some experimental interfaces are provided:
23+
24+
- [Hand Tracking](sdk/src/main/java/com/penumbraos/sdk/api/HandTrackingClient.kt)
25+
- [Notification (Side) LED](sdk/src/main/java/com/penumbraos/sdk/api/HandTrackingClient.kt)
26+
1827
## Architecture
1928

2029
Due to the locked down nature of the Humane Ai Pin, actually achieving access to "privileged" operations is very convoluted (`untrusted_app` cannot even access the network). The PenumbraOS SDK is designed to mitigate the setup issues and make a repeatable solution suitable for end users. The general spawn capabilities are provided by the [`pinitd`](https://github.com/PenumbraOS/pinitd/) init system.
@@ -31,6 +40,14 @@ Quite literally just a bridge between the SDK and the privileged world. `untrust
3140

3241
The gateway to all actual privileged operations. Currently, all operations are exclusively things that can run in the `system` domain, so `bridge-system` also runs in `system`. Communicates with `bridge-core` over Binder. Located in `/bridge-system`.
3342

43+
### Bridge Settings Service
44+
45+
The management system for all PenumbraOS settings, and notably provides the embedded web server used for development and consumers like [MABL](https://github.com/PenumbraOS/mabl) to provide a settings UI. Runs as `bridge-settings` in the `system` domain, and communicates with `bridge-core` over Binder. Located in `/bridge-settings`.
46+
47+
### Bridge Shell Service
48+
49+
Both a worker in the `shell` domain and a service for proxying actual `sh` commands, this service allows PenumbraOS pieces to perform actions that are otherwise restricted to direct ADB access. Runs as `bridge-shell` in the `shell` domain, and communicates with `bridge-core` over Binder. Located in `/bridge-shell`.
50+
3451
## CLI
3552

3653
A command-line interface is available at `/data/local/tmp/penumbra` for managing system settings and executing module actions. Notably, this can be used to configure the eSIM.
@@ -54,32 +71,6 @@ penumbra settings esim downloadAndEnableProfile --activationCode LPA:1\$rsp.trup
5471
This is an active work in progress and may be difficult to set up. Please reach out to [@agg23](https://github.com/agg23) for questions or help.
5572

5673
> [!NOTE]
57-
> These steps are chosen for active development of PenumbraOS and do not represent what the end user experience should be like. In a normal environment, `pinitd` is already running and the `bridge` and `bridge-priv` services are set to run on boot and automatically restart on error.
58-
59-
1. Run `build.sh`. This will build `bridge_priv_rs`, install it, copy `pinitd` service configs, then build + install the `bridge` and `example` Android projects.
60-
2. Due to https://github.com/PenumbraOS/pinitd/issues/4, starting apps may not work after setting up the `pinitd` environment. Start your primary app (the included `example` app, [MABL](https://github.com/PenumbraOS/mabl), or your own custom app) now to ensure it runs (or use the included `mabl.unit` service to autostart it). You can wait for the `BRIDGE_SERVICE_READY` broadcast for when you can start talking to the `bridge` service.
61-
3. Start `pinitd`. At the time of writing this is accomplished by running:
62-
63-
```bash
64-
/data/local/tmp/bin/pinitd-cli debug-manual-start
65-
```
66-
67-
but this will change in the future.
68-
69-
4. Enable the required services:
70-
71-
```bash
72-
/data/local/tmp/bin/pinitd-cli enable bridge-service
73-
/data/local/tmp/bin/pinitd-cli enable bridge-system-service
74-
/data/local/tmp/bin/pinitd-cli enable mabl
75-
```
76-
77-
5. Once `pinitd` is running and the services are enabled, you can start the bridge services. ~~`bridge-service` depends on everything else (including MABL), so it will automatically launch all services as necessary on startup.~~
78-
79-
```bash
80-
/data/local/tmp/bin/pinitd-cli start bridge-service
81-
sleep 5
82-
/data/local/tmp/bin/pinitd-cli start bridge-system-service
83-
```
74+
> These steps are chosen for active development of PenumbraOS and do not represent what the end user experience should be like. In a normal environment, `pinitd` is already running and the `bridge` and `bridge-system` services are set to run on boot and automatically restart on error.
8475
85-
6. At this point, everything should be operational and the custom app should be able to talk to the PenumbraOS SDK. To avoid the app starting issue, you can use the "Apply changes" button in Android Studio to update your app without relaunching.
76+
For general installation, see https://github.com/PenumbraOS/installer. If you want to develop locally, running `build.sh` from a Bash-compatible shell will set up the entire environment for Pin for you on the actual device.

0 commit comments

Comments
 (0)