You can setup a Task in Tasker which you can invoke from command-line. The task can be setup with actions of your liking in combination, such as show a notification and vibrate with XYZ pattern. When setting up a task in Tasker, setup the action like this: Alert → Notify
Fill up the fields as you like. Make sure to enable Allow External Access setting under Preferences → Misc, accessible from three-dots line on the right edge of top bar in Tasker's homescreen.
As for invoking the task from command line, run:
su -c am broadcast -a net.dinglisch.android.taskerm.ACTION_TASK --es "task_name" "YOUR_TASK"
Replace YOUR_TASK with your task's name.
Tip: you can setup Tasker to show text of your liking in your notification by a bit more tricks. Setup a task to watch for a file for changes and assign an action to change the value of a tasker variable to the contents of that file. In your aforesaid vibration/notification task, when filling up the field for "text", assign that local variable instead. So next time, when invoking the task, change the contents of the file for a custom text notification before sending that command.
Tip2: it is also possible that send variable directly to a task using command-line, but I don't have much experience with it so you've got to ask uncle web.
Termux APIapp to control notifications/vibration/etc.
echo 200 > /sys/class/timed_output/vibrator/enablefrom the comments of the Q you linked: And it worked! I'd like to keep the qusetion open because I'd prefer notifications or some sort of alert/pop-up on the screen aswell, but if nothing else is possible without the Termux app + API that would be good enough of an answer for me. (Note for others: That command requires root (at least over SSH), which for me is not an issue though.)