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
Copy file name to clipboardExpand all lines: README.md
+53Lines changed: 53 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -278,6 +278,59 @@ flowchart TD
278
278
279
279
4.**gRPC Layer** (`grpc/`) — Remote proxy for Android APIs over gRPC. A companion app runs the gRPC server on-device; clients call Android APIs from any machine. Generated by `grpcgen`.
280
280
281
+
### gRPC Remote Access
282
+
283
+
The gRPC layer turns any Android phone into a remotely accessible API server. A companion service (`jniservice`) runs on the device — either as an APK (non-rooted) or a Magisk module (rooted, auto-starts on boot). Clients on any machine connect over the network using `jnicli`.
Each client registers with a unique certificate (mTLS). Method access is controlled by per-service ACLs — the device owner approves which services each client can use through an on-screen dialog:
306
+
307
+
```mermaid
308
+
flowchart LR
309
+
subgraph Client
310
+
CLI["jnicli"]
311
+
end
312
+
313
+
subgraph "jniservice (on device)"
314
+
TLS["mTLS gateway"]
315
+
ACL["Per-service ACL"]
316
+
SVC["31 Android API\nservices"]
317
+
RAW["Raw JNI surface"]
318
+
PROXY["Callback proxy\n(Camera2, etc.)"]
319
+
end
320
+
321
+
CLI -->|client cert| TLS
322
+
TLS --> ACL
323
+
ACL -->|"camera.*"| SVC
324
+
ACL -->|"admin only"| RAW
325
+
SVC --> Android["Android\nFramework"]
326
+
RAW --> Android
327
+
PROXY --> Android
328
+
```
329
+
330
+
**Available services** include camera, location, bluetooth, WiFi, telephony, battery, power, alarm, vibrator, audio, NFC, notifications, and more (31 services total, ~2000 RPCs). Callback-based APIs (like Camera2) work through a bidirectional streaming proxy with build-time generated adapter classes.
331
+
332
+
> **Security disclaimer:** This is a hobby/research project. The mTLS + ACL system provides basic access control, but it has not been audited and should not be relied upon for security-critical deployments. The self-signed CA, handle-based object references, and raw JNI surface all have inherent attack surface. Use it on trusted networks for development, testing, and experimentation.
0 commit comments