diff --git a/phone/README.md b/phone/README.md index b7d1bfbd..4648ecac 100644 --- a/phone/README.md +++ b/phone/README.md @@ -101,8 +101,30 @@ Home does not receive privileged ROM services without satisfying their existing package/signature checks. The new build-plan and receipt paths are unit tested and dry-run checked. -APK and device validation remain separate: [App Studio milestone 1](../docs/adr/0006-app-studio-on-the-phone.md) -is in progress; the full phone authoring loop is not yet available. +APK and device validation remain separate. [App Studio milestone 1](../docs/adr/0006-app-studio-on-the-phone.md) +is merged: a development build gives the `studio.*` tools to the system +agent, and to an app's own agent for that app alone; the full phone authoring +loop is not yet available. + +**Using App Studio today.** It exists in development builds only (a release +Home compiles it out), so it takes a developer Home on the phone: build one as +above, install its Home APK beside the store Home with `adb install`, then turn +developer mode on in that build (Settings → About phone, tap Build number seven +times, open Developer options, type `turn on developer mode` and choose Turn +on). From then on everything happens on the phone. In the system agent's chat, +ask it to work on an app bundle in its workspace: with the studio tools it +checks the bundle, opens a live preview, taps and types into it, reads the +screenshots and the widget tree, fixes the script, installs the app as a +launcher tile whose state survives a restart, and uninstalls it on request +([the walkthrough](../docs/architecture-walkthrough.md#follow-app-studio-from-the-agent-to-a-working-app) lists the tools). A computer is needed only to build +and install that developer Home and, if you want device evidence, to run the +two device harnesses in `tools/` (the studio device probe below and +`studio-flow-device-test.py`). A developer-mode Home APK published with a Home +release would remove the build step; it would still be a download and an +install, since the updater refuses test packages. What no build offers yet is +the experience for someone who is not a developer: describing an app and +getting one made on the phone. That is what ADR 0006's remaining slices cover. + The [studio device probe](../tools/studio-device-probe.py) checks denial, light/dark PNG output and background cancellation in that separate package. It needs a `--dev-mode` APK built with `MAKEPAD_FORCE_DEBUGGABLE=1` so `run-as` can provision test fixtures. The probe restores developer settings and returns to Home; it neither installs APKs nor tests model image delivery. Resolve startup permission prompts before running the probe; rendering does not need location access, which can remain denied. Launch fixtures (the `studio-render:` and `studio-flow:` test actions) are accepted only from the package's private `files/studio-fixture/` folder, where the probe writes them. Device execution was verified on a stock Xiaomi in October 2026 ([evidence](../docs/studio/xiaomi-revalidation.md)). The manifest's `dev.makepad.android.APPLICATION_EXTENSION` metadata keeps diff --git a/phone/README.zh-CN.md b/phone/README.zh-CN.md index c2497ae0..4bcf268b 100644 --- a/phone/README.zh-CN.md +++ b/phone/README.zh-CN.md @@ -52,7 +52,10 @@ rom/scripts/build-home.sh --variant standalone --development \ Home 默认使用 `dev.makepad.octosense`。要在已安装的应用旁构建测试 Home,请给上面的独立版命令加上 `--package-name dev.makepad.octosense.studio`。同时使用两个选项时,默认输出为 `rom/out/home/standalone-dev-mode/dev.makepad.octosense.studio/`。只安装测试 Home APK;配套 Bridge 保持原包名,不能替换设备上已安装的 Bridge。独立测试 Home 仍须满足现有包名与签名检查,才可访问 ROM 的特权服务。 -新增构建计划和回执路径已通过单元测试与 dry-run 检查;APK 和设备验证另行进行。[App Studio 里程碑 1](../docs/adr/0006-app-studio-on-the-phone.md) 正在实现,完整的手机应用创作循环尚不可用。 +新增构建计划和回执路径已通过单元测试与 dry-run 检查;APK 和设备验证另行进行。[App Studio 里程碑 1](../docs/adr/0006-app-studio-on-the-phone.md) 已合并:开发版让系统 Agent(以及应用自己的 Agent,仅限该应用)拥有 `studio.*` 工具;完整的手机应用创作循环尚不可用。 + +**目前如何使用 App Studio。** 它只存在于开发版中(发布版 Home 在编译时就去掉了它),因此手机上需要一个开发版 Home:按上文构建,用 `adb install` 把它的 Home APK 装在商店版 Home 旁边,然后在这个开发版 Home 里开启开发者模式(设置 → 关于手机,连点七次版本号,进入开发者选项,输入 `turn on developer mode` 并选择 Turn on)。此后一切都在手机上进行。在系统 Agent 的聊天中让它处理其工作区里的某个应用包:借助 studio 工具,它检查应用包、打开实时预览、在其中点按和输入、读取截图和控件树、修正脚本、把应用安装为重启后状态仍在的启动器磁贴,并按要求卸载([代码导读](../docs/architecture-walkthrough.zh-CN.md#从-agent-调用跟到-app-studio-中可运行的应用)列出了这些工具)。只有两件事需要电脑:构建并安装那个开发版 Home,以及需要设备证据时运行 `tools/` 中的两个设备测试工具(下文的 Studio 设备探针和 `studio-flow-device-test.py`)。如果某次 Home 发布附带开发者模式的 Home APK,就可以省去构建这一步;但那仍是下载后安装,而不是更新,因为更新器拒绝测试包。目前还没有任何构建提供面向非开发者的体验:在手机上描述一个应用,然后拿到做好的应用;这是 ADR 0006 余下几个阶段要做的事。 + [Studio 设备探针](../tools/studio-device-probe.py) 在该独立测试包中检查权限拒绝、浅色/深色 PNG 输出和切入后台后的取消。它需要使用 `MAKEPAD_FORCE_DEBUGGABLE=1` 构建的 `--dev-mode` APK,让 `run-as` 能写入测试夹具。探针会恢复开发者设置并返回主屏;它不安装 APK,也不测试模型能否收到图片。运行前须先处理首次启动的权限提示;渲染不需要定位权限,可以保持拒绝。启动夹具(`studio-render:` 与 `studio-flow:` 测试动作)只接受位于该包私有目录 `files/studio-fixture/` 下的文件,探针也把夹具写在那里。这些设备检查已于 2026 年 10 月在一部普通小米手机上通过(见[证据](../docs/studio/xiaomi-revalidation.md))。 清单中的 `dev.makepad.android.APPLICATION_EXTENSION` 元数据让应用 ID 改变后