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

Adb Pull Error #88

Open
iamLazyCode opened this issue Jul 21, 2022 · 23 comments
Open

Adb Pull Error #88

iamLazyCode opened this issue Jul 21, 2022 · 23 comments

Comments

@iamLazyCode
Copy link

please help

I'm trying to create a backup of my database.

adb: error: cannot create 'D:\Backup\S22Ultra\Backup\Android\media\com.whatsapp\WhatsApp\yoBackup\com.whatsapp\cache\stickers_cache\com.bocadil.stickery.stickercontentprovider\com.bocadil.stickery-65ef891b-93ef-427a-9960-e755ad9fe813-20220311150346\00_2oicFF6Dx6iEyvD3txrUGq039N61CJbKCTZ1LMdBr5Q%3D.webp': Not a directory

@mzlogin
Copy link
Owner

mzlogin commented Jul 21, 2022

Please provide more details.

@iamLazyCode
Copy link
Author

Please provide more details.

hi sir , its just few files dont wana get pulled with the adb pull command and gives this error

is there any flag i can use with adb pull to solve this error

@mzlogin
Copy link
Owner

mzlogin commented Jul 21, 2022

  1. your working dir
  2. your command

may help to understand your situation.

@iamLazyCode
Copy link
Author

c:\Backup is the directory

this command i used sir
adb pull "/sdcard/Android/Media/com.whatsapp" "c:\Backup"

@mzlogin
Copy link
Owner

mzlogin commented Jul 21, 2022

In the Windows API (with some exceptions discussed in the following paragraphs), the maximum length for a path is MAX_PATH, which is defined as 260 characters.

ref https://docs.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=registry

I think you may trigger this limit. The target file path is too long as 276 characters.

You can test and verify it use follow steps:

  1. make a dir "D:\a"
  2. open cmd, cd D:\a dir
  3. adb pull "/sdcard/Android/Media/com.whatsapp"

@mzlogin
Copy link
Owner

mzlogin commented Jul 21, 2022

@iamLazyCode
Copy link
Author

If you use Windows 10, version 1607, and later, you can try this:

https://docs.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=registry#enable-long-paths-in-windows-10-version-1607-and-later

i have allready enabled these in registry editor as well as group policy sir , still same error

@mzlogin
Copy link
Owner

mzlogin commented Jul 21, 2022

In the Windows API (with some exceptions discussed in the following paragraphs), the maximum length for a path is MAX_PATH, which is defined as 260 characters.

ref https://docs.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=registry

I think you may trigger this limit. The target file path is too long as 276 characters.

You can test and verify it use follow steps:

  1. make a dir "D:\a"
  2. open cmd, cd D:\a dir
  3. adb pull "/sdcard/Android/Media/com.whatsapp"

how about this? has the file path in error info changed?

@iamLazyCode
Copy link
Author

thanks sir i guess that solved for whatsapp but another folder came into isse , this file name has spaces too in between

image

@mzlogin
Copy link
Owner

mzlogin commented Jul 21, 2022

thanks sir i guess that solved for whatsapp but another folder came into isse , this file name has spaces too in between

image

and file path still too long 😢

@iamLazyCode
Copy link
Author

thanks sir i guess that solved for whatsapp but another folder came into isse , this file name has spaces too in between
image

and file path still too long 😢

now i can simply delete these files when few , but when there are alot i cant keep deleting one by one , is there i can fix all this sir

@mzlogin
Copy link
Owner

mzlogin commented Jul 21, 2022

thanks sir i guess that solved for whatsapp but another folder came into isse , this file name has spaces too in between
image

and file path still too long 😢

now i can simply delete these files when few , but when there are alot i cant keep deleting one by one , is there i can fix all this sir

you may compress directory into a x.zip in you Android device, and then adb pull that single file /xxx/x.zip

@mzlogin
Copy link
Owner

mzlogin commented Jul 21, 2022

If you use Windows 10, version 1607, and later, you can try this:

https://docs.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=registry#enable-long-paths-in-windows-10-version-1607-and-later

and ensure this has take effect

@iamLazyCode
Copy link
Author

thanks sir i guess that solved for whatsapp but another folder came into isse , this file name has spaces too in between
image

and file path still too long 😢

now i can simply delete these files when few , but when there are alot i cant keep deleting one by one , is there i can fix all this sir

you may compress directory into a x.zip in you Android device, and then adb pull that single file /xxx/x.zip

i have over 60k media files sir and 512gb is over , so can zip cause of lack of space

@iamLazyCode
Copy link
Author

If you use Windows 10, version 1607, and later, you can try this:
https://docs.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=registry#enable-long-paths-in-windows-10-version-1607-and-later

and ensure this has take effect

how do i process that manifest part

@mzlogin
Copy link
Owner

mzlogin commented Jul 21, 2022

If you use Windows 10, version 1607, and later, you can try this:
https://docs.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=registry#enable-long-paths-in-windows-10-version-1607-and-later

and ensure this has take effect

how do i process that manifest part

sorry this may helpless. it's for application developers

@iamLazyCode
Copy link
Author

If you use Windows 10, version 1607, and later, you can try this:
https://docs.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=registry#enable-long-paths-in-windows-10-version-1607-and-later

and ensure this has take effect

how do i process that manifest part

sorry this may helpless. it's for application developers

where shall i go from here , commands are useless , is it just with windows or linux too suffer this ?

@mzlogin
Copy link
Owner

mzlogin commented Jul 21, 2022

a shell script may help, you can write a shell script to travesal dir you want to pull, rename long name files to short one.

push that script to Android device, run it, and then pull again.

@iamLazyCode
Copy link
Author

a shell script may help, you can write a shell script to travesal dir you want to pull, rename long name files to short one.

push that script to Android device, run it, and then pull again.

please help with that sir , commands to use will help please

@iamLazyCode
Copy link
Author

a shell script may help, you can write a shell script to travesal dir you want to pull, rename long name files to short one.

push that script to Android device, run it, and then pull again.

any refrence on what i should do sir

@mzlogin
Copy link
Owner

mzlogin commented Jul 22, 2022

Sorry but I'm not familiar with shell script.

A hint: Android shell is the same as Linux shell.

@iamLazyCode
Copy link
Author

Sorry but I'm not familiar with shell script.

A hint: Android shell is the same as Linux shell.

thanks sir but i have 0 clues about this :)

@freemedom
Copy link

freemedom commented Mar 24, 2024

i have over 60k media files sir and 512gb is over , so can zip cause of lack of space

You can probably tar it and then directly pipe it to windows (not to the phone hard disk). But I haven't tried a specific command yet.
@PitchAbyss

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

3 participants