Android2026Reverse engineering and Android app

Visor

An open-source Android app that replaces the Meta AI app for Ray-Ban Meta and other Meta glasses, by speaking the glasses' own encrypted protocol.

Visor sets the glasses up, makes the phone their owner, brings the photos over and answers "Hey Meta" with a model you choose. It works with the Oakley Meta glasses and the Meta Ray-Ban Display too, and it has no server of its own.

Taking the Meta AI app's place

Normally the glasses rely on the Meta AI app for almost everything: setup, photos, settings and the assistant. Meta's own toolkit for developers starts from that app too. Visor takes its place on the phone. It holds the glasses' Bluetooth and Wi-Fi links and speaks their protocol, so the glasses talk to Visor the way they'd talk to Meta's app.

Two things stay as they are. You still need a Meta account once, at setup, for a reason that comes up below. And the glasses take one session at a time, so if the Meta AI app connects, Visor's session ends, and the other way round.

Visor is my own project. Meta and EssilorLuxottica have nothing to do with it, and it names their products only to say which glasses it works with.

Reading the Meta AI app

None of the protocol is documented, so the Meta AI app was the only reference there was. I read its native code in Ghidra, a tool that turns a compiled program back into something a person can follow, without running it. That gave me guesses.

To check them I used Frida, which hooks functions inside a running app. I watched the same functions while the app talked to real glasses, and compared what I expected with what actually went over the air. Then I wrote the Kotlin, tried it on the glasses, and went back to Ghidra when they said no.

They never say why. When something is off, the glasses close the connection and wait, so a lot of the work was finding out which detail they disliked this time. It's the Bluetooth version of "nothing, I'm fine".

Three radios and a chain of frames

The glasses use three radios. Bluetooth LE, the low-power kind, is the main link, and it keeps working while the glasses sleep folded in their case. Bluetooth Classic is the fallback. Wi-Fi Direct, a network the phone and the glasses make between themselves, carries the heavy things at about 10 MB/s, against 120 to 165 KB/s over Bluetooth Classic.

Everything after the first handshake is encrypted. The two sides agree on keys with ECDH, a way to share a secret over an open link. After that, every frame is encrypted with AES and signed with a short HMAC, a checksum only the two key holders can make.

Each frame also picks up where the one before it left off. Lose a single frame and every frame after it decrypts to garbage, so the link has to deliver every byte, in order, or the session is over.

One setup message carries two random IDs, and the glasses check that both are version 4 UUIDs. A UUID has a few fixed digits: the one after the second dash has to be 4, and the one after the third has to be 8, 9, a or b. Sixteen truly random bytes get both right about one time in 64. Here are 64 tries of each, random bytes on top and real UUIDs below, with a filled dot for every pass:

3fa1c2d9-7be0-7c12-e3a9-58b20f1c9d771 of 64 passed
f47ac10b-58cc-4372-a567-0e02b2c3d47964 of 64 passed
Random bytes passed 1 of 64; real UUIDs passed 64 of 64.

With two IDs in the message, my setup worked about once in 4,096 tries. Every other time it failed in silence, and it looked exactly like a permissions problem. The fix was to stop rolling dice and use real UUIDs:

/** The 16-byte UUIDs EndLinkSetup carries, and the firmware check they have to pass. */
object LinkUuid {
 
    /** 16 bytes from [UUID.randomUUID], which is version 4 and variant 10xx by construction. */
    fun random(): ByteArray = UUID.randomUUID().toBytes()
 
    fun isValid(bytes: ByteArray): Boolean =
        bytes.size == 16 &&
            (bytes[6].toInt() and 0xF0) == 0x40 &&
            (bytes[8].toInt() and 0xC0) == 0x80
}

The rest of the protocol, service by service, is written up at visor.macedonga.com/protocol.

Becoming the owner app

The glasses only take orders from their owner app, and Meta decides which app that is. That's why setup is the one moment Visor needs Meta.

The phone logs in to your Meta account, then sends Meta the glasses' certificate together with a key the phone made for itself. Meta answers with a signed receipt, and Visor hands it to the glasses. From then on the phone proves who it is with its own key, and connecting again never goes through Meta.

Answering "Hey Meta" with your own model

You still say "Hey Meta". The glasses hear the wake word and understand the question themselves, then hand it to the phone on the channel where Meta's assistant would answer. Visor answers there instead.

It sends the question to the model you set up: Claude, ChatGPT, Gemini, Grok, or anything that speaks OpenAI's API, even a model running on your own network. The answer goes back to the glasses, and they read it aloud in their usual voice. The model gets a short brief:

You are the voice assistant in a pair of Meta smart glasses, run by the wearer's own app, Visor. Everything you write is spoken aloud through the glasses' speakers, so answer in one to three short, natural sentences unless asked for more.

It also gets tools. It can ask the glasses for a photo when a question needs one, like "what's this street?", keep notes about you on the phone, and stop the glasses listening when you say you're done. Tools from any MCP server you add show up there too. Every question and answer lands in a diary on the phone, with its photo.

