mzlogin / awesome-adb

ADB Usage Complete / ADB 用法大全
https://mazhuang.org/awesome-adb/
MIT License
11.27k stars 2.22k forks source link

Adb Pull Error #88

Open iamLazyCode opened 2 years ago

iamLazyCode commented 2 years ago

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 commented 2 years ago

Please provide more details.

iamLazyCode commented 2 years ago

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 commented 2 years ago
  1. your working dir
  2. your command

may help to understand your situation.

iamLazyCode commented 2 years ago

c:\Backup is the directory

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

mzlogin commented 2 years ago

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 commented 2 years ago

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

iamLazyCode commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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

image

mzlogin commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

Sorry but I'm not familiar with shell script.

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

iamLazyCode commented 2 years ago

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 commented 5 months ago

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