fix(emulator): macOS gRPC token auth — right discovery dir + wire the native view - #83
Merged
Merged
Conversation
… native view Completes #81's gRPC token auth on macOS, so the native emulator panel streams emulators launched OUTSIDE UMIDE (Android Studio, or `emulator` with no -grpc). Two macOS gaps, both found by live-testing on a real Pixel_9a: 1. Discovery directory (android.rs): the emulator writes its avd/running/pid_*.ini — with grpc.port + grpc.token — to ~/Library/Caches/TemporaryItems on macOS, NOT $TMPDIR (what std::env::temp_dir() returns). grpc_discovery searched only $TMPDIR, so on macOS it never found the token. Now searches the macOS Caches path first, $TMPDIR as fallback (cfg-gated — Windows/Linux behaviour unchanged). 2. Native-view wiring (native_view.rs + emulator_view.rs): start_grpc_stream took no token and passed None to both connect_with_retry calls (Windows left the NOTE). It now takes the token and the macOS panel resolves it from the device serial via grpc_discovery — mirroring the portable path's endpoint_for. Live-proven on macOS (examples/token_grab, external token-mode Pixel_9a): a call WITHOUT the token is rejected (Unauthenticated); WITH it a real 1080x2424 frame streams. UMIDE-launched emulators (explicit -grpc, no token) are unchanged.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Completes #81's gRPC token auth on macOS, so the native emulator panel streams emulators launched outside UMIDE (Android Studio, or
emulatorwith no-grpc). Two macOS gaps, both found by live-testing on a real Pixel_9a:1. Discovery directory (
android.rs) — the macOS-specific bug Windows couldn't catch. The emulator writes itsavd/running/pid_*.ini(withgrpc.port+grpc.token) to~/Library/Caches/TemporaryItemson macOS, not$TMPDIR(whatstd::env::temp_dir()returns).grpc_discoverysearched only$TMPDIR, so on macOS it never found the token. Now searches the macOS Caches path first,$TMPDIRas fallback — cfg-gated, so Windows/Linux are unchanged.2. Native-view wiring (
native_view.rs+emulator_view.rs) —start_grpc_streampassedNoneto bothconnect_with_retrycalls (Windows left the NOTE). It now takes the token, and the macOS panel resolves it from the device serial viagrpc_discovery, mirroring the portable path'sendpoint_for.Live-proven on macOS (
examples/token_grab, external token-mode Pixel_9a)UMIDE-launched emulators (explicit
-grpc, no token) are unchanged. Unblocks the beta on all three platforms.