Give your old Android phone a second life — as a silent, low-power Linux dev server running AI agents. No root required.
让吃灰的旧安卓手机重获新生——变成一台静音、低功耗、能跑 AI Agent 的 Linux 开发服务器。无需 root。
A reproducible recipe (plus a ZCode skill, scripts, and a battle-tested troubleshooting guide) for turning a discarded Android phone into a usable Linux environment that runs modern AI agents like hermes-agent.
The project was born from a real session: reviving a 2020 Smartisan Nut R2 (Snapdragon 865, Android 8.1) to run hermes-agent v0.18. Every trap in references/troubleshooting.md was hit and solved for real — not theoretical.
Running a 2025 AI agent on an old phone hits a stack of compounding issues:
- USB/ADB — charge-only cables, sandbox isolation
- Termux Python 3.14 — too new; agents need 3.11–3.13
- Rust on Android —
rustupdoesn't support theaarch64-unknown-linux-androidtarget, socryptography/uvcan't build - Docker Hub blocked in China —
proot-distro installfails even when GitHub works - GitHub clone flakiness — SSL resets at 99%
- PyPI slowness — and
uvdoesn't readpip.conf - Smartisan OS blocks root — no OEM-unlock toggle, no fastboot driver, no rescue. Don't try; use proot. (§ 10)
- hermes MCP config is interactive —
hermes mcp addcan't be driven remotely; write config files directly. (§ 12) - Slow in-phone downloads — download on PC, push via adb. (§ 11, § 13)
This repo gives you the proven path through all of them.
.
├── README.md # this file ( bilingual )
├── skill/
│ ├── SKILL.md # the ZCode skill — full installation workflow
│ └── scripts/
│ ├── serve.py # Termux-side socket executor (paste once, run)
│ └── send_cmd.ps1 # PC-side PowerShell client (pairs with serve.py)
└── references/
└── troubleshooting.md # every trap hit, with symptom + cause + fix
- Read
skill/SKILL.mdtop-to-bottom — it's the complete workflow in 5 phases. - If anything breaks, jump to
references/troubleshooting.mdbefore improvising — the symptom→fix table at the bottom is your friend.
The high-level path:
data cable + USB debugging
→ ADB + scrcpy (PC mirrors & controls phone)
→ Termux + serve.py (PC drives Termux remotely)
→ proot-distro Ubuntu (escapes Termux's Python 3.14 / Rust-on-Android trap)
→ uv + Python 3.11 + hermes-agent
- People with an old Android phone collecting dust (5+ years old is fine)
- Tinkerers who want a headless dev box / always-on AI agent host
- Anyone in China who's fought Termux + Docker Hub + GitHub and lost
- Smartisan Nut R2 (DE106) / Snapdragon 865 / Android 8.1.0
- Windows 11 host (the PowerShell scripts; the skill itself is platform-agnostic)
一套可复现的方案(包含一个 ZCode skill、辅助脚本、以及一份从实战中淬炼出的故障排查手册),把吃灰的旧安卓手机变成能跑现代 AI Agent(如 hermes-agent)的 Linux 环境。
本项目源于一次真实操作:让一台 2020 年的锤子坚果 R2(骁龙 865,Android 8.1)跑起 hermes-agent v0.18。references/troubleshooting.md 里每一个坑都是实打实踩过并解决的——不是纸上谈兵。
在旧手机上跑 2025 年的 AI Agent,会撞上一连串叠加的问题:
- USB/ADB——充电线不传数据、沙箱隔离
- Termux 的 Python 3.14 太新——Agent 需要 3.11–3.13
- Rust 不支持 Android 目标——
rustup不支持aarch64-unknown-linux-android,导致cryptography/uv编不出来 - 国内 Docker Hub 被墙——
proot-distro install失败,即便 GitHub 能通 - GitHub 克隆不稳——下到 99% 时 SSL 重置
- PyPI 下载慢——而且
uv不读pip.conf - 锤子 Smartisan OS 封锁 root——没有 OEM 解锁开关、没有 fastboot 驱动、无官方救砖。别试,用 proot。(§ 10)
- hermes 的 MCP 配置是交互式的——
hermes mcp add远程喂不进输入,要直接写配置文件。(§ 12) - 手机端下载慢——电脑下好,adb 推过去。(§ 11、§ 13)
本仓库给你一条已被验证的穿越所有这些坑的路径。
.
├── README.md # 本文件(中英双语)
├── skill/
│ ├── SKILL.md # ZCode skill —— 完整安装流程(5个阶段)
│ └── scripts/
│ ├── serve.py # Termux 端 socket 执行器(粘贴一次,运行)
│ └── send_cmd.ps1 # PC 端 PowerShell 客户端(配对 serve.py)
└── references/
└── troubleshooting.md # 所有踩过的坑,按 症状→根因→解决 组织
- 从头到尾读一遍
skill/SKILL.md——5 个阶段的完整流程都在里面。 - 任何环节出错,先查
references/troubleshooting.md再动手——文末的"症状→条目"速查表是利器。
整体路径:
数据线 + USB 调试
→ ADB + scrcpy(PC 投屏并控制手机)
→ Termux + serve.py(PC 远程驱动 Termux)
→ proot-distro Ubuntu(绕开 Termux 的 Python 3.14 / Rust-on-Android 死结)
→ uv + Python 3.11 + hermes-agent
- 有吃灰旧安卓手机的人(5 年以上机龄没问题)
- 想要一台无头开发机 / ×ばつ24 小时 AI Agent 宿主的爱折腾者
- 国内被 Termux + Docker Hub + GitHub 折磨过的人
- 锤子坚果 R2(DE106)/ 骁龙 865 / Android 8.1.0
- Windows 11 主机(PowerShell 脚本针对它;skill 本身跨平台)
MIT — do whatever, just don't blame me if you brick your phone (you won't, this recipe is root-free and reversible).
MIT——随便用。万一搞坏手机别找我(不会的,本方案免 root、完全可逆)。