After a long time of reflection and a good night sleep ,I came back to edit my answer.
Short answer:
beep
will not work under Android as Android devices do not have an internal system speaker and no kernel module pcspkr
. I tried to beep old school way with the command echo -en "\a" > /dev/tty5
, but it will not work since Android doesn't have an internal speaker.
Whenever I run beep
with root or without it always return the same error:
beep : can't open console
After reading the beep documentation I think the problem is not that you don't have permission – but due to beep
command not finding the console (for info: beep
will use tty0
as default console to beep and not the /dev/console
) and that's why it returns "can't open console" and not "permission denied". To fix this you would need to compile beep
from busybox source with option to change the default console like in the beep
desktop version.
But nothing is impossible you can make your own beep program easily following this steps :
After a long time of reflection and a good night sleep ,I came back to edit my answer.
short answer beep will not work under android since android doesn't have an internal system speaker and no kernel module pcspkr , I tried to beep old school way with the command
echo -en "\a" > /dev/tty5
but it will not work since android doesn't have an internal speaker.when ever I run beep with root or without it nit always return the same error
beep : can't open console after reading the beep documentation I think the problem is not that you don't have permission but due to
beep command not finding the console (for info beep will use
tty0
as default console to beep and not the/dev/console
) and that's why it returns can't open console and not "permission denied" to fix this you gonna need to compile beep from busybox source with option to change the default console like in the beep desktop version.But nothing is impossible you can make your own beep program easily following this steps :
make sure you have the binary
aplay
on your phone have it under/system/bin
it is used by the system to play boot sounds if you don't have it grab the arm version from here and put it under/system/bin
on your phone and give it the right permission it have to be executable.download this beep.wav
beep.wav
file from here and put it somewhere on the system partition of the phone or any where else your choice in my exemple it will be/system/beep.wav
.now you can either beep usin this command
aplay /system/beep.wav
aplay /system/beep.wav
or you can make a script file name it beep and put it under /system/xbin
or /system/bin
you can either over right or rename the old copy since it is just a simlink orsymlink to the busybox binary you. You can always call the original beep by busybox beep
command and don't forget to give it the execute permission .
here
Here is the simple exemple of the script youto write:
thisThis will beep your device with the current default speaker it can be the phone's speaker ,headset headset or Bluetooth headset ,you you can change that using the aplay option -Dnameofpcmdevice
thisThis script can only beep once but ,I I see many possibilities can be added easily ,like like playing other sounds alarm and adding arguments like frequency. – and much more.ect