MediaScanner
To speed-up listings of your media in the gallery (and in audio/video players), Android organizes them in an internal database. For its maintenance, there's the MediaScanner – which unfortunately only gets triggered to do its job on certain events: when a MTP connection was closed, or a medium (usually the external SDCard) was mounted. The latter automatically happens on boot, but on devices supporting external SDCards can be done manually via the corresponding system menu.
Usually not an issue. But if you sync your library with your PC by other means, or manually copy/move/delete files via FTP or a file manager, this leaves you in the dark: your changes stay invisible until the next scan finishes. And above means to trigger that are not really practical. Luckily, there are some little tools available to help you out:
Trigger the MediaScanner
- AZ Media Rescan | SD Card Scan (4.5@1,584) Ǥ 8
2
- mediaReScan:updateMediaStorage (4.3@6,707) 5
2
LastUpdate: 2023-02-23 scan entire card or selected directories
- SD Scanner (3.7@648) 5
1
LastUpdate: 2016-04-15
- Rescan SD Card (3.6@826) Ǥ 6
2
LastUpdate: 2020-04-18
- Manually Scan SD Card / Media (3.5@837) Ǥ 6
4
LastUpdate: 2016-07-05
- Rescan Media - Refresh Storage (2.4@820) Ǥ 6
2
LastUpdate: 2023-08-23
- Media Rescan (1@57) 5
2
LastUpdate: 2022-03-09 scan specific media types
- SAF Media Scanner (0@0) 1
/ Classical Music Scanner (0@0) 6
GitLab; media scanner for Unpopular Music Player and Opus Music Player / GitLab
Configure the MediaScanner
PS: If you don't want a separate app for that, and are fine with climbing through menus: in Developer options › Developer Tools › Media Provider someROMs provide a button labeled "Scan SD Card", which does the job as well. If not, ADB might come to your rescue with e.g.
adb shell am broadcast -a android.intent.action.MEDIA_SCANNER_SCAN_FILE -d 'file:///sdcard/DCIM'