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

No such file error halting process #26

Closed kaxlabs closed 1 year ago

kaxlabs commented 1 year ago

Device info

Manufacturer: Samsung Android version: 12 Custom ROM/rooted? No Model: SM-N975U1

System info

Available disk space: 1.21TB (D: drive, backup location); 125GB (C: drive, system) Operating system: Windows 11; Ubuntu WSL


Describe the issue below. After apps are finished being exported (I tried both tar and adb method), it hits an exception.


/data/app/~~MnXxs_EbCa3JDHmoPetPlg==/com.dietbet.app-NreK0...le pulled, 0 skipped. 35.2 MB/s (27809188 bytes in 0.753s)
Exporting contacts (as vCard).
adb: error: failed to stat remote object '/storage/emulated/0/linux-android-backup-temp/.': No such file or directory
Exiting.
Press Enter to continue...
mrrfv commented 1 year ago

Do you have any contacts saved on the phone? Did you export data in the companion app as requested by the script?

kaxlabs commented 1 year ago

I do have contacts saved and I used the companion app both times at the beginning of the program. I clicked export data and gave it permission when prompted.

mrrfv commented 1 year ago

That's very odd, none of my test devices exhibit this type of behavior. Could you replace the get_file function (in backup.sh) with the following and see if it fixes anything?

# Usage: get_file <directory> <file> <destination>
function get_file() {
  if [ "$export_method" = 'tar' ]; then
    adb exec-out "tar -c -C $1 $2 2> /dev/null" | pv -p --timer --rate --bytes | tar -C $3 -xf -
  else # we're falling back to adb pull if the variable is empty/unset
    if [ "$2" = '.' ]; then
        adb pull $1 $3
    else
        adb pull $1/$2 $3
    fi
  fi
}
kaxlabs commented 1 year ago

It still happens. I've uploaded the log to pastebin: https://pastebin.com/RChTvs01 Is there a way to skip contacts as a workaround maybe?

mrrfv commented 1 year ago

You can skip contacts by commenting get_file /storage/emulated/0/linux-android-backup-temp . ./backup-tmp/Contacts in backup.sh, but the log you posted shows that this could be a larger issue - it seems like the companion app is unable to create the folder used to get the contacts from the device. Did you allow the "All files access" permission when requested by the companion app?

mrrfv commented 1 year ago

Closing due to a lack of response from the issue author.