What do I want?

I want to push some directories from my desktop to my android phone. The directories are empty, but the folder name contains important meta-data. The structure is not changeable.

What is the Issue?

If I try to push via adb, I get the following warning:

adb: warning: skipping empty directory 

What have I tried?

As a workaround I could use the MTP protocol. But this protocol is not stable and crashes a lot, especially if you want to copy multiple files. I can't get it work on linux anyways, so adb seems to be the best choice.

My Questions

  1. What is the reasoning to skip empty directories? It seems like an arbitrary (and annoying) design choice for me.

  2. Is there a flag to NOT skip empty directories?

  3. Is there a workaround?


1 Answer 1


I don't see a way to get around this limitation of adb in the adb source code. The sad part is that there is already a bug ticket mentioned to change this behavior (the comment was added Nov 2015).

For pushing empty directories I would try to build a TAR archive (e.g. my.tar), and execute tar extraction on-device via adb shell providing the TAR archive via stdin:

adb shell tar xv -C /storage/emulated/0 < my.tar

If the tar files contains empty directories they will be correctly extracted on device.

You must log in to answer this question.

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