Which command in the Android Terminal can be used to vibrate? (for a custom length such as 50 milliseconds)

I would like to integrate vibration feedback into a shell script.

Maybe I need permission first. How do I manually grant the Android Terminal permission?

| improve this question | | | | |
  • Should this maybe be moved over to StackOverflow? – neverMind9 Feb 5 '19 at 15:03
  • 1
    Shell scripts/command-line questions are on-topic here. No need to move or repost there. Are you open to app based suggestions? For e.g., you can set up a task in Tasker that would vibrate the phone the way you want, and you would be able to trigger that task from shell script as well. – Firelord Feb 5 '19 at 15:15
  • @Firelord Sure, if I can integrate it into the shell script, an app-based solution also will be fine. – neverMind9 Feb 5 '19 at 18:00
  • @FireLord: stackoverflow.com/questions/51418054/… does already mention a command (echo 200 > /sys/class/timed_output/vibrator/enable), but the Android Terminal unfortunately has no permission to use it. – neverMind9 Feb 5 '19 at 18:02
  • 1
    Sorry about Tasker. It has introduced some changes so it won't be possible to use it this way. As for the command you mentioned. I've tested it. It works well, but requires root access. – Firelord Feb 5 '19 at 20:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.