mrrfv / open-android-backup

Back up your device without vendor lock-ins, using insecure software or root. Supports encryption and compression out of the box. Works cross-platform.
http://openandroidbackup.me/
GNU General Public License v3.0
674 stars 37 forks source link

Script freezes while exporting internal storage #25

Closed gregorylima closed 1 year ago

gregorylima commented 1 year ago

does apps bkp save app data? Or just the apks?? when saving the storage, it is crashing in my case it stuck at 2.72gb

how do i check the error?

mrrfv commented 1 year ago

Just the apps, Android doesn't allow you to backup app data over ADB.

when saving the storage, it is crashing in my case it stuck at 2.72gb

How does it crash? Does it just freeze or the script closes? Try using the adb export method (the script asks you about the exporting method every time it's ran). If it doesn't help, use a different USB cable or wireless backups. Make sure that you have enough space for the backup, usually you need twice the amount of your phone's internal storage - for example, if your phone has 128GB of internal storage, you need 256GB of free space on your computer.

mrrfv commented 1 year ago

Closing due to a lack of response from the issue author. Please comment if you are still facing the same issue.

ArjenR commented 1 year ago

Same issue here in the step to export the internal storage.

So apps are done. Vcards, then comes the internal storage. Which runs for a while but then seems to stall and the progress drops to 0,00.

25,8MiB 0:00:01 [21,2MiB/s] [    <=>                                                                                                         ]
Exporting contacts (as vCard).
7,50KiB 0:00:00 [76,4KiB/s] [  <=>                                                                                                           ]
Removing temporary files created by the companion app.
Exporting internal storage - this will take a while.
2,88GiB 0:14:36 [0,00 B/s] [                                                                                        <=>                      ]

looking at ps -faux

shows the following command being executed:

 \_ bash
 |   \_ bash ./backup.sh
 |       \_ adb exec-out tar -c -C /storage/emulated/0 . 2> /dev/null
 |       \_ pv -p --timer --rate --bytes
 |       \_ tar -C ./backup-tmp/Storage -xf -

adb errors are pipe to /dev/null so we don´t see why. I modified the script to see the errors adb throws during the copy of the files. At this attempt the script froze during the backup of an app. Since I do not have the time currently to investigate further I switched to adb instead of tar. Here is hoping backup and restore. I find it to transfer faster then tar.

It might be possible that the issue is with transferring a large file +4GB. I noticed that the size was not properly calculated and the transfer seemed to stall due to this issue. Removing this file and rerunning the backup using adb. Script runs to completion.

I am currently unable to retry using tar due to time constraints but I think this might be due to an issue with adb.

Android Debug Bridge version 1.0.41
Version 28.0.2-debian
Installed as /usr/lib/android-sdk/platform-tools/adb

This version is known to have some issues and much older then currently provided by the SDK platform tools https://developer.android.com/studio/releases/platform-tools which is 33.0.3 currently.

Perhaps getting the SDK platform tools from the script and using the adb included in it for backup and restore will improve and or prevent various issues.

Rgrds Arjen