I want to invest to test command my application through voice command something like "OK GOOGLE".
In addition to the method of using speakers to speak loudly, how can I say "OK Google" through ADB?
Thanks a lot
I was using Audio Loopback Dongle for call simulation. Hope it will works for commands too
wav generated by sudo apt-get install libttspico-utils
pico2wave -w google.wav "OK Google"
Move to device
adb push google.wav /sdcard/Download/
Playing wav by VLC:
adb shell am start -n org.videolan.vlc/.StartActivity -a android.intent.action.VIEW -d file:///sdcard/Download/google.wav -t 'audio/wav'
Related
I would like to running an app automatically using adb command. I know how can I send command like, swip, touch, and etc. How can I play a audio file to simulating voice?
I have test following but none of them work.
>adb shell tinyplay bird.wav
Unable to open file 'bird.wav'
and
>adb shell stagefright -a -o bird.wav
Unable to create data source.
I using Genymotion as an android device.
You can start an activity with file location provided.
Try this-
adb shell am start -a android.intent.action.VIEW -d file:///storage/sdcard0/sample.mp3 -t audio/mp3
I am having one android target.
I have some audio file in mnt/sdcard0.
How can I play through adb command?
Music player application is already installed in the target.
use the following adb shell command:
adb shell am start -a android.intent.action.VIEW -d
file:///storage/sdcard0/test.wav -t audio/wav
There are two other command line programs which may work via a adb shell or even remotely using an ssh connection. Neither need an installed music player app.
adb shell stagefright -a -o file.mp3
and
adb shell tinyplay file.wav
(drop adb shell if not using an adb connection)
Note that tinyplay can only play stereo wav files. I found out about the stagefright command from a3nm's blog: Android from the command-line.
I know it is easy ,if I can use adb .
$ export ADBHOST=192.168.11.14(device's IP)
$ adb kill-server
$ adb start-server
in this status.I can use adb with wireless.so next,
$ adb shell am start -a android.intent.action.VIEW http://www.google.com
in this status. I can see google page in my android device .
I want to do it without adb. I want to develop a app which send a intent to one device via tcp without install any app. How can I do it?
You can't. Android doesn't wirelessly accept Intents from other devices, except via adb. It would be 100% insecure to do so- anyone could send any intent to anyone. It would be spam central. You need an app on both devices.
I am working on a testing tool and I am able to initiate and terminate voice call from default Dialer app in android using following commands.
adb shell am start -a android.intent.action.CALL -d tel:+919999999999
adb shell input keyevent KEYCODE_ENDCALL
I need to enable Speakerphone through adb interface after initiating voice call. How can I achieve this? My android device may not have root permission.
I would like to launch a movie playback directly from the command line and the adb tools.
The way I do it, is with the instrumentation tool:
# am start -t video/mpeg -D /sdcard/Movies_3D/mymovie.mp4
But when I do that,
com.cooliris.media/.MovieView take the intent, doesn't crash, but "is waiting for the debugger to attach"
How to specify directly the Media Player? I cannot find the class name to call.
(uninstalling com.coloris is not an option)
Thanks,
Following works on Android ICS (4.0.3) version
am start -n com.android.gallery3d/.app.MovieActivity -d <URI>
For example, following command plays clip in /data/local/tests/ directory.
am start -n com.android.gallery3d/.app.MovieActivity -d file:////data//local//tests//big_buck_bunny_1080p_H264_AAC_25fps_7200K_short.MP4
This worked for me on Android 9.0
adb shell am start -a android.intent.action.VIEW -t video/mp4 -d file:///sdcard/DCIM/Camera/Video1.mp4