Andee lives on your phone or Mac and uses any app like you do—no integrations, no root, any model; memory and passwords never leave your device | Andee 住进你的手机或 Mac,像你一样操作任何 App——无需集成、无需 Root、支持任意模型,记忆和密码绝不离开设备。
chore(release): v0.3.0
booboosui5115ca170fda
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 3f3a8aa..2227894 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -4,7 +4,7 @@ Notable changes to Andee. The format follows [Keep a Changelog](https://keepacha## Versioning policy-- `versionCode` / `versionName` live in `app/build.gradle` and are currently **`3` / `"0.2.0"`**.+- `versionCode` / `versionName` live in `app/build.gradle` and are currently **`4` / `"0.3.0"`**.- Releases are tagged `vMAJOR.MINOR.PATCH`, `versionName` mirrors the tag without the leading `v`,and `versionCode` increases by one per release. `versionCode` must increase **monotonically** orAndroid refuses the upgrade; the same number must never be reused for two different builds.@@ -13,7 +13,7 @@ Notable changes to Andee. The format follows [Keep a Changelog](https://keepacha**The project starts at `0.x`, and that is the accurate number rather than a modest one.** Nothing isfrozen. The tool-schema contract a hub brain speaks has been rewritten repeatedly-(`net/ToolSchemas.kt` alone has changed in ten commits since the first), the `local.properties`+(`net/ToolSchemas.kt` has been rewritten in every release so far), the `local.properties`build flags that decide the first-install language, the thinking default and whether CodeFlying iscompiled in have all been added since, and a saved scene is a shape that only appeared in thisrelease. Each of those is something a user or a second implementation would have to rebuild against,@@ -28,6 +28,62 @@ hash into `versionName` at build time would close this hole; it is not implement## [Unreleased]+## [0.3.0] - 2026-10-12++The release where the assistant stops living inside the accessibility service. Everything else here+is smaller than that; the split is the reason it is a minor bump and the reason the upgrade notes+matter, because a ROM that revokes accessibility now costs one capability instead of the whole app.++### Added++- **The body is a foreground service; the accessibility service is a shim.** The body — ball, card,+ microphone, ASR/TTS, brain socket, scrollback, todos — used to be constructed inside+ `ScreenBodyService.onServiceConnected()`, and that class is an `AccessibilityService`. So a ROM+ that revokes accessibility (HyperOS, observed) took the whole assistant with it: no ball, no way to+ talk, no way back except knowing which switch in Settings to find. The failure mode was never+ "screen control is gone", it was "the app is gone". `BodyCoreService` now owns everything else and+ outlives the accessibility service, which is reduced to handing the screen capability over and+ taking it back — so a revoked service costs one capability, and the return trip is one tap on a+ notification that is still there. `screen.*` goes through a provider, so a call with no+ accessibility throws a readable error instead of no-op'ing or holding a controller built around a+ dead binding; the shot and gesture guards moved from an `init` block to `wireScreen()`, called on+ every attach, because left on the previous controller they would simply be absent on the new one.+ The launch is a persistent notification that carries whether screen control is up and the way back+ to Settings — posted by the body, so it survives the state it describes. The launcher is the one+ context allowed to claim the microphone foreground-service type, because a microphone-typed service+ cannot be created from the background and every other starter is background.+- **The screen can be read with `MediaProjection` when accessibility is gone.** The split stopped a+ revoked service from taking the whole assistant, except that the assistant went **blind** — every+ way of reading a screen went through the accessibility service, so "what is this screen?" was the+ one question it could not answer on exactly the devices this project exists for. Deliberately a+ fallback and deliberately weaker: `screen.screenshot` only, because `look_region` and `zoom_aim`+ exist to zoom a target for a tap and `dispatchGesture` has no non-root substitute, so there is no+ tap on this path. The result says which way in it used, and carries no aim grid and no element list+ — handing the brain a picture it believes it can aim with would be worse than handing it fewer+ fields. Asked for only while it is the only option: the consent is a notification action, offered+ only when Andee is blind and has no capture, and `ACTION_ACCESSIBILITY_SETTINGS` stays the first+ action because the projection buys reading, not acting.+- **Every mood has a `Pose` on top of its `Face` row** — a wink, eyes that look up and aside, lowered+ or worried lids, a squashed resting body, two puffy hands (open, fist, pointing) and pop-in props.+ Five gesture moods (wink, wave, protect, celebrate, rest) can be asked for by name or synonym in+ the model's own text, and the prompt says to keep them rare. Only a look with `BallLook.gestures`+ reads it, so the other five characters are unchanged. There is deliberately no open mouth:+ cross-fading it with the thin smile drew both at once and one poked through the other.+- **The default ball is now the blue horned Andee** — a cobalt head with curled horns and glassy+ eyes, first in `BallLooks.ALL`, so a fresh install and a factory reset both land on it. Its numbers+ were measured off the reference picture through the renderer's own camera rather than eyeballed.+ The launcher icon set, README covers, social previews and org avatar are regenerated from the same+ source art.+- **The CodeFlying per-user token is read from `assets/andee_key.txt`**, with `BuildConfig` as the+ fallback for dev builds. Production APKs are built once from shared source and the per-user `kft_`+ token is written into that asset at package time, so the base APK stays identical across users and+ the Gradle build cache no longer misses per user.+- **`-PdbgSuffix=` builds a parallel package** for device verification. The package on the tablet was+ signed with a key this checkout does not have, so `pm install -r` was refused and the only+ alternative was uninstalling — which throws away chat history, notebook and vault. Off unless the+ property is passed, so ordinary builds are byte-identical.+- Debug builds gain `BallLabActivity`, which shows one mood on a plain background for screenshots.+### Changed- **The version check moved to `https://api.heyandee.com`, from `https://andee.kuafuai.net`.**@@ -43,6 +99,86 @@ hash into `versionName` at build time would close this hole; it is not implementwhich is the intended failure rather than a fault to report. The service itself was checked beforethe switch: the new host answers `GET /api/version` with the same envelope, and the same `data`fields the client parses.+- **The self-check page now stays up until the user closes it.** It is a list, and a user with five+ rows works through them one at a time — out to a Settings screen and back for each — but the page+ used to hand the screen to the assistant as soon as it could draw one, which happens on the *first*+ of those returns, so the list was taken away after row one. On a page whose whole job is to walk+ somebody down a list, the user is the only one who knows when the list is finished. Closing it with+ 完成 puts the assistant back. Two surfaces fighting for the screen was the real bug underneath and+ it stays fixed by the same move: nothing unfolds a card while the page is up.+- **Closing a page puts the assistant back at full size, unconditionally.** The fold that makes room+ for a page is ours — our card is a fullscreen opaque overlay and would cover it — so undoing it is+ ours too, and it was missing from `pageClosed`. The first cut restored the card only if it had been+ fullscreen when the page went up; the report was the other way round, and closing the self-check+ card drew the same complaint and got the same answer.+- Both READMEs point their CodeFlying links at the `/andee` one-click landing page rather than the+ generic official site, so every jump lands on the Andee entry page.++### Fixed++- **`ui.show_html` no longer needs accessibility**, which it had started to. `awaitUncovered()` asked+ its question through `requireScreen()`, and `awaitUncovered` runs off `ensureCompact()` — which+ `ui.show_html` calls too, because our card would cover the page it is about to draw. So with+ accessibility off, the one tool that draws a page answered "accessibility is off" and the assistant+ told the user it could not show them anything. Introduced by `f364490`, which turned a+ nullable-but-always-present field into a throwing provider and rewrote every call site+ mechanically; the other sixteen are inside `screen.*` branches and are meant to throw. Returning+ early is also right on the merits: the wait exists so that a *tap* lands on the app rather than on+ the folded card, and there are no taps without accessibility.+- **The self-check no longer mistakes a re-creation for a launch.** This page sends the user out+ through its own rows, so the platform killing it while they are away and rebuilding it on return is+ routine here rather than an edge case: grant the overlay, come back to a restarted Activity, and it+ used to unfold the card and finish before a single row was drawn. `savedInstanceState != null` is+ what tells the two apart. A related report — "I granted it, came back, it still said no, then+ re-check was fine" — is the platform's answer about a setting changed seconds ago not being ready+ in the frame the user returns on: the notification-access row is `OK` only once the listener is+ actually bound, and the read that finds it unbound is also the one that requests the rebind.+ `settleRecheck` takes two more local passes and stops, because a page that keeps re-reading itself+ is a page whose numbers stop meaning anything. (The retry is reasoned from the code path, not+ measured: writing the notification listener into `enabled_notification_listeners` does not stick,+ so the state cannot be manufactured from adb.)+- **The body stays off the screen while the check page is up.** The report was "the check said the+ overlay was off, I granted it, came back, and I was on the assistant instead of the check" — the+ check was never gone, the page was still the resumed Activity with the assistant's fullscreen card+ painted over it. Two things put it there, both in the body's birth: `window.setCompact(false)`, and+ `window.show()`, which is subtler — this window is fullscreen *even when the ball is compact* and+ swallows the touches it does not use, so a page with a ball in the corner is a page whose buttons+ cannot be pressed (measured: 完成 did nothing). Telling a fresh launch apart from a return needed+ `SelfCheck.isPageOpen`, written down in the prefs file the startup check already uses. The startup+ self-check card is skipped while the page is up as well, because that page *is* the list.+- **A just-fixed row stops showing as red when the card resumes.** The card's own rows send the user+ out to a system screen and the only thing that happened on the way back was a language comparison,+ so a row the user had just fixed stayed red until they found 重新检查 — and a stale red row reads as+ "the fix did not take". An Activity gets a resume callback and an overlay does not, which is why+ this is a change to one host rather than to the list; it is local-only on purpose, because the+ probes hold the card open for seconds. The first resume is skipped (a full pass just ran), the+ three probed rows keep their last reading (`SelfCheck.mergeLocal`), and `render` restores the+ scroll position — which only started to matter once redraws stopped being deliberate.+- **A perch slide dragged the whole card off-screen, and a voice failure repeated forever.**+ A card held by the folded ball makes the window card-sized, so a perch slide (task start, page up)+ dragged the whole card into the bottom-right corner, half off-screen and untouchable; the perch+ entry points now take the signboard down first. Separately, the auto follow-up mic reopens after+ every answer, so a device with no voice set up raised the same failure card and scrollback row each+ time — now shown once per failure streak, reset by a working voice turn, leaving settings, or the+ user pressing the ball.+- **`screen.screenshot`'s schema claimed something false.** It opened "every screenshot arrives with+ an 8x12 AIM GRID drawn on it" and promised the element list, both exactly untrue on the projection+ path — which is the only screen tool that still works there. The runtime `note` said so, but the+ schema is what the model reads *before* deciding to call it.+- **Three documents still described the pre-split architecture.** `README.md` and `README.zh-CN.md`+ said "this app *is* the accessibility service" and pointed a reader at `ScreenBodyService.kt` as+ the file to read first — both false since `f364490`, which is the whole point of the split. The+ permission table in `docs/permissions.md` / `.zh-CN.md` said of accessibility that "every screen+ action errors", which stopped being true in `82f08db`: `screen.screenshot` has a fallback and the+ row now says so, along with what the fallback cannot do.++### Removed++- `tools/check_launcher_icon.py`, `tools/cosmic_backdrop.py` and the old `make_launcher_icon.py`,+ replaced by a rewritten generator built on `tools/andee_head.py`. All three were written for the+ previous character and a star-field backdrop, neither of which is in use any more.+ `tools/make_social_preview.py` generates the social previews, both README covers and the org avatar+ from the same source art.## [0.2.0] - 2026-10-10diff --git a/DISCLAIMER.md b/DISCLAIMER.mdindex 698e2c7..6fa4365 100644--- a/DISCLAIMER.md+++ b/DISCLAIMER.md@@ -46,7 +46,7 @@ The second row needs spelling out: **tool results are part of the conversation.***So "local mode" does not mean "processed locally."** Local mode swaps the hub for whichever provider you typed in. It does not keep a single byte on the device.Therefore:-- *"We do not monitor or store your data"* — **mostly true, but do not overclaim it.** No database, no behavioural analysis, and no reading of anything you send; the one exception is the version check, which tells us that some device of some model on some IP is running 0.2.0.+- *"We do not monitor or store your data"* — **mostly true, but do not overclaim it.** No database, no behavioural analysis, and no reading of anything you send; the one exception is the version check, which tells us that some device of some model on some IP is running 0.3.0.- *"Your data never leaves the device"* — **false. Do not claim it.**## 3. What it can actually do (not hypotheticals — current state of the code)diff --git a/DISCLAIMER.zh-CN.md b/DISCLAIMER.zh-CN.mdindex 742ee6d..a97d42f 100644--- a/DISCLAIMER.zh-CN.md+++ b/DISCLAIMER.zh-CN.md@@ -45,7 +45,7 @@**因此"本机模式"不等于"本地处理"** —— 本机模式只是把大脑从 hub 换成了你填的那个服务商。它没有让数据留在设备上,一个字都没有。所以:-- 「我们不会监控和存储您的数据」——**基本成立,但别把话说满**。不落库、不做行为分析、不看你发的内容;唯一的例外是版本自检,它让我们知道"某个 IP 上,有一台某个型号的设备在跑 0.2.0"。+- 「我们不会监控和存储您的数据」——**基本成立,但别把话说满**。不落库、不做行为分析、不看你发的内容;唯一的例外是版本自检,它让我们知道"某个 IP 上,有一台某个型号的设备在跑 0.3.0"。- 「您的数据不会离开设备」——**不成立,而且不要说**。## 3. 它真的能做什么(以下都不是危言耸听,是代码里的现状)diff --git a/README.md b/README.mdindex 9c9667c..a002fbd 100644--- a/README.md+++ b/README.md@@ -84,7 +84,7 @@ they are yours like any other — edit them, or delete them:- **Gets to know you.** A private notebook, a real scheduler, a nightly review of its ownconversations, and **scenes** — ways of working it proposes after doing the same kind of thing withyou a few times.-- **Has a character.** Five looks, fourteen moods, and a face the model picks itself, sentence by+- **Has a character.** Six looks, nineteen moods, and a face the model picks itself, sentence bysentence.- **Holds lines a prompt cannot talk it out of.** A stranger's notification cannot unlock the vault orgrant it new permissions — that refusal is in the dispatcher, not in the prompt.@@ -173,7 +173,7 @@ worth turning into a scene next time, and ends empty-handed rather than inventin### Face — a character, not a theme-**9. Five looks, fourteen moods, and a face it chooses.**+**9. Six looks, nineteen moods, and a face it chooses.**奶油 Cream, 八戒 Pigsy, 贱贱兔 Rascal, 憨憨熊 Bear and 小恶魔 Imp, drawn live in hand-written OpenGLES. Fourteen moods (`ui/ball/Mood.kt`) arbitrate between what it feels, what the voice pipeline isdoing, and what work is in flight, plus an idle fidget pool that never repeats the same gesture twice@@ -284,8 +284,8 @@ To build it yourself instead:> - **JDK 17–20.** AGP 8.3.1 needs 17+; the Gradle 8.4 wrapper cannot run on 21+ (Android Studio's> bundled JBR 25 is rejected with `Unsupported class file major version 69`)> - Android SDK with platform 34 and build-tools 34.0.0-> - A real device. This app *is* the accessibility service; an emulator can run it, but almost-> nothing it does is meaningful there+> - A real device. The body is a foreground service and only the screen half is an accessibility+> service; an emulator can run it, but almost nothing it does is meaningful there```bash./gradlew clean :app:assembleDebug # → app/build/outputs/apk/debug/app-<abi>-debug.apk@@ -532,7 +532,7 @@ Pure Kotlin, no Compose; the whole thing hangs off two pillars, `WindowManager`| minSdk | 30 | Android 11 — `AccessibilityAction.ACTION_IME_ENTER` and `takeScreenshot` are both API 30+ || Java / Kotlin JVM target | 1.8 | `sourceCompatibility` 1.8, `jvmTarget = '1.8'` || **Build JDK** | **17–20** | see [Which JDK](#which-jdk) — this is the step people get stuck on |-| versionCode / versionName | 3 / 0.2.0 | see [CHANGELOG.md](CHANGELOG.md) for the policy |+| versionCode / versionName | 4 / 0.3.0 | see [CHANGELOG.md](CHANGELOG.md) for the policy || applicationId / namespace | `net.kuafuai.andee` | never changed from the template. It affects nothing |**Runtime dependencies** (`app/build.gradle`):@@ -824,11 +824,12 @@ that is matched against system text **can never be translated**.```app/ the Android app (Kotlin, no Compose)src/main/java/net/kuafuai/andee/- ScreenBodyService.kt the accessibility service — read this first+ BodyCoreService.kt the body: ball, card, voice, brain socket, scrollback — read this first+ ScreenBodyService.kt the accessibility service — a shim that hands over the screen capabilitybrain/ the agent loop — LocalBrain, LocalPrompt (the character's rulebook:§§1–10 the job, §11 scenes, §12 the persona, §13 the active scene),and NotificationTriage- ui/ball/ the face — Mood (14 moods + idle fidgets), BallLook (five looks, each a character)+ ui/ball/ the face — Mood (19 moods + idle fidgets), BallLook (six looks, each a character)net/ BodyWsServer, BodyWsClient, ToolSchemas (the tool definitions)device/ screen control, permissions, vault, robot dogconfig/ VoiceConfig (settings), Notebook (memories, todos, scenes — encrypted)@@ -952,7 +953,7 @@ Read it before redistributing: **the ML Kit barcode SDK and the `play-services-*open-source**, and the barcode model is fetched from Google at runtime.See [CHANGELOG.md](CHANGELOG.md) for what changed and for the versioning policy. The latest release is-**`v0.2.0`** — pre-1.0 on purpose, because the wire contract and the build flags are still moving.+**`v0.3.0`** — pre-1.0 on purpose, because the wire contract and the build flags are still moving.## Related documentsdiff --git a/README.zh-CN.md b/README.zh-CN.mdindex 785fcc4..bfad516 100644--- a/README.zh-CN.md+++ b/README.zh-CN.md@@ -79,7 +79,7 @@ https://github.com/user-attachments/assets/866e8333-e97b-4bf5-9525-540f9fdb01cd[docs/permissions.zh-CN.md](docs/permissions.zh-CN.md)。- **会越来越懂你。** 私人笔记本、真的定时任务、没人时自己复盘对话,还有**情景** —— 同一类事陪你做过几次之后,它会主动提议"要不要存成一个情景"。-- **有性格。** 五个形象、十四种情绪,表情由模型自己挑,一句话说到一半都能换脸。+- **有性格。** 六个形象、十九种情绪,表情由模型自己挑,一句话说到一半都能换脸。- **有些底线,提示词说不动它。** 陌生人发来的一条通知,打不开保险箱、也不能替你给它新的权限 ——这道拒绝写在调度器里,不在提示词里。@@ -154,7 +154,7 @@ Android 13 及以上,它通过无障碍服务自带的输入通道打字 —### 脸 —— 性格,不是主题皮肤-**9. 五个形象、十四种情绪,表情它自己挑。**+**9. 六个形象、十九种情绪,表情它自己挑。**奶油、八戒、贱贱兔、憨憨熊、小恶魔,全部用手写 OpenGL ES 实时绘制。十四种情绪(`ui/ball/Mood.kt`)在"他的感受 / 语音管线在干什么 / 手头有什么活儿"之间仲裁;另有一组待机小动作,**从不连续重复同一个** —— *"重复看起来像动画卡住了,不像性格"*。现在表情由模型**在句子中间**@@ -251,7 +251,7 @@ Android。跟它要一个 Andee,它会交给你一个**已经配好令牌**的> - **JDK 17–20。** AGP 8.3.1 要 17+;Gradle 8.4 的 wrapper 跑不了 21+(Android Studio 自带的> JBR 25 会被直接拒绝:`Unsupported class file major version 69`)> - Android SDK:platform 34 + build-tools 34.0.0-> - **真机。** 这个应用本身就是那个无障碍服务;模拟器能跑,但它几乎什么都干不了+> - **真机。** 身体是前台服务,屏幕那一半才是无障碍服务;模拟器能跑,但它几乎什么都干不了```bash./gradlew clean :app:assembleDebug # 产物 app/build/outputs/apk/debug/app-<abi>-debug.apk@@ -387,7 +387,7 @@ OpenAI 兼容端点(`llm_api_key`,默认 `https://api.deepseek.com`)。**| minSdk | 30 | Android 11 —— 因为要用 `AccessibilityAction.ACTION_IME_ENTER`(API 30+)和 `takeScreenshot`(API 30+) || Java / Kotlin JVM target | 1.8 | `sourceCompatibility` 1.8、`jvmTarget = '1.8'` || **构建用 JDK** | **17–20** | 见[配 JDK](#配-jdk),这是最容易卡住的一步 |-| versionCode / versionName | 3 / 0.2.0 | 策略见 [CHANGELOG.md](CHANGELOG.md) |+| versionCode / versionName | 4 / 0.3.0 | 策略见 [CHANGELOG.md](CHANGELOG.md) || applicationId / namespace | `net.kuafuai.andee` | 从模板里没改,不影响功能 |**运行库依赖**(`app/build.gradle`):@@ -733,10 +733,11 @@ adb usb # 想切回来时执行```app/ Android 应用(Kotlin,无 Compose)src/main/java/net/kuafuai/andee/- ScreenBodyService.kt 无障碍服务 —— 第一个该读的文件+ BodyCoreService.kt 身体:球、卡片、语音、大脑连接、回溯 —— 第一个该读的文件+ ScreenBodyService.kt 无障碍服务 —— 只负责转交屏幕能力的壳brain/ 智能体循环 —— LocalBrain、LocalPrompt(角色的行为准则:§1–§10 是活儿,§11 情景,§12 人格,§13 当前情景)、NotificationTriage(通知分诊)- ui/ball/ 那张脸 —— Mood(14 种情绪 + 待机小动作)、BallLook(五个形象,每个都是一个角色)+ ui/ball/ 那张脸 —— Mood(19 种情绪 + 待机小动作)、BallLook(六个形象,每个都是一个角色)net/ BodyWsServer、BodyWsClient、ToolSchemas(工具定义)device/ 屏幕控制、权限、保险箱、机器狗config/ VoiceConfig(设置)、Notebook(记忆、待办、情景 —— 加密存储)@@ -844,7 +845,7 @@ CLAUDE.md 给 AI 编码助手看的架构说明(英文)随包分发的第三方组件清单在 [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md)。再分发之前请先看:**ML Kit 扫码 SDK 和 `play-services-*` 不是开源许可**,而且扫码模型是运行时从 Google 拉的。-改了什么、以及版本号策略见 [CHANGELOG.md](CHANGELOG.md) —— 当前版本是 **`v0.2.0`**,故意停在+改了什么、以及版本号策略见 [CHANGELOG.md](CHANGELOG.md) —— 当前版本是 **`v0.3.0`**,故意停在pre-1.0:线上协议和构建开关都还在动。## 相关文档diff --git a/app/build.gradle b/app/build.gradleindex 3119ca4..593f3ce 100644--- a/app/build.gradle+++ b/app/build.gradle@@ -34,8 +34,8 @@ android {applicationId "net.kuafuai.andee"minSdk 30targetSdk 34- versionCode 3- versionName "0.2.0"+ versionCode 4+ versionName "0.3.0"testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"diff --git a/docs/permissions.md b/docs/permissions.mdindex 7ce6867..3a0725b 100644--- a/docs/permissions.md+++ b/docs/permissions.md@@ -37,7 +37,7 @@ The "What you get" column is the copy the app actually shows (`dev_perm_feature_| Permission | What you get | Tools | What happens if you refuse ||---|---|---|---|| Overlay<br>`SYSTEM_ALERT_WINDOW` | Overlay (my face) | The ball, the subtitles, the settings panel itself | **Nothing is visible when the app starts.** The only permission that is "off means completely unusable" |-| Accessibility service<br>`BIND_ACCESSIBILITY_SERVICE` | See the screen, tap the UI, type | `get_screen_element` / `tap_screen_element` / `swipe_by_coordinates` / `type_text` / `submit_input` / `take_screenshot` — all of `screen.*` | **Every screen action errors.** This is the core capability; the other permissions exist around it |+| Accessibility service<br>`BIND_ACCESSIBILITY_SERVICE` | See the screen, tap the UI, type | `get_screen_element` / `tap_screen_element` / `swipe_by_coordinates` / `type_text` / `submit_input` / `take_screenshot` — all of `screen.*` | **Every `screen.*` call errors except `screen.screenshot`**, which has a `MediaProjection` fallback: reading only, no aim grid, no element list, no tapping. Acting on the screen is what this permission buys || Microphone<br>`RECORD_AUDIO` | Voice, and the wake word the user enrolls | Streaming ASR + on-device wake-word matching | Tapping the ball does nothing; wake-word listening does not start (and, as a side effect, the Android 12+ green dot never appears) || Notification access<br>`BIND_NOTIFICATION_LISTENER_SERVICE` | Notification awareness (know when you get messages) | `get_notifications` | It will not know about incoming messages on its own; nothing else is affected || Location<br>`ACCESS_FINE_LOCATION` | Location (where you are / navigation) | `get_location` | "Where am I" cannot be answered |diff --git a/docs/permissions.zh-CN.md b/docs/permissions.zh-CN.mdindex 3cf753c..3922d9a 100644--- a/docs/permissions.zh-CN.md+++ b/docs/permissions.zh-CN.md@@ -37,7 +37,7 @@| 权限 | 用户得到什么 | 对应工具 | 你拒绝了会怎样 ||---|---|---|---|| 悬浮窗<br>`SYSTEM_ALERT_WINDOW` | 悬浮窗(我的脸) | 球、字幕、设置面板本身 | **应用起来什么都看不到。** 这是唯一一个"不开就完全不能用"的 |-| 无障碍服务<br>`BIND_ACCESSIBILITY_SERVICE` | 看屏幕、点界面、打字 | `get_screen_element` / `tap_screen_element` / `swipe_by_coordinates` / `type_text` / `submit_input` / `take_screenshot` 等全部 `screen.*` | **所有屏幕操作报错。** 这是核心能力,其它权限都是围着它转的 |+| 无障碍服务<br>`BIND_ACCESSIBILITY_SERVICE` | 看屏幕、点界面、打字 | `get_screen_element` / `tap_screen_element` / `swipe_by_coordinates` / `type_text` / `submit_input` / `take_screenshot` 等全部 `screen.*` | **除 `screen.screenshot` 外,所有 `screen.*` 都报错** —— 截屏有 `MediaProjection` 兜底:只能读,没有瞄准网格、没有元素列表、不能点。这条权限买的是「能操作屏幕」 || 麦克风<br>`RECORD_AUDIO` | 语音说话、用户自己录的唤醒词 | 流式 ASR + 本机唤醒词匹配 | 点球没反应;唤醒词监听不启动(顺带:Android 12+ 的绿点也不会出现) || 通知监听<br>`BIND_NOTIFICATION_LISTENER_SERVICE` | 通知感知(微信来消息我知道) | `get_notifications` | 来消息不会主动知道;其余功能不受影响 || 位置<br>`ACCESS_FINE_LOCATION` | 位置(在哪/导航) | `get_location` | 问"我在哪"答不出来 |diff --git a/docs/releases/v0.3.0.md b/docs/releases/v0.3.0.mdnew file mode 100644index 0000000..7c5d4b0--- /dev/null+++ b/docs/releases/v0.3.0.md@@ -0,0 +1,154 @@+# v0.3.0++**The assistant stops living inside the accessibility service.** Everything else in this release is+smaller than that one change, and it is the reason this is a minor bump rather than a patch: a ROM+that revokes accessibility now costs one capability instead of the whole app.++> **No APK is attached to this release, on purpose.** The release build type has no `signingConfig`+> and there is no keystore in this repository, so `assembleRelease` emits+> `app-<abi>-release-unsigned.apk`, which will not install until you sign it. Shipping a binary a+> reader cannot install would be worse than shipping none. Build it yourself — see *Install* below.++## Highlights++- **Losing accessibility no longer loses the assistant.** The body — ball, card, microphone, ASR/TTS,+ brain socket, scrollback, todos — used to be built inside an `AccessibilityService`. A ROM that+ revoked accessibility (HyperOS, observed) took all of it: no ball, no way to talk, no way back+ except knowing which switch to find. The body is now a foreground service, and the accessibility+ service is a shim that hands the screen capability over and takes it back.+- **The screen can still be read when accessibility is gone.** `MediaProjection` is the platform's+ other way in — one consent dialog, asked from the notification and only when Andee is blind.+ Deliberately weaker: `screen.screenshot` only, no aim grid, no element list, no tapping.+- **The self-check page stays up until you close it.** It used to hand the screen to the assistant on+ the first return from a Settings screen, taking the list away after row one. A row you just fixed+ also stops showing as red.+- **Every mood has a pose now** — a wink, eyes that look up and aside, two puffy hands and pop-in+ props — and five gesture moods can be asked for by name.+- **The default look is the blue horned Andee**, with the launcher icon, README covers, social+ previews and org avatar regenerated from the same source art.+- **Closing a page always puts the assistant back at full size**, whatever shape the card was in+ before.++## What's Changed++### Added++- **The body is a foreground service (`BodyCoreService`); the accessibility service is a shim**+ (`ScreenBodyService`). `screen.*` now goes through a provider, so a call with no accessibility+ throws a readable error instead of holding a controller built around a dead binding. The launch is+ a **persistent notification** that carries whether screen control is up and the way back to+ Settings — posted by the body, so it survives the state it describes. `-PdbgSuffix=` builds a+ parallel package for device verification, so a test build no longer requires uninstalling (which+ would throw away chat history, notebook and vault).+- **`MediaProjection` screen reading.** One consent dialog from the notification's second action, and+ only while it is the only option; `ACTION_ACCESSIBILITY_SETTINGS` stays the first action, because+ the projection buys reading, not acting.+- **Ball expressions**: a `Pose` layer on top of each `Face` — wink, looking up and aside, lowered+ lids, a squashed resting body, two hands (open, fist, pointing) and pop-in props. Five gesture+ moods (wink, wave, protect, celebrate, rest) can be requested by name or synonym in the model's own+ text; the prompt says to keep them rare. Only a look with `BallLook.gestures` reads it, so the+ older characters are unchanged.+- **The blue horned Andee is the default look**, first in `BallLooks.ALL`, so a fresh install and a+ factory reset both land on it. Its numbers were measured off the reference picture through the+ renderer's own camera rather than eyeballed.+- **The CodeFlying per-user token is read from `assets/andee_key.txt`**, with `BuildConfig` as the+ fallback for dev builds, so the base APK is identical across users and the Gradle build cache no+ longer misses per user.+- Debug builds gain `BallLabActivity` for mood screenshots.++### Changed++- **The version check moved to `https://api.heyandee.com`** from `https://andee.kuafuai.net`. The old+ host was on the mainland, where an unfiled domain is answered with a 403 block page that arrives in+ the app as 查不到. The address is still a hardcoded constant and still the only one the user did not+ configure. A fresh DNS record is not everywhere at once, so on the wrong resolver that row reads+ 查不到 until it propagates — intended, not a fault to report.+- **Closing a page puts the assistant back at full size, unconditionally.** The fold that makes room+ for a page is ours, so undoing it is ours too, and it was missing from the model's route.+- Both READMEs point their CodeFlying links at the `/andee` one-click landing page.++### Fixed++- **`ui.show_html` no longer needs accessibility.** `awaitUncovered()` asked its question through+ `requireScreen()`, so with accessibility off the one tool that draws a page answered "accessibility+ is off" and the assistant told the user it could not show them anything. Introduced by the split,+ which rewrote every call site mechanically; this one was on a shared path and should not have+ thrown.+- **The self-check no longer mistakes a re-creation for a launch.** This page sends the user out+ through its own rows, so the platform killing it while they are away is routine: returning used to+ unfold the card and finish before a single row was drawn. `savedInstanceState != null` tells the+ two apart.+- **The body stays off the screen while the check page is up.** The page was still the resumed+ Activity with the assistant's fullscreen card painted over it — and that window is fullscreen even+ when the ball is compact, so it swallowed touches and 完成 did nothing.+- **A just-fixed row stops showing as red on resume.** Returning from a Settings screen used to+ compare languages and nothing else, so a row the user had just fixed stayed red until they found+ 重新检查.+- **A perch slide dragged the whole card off-screen**, half untouchable, and a voice failure on a+ device with no voice set up repeated forever. Both fixed.+- **`screen.screenshot`'s schema claimed an aim grid and an element list**, both exactly untrue on+ the projection path — which is the only screen tool that still works there.+- **Three documents still described the pre-split architecture.** Both READMEs said "this app *is*+ the accessibility service" and pointed at the wrong file to read first; the permission table said+ of accessibility that "every screen action errors", which stopped being true when the+ `MediaProjection` fallback landed. The look and mood counts in both READMEs were also stale (five+ looks and fourteen moods, against six and nineteen in the code).++### Removed++- `tools/check_launcher_icon.py`, `tools/cosmic_backdrop.py` and the old `make_launcher_icon.py`,+ replaced by a generator built on `tools/andee_head.py`. All three were written for the previous+ character and a star-field backdrop, neither of which is in use any more.++## Known issues++- **The foreground-service start path and the microphone promotion were not verified on a device.**+ The split was verified by assembling and by 37 unit tests; the two things that need a real ROM are+ the foreground-service start and claiming the microphone type from the launcher.+- **A build with CodeFlying compiled in but no API key can still raise the wrong complaint.** The+ availability test looks at `CODEFLYING_ENABLED` and the domain rather than the key. Carried over+ from `v0.1.1` and `v0.2.0`; not fixed by this release.+- **`settleRecheck`'s retry is reasoned from the code path, not measured.** Writing the notification+ listener into `enabled_notification_listeners` does not stick, so the "granted but not bound" state+ cannot be manufactured from adb.+- **`assets/andee_key.txt` is tracked by git and is not in `.gitignore`.** It ships empty, which is+ correct — the per-user `kft_` token is written in at package time. But a local build that fills it+ in would be a key in a tracked file, and nothing currently stops that being committed.+- The two issues `v0.1.0` listed are **unchanged and untouched in this release**:+ `tools/verify_faces_lab.py` still reports 7/16 assertions passing against the committed+ `reports/ball-faces-lab.html`, and the debug WebSocket server (`net/BodyWsServer`) still binds+ `0.0.0.0:9008` with no authentication (documented in `SECURITY.md`).++## Before you install++Read **[DISCLAIMER.md](../../DISCLAIMER.md)** and+**[docs/acceptable-use.md](../acceptable-use.md)** first. This app asks for accessibility, overlay,+notification access, SMS and call log, and it can complete a payment by tapping. The only guardrail on+that path is Android's `FLAG_SECURE`; the prompt-level checks on risky actions are instructions to the+model, not enforcement.++## Install++Android 11+ (`minSdk 30`), arm64-v8a for anything bought in the last several years. There is no binary+in this release; build one:++```bash+git clone https://github.com/kuafuai/andee+cd andee+git checkout v0.3.0+./gradlew :app:assembleDebug # installs as-is, signed with the debug certificate+```++`assembleRelease` needs your own keystore — the repo has none, so it produces an unsigned APK. Either+way the APK is **per-ABI** (`splits` in `app/build.gradle`), so pick the file that matches the device.+Full from-scratch setup is in the README's **Provisioning** section. Then, in this order: grant+Overlay → enable Accessibility → tap the ball → put in your own keys under ⚙.++**Upgrading from v0.2.0:** `versionCode` moves `3 → 4`, so this installs over it normally. You will+now see a **persistent notification** — that is the body, and it is what keeps the assistant alive+when accessibility is taken away. The accessibility service keeps the same class name, so an existing+grant survives the upgrade. Four foreground-service permissions are added to the manifest; they are+install-time, with no dialog, and they exist so the body can run and so the screen can be read+without accessibility.++**Full Changelog**: https://github.com/kuafuai/andee/compare/v0.2.0...v0.3.0