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

Failure when backing up .nomedia file #15

Closed xipmix closed 1 year ago

xipmix commented 2 years ago

I was unable to get past this issue, but spent a little time looking at it. I am no android expert. Things bump along ok (see #7) until this point:

Exporting internal storage - this will take a while.
adb: error: failed to copy '/storage/emulated/0/Android/data/.nomedia' to './backup-tmp/Storage/0/Android/data/.nomedia': remote open failed: Permission denied

I started an adb shell and found the file permissions were like so:

-rw------- 1 u0_a256 ext_data_rw 0 2021-05-10 20:59 storage/emulated/0/Android/data/.nomedia

My uid was 'shell' (uid 2000), so I had no way of changing the permissions. The phone is not rooted and not going to be.

It would be helpful to warn about such files but carry on processing. Better not to fail the backup for lack of permission on one zero-byte file.

Edit: usb client is mac laptop with Android Debug Bridge version 1.0.41, Version 33.0.2-8557947

mrrfv commented 2 years ago

What phone are you backing up? I read in another issue that you are trying to backup a phone running Android 12, but I need more information (brand, Android skin, model, etc) before trying to find the culprit.

I'm going on vacation soon, so it might take longer than usual for me to respond.

xipmix commented 1 year ago

The phone is a pixel5

mrrfv commented 1 year ago

You mentioned in #7 that you had to create a directory called linux-android-backup-temp as a workaround. This directory should be automatically created by the companion app. Did you export the data in the companion app when the script asked you to?

xipmix commented 1 year ago

Thanks for this fix, tar mode works well for me.