Skip to content

[Bug] ColorOS 16 上使用精简tar导致全部备份失败 #486

Description

@Mcpezht

Describe the bug
在ColorOS 16上使用的 tar 是精简版,它不支持 --totals 这个GNU tar的扩展选项。应用在尝试打包每个应用时都因为这条命令失败而中断.

To Reproduce
Steps to reproduce the behavior:

  1. 打开程序
  2. 配置备份选项
  3. 开始备份
  4. 全部备份打红叉,失败

Expected behavior
备份打绿色勾,成功

Screenshots
Screenshot

Smartphone (please complete the following information):

  • Device: OnePlus Ace 5
  • OS: ColorOS 16.0.8, Android 16
  • Version PKG110_16.0.8.300(CN01B40P02)

Additional context
我将Logcat获取到的程序日志给DeepSeek后的结果:

--------DeepSeek--------
根据你提供的日志,我发现了导致备份失败的直接原因:你的 tar 命令不支持 --totals 参数。
日志中反复出现关键错误 tar: Unknown option 'totals',导致后续的压缩和校验全部失败。

🔍 问题根源分析
你在ColorOS(PKG110系统)上使用的 tar 是精简版(可能来自BusyBox或Toybox),它不支持 --totals 这个GNU tar的扩展选项。应用在尝试打包每个应用时都因为这条命令失败而中断,所以所有备份都打上了红叉。

✅ 解决方案

安装完整的GNU ta
在手机上安装 BusyBox 或 Toybox 的完整版(推荐从 Magisk 模块或 Termux 中安装 gnu-tar)。
确保安装后,完整版的 tar 路径(如 /data/data/com.termux/files/usr/bin/tar)在系统PATH中优先于系统自带的精简版 tar。
你可以通过 which tar 命令检查当前使用的是哪个 tar。

💎总结
核心问题是你设备上的 tar 命令太精简了。
--------DeepSeek--------

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions