How can I play an mp3 file using adb command using Google Play Music on Android KitKat 4.4.4?

I just tried the old way to start playing the .mp3 file using the adb command.

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

      

But it is currently not working. Can anyone help check if there are any updated ways to do this?

+1


source to share


2 answers


The problem was fixed with a command like:

(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

      

+2


source


Start the game:

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

      

Close the player:

adb shell input keyevent 4

      



To stop the player:

adb shell input keyevent 127

      

Pause / Resume:

adb shell input keyevent 85

      

0


source







All Articles