I am using HuaWeiNova device, and I tried to access it with aft-mpt-cli.

$ aft-mtp-cli
$ ls DCIM/

I got folders listed here:


When I tried to list or download my photos in the Camera/ folder, I got nothing. Only the empty folders are listed and the folders that contains files are not shown at all. I am quite sure my photos are stored in the Camera folder in my cell phone. How come I could not access my photos with my computer ?

  • Maybe your photos are on the sd card, but you show internal storage? – Axifive Oct 15 '18 at 15:31

For accessing your Android device via USB in "File Transfer" mode your computer uses the MTP protocol. This protocol allows to list and read/write the files from/to your device.

What most people don't know is that the MTP protocol does not show the content of the file-system. Instead it uses the Android MediaStore Database (an SQLite database) which is populated by the Media Provider, a special daemon running on Android (app package name: com.android.providers.media).

If you create a new file/directory or delete something without notify this daemon the database and the file-system are out-of sync and you end up that you can see files already deleted or can't see existing files.

You can force the Android MediaStore to refresh it's database, e.g. via ADB command-line (source):

adb shell am broadcast -a android.intent.action.MEDIA_MOUNTED -d file:///sdcard

There are also a lot of apps that can force a rescan of the sd-card.

Not the answer you're looking for? Browse other questions tagged or ask your own question.