豆包复刻:原生安卓(Compose + 内嵌 Termux)+ Web / Windows

一个界面照着豆包抠的 AI 助手。主力是安卓端,完全离线自主:不依赖电脑、
不需要另外装 Termux。

安卓端
- 原生 Jetpack Compose,7 个页面,配色/圆角/间距对着真机截图量出来的
- 完整动效:抽屉滑入、页面切换、气泡淡入上移、面板底部升起、typing 三点、按钮回弹
- 内置 Termux:bash/apt/pkg 388 个命令、真 pty 终端;
  pty 不可用的 ROM 上自动降级成命令控制台
- APK 内嵌 CPython 3.13(Chaquopy),AI 内核跑在手机上
- 设备能力:定位 / 陀螺仪 / 加速度计 / 光线 / 电量 / 剪贴板
- 语音:朗读 + 语音输入,火山豆包音色 / OpenAI 兼容 / 设备自带三级引擎

AI 能力
- 10 家 OpenAI 兼容提供商:方舟 / OpenAI / DeepSeek / Kimi / 智谱 /
  通义 / 硅基流动 / OpenRouter / 本地 Ollama / 自定义
- 思考强度按各家支持情况发不同字段(thinking / reasoning_effort / 不发),
  认不出来的一律不发,避免给不支持的厂商发字段直接 400
- MCP 三种传输(http / stdio / inproc)、工具热加载、文件上传、权限模式

跨端
- 安卓走原生 Compose,Web / Windows 走 Lynx
- Node 与 Python 两份内核接口逐字段一致,关键路径都有对拍脚本

自检脚本(都不需要真 Key)
- verify-phone.mjs          设备端 24 项验收
- verify-speech.mjs         语音链路 31 项,两份内核各跑一遍
- parity-thinking.mjs       思考强度映射对拍
- probe-settings-wipe.mjs   设置防清空攻击测试
- mock-llm.mjs              假的 OpenAI + 火山语音服务

许可 MIT;第三方组件(Termux Apache-2.0、Chaquopy、Compose、LynxJS、Electron)
的授权见 LICENSE。
This commit is contained in:
l
2026-10-09 14:09:36 +08:00
commit f056bcf45a
308 changed files with 46874 additions and 0 deletions

62
LICENSE Normal file
View File

@@ -0,0 +1,62 @@
MIT License
Copyright (c) 2026 doubao-clone contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
===============================================================================
第三方组件(Third-Party Notices)
===============================================================================
本项目**包含或依赖**以下第三方作品。它们各自的授权条款独立于上面的 MIT,
使用时请一并遵守:
1. Termux(终端模拟器与 Linux 用户态)—— Apache License 2.0
https://github.com/termux/termux-app
- `android/app/src/main/java/com/termux/**` 是 Termux 的终端模拟器源码
(vendored,只改了 R 类的包名引用)
- `android/app/src/main/jniLibs/*/libtermux.so` 是 Termux 编译出的 JNI 库
- 构建 APK 时还需要 Termux 的 bootstrap(`libtermux-bootstrap.so`),
该文件未收录在本仓库中
- 完整许可见 `android/app/src/main/assets/TERMUX_LICENSE.txt`
与 `android/app/src/main/assets/APACHE-2.0.txt`
2. Chaquopy —— MIT License(社区版)
https://chaquo.com/chaquopy/
用于在 APK 内嵌 CPython。
3. Jetpack Compose / AndroidX —— Apache License 2.0
https://developer.android.com/jetpack
4. LynxJS —— Apache License 2.0
https://github.com/lynx-family/lynx
Web / Windows 桌面版的界面用的就是它。
5. Electron —— MIT License
https://github.com/electron/electron
仅 Windows 桌面版打包使用。
===============================================================================
关于商标与素材
===============================================================================
- 「豆包」是字节跳动的商标,本项目**与字节跳动没有任何关系**,
是出于学习目的的界面复刻,不包含任何来自豆包 App 的代码或素材。
- 界面配色与布局是照着公开截图量出来的,图标用的是 Material Icons。
- 仓库里的界面截图由项目作者在自己的设备上截取。