Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I play a mp3 file via adb command with google play music on android kitkat 4.4.4? [closed]

I just have tried the old method of start to play a .mp3 file with adb command.

adb shell am start -n com.google.android.music/com.android.music.MediaPlaybackActivity -d /sdcard/Music/abc.mp3

But currently it does not work. Could any one help to check if there are any updated ways to do so?

like image 515
Michael.Zhou Avatar asked Dec 15 '22 20:12

Michael.Zhou


1 Answers

Issue resolved by using command such as:

(file path: /storage/sdcard0/test.wav)

adb shell am start -a android.intent.action.VIEW -d file:///storage/sdcard0/test.wav -t audio/wav

(file path: /storage/emulated/0/test.wav)

adb shell am start -a android.intent.action.VIEW -d file:///storage/emulated/0/test.wav -t audio/wav
like image 84
Michael.Zhou Avatar answered Dec 26 '22 05:12

Michael.Zhou