awesome-adb icon indicating copy to clipboard operation
awesome-adb copied to clipboard

Adb Pull Error

Open iamLazyCode opened this issue 2 years ago • 23 comments

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

iamLazyCode avatar Jul 21 '22 07:07 iamLazyCode

Please provide more details.

mzlogin avatar Jul 21 '22 11:07 mzlogin

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

iamLazyCode avatar Jul 21 '22 11:07 iamLazyCode

  1. your working dir
  2. your command

may help to understand your situation.

mzlogin avatar Jul 21 '22 11:07 mzlogin

c:\Backup is the directory

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

iamLazyCode avatar Jul 21 '22 12:07 iamLazyCode

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 avatar Jul 21 '22 12:07 mzlogin

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

mzlogin avatar Jul 21 '22 12:07 mzlogin

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

iamLazyCode avatar Jul 21 '22 12:07 iamLazyCode

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?

mzlogin avatar Jul 21 '22 12:07 mzlogin

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

image

iamLazyCode avatar Jul 21 '22 12:07 iamLazyCode

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 😢

mzlogin avatar Jul 21 '22 12:07 mzlogin

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

iamLazyCode avatar Jul 21 '22 12:07 iamLazyCode

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 avatar Jul 21 '22 13:07 mzlogin

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

mzlogin avatar Jul 21 '22 13:07 mzlogin

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 avatar Jul 21 '22 13:07 iamLazyCode

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

iamLazyCode avatar Jul 21 '22 13:07 iamLazyCode

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

mzlogin avatar Jul 21 '22 13:07 mzlogin

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 ?

iamLazyCode avatar Jul 21 '22 13:07 iamLazyCode

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.

mzlogin avatar Jul 21 '22 13:07 mzlogin

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 avatar Jul 21 '22 13:07 iamLazyCode

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

iamLazyCode avatar Jul 21 '22 15:07 iamLazyCode

Sorry but I'm not familiar with shell script.

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

mzlogin avatar Jul 22 '22 01:07 mzlogin

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 :)

iamLazyCode avatar Jul 22 '22 14:07 iamLazyCode