Send a notification (or just vibrate) to phone via ADB/shell I would like to be able to send some kind of notification to my android using a remote shell script (SimpleSSHD running as root, so basically the same as an adb shell).

On an iOS device I can use the commands cvibrate to make the device vibrate and sbalert to display a notification via SSH. I would like to do the same, but on android.

It would be great if it could be an actual notification like any other app would invoke, but a way to just vibrate it would suffice aswell if both isn't possible on android.

This seems like a very simple task, but I've not been able to find a solution...
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 &rarr; Notify

Fill up the fields as you like. Make sure to enable Allow External Access setting under Preferences &rarr;  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.tasker.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.