Visor's Meta AI diary for today, with three questions asked through the glasses and their answersVisor's Memories page, with one fact the assistant keeps: your bike is on level 3

The assistant gave me two good bugs. The glasses only wait 20 seconds for an answer, and when a slow model took longer, they gave up and said "Open the Meta AI app". From where they stood, that was fair advice. Visor now tells them to wait 45 seconds.

The other one came with models that think before they answer. The thinking counted against the answer's length, so a model could spend its whole budget thinking about a simple question and have no words left for the reply. The glasses then said "Sorry, I couldn't get an answer", which was technically true. Claude now gets its room to think on top of the answer.

Bringing the photos over

Visor copies photos and videos to the phone over Wi-Fi Direct, by itself while the glasses charge or when you tap Import. Live photos become Android Motion Photos, and once a file is safely on the phone, Visor deletes it from the glasses.

Early on, some imported photos went missing. They weren't missing. They were in the gallery, weeks back, because the glasses' clock had fallen behind and dated every new photo in the past. For a while, every new photo was a throwback. Visor now sets the glasses' clock every time it connects.

The live view, on 2.4 GHz only

The live view shows the glasses' camera on the phone. It can record, keep an instant replay of the last few minutes, and broadcast to any RTMP server, the protocol most streaming sites take.

It runs over Wi-Fi Direct, and the network Visor makes for it is always on 2.4 GHz. On 5 GHz, the glasses' Wi-Fi crashed within seconds of going live, which made for very short streams.

Every setting, including the switched-off ones

Settings has every setting the glasses keep, laid out the way the Meta AI app shows them. Under Advanced are the firmware's feature flags, the switches that decide which features a device gets.

A few days after launch, Visor had a page of features that were in the firmware but switched off on these glasses, with a switch for each one. It didn't last long as a page, because each feature soon moved to the settings where it belonged: hearing correction now lives under Hearing, for example. Firmware updates themselves stay with Meta, and Visor only shows the versions.

Visor's settings for Marco's glasses: the Meta AI row set to Sonnet 5.5 with the glasses' voice, then language, notifications, controls, sound, hearing, and wear and battery

The Display and the Neural Band

The Meta Ray-Ban Display has a small screen in the right lens, and the Neural Band reads finger gestures from the wrist. Support for both took two weeks on a branch of its own. It covers a lot, though not yet everything the Meta AI app does there.

Most of that work was the Display's own apps. They reach the internet through the phone, so Visor had to serve them messages, calls, maps and even Instagram's Reels. Maps needed a detour: the phone's own place search found nothing for "cafe" or "park". Finding no cafe at all in Italy takes real effort, so Visor asks OpenStreetMap instead.

The band can be shared with the phone, so other apps can make it buzz while the Display keeps using it.

Letting other apps use the glasses

Meta has a toolkit for this, the Wearables Device Access Toolkit. It works through the Meta AI app, and developers register with Meta to use it. I built the Visor Development Kit, or VDK, to do the same job through Visor.

Apps on the phone use an Android library. Programs and AI agents on a computer connect over the local network, with JSON-RPC, a simple request-and-answer format, or with MCP. Web apps on the Display reach it from their own JavaScript.

Nothing gets in unless the person wearing the glasses says yes. Each app holds scopes, like camera or display. An Android app asks for them on Visor's consent screen, a program gets the ones you pick when you add it, and you can take any of them back. The capture light on the glasses still comes on for every photo an app takes.

Visor's Apps settings with programs allowed to connect and one program, Trains, holding the status, display and voice scopes

I wrote the VDK over a weekend and the Monday after. To try it without glasses, visor fake runs a stand-in for Visor on a computer, with a simulator of the Display in the browser. Its demo cards are a train to Venice and a timer for a risotto, which is about as Italian as a simulator gets.

The visor fake Display simulator in a browser, showing two cards on the Meta Ray-Ban Display over a dim room: a train to Venezia S. Lucia in 12 minutes from platform 3, and a kitchen timer for a risotto, with the touchpad and view controls beside it

Where Visor connects

Visor has no server of its own, no analytics and no crash reporting. This is every place it talks to:

ToWhenWhat for
MetaDuring setupThe login, and the receipt that makes Visor the owner app of your glasses
MetaWhen neededYour pair's frame style, assistant language packs, and the Display's weather, sports and stocks
MetaWhen you link a Facebook, Instagram or Threads accountThat account's tokens, which Visor hands to the glasses
Your model providerWhen you ask the assistantYour question, with your own API key
Your RTMP serverWhen you broadcastThe broadcast
OpenStreetMapWhen Maps on the Display searches or plans a routeThe search, and the route's start and end
GitHubTwice a dayThe latest release, to tell you about a new version (you can turn it off)

Everything else stays between the phone and the glasses.

Testing on real glasses

Every change gets tried on real glasses, sometimes more than once.

Other people send fixes as well, and thanks to them Visor speaks Russian and Chinese. Visor also asks, a day after you start using it, whether you'd like to leave a star on GitHub. If you say no, it asks once more a week later, and "Don't show again" means it.

Contracting from January, and open to more: web and Android apps, and integrations.me@marco.win