Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"adb pull" stuck in half way

Suddenly my "adb pull" command will stuck in the middle of the process. I'm not sure what cause it, after install some application or driver. Happens for Pull one files or multiple files.

Does anyone encounter the same issue before? thanks.

Example:

U:\batch>adb pull /sdcard/xxxlog/mobilelog .\xxxlog\

[ 94%] /sdcard/xxxlog/mobilelog/APLog_xxx/main_log_1__xxx: 87%

Here a screenshot from my console

like image 524
Eric Avatar asked Dec 07 '18 07:12

Eric


4 Answers

for my specific answer, and provide a possible answer to who encounter similar problem.

after I reinstall the whole os, testing different adb version, the issue still remains.

during testing adb version, I found the issue will not happens if i use Local Disk... where issue happens when using Network Drive..

So a possible solution, is don't use Network drive

like image 175
Eric Avatar answered Nov 03 '22 09:11

Eric


I encountered similar problem on adb server (v 1.0.40) started on Windows 7 machine. When tried to pull files from device on other machine running Linux in same local network (I used: "adb -H pull ...") the adb was freezing occasionally.

The solution was to not use Windows for ADB server.

This problem was NOT visible, when adb server was running on Linux VM (Ubuntu 16.4/ VirtualBox). Hope that this helps.

BR, Ziggy

like image 38
Ziggy85 Avatar answered Nov 03 '22 07:11

Ziggy85


Every time I encounter this, it ends up being a max path length issue. Open a shell on the device using adb and review the file names within the directories that you are pulling. If any have exceedingly long names, they will silently fail and adb will hang

The thing that really throws you for a loop is that it usually fails after giving a percentage complete which makes you think it's a faulty connection or some other issue.

I haven't found a good way to recursively list out file names in shell and test their name length prior to doing the pull in order to know that the issue is going to happen, but when I have the same issue and rename long files, it ends up working on the next attempt.

like image 1
zero298 Avatar answered Nov 03 '22 07:11

zero298


I encountered the same problem when trying to transfer a large amount of data from an Android phone to a Raspberry Pi 3B+, and the logcat output seemed to reveal that adb was silently failing due to an issue with USB buffer reads (unfortunately, I don't have the exact message with me).

After the initial failure, it was possible to get another few files individually by unplugging the phone, running adb kill-server and adb start-server, and plugging it back in between each one, but the only longer-term fix I could find was restarting the Raspberry Pi. This solution, however, is not permanent, and must be repeated occasionally.

I was not able to replicate this issue on Windows or on a traditional Ubuntu system.

like image 1
StardustGogeta Avatar answered Nov 03 '22 08:11

StardustGogeta