// Google Automotive Link media channels: the shared setup/start/ack sequence used by the // video sink and the three audio sinks, plus video focus. // // GAL 11/12 GAP (Phase 4, MA Auto sender): the media-playback-status (service 11, // `xkn`) and media-browser (service 12, `xki`) channel messages are unmapped, so they // are deliberately absent below. Now-playing is served from the on-device media session // and rendered into the ch2 video stream instead; inbound 11/12 traffic is // NOT_SUPPORTED (observed, never answered -- see `isMediaBrowserChannel`). // If the teardown ever recovers those IDs, their messages go at the end of this file. // // Field numbers recovered from the APK's protobuf-lite descriptors and exact; names follow // aasdk/openauto. See gal/control.proto for the provenance note. syntax = "proto2"; package gal; option java_package = "com.vayunmathur.auto.protocol.gal"; option java_multiple_files = true; enum VideoFocusMode { VIDEO_FOCUS_PROJECTED = 1; VIDEO_FOCUS_NATIVE = 2; VIDEO_FOCUS_NATIVE_TRANSIENT = 3; VIDEO_FOCUS_PROJECTED_NO_INPUT_FOCUS = 4; } enum VideoFocusReason { UNKNOWN = 0; PHONE_SCREEN_OFF = 1; PHONE_SCREEN_ON = 2; LAUNCH_NATIVE = 3; } // 0x8000. Claims the channel for a media type before anything is streamed. message MediaSetupRequest { required int32 media_type = 1; } // 0x8003, from the head unit. `configuration_indices` selects which of the configurations // advertised in discovery the head unit will actually accept. message MediaSetupResponse { required int32 media_status = 1; optional uint32 max_unacked = 2; repeated uint32 configuration_indices = 3; } // 0x8001. `configuration_index` indexes the config list from the discovery response. message MediaStartRequest { required int32 session_id = 1; required uint32 configuration_index = 2; optional int32 field3 = 3; optional bytes field4 = 4; } // 0x8002. Genuinely empty. message MediaStopRequest {} // 0x8004, from the head unit: it has consumed frames and we may send more. message MediaAck { required int32 session_id = 1; optional uint32 ack = 2; repeated uint64 field3 = 3; } // 0x8007. Note this starts at field 2 -- there is no field 1. message VideoFocusRequest { optional VideoFocusMode mode = 2; optional VideoFocusReason reason = 3; } // 0x8008, from the head unit. message VideoFocusIndication { optional VideoFocusMode mode = 1; optional bool unsolicited = 2; } // 0x8006, from the head unit: microphone request (`xkt`), from the teardown // (proto2, required int32 field 1, optional int32 field 2). Field NAMES are // not in the APK -- `fieldN` until the teardown names them -- but numbers, // wire types and cardinality are exact. The car owns the microphone, so the // phone receives this and answers bulk audio with 0x8004 acks. message MicrophoneRequest { required int32 field1 = 1; optional int32 field2 = 2; } // 0x800A, phone -> HU: UI-config update (`xow`), from the teardown: a single // optional message field 1 carrying `xop` (proto2, 8 fields: 3 singular // messages, 1 enum, 1 repeated enum, 2 repeated messages, 1 message). // // The `xop` interior is NOT recovered -- its nested message/enum classes are // unidentified in the dump (`xou`/`xku` resolve to enum values, `xha`/`xiz` // to partial shapes, the rest to bare field names) -- so this is a typed // envelope stub: field 1's number and length-delimited wire type are exact, // the interior stays opaque bytes. NEVER fill the interior with invented // fields; an empty envelope (zero bytes on the wire) is the honest send // until the teardown recovers `xop`. message UpdateUiConfigRequest { optional bytes config = 1; }