Skip to content

[Bug] 应用备份失败 #443

@veltlion

Description

@veltlion

Describe the bug
应用备份失败

Screenshots
Image

Smartphone (please complete the following information):

  • Device: S912 tvbox
  • OS: slimBOXtv 9.18 (Android 9 32bit)
  • Version: Image

Additional context
logcat

11-20 15:56:49.858 23053 23114 D BackupServiceLocalImpl: Preprocessing is starting.
11-20 15:56:49.878 23053 28745 D SHELL_IN  : settings get secure default_input_method
11-20 15:56:49.994 23053 28745 D SHELL_OUT : org.liskovsoft.androidtv.rukeyboard/com.liskovsoft.leankeyboard.ime.LeanbackImeService
11-20 15:56:49.995 23053 28745 D SHELL_CODE: 0
11-20 15:56:49.996 23053 28745 D SHELL_IN  : settings get secure enabled_accessibility_services
11-20 15:56:50.107 23053 28745 D SHELL_OUT : null
11-20 15:56:50.108 23053 28745 D SHELL_CODE: 0
11-20 15:56:50.111 23053 28745 D BackupServiceLocalImpl: InputMethods: org.liskovsoft.androidtv.rukeyboard/com.liskovsoft.leankeyboard.ime.LeanbackImeService.
11-20 15:56:50.113 23053 28745 D BackupServiceLocalImpl: AccessibilityServices: null.
11-20 15:56:50.120 23053 28745 D BackupServiceLocalImpl: Trying to create: /storage/emulated/0/DataBackup/apps.
11-20 15:56:50.127 23053 28745 D BackupServiceLocalImpl: Trying to create: /storage/emulated/0/DataBackup/configs.
11-20 15:56:50.886 23053 28745 D BackupServiceLocalImpl: Processing is starting.
11-20 15:56:50.905 23053 28745 D BackupServiceLocalImpl: Task count: 1.
11-20 15:56:50.908 23053 28744 D BackupServiceLocalImpl: Kill app option: OPTION_II
11-20 15:56:50.912 23053 28744 D BackupServiceLocalImpl: Current package: PackageEntity(id=1, indexInfo=PackageIndexInfo(opType=BACKUP, packageName=com.lonelycatgames.Xplore, userId=0, compressionType=ZSTD, preserveId=0, cloud=, backupDir=), packageInfo=PackageInfo(label=X-plore, versionName=4.44.00, versionCode=44400, flags=950648388, firstInstallTime=1483228900000, lastUpdateTime=1483228900000), extraInfo=PackageExtraInfo(uid=10072, hasKeystore=false, permissions=[PackagePermission(name=android.permission.READ_EXTERNAL_STORAGE, isGranted=true, op=59, mode=1), PackagePermission(name=android.permission.WRITE_EXTERNAL_STORAGE, isGranted=true, op=60, mode=1), PackagePermission(name=android.permission.REQUEST_INSTALL_PACKAGES, isGranted=true, op=66, mode=1), PackagePermission(name=android.permission.FOREGROUND_SERVICE, isGranted=true, op=76, mode=1)], ssaid=, lastBackupTime=0, blocked=false, activated=true, firstUpdated=true, enabled=true), dataStates=PackageDataStates(apkState=Selected, userState=Selected, userDeState=Selected, dataState=Selected, obbState=Selected, mediaState=Selected, permissionState=Selected, ssaidState=Selected), storageStats=PackageStorageStats(appBytes=35995648, cacheBytes=16384, dataBytes=32768, externalCacheBytes=0), dataStats=PackageDataStats(apkBytes=0, userBytes=0, userDeBytes=0, dataBytes=0, obbBytes=0, mediaBytes=0), displayStats=PackageDataStats(apkBytes=0, userBytes=0, userDeBytes=0, dataBytes=0, obbBytes=0, mediaBytes=0))
11-20 15:56:50.919 23053 28744 D BackupServiceLocalImpl: Trying to kill com.lonelycatgames.Xplore.
11-20 15:56:51.036 23053 28744 D PackagesBackupUtil: Backing up apk...
11-20 15:56:51.244 23053 30652 D SHELL_IN  : cd /data/app/Xplore
11-20 15:56:51.255 23053 30652 D SHELL_CODE: 0
11-20 15:56:51.256 23053 30652 D SHELL_IN  : tar --totals -cpf - ./*.apk | zstd -r -T0 --ultra -q --priority=rt -1 > "/storage/emulated/0/DataBackup/apps/com.lonelycatgames.Xplore/user_0/apk.tar.zst"
11-20 15:56:51.723 23053 30652 D SHELL_OUT : Total bytes written: 15185920 (15MiB, 56MiB/s)
11-20 15:56:51.724 23053 30652 D SHELL_CODE: 0
11-20 15:56:51.725 23053 30652 D SHELL_IN  : cd /
11-20 15:56:51.730 23053 30652 D SHELL_CODE: 0
11-20 15:56:51.735 23053 30669 D SHELL_IN  : zstd -d -c "/storage/emulated/0/DataBackup/apps/com.lonelycatgames.Xplore/user_0/apk.tar.zst" | tar -tf - > /dev/null 2>&1
11-20 15:56:51.755 23053 30669 D SHELL_OUT : Aborted 
11-20 15:56:51.755 23053 30669 D SHELL_CODE: 134
11-20 15:56:51.756 23053 30669 D CommonBackupUtil: /storage/emulated/0/DataBackup/apps/com.lonelycatgames.Xplore/user_0/apk.tar.zst is broken, trying to delete it.
11-20 15:56:51.815 23053 30652 D PackagesBackupUtil: Backing up user...
11-20 15:56:51.821 23053 28747 D PackagesBackupUtil: ExclusionList: ["com.lonelycatgames.Xplore/.ota", "com.lonelycatgames.Xplore/cache", "com.lonelycatgames.Xplore/lib", "com.lonelycatgames.Xplore/code_cache", "com.lonelycatgames.Xplore/no_backup"].
11-20 15:56:51.853 23053 30655 D SHELL_IN  : tar --totals --exclude="com.lonelycatgames.Xplore/.ota" --exclude="com.lonelycatgames.Xplore/cache" --exclude="com.lonelycatgames.Xplore/lib" --exclude="com.lonelycatgames.Xplore/code_cache" --exclude="com.lonelycatgames.Xplore/no_backup" -cpf - -C "/data/user/0" -- "com.lonelycatgames.Xplore" | zstd -r -T0 --ultra -q --priority=rt -1 > "/storage/emulated/0/DataBackup/apps/com.lonelycatgames.Xplore/user_0/user.tar.zst"
11-20 15:56:51.881 23053 30655 D SHELL_OUT : Total bytes written: 10240 (10KiB, 8.1MiB/s)
11-20 15:56:51.882 23053 30655 D SHELL_CODE: 0
11-20 15:56:51.886 23053 27717 D SHELL_IN  : zstd -d -c "/storage/emulated/0/DataBackup/apps/com.lonelycatgames.Xplore/user_0/user.tar.zst" | tar -tf - > /dev/null 2>&1
11-20 15:56:51.903 23053 27717 D SHELL_OUT : Aborted 
11-20 15:56:51.903 23053 27717 D SHELL_CODE: 134
11-20 15:56:51.905 23053 27717 D CommonBackupUtil: /storage/emulated/0/DataBackup/apps/com.lonelycatgames.Xplore/user_0/user.tar.zst is broken, trying to delete it.
11-20 15:56:51.967 23053 28747 D PackagesBackupUtil: Backing up user_de...
11-20 15:56:51.985 23053 30654 D PackagesBackupUtil: ExclusionList: ["com.lonelycatgames.Xplore/.ota", "com.lonelycatgames.Xplore/cache", "com.lonelycatgames.Xplore/lib", "com.lonelycatgames.Xplore/code_cache", "com.lonelycatgames.Xplore/no_backup"].
11-20 15:56:52.009 23053 27717 D SHELL_IN  : tar --totals --exclude="com.lonelycatgames.Xplore/.ota" --exclude="com.lonelycatgames.Xplore/cache" --exclude="com.lonelycatgames.Xplore/lib" --exclude="com.lonelycatgames.Xplore/code_cache" --exclude="com.lonelycatgames.Xplore/no_backup" -cpf - -C "/data/user_de/0" -- "com.lonelycatgames.Xplore" | zstd -r -T0 --ultra -q --priority=rt -1 > "/storage/emulated/0/DataBackup/apps/com.lonelycatgames.Xplore/user_0/user_de.tar.zst"
11-20 15:56:52.033 23053 27717 D SHELL_OUT : Total bytes written: 10240 (10KiB, 13MiB/s)
11-20 15:56:52.034 23053 27717 D SHELL_CODE: 0
11-20 15:56:52.039 23053 30669 D SHELL_IN  : zstd -d -c "/storage/emulated/0/DataBackup/apps/com.lonelycatgames.Xplore/user_0/user_de.tar.zst" | tar -tf - > /dev/null 2>&1
11-20 15:56:52.052 23053 30669 D SHELL_OUT : Aborted 
11-20 15:56:52.053 23053 30669 D SHELL_CODE: 134
11-20 15:56:52.053 23053 30669 D CommonBackupUtil: /storage/emulated/0/DataBackup/apps/com.lonelycatgames.Xplore/user_0/user_de.tar.zst is broken, trying to delete it.
11-20 15:56:52.089 23053 23142 D PackagesBackupUtil: Backing up data...
11-20 15:56:52.108 23053 23114 D PackagesBackupUtil: Not exist and skip: /data/media/0/Android/data/com.lonelycatgames.Xplore
11-20 15:56:52.149 23053 23114 D PackagesBackupUtil: Backing up obb...
11-20 15:56:52.169 23053 27717 D PackagesBackupUtil: Not exist and skip: /data/media/0/Android/obb/com.lonelycatgames.Xplore
11-20 15:56:52.204 23053 27717 D PackagesBackupUtil: Backing up media...
11-20 15:56:52.214 23053 28747 D PackagesBackupUtil: Not exist and skip: /data/media/0/Android/media/com.lonelycatgames.Xplore
11-20 15:56:52.249 23053 28747 D PackagesBackupUtil: Backing up permissions...
11-20 15:56:52.288 23053 28747 D PackagesBackupUtil: Permissions size: 4...
11-20 15:56:52.289 23053 28747 D PackagesBackupUtil: Permission name: android.permission.READ_EXTERNAL_STORAGE, isGranted: true, op: 59, mode: 1
11-20 15:56:52.290 23053 28747 D PackagesBackupUtil: Permission name: android.permission.WRITE_EXTERNAL_STORAGE, isGranted: true, op: 60, mode: 1
11-20 15:56:52.290 23053 28747 D PackagesBackupUtil: Permission name: android.permission.REQUEST_INSTALL_PACKAGES, isGranted: true, op: 66, mode: 1
11-20 15:56:52.291 23053 28747 D PackagesBackupUtil: Permission name: android.permission.FOREGROUND_SERVICE, isGranted: true, op: 76, mode: 1
11-20 15:56:52.292 23053 28747 D PackagesBackupUtil: Backing up ssaid...
11-20 15:56:52.300 23053 28747 D PackagesBackupUtil: Ssaid: 
11-20 15:56:52.332 23053 28747 D BackupServiceLocalImpl: PostProcessing is starting.
11-20 15:56:52.348 23053 30652 D BackupServiceLocalImpl: Backup itself enabled.
11-20 15:56:52.351 23053 30652 D CommonBackupUtil: Backing up itself...
11-20 15:56:56.590 23053 30652 D CommonBackupUtil: Copied from /data/app/com.xayah.databackup.foss-0Onr9ZMFnrCarAdzpj1x1g==/base.apk to /storage/emulated/0/DataBackup/DataBackup.apk.
11-20 15:56:57.979 23053 30652 D PackagesBackupUtil: Backing up icons...
11-20 15:56:57.983 23053 30652 D SHELL_IN  : tar --totals -cpf - -C "/data/user/0/com.xayah.databackup.foss/files" -- "icon" > "/storage/emulated/0/DataBackup/configs/icon.tar"
11-20 15:56:57.999 23053 30652 D SHELL_OUT : tar: memory exhausted
11-20 15:56:57.999 23053 30652 D SHELL_OUT : tar: Error is not recoverable: exiting now
11-20 15:56:58.000 23053 30652 D SHELL_CODE: 2
11-20 15:56:58.003 23053 27717 D SHELL_IN  : tar -tf "/storage/emulated/0/DataBackup/configs/icon.tar" > /dev/null 2>&1
11-20 15:56:58.014 23053 27717 D SHELL_CODE: 2
11-20 15:56:58.020 23053 27717 D CommonBackupUtil: /storage/emulated/0/DataBackup/configs/icon.tar is broken, trying to delete it.
11-20 15:56:58.989 23053 30655 D BackupServiceLocalImpl: Backup configs enabled.
11-20 15:56:58.990 23053 30655 D CommonBackupUtil: Backing up configs...
11-20 15:56:59.032 23053 30654 D SHELL_IN  : ime enable "org.liskovsoft.androidtv.rukeyboard/com.liskovsoft.leankeyboard.ime.LeanbackImeService"
11-20 15:56:59.123 23053 30654 D SHELL_OUT : Input method org.liskovsoft.androidtv.rukeyboard/com.liskovsoft.leankeyboard.ime.LeanbackImeService: already enabled
11-20 15:56:59.124 23053 30654 D SHELL_CODE: 0
11-20 15:56:59.125 23053 30654 D SHELL_IN  : ime set "org.liskovsoft.androidtv.rukeyboard/com.liskovsoft.leankeyboard.ime.LeanbackImeService"
11-20 15:56:59.220 23053 30654 D SHELL_OUT : Input method org.liskovsoft.androidtv.rukeyboard/com.liskovsoft.leankeyboard.ime.LeanbackImeService  selected
11-20 15:56:59.220 23053 30654 D SHELL_CODE: 0
11-20 15:56:59.221 23053 30654 D SHELL_IN  : settings put secure default_input_method "org.liskovsoft.androidtv.rukeyboard/com.liskovsoft.leankeyboard.ime.LeanbackImeService"
11-20 15:56:59.328 23053 30654 D SHELL_CODE: 0
11-20 15:56:59.329 23053 30654 D BackupServiceLocalImpl: InputMethods restored: org.liskovsoft.androidtv.rukeyboard/com.liskovsoft.leankeyboard.ime.LeanbackImeService.
11-20 15:56:59.334 23053 30654 D SHELL_IN  : settings put secure enabled_accessibility_services "null"
11-20 15:56:59.417 23053 30654 D SHELL_CODE: 0
11-20 15:56:59.418 23053 30654 D SHELL_IN  : settings put secure accessibility_enabled 1
11-20 15:56:59.502 23053 30654 D SHELL_CODE: 0
11-20 15:56:59.503 23053 30654 D BackupServiceLocalImpl: AccessibilityServices restored: null.
11-20 15:57:00.438 23053 23064 I databackup.fos: Background concurrent copying GC freed 422196(15MB) AllocSpace objects, 37(744KB) LOS objects, 49% free, 10MB/20MB, paused 196us total 263.164ms

使用 termux 的 tar 可以成功备份:

❯ ls -l /data/data/com.xayah.databackup.foss/files/bin/tar
lrwxrwxrwx. root root 39 B Thu Nov 20 16:08:20 2025  /data/data/com.xayah.databackup.foss/files/bin/tar ⇒ /data/data/com.termux/files/usr/bin/tar
Image

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