Android adb shell command to play sound from the command line -
I have a set of rooted Android device, which I can access on TCP / IP via ADB. I am trying to identify a particular by playing a sound from the command line (one of the .ogg files from / system / media / audio).
I know that I can become an app for this but it feels like an overkill to use an APK, and I hope there is another indigenous method there. I already know how to start the intents from the command line.
I have tried:
-
No useful reference about the service call media.player syntax was not found I
dumpsys media I can see references about AwesomePlayer but I do not get anything.
- Tried to find a compiled version from the Android source code, because it is disappearing from the device, but without any luck till now.
- Tried to create a command line Java application for Android. With the media player
delveism , but my knowledge of Android and
any thoughts?
Depending on the, I like the following java code to play some sound, minimum speaker The media player seems to be the only one who will not play with any user interaction because others require a real activity reference ...
Public square beep {public static zero main (string [] a) {MediaPlayer mp = new MediaPlayer (); Try {mp.setDataSource ("/ system / media / audio / alarms / ticktac.ogg"); Mp.prepare (); Mp.start (); } Hold (IOException e) {Log.w ("beep", "IOE expansion", e); }}
()
This should be, linked to android.jar,
and finally using theAp_prosse (no DelWiki):
Export ClassSet =. / BEP dex ap_prosos / system / bean beep / system / media / audio / ringtone / beep beep.og
this is not a one-liner which I was expecting but I need it Is ...
Comments
Post a Comment