Cateners / tiny_computer

Click-to-run debian 12 xfce on android for Chinese users, with fcitx pinyin input method and some useful packages preinstalled. No termux required.
GNU General Public License v3.0
966 stars 43 forks source link
android proot-android termux-proot

小小电脑

给所有安卓arm64设备的“PC应用引擎”平替

Click-to-run Debian Bookworm XFCE on Android for Chinese users, with the Fcitx Pinyin input method preinstalled. No Termux is required. If you want to change the language in the container, run "tmoe", since this root filesystem is made using tmoe.

特点

原理

使用proot运行debian环境

内置noVNC/AVNC/Termux:X11显示图形界面

项目结构

assets的文件来源信息可以在这里找到。

完整的容器制作过程可以在这里看到。

数据包不再在assets中更新,而是随releases提供,主要是为了避免git越来越大

lib目录:

编译

你需要配置好flutter和安卓sdk,还需安装python3、bison、patch、gcc,然后克隆此项目。

在编译之前,需要在release中下载系统rootfs(或者自行制作),之后使用split命令分割,拷贝到assets。一般我将其分为98MB。

split -b 98M debian.tar.xz

还需要对flutter的一些默认配置作修改,因为其与项目中build.gradle的一些设置冲突。

接下来就可以编译了。我使用的命令如下:

flutter build apk --target-platform android-arm64 --split-per-abi --obfuscate --split-debug-info=tiny_computer/sdi

有一些C代码可能报错。比如KeyBind.c等文件,报错一些符号未定义。但其实包含那些符号的函数并没有被使用,所以可以把它们删掉再编译。 应该有编译选项可以避免这种情况,但我对cmake不熟,就先这样了:P

目前已知bug

多用户/分身情形无法sudo, 其它见issue

一些链接

这是我的第一个flutter软件,感谢这些项目为我指路

Getting Started

This project is a starting point for a Flutter application.

A few resources to get you started if this is your first Flutter project:

For help getting started with Flutter development, view the online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.