Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support full backups of /sdcard #10

Open
SamCyanide opened this issue Apr 3, 2022 · 1 comment
Open

Support full backups of /sdcard #10

SamCyanide opened this issue Apr 3, 2022 · 1 comment

Comments

@SamCyanide
Copy link

SamCyanide commented Apr 3, 2022

Hi,

Due to followLinks being False, running backups of /sdcard without specifying a deeper directory fails.

/sdcard/[directory] works fine, but it ignores /sdcard due to it being a symlink.

python adbsync.py --pull --adb-flag a 'J:\GalaxyS10BackupsAug2021newer\Apr32022\sdcard\' /sdcard --exclude MyVerizon  --show-progress
[WARNING] Ignoring symlink '/sdcard'

Note:
A potential solution is to use /storage/emulated/0 instead, but sometimes the permissions for this directory do not work/are not set properly over ADB, causing a permission denied error. /sdcard seems to be more consistent, even if it is just a link.

Regardless, it seems there are some issues still with using that.

Traceback (most recent call last):
  File "adbsync.py", line 6, in <module>
    ADBSync.main()
  File "J:\GalaxyS10BackupsAug2021newer\ADBSync\src\ADBSync\__init__.py", line 369, in main
    filesTree_source = fs_source.getFilesTree(path_source, followLinks = args.copyLinks)
  File "J:\GalaxyS10BackupsAug2021newer\ADBSync\src\ADBSync\FileSystems\Base.py", line 55, in getFilesTree
    return self._getFilesTree(tree_root, statObject, followLinks = followLinks)
  File "J:\GalaxyS10BackupsAug2021newer\ADBSync\src\ADBSync\FileSystems\Base.py", line 43, in _getFilesTree
    tree[filename] = self._getFilesTree(
  File "J:\GalaxyS10BackupsAug2021newer\ADBSync\src\ADBSync\FileSystems\Base.py", line 40, in _getFilesTree
    for filename, statObject_child, in self.lstat_inDir(tree_root):
  File "J:\GalaxyS10BackupsAug2021newer\ADBSync\src\ADBSync\FileSystems\Android.py", line 146, in lstat_inDir
    for line in self.adbShell(["ls", "-la", self.escapePath(path)]):
  File "J:\GalaxyS10BackupsAug2021newer\ADBSync\src\ADBSync\FileSystems\Base.py", line 17, in adbShell
    adbLine = adbLine.decode().rstrip("\r\n")
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x96 in position 76: invalid start byte

Software:

Android Debug Bridge version 1.0.41
Version 33.0.1-8253317
Python 3.8.2
Windows Version 10.0.19044 Build 19044
@jb2170
Copy link
Owner

jb2170 commented Apr 5, 2022

Huh UnicodeDecodeError that's a new one for adbsync lol. Perhaps it's to do with Windows using UTF-16 (or anything non-UTF-8) as its encoding? I'm running the same version of adb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants