Compare commits

..

4 Commits

Author SHA1 Message Date
Caten
87beedef68 adjust readme 2023-11-11 18:05:11 +08:00
Caten
c6afc4d468 virgl support 2023-11-11 11:23:16 +08:00
Caten
6dbe710fdc getifaddrs fix 2023-11-10 21:29:07 +08:00
Caten
cf8ce47662 Organize the code 2023-11-09 12:48:55 +08:00
12 changed files with 1471 additions and 596 deletions

View File

@@ -30,6 +30,8 @@ assets的文件来源如下:
其中tar、busybox和pulseaudio相关文件都是直接用了二进制文件。 其中tar、busybox和pulseaudio相关文件都是直接用了二进制文件。
更多信息可以在[这里](extra/readme)找到。
对debian容器进行了如下修改 对debian容器进行了如下修改
- 使用tmoe安装了xfce环境和全套VNC - 使用tmoe安装了xfce环境和全套VNC
- 使用kali-undercover提供的Win10主题美化xfce - 使用kali-undercover提供的Win10主题美化xfce
@@ -40,7 +42,7 @@ assets的文件来源如下:
- 启动时会尝试挂载手机的一些字体目录(AppFiles/Fonts、Fonts和/system/fonts), 如果这些目录下有字体文件的话会一并加载到系统中,无需额外安装; - 启动时会尝试挂载手机的一些字体目录(AppFiles/Fonts、Fonts和/system/fonts), 如果这些目录下有字体文件的话会一并加载到系统中,无需额外安装;
- 最后采用tar.xz压缩用split命令分成了xa*等多个文件(低内存设备一次性拷贝大文件会导致软件闪退)。 - 最后采用tar.xz压缩用split命令分成了xa*等多个文件(低内存设备一次性拷贝大文件会导致软件闪退)。
完整的容器制作过程可以在[这里](https://github.com/Cateners/build-tiny-rootfs)看到。 完整的容器制作过程可以在[这里](extra/build-tiny-rootfs.md)看到。
数据包不再在assets中更新而是随releases提供主要是为了避免git越来越大 数据包不再在assets中更新而是随releases提供主要是为了避免git越来越大
@@ -57,7 +59,7 @@ lib目录
你需要配置好flutter和安卓sdk然后克隆此项目。 你需要配置好flutter和安卓sdk然后克隆此项目。
在编译之前需要在release中下载系统rootfs(或者[自行制作](https://github.com/Cateners/build-tiny-rootfs))之后使用split命令分割拷贝到assets。一般我将其分为98MB。 在编译之前需要在release中下载系统rootfs(或者[自行制作](extra/build-tiny-rootfs.md))之后使用split命令分割拷贝到assets。一般我将其分为98MB。
`split -b 98M debian.tar.xz` `split -b 98M debian.tar.xz`

Binary file not shown.

BIN
assets/patch.tar.gz Normal file

Binary file not shown.

196
extra/build-tiny-rootfs.md Normal file
View File

@@ -0,0 +1,196 @@
# build-tiny-rootfs
对小小电脑项目rootfs制作的说明
### 为什么不直接制作一个脚本呢?
因为我不会,所以只能用自然语言记录一下制作步骤。
## 制作步骤
### 安装Debian容器
- 安装Termux
- 在Termux内安装tmoe
- 在tmoe内安装Debian Bookworm的proot容器
- 是否新建sudo用户-是-用户名tiny-密码tiny
- 是否设置tiny为默认用户-是
- 是否为root配置zsh-否
- 是否删除zsh.sh等-是
- 是否启动tmoe tools-是
- 其余对话框默认直接按回车
- 来到tmoe tool界面时取消退出
### 安装其他软件
安装xfce部分是根据记忆写的如果有误请指出。
桌面环境只安装一个。
#### 安装桌面环境(lxqt)
- 输入debian-i进入tmoe tools
- 图形界面-rootless-lxqt-core
- 不安装electron apps
- 不安装chromium
- 按需调整
#### 安装桌面环境(xfce)
前面的部分和lxqt一致只是选桌面环境时选了xfce-lite。
下面是额外的美化部分。推荐先安装软件再做这个因为使用kali-undercover时可能有依赖报错但我忘记是哪些依赖了。但后面安装的某个软件会帮我们把依赖补上。
- xfce美化
- 前往kali源下载kali-undercover包并apt install安装
- 修改kali-undercover脚本中检测xfce环境的地方强制允许
- 即注释第一个if里的exit 1
- 执行kali-undercover
- 按需调整
- 注释.bashrc中把bash风格改为windows风格的语句
- 调整状态栏
- ......
#### 安装VNC
安装桌面环境后会自动进行这一步使用tmoe tools全部安装即可。
- 选择tigervnc
- 密码12345678
安装完成后输入debian-i回到tmoe继续修改一些参数主要目的是避免与termux的容器端口一致产生冲突
- 修改显示端口到5904
- 远程桌面-tigervnc-显示端口-4
- 修改novnc端口到36082
- 远程桌面-novnc-端口-36082
- 修改startnovnc启动脚本(避免每次启动novnc时打开浏览器虽然不是windows)
- 注释start_win10_edge_novnc_addr(大概在倒数第五行)
接下来对novnc应用补丁以添加"通过滑块修改分辨率"等功能
- [下载novnc.patch](https://github.com/Cateners/noVNC/releases/tag/1.2)
- 切换目录到/usr/local/etc/tmoe-linux/novnc
- `patch -p1 < novnc.patch`
- ```bash
find . '(' \
-name \*-baseline -o \
-name \*-merge -o \
-name \*-original -o \
-name \*.orig -o \
-name \*.rej \
')' -delete
```
#### 修复tmoe不能下载软件
在我发布的xfce版本中我给每个aria2c调用都添加了--async-dns=false参数。
先切换到tmoe目录`/usr/local/etc/tmoe-linux/git/share`,然后执行脚本`./replace.sh old-version`
```shell
#!/bin/bash
# 用法: ./replace.sh 目录
# 该脚本会递归地在给定目录下的所有文件中替换文本
# 原文本: aria2c --console-log-level
# 新文本: aria2c --async-dns=false --console-log-level
# 检查参数是否正确
if [ $# -ne 1 ]; then
echo "错误: 需要一个目录作为参数"
exit 1
fi
# 检查目录是否存在
if [ ! -d "$1" ]; then
echo "错误: 目录 $1 不存在"
exit 2
fi
# 遍历目录下的所有文件
find "$1" -type f | while read file; do
# 使用sed命令替换文本
sed -i 's/aria2c --console-log-level/aria2c --async-dns=false --console-log-level/g' "$file"
echo
done
```
用完后删除replace.sh
另外现在tmoe官方给出了[解决办法](https://gitee.com/mo2/linux/issues/I8BQG3),不过我测试似乎还是不行,所以就先这样了
#### 修改apt源
按需修改/etc/apt/sources.list另外把non-free改为non-free-firmware
#### 安装火狐浏览器
`sudo apt install firefox-esr firefox-esr-l10n-zh-cn`
#### 安装输入法
- debian-i
- 03秘密花园-10输入法-fcitx4-安装4libpinyin和6云拼音模块
- 在图形界面应用找到fcitx配置-附加组件-云拼音-配置-云拼音来源把Google改为百度确认
- 启动图形界面输入startnovnc会出现一个类似xxx.xxx.xxx.xxx:36082/vnc.html的网址复制到本机的浏览器中输入vnc密码12345678就可以访问了。
#### 安装gdebi
这个软件包能使用户通过图形界面安装deb安装包
安装:`sudo apt install gdebi`
修改启动器:在/usr/share/applications/gdebi.desktop的Exec=后加上sudo
#### 安装VSCode
VSCode使用tmoe安装正好测试一下不能下载软件的问题是否存在
- 2软件-2开发-1VSCode-1Official
tmoe还会安装gnome-keyring由于之前我做xfce包时会造成VSCode反复弹窗更新密钥环所以被我卸载了这个按需决定是否保留吧
#### 安装ffmpeg
这个是为了预览推流用的,按需安装
`sudo apt install ffmpeg`
### 其他修补
#### cmatrix
这个是给快捷指令的彩蛋。下载cmatrix的包并将cmatrix文件提取放到/home/tiny/.local/bin里即可记得添加执行权限
#### WPS
- 软件设置修改
- 从官网下载WPS linux arm64 deb安装包直接在图形界面点开用gdebi安装(正好测试一下gdebi是否能用)
- 打开WPS-右上角设置-其他-切换窗口管理模式-整合模式改为多组件模式(否则一些设备在新建文档等操作时卡死,目前原因不明)
- 使用gdebi(或自行)卸载WPS
- 字体修补
- 在你的Windows电脑里的C:\Windows\Fonts文件夹找到symbol.ttf、webdings.ttf、wingding.ttf、WINGDNG2.TTF、WINGDNG3.TTF、MTEXTRA.TTF字体并放到容器/usr/share/fonts的某个文件夹下(我新建了extra文件夹并把这些字体放到里面)
- libtiff.so.5库修补
- 切换到/lib/aarch64-linux-gnu文件夹创建软链把libtiff.so.6链接到libtiff.so.5
- 或者找libtiff.so.5的包并安装,这样可能更好一些
### 打包
- 首先退出容器在容器挂载选项里取消对sd和termux的挂载之后进入容器删除termux软连接
- 在后面使用tar打包时即使指定了excludetar也会尝试把它们打包进去
- 这个很可能因为我自己没用对参数,如果你非常自信的话就不需要这么做,自行打包即可=v=
- 在[这里](https://github.com/meefik/busybox/releases)下载提取busybox的可执行文件并放到系统根目录
- 我使用busybox的tar来打包而不是容器自带的tar原因是容器自带的tar会把硬链接打包成单独的文件导致打包解包后占用多出1GB
- 这个也很可能是我自己没用对参数,如果你非常自信就不用这么做......
- 尽可能多地删除使用痕迹,包括但不限于
- apt clean
- /tmp下的文件退出容器后删
- tiny和root目录下的
- .cache
- .vnc/vnc.log, .vnc/x.log
- .bash_history
- .ICEauthority
- .Xauthority
- 等等
- 切换到root用户切换到根目录`/busybox tar -Jcpvf /debian.tar.xz --exclude=debian.tar.xz --exclude=dev --exclude=proc --exclude=system --exclude=storage --exclude=apex --exclude=sys --exclude=media/sd --exclude=busybox --exclude=".l2s.*" /`

View File

@@ -0,0 +1,243 @@
// getifaddrs_bridge_client_lib.c -- This file is part of tiny_computer.
// Copyright (C) 2023 Caten Hu
// Tiny Computer is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published
// by the Free Software Foundation, either version 3 of the License,
// or any later version.
// Tiny Computer is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty
// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with this program. If not, see http://www.gnu.org/licenses/.
/* this file is mainly generated by Bing */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <ifaddrs.h>
#include <sys/ioctl.h>
#include <net/if.h>
#include <sys/un.h>
#define BUFSIZE 1024 // 定义缓冲区大小
// 定义一个反序列化函数将字节数组转换为ifaddrs结构体
int TINY_deserialize_ifaddrs(char *buf, int size, struct ifaddrs **ifap) {
int len = 0; // 记录已经读取的字节数
struct ifaddrs *head = NULL; // 链表头指针
struct ifaddrs *tail = NULL; // 链表尾指针
while (len < size) {
// 为当前接口分配内存
struct ifaddrs *ifa = (struct ifaddrs *)malloc(sizeof(struct ifaddrs));
if (ifa == NULL) {
// 分配失败,释放已分配的内存
freeifaddrs(head);
return -1; // 返回错误
}
// 读取接口名称
int namelen = strlen(buf + len) + 1; // 包括结束符
if (len + namelen > size) break; // 缓冲区不足
ifa->ifa_name = (char *)malloc(namelen); // 为名称分配内存
if (ifa->ifa_name == NULL) {
// 分配失败,释放已分配的内存
free(ifa);
freeifaddrs(head);
return -1; // 返回错误
}
memcpy(ifa->ifa_name, buf + len, namelen); // 复制名称
len += namelen;
// 读取接口标志
if (len + sizeof(unsigned int) > size) break; // 缓冲区不足
memcpy(&ifa->ifa_flags, buf + len, sizeof(unsigned int)); // 复制标志
len += sizeof(unsigned int);
// 读取接口地址
if (buf[len] != '\0') {
// 如果有地址
int addrlen = sizeof(struct sockaddr); // 地址结构体长度
if (len + addrlen > size) break; // 缓冲区不足
ifa->ifa_addr = (struct sockaddr *)malloc(addrlen); // 为地址分配内存
if (ifa->ifa_addr == NULL) {
// 分配失败,释放已分配的内存
free(ifa->ifa_name);
free(ifa);
freeifaddrs(head);
return -1; // 返回错误
}
memcpy(ifa->ifa_addr, buf + len, addrlen); // 复制地址
len += addrlen;
} else {
// 如果没有地址,跳过一个空字节
ifa->ifa_addr = NULL;
len += 1;
}
// 读取接口掩码
if (buf[len] != '\0') {
// 如果有掩码
int masklen = sizeof(struct sockaddr); // 掩码结构体长度
if (len + masklen > size) break; // 缓冲区不足
ifa->ifa_netmask = (struct sockaddr *)malloc(masklen); // 为掩码分配内存
if (ifa->ifa_netmask == NULL) {
// 分配失败,释放已分配的内存
free(ifa->ifa_addr);
free(ifa->ifa_name);
free(ifa);
freeifaddrs(head);
return -1; // 返回错误
}
memcpy(ifa->ifa_netmask, buf + len, masklen); // 复制
len += masklen;
} else {
// 如果没有掩码,跳过一个空字节
ifa->ifa_netmask = NULL;
len += 1;
}
// 读取接口广播地址或点对点地址
if (ifa->ifa_flags & IFF_BROADCAST) {
// 如果有广播地址
if (buf[len] != '\0') {
// 如果有广播地址
int broadlen = sizeof(struct sockaddr); // 广播地址结构体长度
if (len + broadlen > size) break; // 缓冲区不足
ifa->ifa_broadaddr = (struct sockaddr *)malloc(broadlen); // 为广播地址分配内存
if (ifa->ifa_broadaddr == NULL) {
// 分配失败,释放已分配的内存
free(ifa->ifa_netmask);
free(ifa->ifa_addr);
free(ifa->ifa_name);
free(ifa);
freeifaddrs(head);
return -1; // 返回错误
}
memcpy(ifa->ifa_broadaddr, buf + len, broadlen); // 复制广播地址
len += broadlen;
} else {
// 如果没有广播地址,跳过一个空字节
ifa->ifa_broadaddr = NULL;
len += 1;
}
} else if (ifa->ifa_flags & IFF_POINTOPOINT) {
// 如果有点对点地址
if (buf[len] != '\0') {
// 如果有点对点地址
int dstlen = sizeof(struct sockaddr); // 点对点地址结构体长度
if (len + dstlen > size) break; // 缓冲区不足
ifa->ifa_dstaddr = (struct sockaddr *)malloc(dstlen); // 为点对点地址分配内存
if (ifa->ifa_dstaddr == NULL) {
// 分配失败,释放已分配的内存
free(ifa->ifa_netmask);
free(ifa->ifa_addr);
free(ifa->ifa_name);
free(ifa);
freeifaddrs(head);
return -1; // 返回错误
}
memcpy(ifa->ifa_dstaddr, buf + len, dstlen); // 复制点对点地址
len += dstlen;
} else {
// 如果没有点对点地址,跳过一个空字节
ifa->ifa_dstaddr = NULL;
len += 1;
}
} else {
// 如果没有广播地址或点对点地址,跳过两个空字节
ifa->ifa_broadaddr = NULL;
ifa->ifa_dstaddr = NULL;
len += 2;
}
// 读取接口数据
if (buf[len] != '\0') {
// 如果有数据
// TODO: 根据不同的地址族,读取不同的数据
// 这里暂时省略,只跳过一个空字节
ifa->ifa_data = NULL;
len += 1;
} else {
// 如果没有数据,跳过一个空字节
ifa->ifa_data = NULL;
len += 1;
}
// 将当前接口插入链表
ifa->ifa_next = NULL;
if (head == NULL) {
// 如果是第一个接口,设置头指针
head = ifa;
} else {
// 如果不是第一个接口,设置尾指针的下一个指针
tail->ifa_next = ifa;
}
// 更新尾指针
tail = ifa;
}
*ifap = head; // 返回链表头指针
return len; // 返回读取的总字节数
}
// 定义一个发送信号的函数,向服务器发送一个信号
int TINY_send_signal(int sockfd) {
char sig = 'S'; // 定义信号为一个字符S
int n = write(sockfd, &sig, 1); // 向套接字写入一个字节
if (n < 0) {
perror("write");
return -1; // 返回错误
}
return 0; // 返回成功
}
// 定义一个接收数据的函数,从服务器接收数据并反序列化
int TINY_receive_data(int sockfd, struct ifaddrs **ifap) {
char buf[BUFSIZE]; // 定义缓冲区
int n = read(sockfd, buf, BUFSIZE); // 从套接字读取数据
if (n < 0) {
perror("read");
return -1; // 返回错误
}
int len = TINY_deserialize_ifaddrs(buf, n, ifap); // 反序列化数据
if (len < 0) {
fprintf(stderr, "deserialize_ifaddrs failed\n");
return -1; // 返回错误
}
return 0; // 返回成功
}
// 主函数
int getifaddrs(struct ifaddrs **ifap) {
// 创建一个套接字
int sockfd = socket(PF_UNIX, SOCK_STREAM, 0);
if (sockfd < 0) {
perror("socket");
exit(1);
}
// 定义服务器地址结构体
struct sockaddr_un un;
memset(&un, 0, sizeof(un));
un.sun_family = AF_UNIX;
snprintf(un.sun_path, sizeof(un.sun_path), "%s", "/tmp/.getifaddrs-bridge");
// 连接到服务器
if (connect(sockfd, (struct sockaddr *)&un, sizeof(un)) < 0) {
perror("connect");
exit(1);
}
// 发送信号给服务器
if (TINY_send_signal(sockfd) < 0) {
fprintf(stderr, "send_signal failed\n");
exit(1);
}
// 接收数据并反序列化
if (TINY_receive_data(sockfd, ifap) < 0) {
fprintf(stderr, "receive_data failed\n");
exit(1);
}
// 关闭套接字
close(sockfd);
return 0;
}

View File

@@ -0,0 +1,222 @@
// getifaddrs_bridge_server.c -- This file is part of tiny_computer.
// Copyright (C) 2023 Caten Hu
// Tiny Computer is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published
// by the Free Software Foundation, either version 3 of the License,
// or any later version.
// Tiny Computer is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty
// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with this program. If not, see http://www.gnu.org/licenses/.
/* this file is mainly generated by Bing */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <ifaddrs.h>
#include <sys/ioctl.h>
#include <net/if.h>
#include <sys/un.h>
#define BUFSIZE 1024 // 定义缓冲区大小
// 定义一个序列化函数将ifaddrs结构体转换为字节数组
int serialize_ifaddrs(struct ifaddrs *ifa, char *buf, int size) {
int len = 0; // 记录已经写入的字节数
while (ifa != NULL && len < size) {
// 写入接口名称
int namelen = strlen(ifa->ifa_name) + 1; // 包括结束符
if (len + namelen > size) break; // 缓冲区不足
memcpy(buf + len, ifa->ifa_name, namelen);
len += namelen;
// 写入接口标志
if (len + sizeof(unsigned int) > size) break; // 缓冲区不足
memcpy(buf + len, &ifa->ifa_flags, sizeof(unsigned int));
len += sizeof(unsigned int);
// 写入接口地址
if (ifa->ifa_addr != NULL) {
int addrlen = sizeof(struct sockaddr); // 地址结构体长度
if (len + addrlen > size) break; // 缓冲区不足
memcpy(buf + len, ifa->ifa_addr, addrlen);
len += addrlen;
} else {
// 如果没有地址,写入一个空字节
if (len + 1 > size) break; // 缓冲区不足
buf[len] = '\0';
len += 1;
}
// 写入接口掩码
if (ifa->ifa_netmask != NULL) {
int masklen = sizeof(struct sockaddr); // 掩码结构体长度
if (len + masklen > size) break; // 缓冲区不足
memcpy(buf + len, ifa->ifa_netmask, masklen);
len += masklen;
} else {
// 如果没有掩码,写入一个空字节
if (len + 1 > size) break; // 缓冲区不足
buf[len] = '\0';
len += 1;
}
// 写入接口广播地址或点对点地址
if (ifa->ifa_flags & IFF_BROADCAST) {
// 如果有广播地址
if (ifa->ifa_broadaddr != NULL) {
int broadlen = sizeof(struct sockaddr); // 广播地址结构体长度
if (len + broadlen > size) break; // 缓冲区不足
memcpy(buf + len, ifa->ifa_broadaddr, broadlen);
len += broadlen;
} else {
// 如果没有广播地址,写入一个空字节
if (len + 1 > size) break; // 缓冲区不足
buf[len] = '\0';
len += 1;
}
} else if (ifa->ifa_flags & IFF_POINTOPOINT) {
// 如果有点对点地址
if (ifa->ifa_dstaddr != NULL) {
int dstlen = sizeof(struct sockaddr); // 点对点地址结构体长度
if (len + dstlen > size) break; // 缓冲区不足
memcpy(buf + len, ifa->ifa_dstaddr, dstlen);
len += dstlen;
} else {
// 如果没有点对点地址,写入一个空字节
if (len + 1 > size) break; // 缓冲区不足
buf[len] = '\0';
len += 1;
}
} else {
// 如果没有广播地址或点对点地址,写入两个空字节
if (len + 2 > size) break; // 缓冲区不足
buf[len] = '\0';
buf[len + 1] = '\0';
len += 2;
}
// 写入接口数据
if (ifa->ifa_data != NULL) {
// TODO: 根据不同的地址族,写入不同的数据
// 这里暂时省略,只写入一个空字节
if (len + 1 > size) break; // 缓冲区不足
buf[len] = '\0';
len += 1;
} else {
// 如果没有数据,写入一个空字节
if (len + 1 > size) break; // 缓冲区不足
buf[len] = '\0';
len += 1;
}
// 跳到下一个接口
ifa = ifa->ifa_next;
}
return len; // 返回写入的总字节数
}
// 定义一个接收信号的函数,从客户端接收一个信号
int receive_signal(int sockfd) {
char sig; // 定义信号变量
int n = read(sockfd, &sig, 1); // 从套接字读取一个字节
if (n < 0) {
perror("read");
return -1; // 返回错误
}
if (sig == 'S') {
// 如果收到信号S表示客户端需要数据
return 0; // 返回成功
} else {
// 如果收到其他信号,表示无效信号
fprintf(stderr, "invalid signal: %c\n", sig);
return -1; // 返回错误
}
}
// 定义一个发送数据的函数,向客户端发送数据并序列化
int send_data(int sockfd) {
struct ifaddrs *ifap = NULL; // 定义ifaddrs结构体指针
// 调用getifaddrs函数获取本地接口信息
if (getifaddrs(&ifap) < 0) {
perror("getifaddrs");
return -1; // 返回错误
}
char buf[BUFSIZE]; // 定义缓冲区
// 调用序列化函数将ifaddrs结构体转换为字节数组
int len = serialize_ifaddrs(ifap, buf, BUFSIZE);
if (len < 0) {
fprintf(stderr, "serialize_ifaddrs failed\n");
return -1; // 返回错误
}
// 向套接字写入数据
int n = write(sockfd, buf, len);
if (n < 0) {
perror("write");
return -1; // 返回错误
}
// 释放ifaddrs结构体
freeifaddrs(ifap);
return 0; // 返回成功
}
// 主函数
int main(int argc, char *argv[]) {
if (argc != 2) {
printf("usage: %s <socket_path>\n", argv[0]);
return 0;
}
// 创建一个套接字
int sockfd = socket(PF_UNIX, SOCK_STREAM, 0);
if (sockfd < 0) {
perror("socket");
exit(1);
}
// 定义服务器地址结构体
struct sockaddr_un un;
memset(&un, 0, sizeof(un));
un.sun_family = AF_UNIX;
snprintf(un.sun_path, sizeof(un.sun_path), "%s", argv[1]);
unlink(un.sun_path);
// 绑定套接字到服务器地址
if (bind(sockfd, (struct sockaddr *)&un, sizeof(un)) < 0) {
perror("bind");
exit(1);
}
// 监听套接字
if (listen(sockfd, 5) < 0) {
perror("listen");
exit(1);
}
// 循环接受客户端连接
while (1) {
int connfd = accept(sockfd, NULL, NULL);
if (connfd < 0) {
perror("accept");
continue; // 如果接受失败,继续循环
}
// 循环接收和发送数据
while (1) {
// 接收信号
if (receive_signal(connfd) < 0) {
fprintf(stderr, "receive_signal failed\n");
close(connfd); // 如果接收失败,关闭连接套接字
break; // 跳出循环
}
// 发送数据
if (send_data(connfd) < 0) {
fprintf(stderr, "send_data failed\n");
close(connfd); // 如果发送失败,关闭连接套接字
break; // 跳出循环
}
}
}
// 关闭监听套接字
close(sockfd);
return 0;
}

View File

@@ -0,0 +1,19 @@
### 编译
使用NDK编译getifaddrs_bridge_server.c:
`aarch64-linux-android-clang getifaddrs_bridge_server.c -o getifaddrs_bridge_server`
在小小电脑上编译getifaddrs_bridge_client_lib.c:
`gcc getifaddrs_bridge_client_lib.c -o getifaddrs_bridge_client_lib.so -shared`
### 使用
在安卓端:
`getifaddrs_bridge_server /path/to/container/tmp/.getifaddrs-bridge`
在proot容器
`LD_PRELOAD=/path/to/getifaddrs_bridge_client_lib.so <your_program>`

24
extra/readme Normal file
View File

@@ -0,0 +1,24 @@
## 这个readme介绍assets文件夹中文件的制作方式。
### assets.zip中的文件
#### [容器文件xa*](build-tiny-rootfs.md)
### patch.tar.gz中的文件
#### extra/getifaddrs_bridge_client_lib.so:
在安卓13以上的系统中proot容器无权使用默认的getifaddrs而这个库包含了一个getifaddrs实现。
linux在需要数据时使用socket通知位于安卓的getifaddrs_bridge_server让getifaddrs_bridge_server执行getifaddrs函数并将结构体数据序列化后发送回linux端这边接收数据并反序列化还原成指针结构体。简单来说就是用安卓的getifaddrs代替linux的getifaddrs。
源码和编译信息在getifaddrs_bridge文件夹查看。
#### caj, edraw
这些分别是cajviewer亿图图示的补丁
- 亿图图示补丁的库文件是在小小电脑上下载了Qt对应版本源码后编译得到的
- 编译进行了两次第一次直接编译可以得到Gui和Widgets两个库。第二次编译带上XcbQpa虽然会编译失败但在这之前就可以得到XcbQpa的库。

File diff suppressed because it is too large Load Diff

View File

@@ -56,12 +56,12 @@ class Util {
Directory.fromRawPath(const Utf8Encoder().convert(dir)).createSync(recursive: true); Directory.fromRawPath(const Utf8Encoder().convert(dir)).createSync(recursive: true);
} }
static Future<void> execute(String str) async { static Future<int> execute(String str) async {
Pty pty = Pty.start( Pty pty = Pty.start(
"/system/bin/sh" "/system/bin/sh"
); );
pty.write(const Utf8Encoder().convert("$str\nexit\n")); pty.write(const Utf8Encoder().convert("$str\nexit \$!\n"));
await pty.exitCode; return await pty.exitCode;
} }
static void termWrite(String str) { static void termWrite(String str) {
@@ -85,6 +85,11 @@ class Util {
//int vip = 0 用户等级vip免广告你要改吗(ToT) //int vip = 0 用户等级vip免广告你要改吗(ToT)
//bool isStickyKey = true 终端ctrl, shift, alt键是否粘滞 //bool isStickyKey = true 终端ctrl, shift, alt键是否粘滞
//String defaultFFmpegCommand 默认推流命令 //String defaultFFmpegCommand 默认推流命令
//String defaultVirglCommand 默认virgl参数
//String defaultVirglOpt 默认virgl环境变量
//bool reinstallBootstrap = false 下次启动是否重装引导包
//bool getifaddrsBridge = false 下次启动是否桥接getifaddrsBridge
//bool virgl = false 下次启动是否启用virgl
//? int bootstrapVersion: 启动包版本 //? int bootstrapVersion: 启动包版本
//String[] containersInfo: 所有容器信息(json) //String[] containersInfo: 所有容器信息(json)
//{name, boot:"\$DATA_DIR/bin/proot ...", vnc:"startnovnc", vncUrl:"...", commands:[{name:"更新和升级", command:"apt update -y && apt upgrade -y"}, //{name, boot:"\$DATA_DIR/bin/proot ...", vnc:"startnovnc", vncUrl:"...", commands:[{name:"更新和升级", command:"apt update -y && apt upgrade -y"},
@@ -108,7 +113,12 @@ class Util {
case "termFontScale" : return b ? G.prefs.getDouble(key)! : (value){G.prefs.setDouble(key, value); return value;}(1.0); case "termFontScale" : return b ? G.prefs.getDouble(key)! : (value){G.prefs.setDouble(key, value); return value;}(1.0);
case "vip" : return b ? G.prefs.getInt(key)! : (value){G.prefs.setInt(key, value); return value;}(0); case "vip" : return b ? G.prefs.getInt(key)! : (value){G.prefs.setInt(key, value); return value;}(0);
case "isStickyKey" : return b ? G.prefs.getBool(key)! : (value){G.prefs.setBool(key, value); return value;}(true); case "isStickyKey" : return b ? G.prefs.getBool(key)! : (value){G.prefs.setBool(key, value); return value;}(true);
case "reinstallBootstrap" : return b ? G.prefs.getBool(key)! : (value){G.prefs.setBool(key, value); return value;}(false);
case "getifaddrsBridge" : return b ? G.prefs.getBool(key)! : (value){G.prefs.setBool(key, value); return value;}(false);
case "virgl" : return b ? G.prefs.getBool(key)! : (value){G.prefs.setBool(key, value); return value;}(false);
case "defaultFFmpegCommand" : return b ? G.prefs.getString(key)! : (value){G.prefs.setString(key, value); return value;}("-hide_banner -an -max_delay 1000000 -r 30 -f android_camera -camera_index 0 -i 0:0 -vf scale=iw/2:-1 -rtsp_transport udp -f rtsp rtsp://127.0.0.1:8554/stream"); case "defaultFFmpegCommand" : return b ? G.prefs.getString(key)! : (value){G.prefs.setString(key, value); return value;}("-hide_banner -an -max_delay 1000000 -r 30 -f android_camera -camera_index 0 -i 0:0 -vf scale=iw/2:-1 -rtsp_transport udp -f rtsp rtsp://127.0.0.1:8554/stream");
case "defaultVirglCommand" : return b ? G.prefs.getString(key)! : (value){G.prefs.setString(key, value); return value;}("--socket-path=\$CONTAINER_DIR/tmp/.virgl_test");
case "defaultVirglOpt" : return b ? G.prefs.getString(key)! : (value){G.prefs.setString(key, value); return value;}("GALLIUM_DRIVER=virpipe MESA_GL_VERSION_OVERRIDE=4.0");
case "containersInfo" : return G.prefs.getStringList(key)!; case "containersInfo" : return G.prefs.getStringList(key)!;
case "adsBonus" : return b ? G.prefs.getStringList(key)! : (value){G.prefs.setStringList(key, value); return value;}([].cast<String>()); case "adsBonus" : return b ? G.prefs.getStringList(key)! : (value){G.prefs.setStringList(key, value); return value;}([].cast<String>());
} }
@@ -132,16 +142,16 @@ class Util {
//返回单个G.bonusTable定义的item //返回单个G.bonusTable定义的item
static Map<String, dynamic> getRandomBonus() { static Map<String, dynamic> getRandomBonus() {
final random = Random(); final random = Random();
final totalWeight = G.bonusTable.fold(0.0, (sum, item) => sum + item['weight']); final totalWeight = D.bonusTable.fold(0.0, (sum, item) => sum + item['weight']);
final randomIndex = random.nextDouble() * totalWeight; final randomIndex = random.nextDouble() * totalWeight;
var cumulativeWeight = 0.0; var cumulativeWeight = 0.0;
for (final item in G.bonusTable) { for (final item in D.bonusTable) {
cumulativeWeight += item['weight']; cumulativeWeight += item['weight'];
if (randomIndex <= cumulativeWeight) { if (randomIndex <= cumulativeWeight) {
return item; return item;
} }
} }
return G.bonusTable[0]; return D.bonusTable[0];
} }
//由getRandomBonus返回的数据 //由getRandomBonus返回的数据
@@ -163,7 +173,7 @@ class Util {
//根据已看广告量判断是否应该继续看广告 //根据已看广告量判断是否应该继续看广告
static bool shouldWatchAds(int expectNum) { static bool shouldWatchAds(int expectNum) {
return ((Util.getGlobal("adsWatchedTotal") as int) < expectNum) && ((Util.getGlobal("vip") as int) < 1) && ((Util.getGlobal("adsWatchedToday") as int) < G.adsRequired["unlockToday"]!) && (G.adsWatchedThisTime < G.adsRequired["unlockOnce"]!); return ((Util.getGlobal("adsWatchedTotal") as int) < expectNum) && ((Util.getGlobal("vip") as int) < 1) && ((Util.getGlobal("adsWatchedToday") as int) < D.adsRequired["unlockToday"]!) && (G.adsWatchedThisTime < D.adsRequired["unlockOnce"]!);
} }
//限定字符串在min和max之间, 给文本框的validator //限定字符串在min和max之间, 给文本框的validator
@@ -230,7 +240,7 @@ class VirtualKeyboard extends TerminalInputHandler with ChangeNotifier {
shift: event.shift || _shift, shift: event.shift || _shift,
alt: event.alt || _alt, alt: event.alt || _alt,
)); ));
G.maybeCtrlJ = event.key.name == "keyJ"; G.maybeCtrlJ = event.key.name == "keyJ"; //这个是为了稍后区分按键到底是Enter还是Ctrl+J
if (!(Util.getGlobal("isStickyKey") as bool)) { if (!(Util.getGlobal("isStickyKey") as bool)) {
G.keyboard.ctrl = false; G.keyboard.ctrl = false;
G.keyboard.shift = false; G.keyboard.shift = false;
@@ -344,7 +354,7 @@ class D {
{"name":"卸载CAJViewer", "command":"sudo apt autoremove --purge -y net.cnki.cajviewer && bash /home/tiny/.local/share/tiny/caj/postrm"}, {"name":"卸载CAJViewer", "command":"sudo apt autoremove --purge -y net.cnki.cajviewer && bash /home/tiny/.local/share/tiny/caj/postrm"},
{"name":"安装亿图图示", "command":"wget https://www.edrawsoft.cn/2download/aarch64/edrawmax_11.5.6-3_arm64.deb -O /tmp/edraw.deb && sudo apt update && sudo apt install -y /tmp/edraw.deb && bash /home/tiny/.local/share/tiny/edraw/postinst; rm /tmp/edraw.deb"}, {"name":"安装亿图图示", "command":"wget https://www.edrawsoft.cn/2download/aarch64/edrawmax_11.5.6-3_arm64.deb -O /tmp/edraw.deb && sudo apt update && sudo apt install -y /tmp/edraw.deb && bash /home/tiny/.local/share/tiny/edraw/postinst; rm /tmp/edraw.deb"},
{"name":"卸载亿图图示", "command":"sudo apt autoremove --purge -y edrawmax libldap-2.4-2"}, {"name":"卸载亿图图示", "command":"sudo apt autoremove --purge -y edrawmax libldap-2.4-2"},
{"name":"安装QQ", "command":"wget https://dldir1.qq.com/qqfile/qq/QQNT/b69de82d/linuxqq_3.2.1-17153_arm64.deb -O /tmp/qq.deb && sudo apt update && sudo apt install -y /tmp/qq.deb && sed -i 's#Exec=/opt/QQ/qq %U#Exec=/opt/QQ/qq --no-sandbox %U#g' /usr/share/applications/qq.desktop; rm /tmp/qq.deb"}, {"name":"安装QQ", "command":"wget https://dldir1.qq.com/qqfile/qq/QQNT/fd2e886e/linuxqq_3.2.2-18394_arm64.deb -O /tmp/qq.deb && sudo apt update && sudo apt install -y /tmp/qq.deb && sed -i 's#Exec=/opt/QQ/qq %U#Exec=/opt/QQ/qq --no-sandbox %U#g' /usr/share/applications/qq.desktop; rm /tmp/qq.deb"},
{"name":"卸载QQ", "command":"sudo apt autoremove --purge -y linuxqq"}, {"name":"卸载QQ", "command":"sudo apt autoremove --purge -y linuxqq"},
{"name":"修复无法编译C语言程序", "command":"sudo apt update && sudo apt reinstall -y libc6-dev"}, {"name":"修复无法编译C语言程序", "command":"sudo apt update && sudo apt reinstall -y libc6-dev"},
{"name":"修复系统语言到中文", "command":"sudo localedef -c -i zh_CN -f UTF-8 zh_CN.UTF-8"}, {"name":"修复系统语言到中文", "command":"sudo localedef -c -i zh_CN -f UTF-8 zh_CN.UTF-8"},
@@ -352,7 +362,7 @@ class D {
{"name":"拉流测试", "command":"ffplay rtsp://127.0.0.1:8554/stream &"}, {"name":"拉流测试", "command":"ffplay rtsp://127.0.0.1:8554/stream &"},
{"name":"关机", "command":"stopvnc\nexit\nexit"}, {"name":"关机", "command":"stopvnc\nexit\nexit"},
{"name":"???", "command":"timeout 8 cmatrix"}]; {"name":"???", "command":"timeout 8 cmatrix"}];
//默认快捷指令 //默认小键盘
static const termCommands = [ static const termCommands = [
{"name": "Esc", "key": TerminalKey.escape}, {"name": "Esc", "key": TerminalKey.escape},
{"name": "Tab", "key": TerminalKey.tab}, {"name": "Tab", "key": TerminalKey.tab},
@@ -377,28 +387,8 @@ class D {
{"name": "F10", "key": TerminalKey.f10}, {"name": "F10", "key": TerminalKey.f10},
{"name": "F11", "key": TerminalKey.f11}, {"name": "F11", "key": TerminalKey.f11},
{"name": "F12", "key": TerminalKey.f12}, {"name": "F12", "key": TerminalKey.f12},
]; ];
}
// Global variables
class G {
static late final String dataPath;
static Pty? audioPty;
static late WebViewController controller;
static late BuildContext homePageStateContext;
static late int currentContainer; //目前运行第几个容器
static late Map<int, TermPty> termPtys; //为容器<int>存放TermPty数据
static late AdManager ads; //广告实例
static late VirtualKeyboard keyboard; //存储ctrl, shift, alt状态
static bool maybeCtrlJ = false; //为了区分按下的ctrl+J和enter而准备的变量
static double termFontScale = 1; //终端字体大小存储为G.prefs的termFontScale
static int adsWatchedThisTime = 0; //本次启动应用看的广告数
static bool isStreamServerStarted = false;
static bool isStreaming = false;
static int? streamingId;
static String streamingOutput = "";
static late Pty streamServerPty;
//看广告可以获得的奖励。 //看广告可以获得的奖励。
//weight抽奖权重singleUse使用一次花费的数量amount抽中可以获得的数量 //weight抽奖权重singleUse使用一次花费的数量amount抽中可以获得的数量
@@ -420,12 +410,60 @@ class G {
"enableTerminalCommands" : 3, "enableTerminalCommands" : 3,
"changeTermMaxLines" : 6, "changeTermMaxLines" : 6,
"changeFFmpegCommand" : 8, "changeFFmpegCommand" : 8,
"enableVirgl" : 10,
"unlockOnce" : 1, //临时解锁需要看的广告数 "unlockOnce" : 1, //临时解锁需要看的广告数
"unlockToday" : 2, //当日解锁需要看的广告数 "unlockToday" : 2, //当日解锁需要看的广告数
}; };
static const String boot = "\$DATA_DIR/bin/proot -H --change-id=1000:1000 --pwd=/home/tiny --rootfs=\$CONTAINER_DIR --mount=/system --mount=/apex --kill-on-exit --mount=/storage:/storage --sysvipc -L --link2symlink --mount=/proc:/proc --mount=/dev:/dev --mount=\$CONTAINER_DIR/tmp:/dev/shm --mount=/dev/urandom:/dev/random --mount=/proc/self/fd:/dev/fd --mount=/proc/self/fd/0:/dev/stdin --mount=/proc/self/fd/1:/dev/stdout --mount=/proc/self/fd/2:/dev/stderr --mount=/dev/null:/dev/tty0 --mount=/dev/null:/proc/sys/kernel/cap_last_cap --mount=/storage/self/primary:/media/sd --mount=\$DATA_DIR/share:/home/tiny/公共 --mount=\$DATA_DIR/tiny:/home/tiny/.local/share/tiny --mount=/storage/self/primary/Fonts:/usr/share/fonts/wpsm --mount=/storage/self/primary/AppFiles/Fonts:/usr/share/fonts/yozom --mount=/system/fonts:/usr/share/fonts/androidm --mount=/storage/self/primary/Pictures:/home/tiny/图片 --mount=/storage/self/primary/Music:/home/tiny/音乐 --mount=/storage/self/primary/Movies:/home/tiny/视频 --mount=/storage/self/primary/Download:/home/tiny/下载 --mount=/storage/self/primary/DCIM:/home/tiny/照片 --mount=/storage/self/primary/Documents:/home/tiny/文档 --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/.tmoe-container.stat:/proc/stat --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/.tmoe-container.version:/proc/version --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/bus:/proc/bus --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/buddyinfo:/proc/buddyinfo --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/cgroups:/proc/cgroups --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/consoles:/proc/consoles --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/crypto:/proc/crypto --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/devices:/proc/devices --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/diskstats:/proc/diskstats --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/execdomains:/proc/execdomains --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/fb:/proc/fb --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/filesystems:/proc/filesystems --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/interrupts:/proc/interrupts --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/iomem:/proc/iomem --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/ioports:/proc/ioports --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/kallsyms:/proc/kallsyms --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/keys:/proc/keys --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/key-users:/proc/key-users --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/kpageflags:/proc/kpageflags --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/loadavg:/proc/loadavg --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/locks:/proc/locks --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/misc:/proc/misc --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/modules:/proc/modules --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/pagetypeinfo:/proc/pagetypeinfo --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/partitions:/proc/partitions --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/sched_debug:/proc/sched_debug --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/softirqs:/proc/softirqs --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/timer_list:/proc/timer_list --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/uptime:/proc/uptime --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/vmallocinfo:/proc/vmallocinfo --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/vmstat:/proc/vmstat --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/zoneinfo:/proc/zoneinfo /usr/bin/env -i HOSTNAME=TINY HOME=/home/tiny USER=tiny TERM=xterm-256color SDL_IM_MODULE=fcitx XMODIFIERS=@im=fcitx QT_IM_MODULE=fcitx GTK_IM_MODULE=fcitx TMOE_CHROOT=false TMOE_PROOT=true TMPDIR=/tmp MOZ_FAKE_NO_SANDBOX=1 DISPLAY=:4 PULSE_SERVER=tcp:127.0.0.1:4718 LANG=zh_CN.UTF-8 SHELL=/bin/bash PATH=/usr/local/sbin:/usr/local/bin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/games:/usr/local/games \$EXTRA_OPT /bin/bash -l";
static final ButtonStyle commandButtonStyle = OutlinedButton.styleFrom(
tapTargetSize: MaterialTapTargetSize.shrinkWrap,
minimumSize: const Size(0, 0),
padding: const EdgeInsets.fromLTRB(4, 2, 4, 2)
);
static final ButtonStyle controlButtonStyle = OutlinedButton.styleFrom(
textStyle: const TextStyle(fontWeight: FontWeight.w400),
side: const BorderSide(color: Color(0x1F000000)),
tapTargetSize: MaterialTapTargetSize.shrinkWrap,
minimumSize: const Size(0, 0),
padding: const EdgeInsets.fromLTRB(8, 4, 8, 4)
);
}
// Global variables
class G {
static late final String dataPath;
static Pty? audioPty;
static late WebViewController controller;
static late BuildContext homePageStateContext;
static late int currentContainer; //目前运行第几个容器
static late Map<int, TermPty> termPtys; //为容器<int>存放TermPty数据
static late AdManager ads; //广告实例
static late VirtualKeyboard keyboard; //存储ctrl, shift, alt状态
static bool maybeCtrlJ = false; //为了区分按下的ctrl+J和enter而准备的变量
static ValueNotifier<double> termFontScale = ValueNotifier(1); //终端字体大小存储为G.prefs的termFontScale
static int adsWatchedThisTime = 0; //本次启动应用看的广告数
static bool isStreamServerStarted = false;
static bool isStreaming = false;
//static int? streamingPid;
static String streamingOutput = "";
static late Pty streamServerPty;
static bool isVirglServerStarted = false;
static late Pty virglServerPty;
//static int? virglPid;
static ValueNotifier<int> pageIndex = ValueNotifier(0); //主界面索引
static ValueNotifier<bool> terminalPageChange = ValueNotifier(true); //更改值,用于刷新小键盘
static ValueNotifier<bool> bannerAdsChange = ValueNotifier(true); //更改值用于刷新banner广告
static ValueNotifier<bool> bootTextChange = ValueNotifier(true); //更改值,用于刷新启动命令
static ValueNotifier<String> updateText = ValueNotifier("小小电脑"); //加载界面的说明文字
static late SharedPreferences prefs; static late SharedPreferences prefs;
} }
@@ -515,6 +553,8 @@ class Workflow {
Util.createDirFromString("${G.dataPath}/tmp"); Util.createDirFromString("${G.dataPath}/tmp");
//给proot的tmp文件夹虽然我不知道为什么proot要这个 //给proot的tmp文件夹虽然我不知道为什么proot要这个
Util.createDirFromString("${G.dataPath}/proot_tmp"); Util.createDirFromString("${G.dataPath}/proot_tmp");
//给pulseaudio的tmp文件夹
Util.createDirFromString("${G.dataPath}/pulseaudio_tmp");
//解压后得到bin文件夹和libexec文件夹 //解压后得到bin文件夹和libexec文件夹
//bin存放了proot, pulseaudio, tar等 //bin存放了proot, pulseaudio, tar等
//libexec存放了proot loader //libexec存放了proot loader
@@ -522,6 +562,12 @@ class Workflow {
"assets/assets.zip", "assets/assets.zip",
"${G.dataPath}/assets.zip", "${G.dataPath}/assets.zip",
); );
//patch.tar.gz存放了tiny文件夹
//里面是一些补丁,会被挂载到~/.local/share/tiny
await Util.copyAsset(
"assets/patch.tar.gz",
"${G.dataPath}/patch.tar.gz",
);
//dddd //dddd
await Util.copyAsset( await Util.copyAsset(
"assets/busybox", "assets/busybox",
@@ -532,29 +578,35 @@ class Workflow {
export DATA_DIR=${G.dataPath} export DATA_DIR=${G.dataPath}
cd \$DATA_DIR cd \$DATA_DIR
chmod +x busybox chmod +x busybox
\$DATA_DIR/busybox unzip assets.zip \$DATA_DIR/busybox unzip -o assets.zip
chmod -R +x bin/* chmod -R +x bin/*
chmod -R +x libexec/proot/* chmod -R +x libexec/proot/*
chmod 1777 tmp chmod 1777 tmp
ln -s \$DATA_DIR/busybox \$DATA_DIR/bin/xz ln -sf \$DATA_DIR/busybox \$DATA_DIR/bin/xz
\$DATA_DIR/busybox rm -rf assets.zip ln -sf \$DATA_DIR/busybox \$DATA_DIR/bin/gzip
\$DATA_DIR/bin/tar zxf patch.tar.gz
\$DATA_DIR/busybox rm -rf assets.zip patch.tar.gz
"""); """);
} }
//初次启动要做的事情 //初次启动要做的事情
static Future<void> initForFirstTime() async { static Future<void> initForFirstTime() async {
//首先设置bootstrap //首先设置bootstrap
G.updateText.value = "正在安装引导包";
await setupBootstrap(); await setupBootstrap();
G.updateText.value = "正在复制容器系统";
//存放容器的文件夹0和存放硬链接的文件夹.l2s //存放容器的文件夹0和存放硬链接的文件夹.l2s
Util.createDirFromString("${G.dataPath}/containers/0/.l2s"); Util.createDirFromString("${G.dataPath}/containers/0/.l2s");
//这个是容器rootfs被split命令分成了xa* //这个是容器rootfs被split命令分成了xa*
//首次启动,就用这个,别让用户另选了 //首次启动,就用这个,别让用户另选了
//TODO: 这个字符串列表太丑陋了 //TODO: 这个字符串列表太丑陋了
for (String name in ["xaa", "xab", "xac", "xad", "xae", "xaf", "xag", "xah", "xai"]) { for (String name in ["xaa", "xab", "xac", "xad", "xae", "xaf", "xag", "xah", "xai", "xaj"]) {
//for (String name in ["xaa", "xab", "xac", "xad", "xae", "xaf", "xag", "xah", "xai", "xaj", "xak", "xal", "xam", "xan", "xao", "xap", "xaq"]) { //for (String name in ["xaa", "xab", "xac", "xad", "xae", "xaf", "xag", "xah", "xai", "xaj", "xak", "xal", "xam", "xan", "xao", "xap", "xaq"]) {
await Util.copyAsset("assets/$name", "${G.dataPath}/$name"); await Util.copyAsset("assets/$name", "${G.dataPath}/$name");
} }
//-J //-J
G.updateText.value = "正在安装容器系统";
await Util.execute( await Util.execute(
""" """
export DATA_DIR=${G.dataPath} export DATA_DIR=${G.dataPath}
@@ -587,23 +639,12 @@ done
//$DATA_DIR是数据文件夹, $CONTAINER_DIR是容器根目录 //$DATA_DIR是数据文件夹, $CONTAINER_DIR是容器根目录
await G.prefs.setStringList("containersInfo", ["""{ await G.prefs.setStringList("containersInfo", ["""{
"name":"Debian Bookworm", "name":"Debian Bookworm",
"boot":"\$DATA_DIR/bin/proot -H --change-id=1000:1000 --pwd=/home/tiny --rootfs=\$CONTAINER_DIR --mount=/system --mount=/apex --kill-on-exit --mount=/storage:/storage --sysvipc -L --link2symlink --mount=/proc:/proc --mount=/dev:/dev --mount=\$CONTAINER_DIR/tmp:/dev/shm --mount=/dev/urandom:/dev/random --mount=/proc/self/fd:/dev/fd --mount=/proc/self/fd/0:/dev/stdin --mount=/proc/self/fd/1:/dev/stdout --mount=/proc/self/fd/2:/dev/stderr --mount=/dev/null:/dev/tty0 --mount=/dev/null:/proc/sys/kernel/cap_last_cap --mount=/storage/self/primary:/media/sd --mount=\$DATA_DIR/share:/home/tiny/公共 --mount=/storage/self/primary/Fonts:/usr/share/fonts/wpsm --mount=/storage/self/primary/AppFiles/Fonts:/usr/share/fonts/yozom --mount=/system/fonts:/usr/share/fonts/androidm --mount=/storage/self/primary/Pictures:/home/tiny/图片 --mount=/storage/self/primary/Music:/home/tiny/音乐 --mount=/storage/self/primary/Movies:/home/tiny/视频 --mount=/storage/self/primary/Download:/home/tiny/下载 --mount=/storage/self/primary/DCIM:/home/tiny/照片 --mount=/storage/self/primary/Documents:/home/tiny/文档 --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/.tmoe-container.stat:/proc/stat --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/.tmoe-container.version:/proc/version --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/bus:/proc/bus --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/buddyinfo:/proc/buddyinfo --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/cgroups:/proc/cgroups --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/consoles:/proc/consoles --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/crypto:/proc/crypto --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/devices:/proc/devices --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/diskstats:/proc/diskstats --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/execdomains:/proc/execdomains --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/fb:/proc/fb --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/filesystems:/proc/filesystems --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/interrupts:/proc/interrupts --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/iomem:/proc/iomem --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/ioports:/proc/ioports --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/kallsyms:/proc/kallsyms --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/keys:/proc/keys --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/key-users:/proc/key-users --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/kpageflags:/proc/kpageflags --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/loadavg:/proc/loadavg --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/locks:/proc/locks --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/misc:/proc/misc --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/modules:/proc/modules --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/pagetypeinfo:/proc/pagetypeinfo --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/partitions:/proc/partitions --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/sched_debug:/proc/sched_debug --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/softirqs:/proc/softirqs --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/timer_list:/proc/timer_list --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/uptime:/proc/uptime --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/vmallocinfo:/proc/vmallocinfo --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/vmstat:/proc/vmstat --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/zoneinfo:/proc/zoneinfo /usr/bin/env -i HOSTNAME=TINY HOME=/home/tiny USER=tiny TERM=xterm-256color SDL_IM_MODULE=fcitx XMODIFIERS=@im=fcitx QT_IM_MODULE=fcitx GTK_IM_MODULE=fcitx TMOE_CHROOT=false TMOE_PROOT=true TMPDIR=/tmp MOZ_FAKE_NO_SANDBOX=1 DISPLAY=:4 PULSE_SERVER=tcp:127.0.0.1:4718 LANG=zh_CN.UTF-8 SHELL=/bin/bash PATH=/usr/local/sbin:/usr/local/bin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/games:/usr/local/games \$EXTRA_OPT /bin/bash -l", "boot":"${D.boot}",
"vnc":"startnovnc &", "vnc":"startnovnc &",
"vncUrl":"http://localhost:36082/vnc.html?host=localhost&port=36082&autoconnect=true&resize=remote&password=12345678", "vncUrl":"http://localhost:36082/vnc.html?host=localhost&port=36082&autoconnect=true&resize=remote&password=12345678",
"commands":${jsonEncode(D.commands)} "commands":${jsonEncode(D.commands)}
}"""]); }"""]);
// await G.prefs.setStringList("adsBonus", []); G.updateText.value = "安装完成";
// await G.prefs.setInt("adsWatchedTotal", 0);
// await G.prefs.setBool("isTerminalCommandsEnabled", false);
// await G.prefs.setBool("isTerminalWriteEnabled", false);
// await G.prefs.setBool("isBannerAdsClosed", false);
// await G.prefs.setBool("autoLaunchVnc", true);
// await G.prefs.setInt("defaultAudioPort", 4718);
// await G.prefs.setInt("defaultContainer", 0);
// await G.prefs.setInt("termMaxLines", 4095);
// await G.prefs.setDouble("termFontScale", 1);
// await G.prefs.setInt("vip", 0);
// await G.prefs.setBool("isStickyKey", true);
} }
static Future<void> initData() async { static Future<void> initData() async {
@@ -629,26 +670,36 @@ done
} }
G.currentContainer = Util.getGlobal("defaultContainer") as int; G.currentContainer = Util.getGlobal("defaultContainer") as int;
G.termFontScale = Util.getGlobal("termFontScale") as double; //是否需要重新安装引导包?
if (Util.getGlobal("reinstallBootstrap")) {
G.updateText.value = "正在重新安装引导包";
await setupBootstrap();
G.prefs.setBool("reinstallBootstrap", false);
}
G.termFontScale.value = Util.getGlobal("termFontScale") as double;
G.controller = WebViewController()..setJavaScriptMode(JavaScriptMode.unrestricted); G.controller = WebViewController()..setJavaScriptMode(JavaScriptMode.unrestricted);
//恢复临时开启的功能 //恢复临时开启的功能
if (Util.shouldWatchAds(G.adsRequired["changeFFmpegCommand"]!)) { if (Util.shouldWatchAds(D.adsRequired["changeFFmpegCommand"]!)) {
await G.prefs.remove("defaultFFmpegCommand"); await G.prefs.remove("defaultFFmpegCommand");
} }
if (Util.shouldWatchAds(G.adsRequired["changeTermMaxLines"]!)) { if (Util.shouldWatchAds(D.adsRequired["changeTermMaxLines"]!)) {
await G.prefs.setInt("termMaxLines", 4095); await G.prefs.setInt("termMaxLines", 4095);
} }
if (Util.shouldWatchAds(G.adsRequired["closeBannerAds"]!)) { if (Util.shouldWatchAds(D.adsRequired["closeBannerAds"]!)) {
await G.prefs.setBool("isBannerAdsClosed", false); await G.prefs.setBool("isBannerAdsClosed", false);
} }
if (Util.shouldWatchAds(G.adsRequired["enableTerminalWrite"]!)) { if (Util.shouldWatchAds(D.adsRequired["enableTerminalWrite"]!)) {
await G.prefs.setBool("isTerminalWriteEnabled", false); await G.prefs.setBool("isTerminalWriteEnabled", false);
} }
if (Util.shouldWatchAds(G.adsRequired["enableTerminalCommands"]!)) { if (Util.shouldWatchAds(D.adsRequired["enableTerminalCommands"]!)) {
await G.prefs.setBool("isTerminalCommandsEnabled", false); await G.prefs.setBool("isTerminalCommandsEnabled", false);
} }
if (Util.shouldWatchAds(D.adsRequired["enableVirgl"]!)) {
await G.prefs.setBool("virgl", false);
}
} }
@@ -679,23 +730,31 @@ done
//pulseaudio还需要一个文件夹放配置这里用share //pulseaudio还需要一个文件夹放配置这里用share
G.audioPty!.write(const Utf8Encoder().convert(""" G.audioPty!.write(const Utf8Encoder().convert("""
export DATA_DIR=${G.dataPath} export DATA_DIR=${G.dataPath}
cd \$DATA_DIR/..
export TMPDIR=\$PWD/cache
cd \$DATA_DIR
export HOME=\$DATA_DIR/share
export LD_LIBRARY_PATH=\$DATA_DIR/bin
\$DATA_DIR/busybox sed "s/4713/${Util.getGlobal("defaultAudioPort") as int}/g" \$DATA_DIR/bin/pulseaudio.conf > \$DATA_DIR/bin/pulseaudio.conf.tmp \$DATA_DIR/busybox sed "s/4713/${Util.getGlobal("defaultAudioPort") as int}/g" \$DATA_DIR/bin/pulseaudio.conf > \$DATA_DIR/bin/pulseaudio.conf.tmp
\$DATA_DIR/bin/pulseaudio -F \$DATA_DIR/bin/pulseaudio.conf.tmp TMPDIR=\$DATA_DIR/pulseaudio_tmp HOME=\$DATA_DIR/pulseaudio_tmp XDG_CONFIG_HOME=\$DATA_DIR/pulseaudio_tmp LD_LIBRARY_PATH=\$DATA_DIR/bin \$DATA_DIR/bin/pulseaudio -F \$DATA_DIR/bin/pulseaudio.conf.tmp
exit exit
""")); """));
await G.audioPty?.exitCode; await G.audioPty?.exitCode;
} }
static Future<void> launchCurrentContainer() async { static Future<void> launchCurrentContainer() async {
String extraOpt = "";
if (Util.getGlobal("getifaddrsBridge")) {
Util.execute("${G.dataPath}/bin/getifaddrs_bridge_server ${G.dataPath}/containers/${G.currentContainer}/tmp/.getifaddrs-bridge");
extraOpt += "LD_PRELOAD=/home/tiny/.local/share/tiny/extra/getifaddrs_bridge_client_lib.so ";
}
if (Util.getGlobal("virgl")) {
Util.execute("""
export DATA_DIR=${G.dataPath}
export CONTAINER_DIR=\$DATA_DIR/containers/${G.currentContainer}
${G.dataPath}/bin/virgl_test_server ${Util.getGlobal("defaultVirglCommand")}""");
extraOpt += "${Util.getGlobal("defaultVirglOpt")} ";
}
Util.termWrite( Util.termWrite(
""" """
export DATA_DIR=${G.dataPath} export DATA_DIR=${G.dataPath}
export CONTAINER_DIR=\$DATA_DIR/containers/${G.currentContainer} export CONTAINER_DIR=\$DATA_DIR/containers/${G.currentContainer}
export EXTRA_OPT="$extraOpt"
#export PROOT_L2S_DIR=\$DATA_DIR/containers/0/.l2s #export PROOT_L2S_DIR=\$DATA_DIR/containers/0/.l2s
cd \$DATA_DIR cd \$DATA_DIR
export PROOT_TMP_DIR=\$DATA_DIR/proot_tmp export PROOT_TMP_DIR=\$DATA_DIR/proot_tmp

View File

@@ -101,10 +101,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: file name: file
sha256: "1b92bec4fc2a72f59a8e15af5f52cd441e4a7860b49499d69dfa817af20e925d" sha256: "5fc22d7c25582e38ad9a8515372cd9a93834027aacf1801cf01164dac0ffa08c"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "6.1.4" version: "7.0.0"
flutter: flutter:
dependency: "direct main" dependency: "direct main"
description: flutter description: flutter
@@ -212,10 +212,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: path_provider_android name: path_provider_android
sha256: "6b8b19bd80da4f11ce91b2d1fb931f3006911477cec227cce23d3253d80df3f1" sha256: e595b98692943b4881b219f0a9e3945118d3c16bd7e2813f98ec6e532d905f72
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.2.0" version: "2.2.1"
path_provider_foundation: path_provider_foundation:
dependency: transitive dependency: transitive
description: description:
@@ -276,10 +276,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: permission_handler_platform_interface name: permission_handler_platform_interface
sha256: f2343e9fa9c22ae4fd92d4732755bfe452214e7189afcc097380950cf567b4b2 sha256: "6760eb5ef34589224771010805bea6054ad28453906936f843a8cc4d3a55c4a4"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "3.11.5" version: "3.12.0"
permission_handler_windows: permission_handler_windows:
dependency: transitive dependency: transitive
description: description:
@@ -292,10 +292,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: platform name: platform
sha256: ae68c7bfcd7383af3629daafb32fb4e8681c7154428da4febcff06200585f102 sha256: "0a279f0707af40c890e80b1e9df8bb761694c074ba7e1d4ab1bc4b728e200b59"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "3.1.2" version: "3.1.3"
platform_info: platform_info:
dependency: transitive dependency: transitive
description: description:
@@ -328,23 +328,14 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "3.1.2" version: "3.1.2"
saf:
dependency: "direct main"
description:
path: "."
ref: HEAD
resolved-ref: e3aa3fcbd031f2645688e97ebd5a4f14a014bd42
url: "https://github.com/Cateners/saf"
source: git
version: "1.0.3+3"
shared_preferences: shared_preferences:
dependency: "direct main" dependency: "direct main"
description: description:
name: shared_preferences name: shared_preferences
sha256: b7f41bad7e521d205998772545de63ff4e6c97714775902c199353f8bf1511ac sha256: "81429e4481e1ccfb51ede496e916348668fd0921627779233bd24cc3ff6abd02"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.2.1" version: "2.2.2"
shared_preferences_android: shared_preferences_android:
dependency: transitive dependency: transitive
description: description:
@@ -365,10 +356,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: shared_preferences_linux name: shared_preferences_linux
sha256: c2eb5bf57a2fe9ad6988121609e47d3e07bb3bdca5b6f8444e4cf302428a128a sha256: "9f2cbcf46d4270ea8be39fa156d86379077c8a5228d9dfdb1164ae0bb93f1faa"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.3.1" version: "2.3.2"
shared_preferences_platform_interface: shared_preferences_platform_interface:
dependency: transitive dependency: transitive
description: description:
@@ -389,10 +380,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: shared_preferences_windows name: shared_preferences_windows
sha256: f763a101313bd3be87edffe0560037500967de9c394a714cd598d945517f694f sha256: "841ad54f3c8381c480d0c9b508b89a34036f512482c407e6df7a9c4aa2ef8f59"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.3.1" version: "2.3.2"
sky_engine: sky_engine:
dependency: transitive dependency: transitive
description: flutter description: flutter
@@ -458,74 +449,74 @@ packages:
dependency: "direct main" dependency: "direct main"
description: description:
name: unity_ads_plugin name: unity_ads_plugin
sha256: "2b19ff02089e5a0d1a6549a2cd9d2baf5f8733bdda296d947d411a293f0bffda" sha256: "75b0b87697a9601971eacd2cd37458b88cf88f062af6f21c67c9fb28a11699d9"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.3.8" version: "0.3.10"
url_launcher: url_launcher:
dependency: "direct main" dependency: "direct main"
description: description:
name: url_launcher name: url_launcher
sha256: "47e208a6711459d813ba18af120d9663c20bdf6985d6ad39fe165d2538378d27" sha256: b1c9e98774adf8820c96fbc7ae3601231d324a7d5ebd8babe27b6dfac91357ba
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "6.1.14" version: "6.2.1"
url_launcher_android: url_launcher_android:
dependency: transitive dependency: transitive
description: description:
name: url_launcher_android name: url_launcher_android
sha256: b04af59516ab45762b2ca6da40fa830d72d0f6045cd97744450b73493fa76330 sha256: "31222ffb0063171b526d3e569079cf1f8b294075ba323443fdc690842bfd4def"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "6.1.0" version: "6.2.0"
url_launcher_ios: url_launcher_ios:
dependency: transitive dependency: transitive
description: description:
name: url_launcher_ios name: url_launcher_ios
sha256: "7c65021d5dee51813d652357bc65b8dd4a6177082a9966bc8ba6ee477baa795f" sha256: "4ac97281cf60e2e8c5cc703b2b28528f9b50c8f7cebc71df6bdf0845f647268a"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "6.1.5" version: "6.2.0"
url_launcher_linux: url_launcher_linux:
dependency: transitive dependency: transitive
description: description:
name: url_launcher_linux name: url_launcher_linux
sha256: b651aad005e0cb06a01dbd84b428a301916dc75f0e7ea6165f80057fee2d8e8e sha256: "9f2d390e096fdbe1e6e6256f97851e51afc2d9c423d3432f1d6a02a8a9a8b9fd"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "3.0.6" version: "3.1.0"
url_launcher_macos: url_launcher_macos:
dependency: transitive dependency: transitive
description: description:
name: url_launcher_macos name: url_launcher_macos
sha256: b55486791f666e62e0e8ff825e58a023fd6b1f71c49926483f1128d3bbd8fe88 sha256: b7244901ea3cf489c5335bdacda07264a6e960b1c1b1a9f91e4bc371d9e68234
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "3.0.7" version: "3.1.0"
url_launcher_platform_interface: url_launcher_platform_interface:
dependency: transitive dependency: transitive
description: description:
name: url_launcher_platform_interface name: url_launcher_platform_interface
sha256: "95465b39f83bfe95fcb9d174829d6476216f2d548b79c38ab2506e0458787618" sha256: "980e8d9af422f477be6948bdfb68df8433be71f5743a188968b0c1b887807e50"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.1.5" version: "2.2.0"
url_launcher_web: url_launcher_web:
dependency: transitive dependency: transitive
description: description:
name: url_launcher_web name: url_launcher_web
sha256: "2942294a500b4fa0b918685aff406773ba0a4cd34b7f42198742a94083020ce5" sha256: "7fd2f55fe86cea2897b963e864dc01a7eb0719ecc65fcef4c1cc3d686d718bb2"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.0.20" version: "2.2.0"
url_launcher_windows: url_launcher_windows:
dependency: transitive dependency: transitive
description: description:
name: url_launcher_windows name: url_launcher_windows
sha256: "95fef3129dc7cfaba2bc3d5ba2e16063bb561fc6d78e63eee16162bc70029069" sha256: "7754a1ad30ee896b265f8d14078b0513a4dba28d358eabb9d5f339886f4a1adc"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "3.0.8" version: "3.1.0"
vector_math: vector_math:
dependency: transitive dependency: transitive
description: description:
@@ -546,18 +537,18 @@ packages:
dependency: "direct main" dependency: "direct main"
description: description:
name: webview_flutter name: webview_flutter
sha256: c1ab9b81090705c6069197d9fdc1625e587b52b8d70cdde2339d177ad0dbb98e sha256: "42393b4492e629aa3a88618530a4a00de8bb46e50e7b3993fedbfdc5352f0dbf"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "4.4.1" version: "4.4.2"
webview_flutter_android: webview_flutter_android:
dependency: transitive dependency: transitive
description: description:
name: webview_flutter_android name: webview_flutter_android
sha256: b0cd33dd7d3dd8e5f664e11a19e17ba12c352647269921a3b568406b001f1dff sha256: "8326ee235f87605a2bfc444a4abc897f4abc78d83f054ba7d3d1074ce82b4fbf"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "3.12.0" version: "3.12.1"
webview_flutter_platform_interface: webview_flutter_platform_interface:
dependency: transitive dependency: transitive
description: description:
@@ -570,10 +561,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: webview_flutter_wkwebview name: webview_flutter_wkwebview
sha256: "30b9af6bdd457b44c08748b9190d23208b5165357cc2eb57914fee1366c42974" sha256: accdaaa49a2aca2dc3c3230907988954cdd23fed0a19525d6c9789d380f4dc76
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "3.9.1" version: "3.9.4"
win32: win32:
dependency: transitive dependency: transitive
description: description:

View File

@@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
# In Windows, build-name is used as the major, minor, and patch parts # In Windows, build-name is used as the major, minor, and patch parts
# of the product and file versions while build-number is used as the build suffix. # of the product and file versions while build-number is used as the build suffix.
version: 1.0.10+2 version: 1.0.11+1
environment: environment:
sdk: '>=3.1.0 <4.0.0' sdk: '>=3.1.0 <4.0.0'
@@ -43,8 +43,6 @@ dependencies:
unity_ads_plugin: ^0.3.8 unity_ads_plugin: ^0.3.8
clipboard: ^0.1.3 clipboard: ^0.1.3
ffmpeg_kit_flutter_full_gpl: ^6.0.3 ffmpeg_kit_flutter_full_gpl: ^6.0.3
saf:
git: https://github.com/Cateners/saf
# The following adds the Cupertino Icons font to your application. # The following adds the Cupertino Icons font to your application.