I want to transfer a large file with adb pull, but my USB connection disconnects all the time, interrupting the transfer. How can I make this work?

  • I don't believe there a "resume" or continue option...
    – acejavelin
    Mar 23, 2018 at 18:57
  • Is there a way were I can modify the code myself? Is it open source? Mar 23, 2018 at 19:15
  • I don't know that... and that is outside the scope of this forum (developer specific questions are off-topic here).
    – acejavelin
    Mar 23, 2018 at 19:16
  • Ok, I will just wait to see if someone knows a way or a "wrapper" that enables the resume Mar 23, 2018 at 19:19
  • 1
    My loop lasts around 20 secs. It is a Xiaomi, and I have seen that there are more people affected, with similar loop times. If I could resume pulling, then I could pull files little by little in those 20 secs to get them all. I cannot think of any other approach, to be honest. Any suggestion is appreciated Mar 24, 2018 at 2:37

2 Answers 2


Here's a Python 3 script that implements a workaround based on adb and dd. It continuously retries and resumes download when disconnection happens.

For me the performance is the same as adb pull. If you experience problems with performance—try to play with BUFFER_SIZE value.


ADB can not pull files partially or resume. Also modifying the PC side of ADB is AFAIK of no use to you, as the provided functionality is provided by the on-device part (which you can't replace).

From my point of view there are two possibilities left:

  1. Install an FTP server (app) that allows to automatically start with Android and that is able resume the download. Let is share a directory, the file you want to get is located in, or use your 20 seconds time window to move the file into the FTP shared directory.

  2. Another option would be a cloud synchronization app (or command-line tool you could call via adb) that is able to push files automatically block-wise to the server (like the DropBox desktop client does). Unfortunately AFAIK the official Android DropBox client works differently and is of no use for you in this scenario. But some 3rd party Dropbox app or a different cloud sync app may be usable.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .