google / adb-sync

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

full /sdcard/ download does not work

oernii opened this issue · comments

./adb-sync --reverse /sdcard/ /BACKUP/android/xperia/sdcard/
Sync: local /BACKUP/android/xperia/sdcard/, remote /sdcard
Scanning and diffing...
Note: unsupported file: /sdcard
Total: 0 KB/s (0 bytes in 0.317s)

I have to use /sdcard/* which seems weird.

Adding to it, if I use /sdcard/* when it finish (and I ran it multiple times just to be sure),
I don't get the same amount of files, I ran inside adb shell this command in the /sdcard/ directory: find . -type f | wc -l and I got 35694, but when I ran it on the remote I got 28150.

Any Ideas how's that possible?

the mtp daemon does not provide access to all files on the emulated storage. some files are considered app-private, and google thinks your phones are theirs and/or of app developers and not yours, so you are denied access. in addition to that, the daemon only lets you access files of specific know types.

if you ask me, the free software community should fix these bugs and anti-features in aftermarket roms.

you can boot TWRP to access the complete storage via mtp. but keep in mind that TWRP's mtp implementation is not rock solid, AFAICT.

Not sure if this is the only issue, but /sdcard/* does not include hidden files in /sdcard/, which might exist on your device (e.g. ES File Explorer creates such a directory).

As for /sdcard/ getting turned into /sdcard, I'll look into that and keep this bug open for that purpose. To be consistent with rsync, /sdcard/ should imply looking into the directory, while /sdcard should refer to the symlink.

Can you try listing the files on both sides using find, and compare the output? That might help figuring out what exactly is missing and why.

My solution was opening an SSH port and using adb forward and then syncing with rsync .
Sorry I can't make a diff file because I already synced everything, but try it on your phone i'm pretty sure you'll encounter the same problem.

I don't see any mention of an external SD card here. Can I assume this is unimplemented or requires root?

I've concluded that it supports full external SD card operations on Android 7.1.1 without root!

I see the problem is with /sdcard being a symlink; don't see a quick fix though. The main issue is that adb-sync expects directory names internally to not end with a slash.

A workaround to force interpretation as a directory is using /sdcard/. as a source.

Given all that breaks from not cutting off that slash is some ugliness... fixed.