利用亚行刷新的Andr​​oid mediastore [英] Refresh Android mediastore using adb

查看:322
本文介绍了利用亚行刷新的Andr​​oid mediastore的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用亚行同步音乐在Android手机上。从本质上讲,我RM现有的音乐目录和推更换音乐文件。

I'm using adb to sync music on an android phone. Essentially, I rm the existing music directory and push replacement music files.

我希望能够利用亚行强制重新扫描,从而使谷歌音乐播放器(和其他应用程序)正常工作与新的歌曲和播放列表。

I'd like to be able to use adb to force a rescan, so that the google music player (and other apps) works properly with the new songs and playlists.

根据我怎样才能刷新MediaStore在Android?你可以通过广播适当的意图强制重新扫描。

According to How can I refresh MediaStore on Android? you can force a rescan by broadcasting an appropriate intent.

亚行提供壳AM广播,这似乎让我从亚行强制重新扫描。

adb provides 'shell am broadcast', which would seem to allow me to force a rescan from adb.

另外我可以运行重新扫描应用程序或重新启动,但我想从亚行触发重新扫描

Alternatively I could run a rescan app or reboot, but I'd like to trigger the rescan from adb

我应该发出什么ADB命令?音乐文件和播放列表都在/ SD卡/音乐。

What adb command should I issue? The music files and playlists are all in /sdcard/music.

推荐答案

重新扫描应用程序使用装入介质的意图揭开序幕媒体扫描仪。您可以使用 AM广播发送相同的意向。

The rescan apps use a media mount intent to kick off the media scanner. You can use am broadcast to send the same intent.

的命令是:

adb shell am broadcast android.intent.action.MEDIA_MOUNTED

这篇关于利用亚行刷新的Andr​​oid mediastore的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