mirror of
https://github.com/PenumbraOS/sdk.git
synced 2026-02-03 17:26:48 -06:00
Document all of current client services
This commit is contained in:
parent
f64f5b13c5
commit
6a60dbe469
1
.github/FUNDING.yml
vendored
Normal file
1
.github/FUNDING.yml
vendored
Normal file
@ -0,0 +1 @@
|
||||
github: agg23
|
||||
47
README.md
47
README.md
@ -9,12 +9,21 @@ This is the SDK for [PenumbraOS](https://github.com/PenumbraOS/), the full devel
|
||||
|
||||
The PenumbraOS SDK exposes the following restricted interfaces on the Ai Pin:
|
||||
|
||||
- [DNS](sdk/src/main/java/com/penumbraos/sdk/api/DnsClient.kt) - Custom API implementation
|
||||
- [HTTP](sdk/src/main/java/com/penumbraos/sdk/api/HttpClient.kt) - Custom API implementation. Hopefully will add `OkHttp` handler soon
|
||||
- [WebSocket](sdk/src/main/java/com/penumbraos/sdk/api/WebSocketClient.kt) - Custom API implementation. Hopefully will add `OkHttp` handler soon
|
||||
- [Touchpad](sdk/src/main/java/com/penumbraos/sdk/api/TouchpadClient.kt)
|
||||
- [Hand Gestures](sdk/src/main/java/com/penumbraos/sdk/api/HandGestureClient.kt)
|
||||
- [Speech Recognition](sdk/src/main/java/com/penumbraos/sdk/api/SttClient.kt)
|
||||
- [Shell Tunnel](sdk/src/main/java/com/penumbraos/sdk/api/ShellClient.kt)
|
||||
- [eSIM Configuration](sdk/src/main/java/com/penumbraos/sdk/api/EsimClient.kt)
|
||||
- [Settings Management](bridge-settings/src/main/java/com/penumbraos/bridge_settings/) - System and app settings with dynamic web UI
|
||||
|
||||
Additionally some experimental interfaces are provided:
|
||||
|
||||
- [Hand Tracking](sdk/src/main/java/com/penumbraos/sdk/api/HandTrackingClient.kt)
|
||||
- [Notification (Side) LED](sdk/src/main/java/com/penumbraos/sdk/api/HandTrackingClient.kt)
|
||||
|
||||
## Architecture
|
||||
|
||||
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
|
||||
|
||||
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`.
|
||||
|
||||
### Bridge Settings Service
|
||||
|
||||
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`.
|
||||
|
||||
### Bridge Shell Service
|
||||
|
||||
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`.
|
||||
|
||||
## CLI
|
||||
|
||||
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
|
||||
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.
|
||||
|
||||
> [!NOTE]
|
||||
> 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.
|
||||
> 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.
|
||||
|
||||
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.
|
||||
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.
|
||||
3. Start `pinitd`. At the time of writing this is accomplished by running:
|
||||
|
||||
```bash
|
||||
/data/local/tmp/bin/pinitd-cli debug-manual-start
|
||||
```
|
||||
|
||||
but this will change in the future.
|
||||
|
||||
4. Enable the required services:
|
||||
|
||||
```bash
|
||||
/data/local/tmp/bin/pinitd-cli enable bridge-service
|
||||
/data/local/tmp/bin/pinitd-cli enable bridge-system-service
|
||||
/data/local/tmp/bin/pinitd-cli enable mabl
|
||||
```
|
||||
|
||||
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.~~
|
||||
|
||||
```bash
|
||||
/data/local/tmp/bin/pinitd-cli start bridge-service
|
||||
sleep 5
|
||||
/data/local/tmp/bin/pinitd-cli start bridge-system-service
|
||||
```
|
||||
|
||||
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.
|
||||
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.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user