# How my phone answers "Hey Meta" for Ray-Ban Meta glasses

> Ray-Ban Meta glasses hear the question themselves and hand it to a server. This is how Visor plays that server, from the first question in plaintext to two bugs that only ever sounded like silence.

Write-up · 6 Nov 2026 · 9 min read

[Visor](https://www.marco.win/work/visor) is my open-source Android app that replaces the Meta AI app for Ray-Ban Meta and Meta's other smart glasses. It answers "Hey Meta" with a model you pick. Its project page says that in two paragraphs. This is the long version: what the glasses send, what they expect back, and how I found out, mostly by listening to them say nothing.

## The glasses do the listening

The glasses do more on their own than I expected. They hear the wake word, record the question and turn it into text on their own speech model. What they hand over is the result: the transcript, the intent they think you meant, and the slots they filled in.

What they want back is an answer from a server behind **service 15**, the assistant service. Normally the Meta AI app fills that role. Visor sits in the same place and answers itself, so Meta's servers take no part in a turn.

## "Bluetooth disconnected"

The first test was a client of my own on a computer, with the Meta AI app switched off on the phone. I said "Hey Meta, what's the weather?". The glasses chimed, thought about it, and said "Bluetooth disconnected. Check the connection and try again." The connection was fine. It was carrying their keepalives while they said it.

Next to that sentence in the glasses' firmware is code that launches the companion app through something called Nexus, and blames Bluetooth when the launch fails. So I went after Nexus. I probed the five service numbers that looked like its tunnels, decoded every capture I had of them, and started planning a tunnel of my own.

None of it was there. Nexus is switched off by a configuration flag, and the five "tunnels" carried almost nothing in any capture: some empty messages, a few two-byte ones, and the same four bytes, `000000c8`, over and over. That's the number 200, sent every few seconds as an availability check.

## Service 15 was there all along

I had crossed service 15 off early because it ignored a probe. The probe used message type 1, and service 15 has no type 1. It registers with types 1000 and 5000, on two channels: one for messages, called `m0`, and one for a stream, called `s0`.

```
>> svc15 1000  {1: "<epoch ms>-<uuid>", 2: "<client>", 3: "<client>-m0", 4: 2}
<< svc15 1001  accepted
>> svc15 5000  {1: "<epoch ms>-<uuid>", 2: "<client>", 3: "<client>-s0", 4: 2}
<< svc15 5001  accepted
```

With both channels up, I said "Hey Meta, test", and the question arrived in plaintext, or rather the glasses' version of it: the transcript read `hey meta text`. They had misheard the last word, which at least proved the transcript was theirs and not mine.

Then they asked again, and again. Nine times in a hundred seconds, every five to eight seconds, byte for byte the same. The glasses were waiting for an answer and I had nothing to say. A device that repeats the question until it likes the reply makes a good test rig, though: every candidate answer got judged within seconds.

The stream channel turned out to be a live feed of the microphone, at 16 kHz and about 1.6 KB per second. That's twenty times smaller than raw audio, and later it proved to be SILK, the speech mode of Opus.

## Four layers deep

The question came in a message of type 9000, and it took four layers to reach it:

```
DataX message, type 9000
  protobuf envelope    {1 seq, 2 kind, 3 payload}
    NetEvent           {1 event id, 2 payload, 3 compressed, 4 size}
      zlib             only when "compressed" is true
        Thrift         the event itself
```

The envelope is protobuf and everything inside it is Thrift, in its compact encoding. A compact field header packs the type and the gap from the previous field number into one byte, and integers are zigzag varints. Nothing I had tried before decoded it, because I had been feeding Thrift to a protobuf decoder.

Each envelope carries a sequence number that is always even and goes up by two, and each one wants an ack, type 9001. Without the ack, the glasses keep sending the same envelope for minutes.

One event was much bigger than the rest: 7,462 bytes once unzipped. It's the glasses' list of what they can do, in 20 groups. One group is called `phone_llm`. Another carries tool definitions in the shape MCP uses, with a name, a description and a JSON input schema, for things like taking a photo for the assistant. So the glasses already have a word for a model that runs on the phone, and a list of tools to give it.

## Names for the numbers

Knowing the encoding gave me numbers, not names. Field 7 of event 53 means nothing until you know what event 53 is. The Meta AI app ships its Thrift metadata as 138 small asset files, so I wrote a parser for them and got **1,117 structs** with their field ids and types. They matched a real 645-byte answer I had captured, byte for byte.

Two details nearly fooled me. The decompiler shows each field's constructor taking a type, a name and an id, but the files store id, name and type, and they only parse in that order. And in the decompiled code, a call like `A01(5)` reads the fifth declared field, not field 5. Before I knew that, I had the answer's text at field 28. Field 28 is a timeline context. The text is field 7.

## A hook the app couldn't survive

The schema named the messages, but I still had no example of an answer, because I had never captured the Meta AI app answering one. The plan was simple: hook the app with [Frida](https://frida.re), ask the glasses a question, and record both directions.

The app crashed within a second of the wake word, every time:

```
Abort message: 'Check failed: top_shadow_frame_ != nullptr '
  art::interpreter::DoCall<false>
```

That's a check inside ART, Android's runtime, not a memory fault. When Frida replaces a Java method, ART has to run that method in its interpreter, and Frida rewrites its stack frames. The assistant calls the receive method hard from a background thread, and that bookkeeping comes apart. The first stack I looked at was 500 frames of Frida's own agent, so I took it for recursion in the agent. I fixed a real bug on the way, a read past the end of a buffer in my hook, and the crash came back unchanged.

The way out was to stay away from Java. The send and receive paths have native methods, `Stream.sendNative` and `Connection.onReceivedNative`, and a hook on native code is invisible to ART. They aren't exported symbols, though. The usual trick is to catch `RegisterNatives` while the app hands them to the runtime, but on a running app that's too late, because the library registers them at startup.

So the hook searches `libstartup.so` for the method's name string, and then for the `JNINativeMethod` entry that points at it:

```
JNINativeMethod
  +0   name        -> "sendNative"
  +8   signature
  +16  fnPtr       <- the function to hook
```

The receive side gets frames that are already decrypted, with an explicit offset and length, so there was nothing to parse and nothing to overread. One capture of the app answering a question gave me a whole turn, in order.

## What an answer looks like

The answer isn't text. I had assumed "prompt in, text out" for most of a day, and the capture showed the app **streaming speech** to the glasses on the stream channel. One turn, from the phone's side:

1. ev71, then ev52 with the transcript and ev342 with an intent.
2. ev388, which marks the start of speech.
3. A stream header, type 5002, carrying the stream id the glasses chose for this turn.
4. The first audio message, type 5003, with two Opus packets.
5. The answer itself, ev53.
6. The rest of the audio, one message every 40 ms.
7. The stream end, type 6000, then ev389 and ev392.
8. ev60, which closes the turn.

The audio is 48 kHz mono Opus in 20 ms packets. Each message holds two packets, each with its length in front as a little-endian u32, so one message every 40 ms keeps the stream in real time.

Visor always sends `IN:GET_WEATHER` as the intent in ev342, whatever you asked. The glasses accept it. What they do with it, I still don't know.

The answer event, ev53, is a VARM, a "voice action response message". Visor doesn't encode it from scratch. It fills in fields of a captured one, because when I encoded the same struct myself, some integers came out in different widths and the glasses refused it.

## Forty milliseconds of a six-second answer

With the order right, the glasses took my answer and played nothing. After each turn they send a short text report, type 5005:

```
<stream id>_<interaction id>_<pcm bytes>_<milliseconds>
```

At 48 kHz, mono and 16 bits, that's 96 bytes per millisecond. The Meta AI app's turns came back as `721920_7520`, the whole answer. Mine came back as `3840_40`. Forty milliseconds is two Opus packets: **exactly my first audio message, and nothing after it**. The number was the same on every run, so at first I had read it as a buffer setting. It was the same because every run delivered the same single message.

The cause was the header on the messages after the first one. The app sends them with a bare DataX header. Mine carried a message type tag, with the value zero:

```
app:   00 6d 80 15                  109 bytes on channel 0x8015, no tags
mine:  80 3a 80 04 | 02 00 00 00    the same, plus a tag: message type 0
```

A tagged type 0 isn't "more of the stream". It's a message of type zero, and the glasses dropped every one.

The second bug was a matter of manners. The glasses announce changes to the turn's state as ev339, and the app echoes each one back as ev333, with the same fields, within a couple of milliseconds. One of those changes lands about 90 ms after the stream header, in the middle of the audio. My client read the socket only once every ten audio messages, so it answered six seconds late, and the glasses gave up on the answer. Visor now mirrors the state from its reader, as it arrives.

With both fixed, the glasses spoke my sentence. The first voice to come out of them that wasn't theirs was Windows' built-in text-to-speech, piped through Opus, which is not how I had pictured that moment.

## Names from the firmware

The schema named the structs, but not the events. The app's class for them is an empty stub, and the ids aren't in the schema either. I looked three times before I found them in the glasses' firmware, in `libassistantruntime.so`.

The names sit there as an array of 206 string views, each a pointer and a length. Nothing refers to the array by name, so I took one event name I already knew, found its string, and scanned the data section for a raw 8-byte pointer to it. That landed in the middle of the array. A second table, of 16-bit values, maps each event id to its position.

Several of my guessed names were wrong, even though the bytes behind them worked. ev71, which I had down as "interaction created", is `StartOfUserSpeech`. ev392 is `KeepWearableAirSessionAlive`.

## The 20-second limit

Then Visor moved to the phone and met real models, and the slow ones got cut off. After 20 seconds, the glasses gave up and said "Open the Meta AI app on your phone to reconnect".

That 20 is a setting, `assistant_on_sn.default_processing_timeout_s`, in MobileConfig, the table of settings Meta syncs to the glasses. The timer starts when the microphone closes. Visor writes 45, and the glasses pick up the new value live, without a restart. It stays under 60, because a separate watchdog ends any turn that thinks for a full minute.

Nothing else buys time. ev392, partial answers, and replies to the glasses' once-a-second ev63 with "extend the timeout" set all leave the limit where it is.

## Every turn ends with ev60

In the capture of the Meta AI app, ev60 came once, when the whole session ended. Visor needs one per turn. Without it, a streamed answer played fine, and then the glasses stayed in their "responding" state with the microphone on until you folded them. The next question went nowhere.

ev60 also decides what happens next. Field 3, `requiresAnswer`, and field 11, `shouldSmartFollowUp`, make the glasses open a new turn by themselves, without the wake word. Visor sets `requiresAnswer` when the answer ends with a question, so "want me to set a timer?" gets its "yes" without another "Hey Meta".

## The flag that made every answer silent

A tester's glasses played no answers at all, in either voice, and nothing reported an error. Their bug report showed the glasses processing the VARM the moment it arrived, and ending the turn before anything was spoken.

The difference was one flag, `simplify_mwa_message_forwarding`. It's false in the firmware and true in Meta's server config, so glasses that never synced with Meta run with it off. The glasses report it in every question, as field 30 of ev57:

- **True:** the glasses hold the VARM until ev60 or the audio arrives, then speak. Visor sends the VARM after the first audio and ev60 at the end.
- **False:** the glasses act on the VARM at once and end the turn. In the glasses' own voice Visor sends ev60 first, and in the phone's voice it sends the VARM after the stream ends.

With the flag off and the usual order, every answer is silent. Visor now reads field 30 before it picks the order.

## Speaking in the glasses' own voice

The glasses can also read the answer themselves, in the voice you chose for them. The VARM goes out with streaming switched off and no audio, followed by an ev60 that carries the text. VARM field 7 is called `speakRequestText`, which sounds like exactly the right field, and it does nothing.

English was the exception. English turns arrived as "session" turns, through a path selected by a flag whose name mentions AI phone calls, and on that path nothing speaks text from the phone. Visor switches that flag off and restarts only the glasses' assistant. There is no restart command, but changing the voice setting makes the assistant exit and come back, which does the job. The first English answer after that came out in John Cena's voice, the voice those glasses had set.

## Follow-ups without a transcript

After a streamed answer, the glasses keep the microphone open for a follow-up on the same stream, but they send no ev57 and no transcript. The phone has to recognize the audio itself. Visor decodes the 16 kHz SILK stream and runs Android's speech recognizer on it.

That recognizer has its own traps. The standard one returns error 9 while Visor is in the background, even with the microphone permission. The on-device one works, but only with the language's model installed, and it returns error 12 without it. Starting a second on-device recognizer while one is listening returns error 11.

Every message in this piece is written up with all its fields on [Visor's protocol pages](https://visor.macedonga.com/protocol/assistant-protocol/).
