agentleFS
Mentra-CommunityMentra-Community/MentraOS/.agents/skills/mentra-update-connected-live/SKILL.md

mentra-update-connected-live

Skill2.4k starsChanged 5 days agoApache-2.0View on GitHub

Update a USB-connected Mentra Live to the latest published ASG client, BES firmware, and MTK firmware from the newest public Mentra release. Use when the user asks to check or update the connected glasses' BES, MTK, or ASG client. Not for firmware_live.json manifest PRs or BES source builds.

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 1 is distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Do not use asg_client/scripts/update-stock-for-dev.sh, update-mentra-live.sh, or the staging-builds manifest staging_live_version.json.

    line 10
  2. Very specific:

    Read bes_fw_version from a version_info_3 log line.

    line 43
  3. Distinctive:

    Update only what is behind.

    line 47
  4. Very specific:

    After BES apply, read all three again.

    line 96

≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Update a connected Mentra Live

Bring one USB-connected Mentra Live up to the newest public Mentra release's glasses set: ASG client, then MTK, then BES. Keep the Infinity Cable attached. MTK reboots Android and ADB drops until the new slot boots. Start BES only after that boot has finished.

Do not use asg_client/scripts/update-stock-for-dev.sh, update-mentra-live.sh, or the staging-builds manifest staging_live_version.json. That snapshot lags the coordinated release and will skip or downgrade a current device.

Resolve the target

Take the newest public GitHub release whose tag matches mentra-v*. Skip mentra-private-cloud-*. The release body links the ASG APK and the glasses OTA manifest (mentra-live-ota-<version>.json under mentra-builds-v<family> on artifactscdn.mentraglass.com).

Download that manifest with curl --fail --silent --show-error --location. It pins:

  • apps["com.mentra.asg_client"] — versionCode, versionName, apkUrl, apkSize, sha256
  • bes_firmware — version, url, sha256
  • mtk_full_ota.end_firmware and mtk_patches

Cross-check BES https://firmwarecdn.mentraglass.com/latest.json and MTK https://mtkfirmware.mentraglass.com/latest.json. The release pin and the CDN must name the same BES version and the same MTK target (target_firmware / full end_firmware). If they disagree, stop and report both. Do not mix a newer CDN blob into an older release.

Fetch with curl. Python urllib has been served the OTA website HTML from these hosts.

Re-check the newest mentra-v* tag after a long download. If a newer public release pins different artifacts, switch to that set before flashing anything still pending.

Read the glasses

Require one adb device in device state whose ro.product.model is Mentra Live. If more than one device is attached, set ANDROID_SERIAL. Source scripts/lib/glasses-device.sh when a script already does.

  • MTK: adb shell getprop ro.custom.ota.version (MentraLive_YYYYMMDD[.N])
  • ASG: the first versionCode and versionName from dumpsys package com.mentra.asg_client. That is the updated system app. A later block is the factory image underneath and is not the running client.
  • BES: start com.mentra.asg_client/.MainActivity, wait until the process is up, then:
adb shell am broadcast \
  -a com.mentra.asg_client.ACTION_SEND_COMMAND \
  --es json '{"type":"request_version","mId":424242}' \
  -n com.mentra.asg_client/.receiver.IntentCommandReceiver

Read bes_fw_version from a version_info_3 log line. BES firmware version cached successfully is the same value once UART is up. The glasses clock often shows the firmware build date, so logcat timestamps are not wall time.

Decide

Update only what is behind. Order is ASG, then MTK, then BES.

  • ASG matches versionCode and versionName has no -dev suffix: leave it.
  • A -dev versionName is a local sideload. Its versionCode is intentionally higher than the published client. Replace it.
  • BES and MTK: if the device is already equal, leave it. If the device is newer than the release pin, stop. Do not downgrade.
  • MTK behind: use the mtk_patches entry whose start_firmware is the device version and whose end_firmware is the release target. If that entry does not exist, use the full OTA only after the wipe check below. Intermediate builds such as MentraLive_20260906.2 often have no incremental to the latest target.

dumpsys battery level can be a bad gauge. Voltage near 4400 mV is a charged cell even when level is a few percent, and the Infinity Cable may report USB as unpowered. Do not flash when voltage is near empty.

Install

Download each changed artifact with curl. Require the manifest SHA-256 and, when the manifest has one, the byte size. Keep the files outside the repo.

ASG:

adb -s "$ANDROID_SERIAL" install -r -d <apk>

-d replaces a -dev sideload. Confirm the first dumpsys versionCode and versionName. If install fails on signature, stop.

MTK runs before BES. An incremental applies when a patch starts at the device version:

ANDROID_SERIAL="$ANDROID_SERIAL" \
  ./asg_client/scripts/test-mtk-ota.sh <patch.zip>

MTK full, when no such patch exists. Before flashing, read META-INF/com/android/metadata and payload_properties.txt. Require ota-type=AB, no ota-wipe=yes, no POWERWASH=1, and no ota-downgrade=yes on an upgrade. test-mtk-ota.sh prints POWERWASH=0 after its own check. Refuse a wiping package.

ANDROID_SERIAL="$ANDROID_SERIAL" \
  ./asg_client/scripts/test-mtk-ota.sh <full.zip> \
  --full --end-firmware <MentraLive_target>

The script checks the new boot, the opposite A/B slot, the same eMMC CID, and the exact target version. ADB disappears during the reboot. If observation is interrupted, reconnect and read ro.custom.ota.version. Do not start a second install to compensate. Do not start BES until this boot has finished and ASG is running again.

BES uses the release .bin from the manifest, never a raw BES build:

ANDROID_SERIAL="$ANDROID_SERIAL" \
  ./asg_client/scripts/test-bes-ota.sh <bin> <version> --no-follow

The script returns when the trigger is sent. Proof is a later terminal_status=SUCCESS with actual=<version>, then a fresh version_info_3 whose bes_fw_version equals that version. A tag-filtered logcat -t can miss this after ASG restarts. If the log says BesOtaManager not initialized, start the activity and send the trigger once more. Authorization denied, CRC failure, or apply error stops the run.

Prove it

After BES apply, read all three again. ASG versionCode / versionName, MTK ro.custom.ota.version, and BES bes_fw_version must match the release that was pinned. Report that tag. Manifest checks do not prove the device; the post-update reads do.

Download now (ZIP)

Trending

More talk lately.about the whole repository

Dec 2025: 1 mentionJan 2026: 0 mentionsFeb 2026: 0 mentionsMar 2026: 0 mentionsApr 2026: 1 mentionMay 2026: 2 mentionsJun 2026: 1 mentionJul 2026: 0 mentionsAug 2026: 4 mentionsSep 2026: 4 mentionsOct 2026: 39 mentionsNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the Mentra-Community/MentraOS repository that our weekly crawl found. There is no adoption data for this file yet.

Who's talking about Mentra-Community/MentraOS

The biggest 5 of 55 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 55

Talked about on GitHub, Bluesky and Hacker News (55 times).

On GitHub · 50

45 more on GitHub

On Bluesky · 4

On Hacker News · 1

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.