USB HID Client app
This Android app allows you your phone to present itself to a connected device as a keyboard and mouse. Since this happens at a very low level, the connected device sees it exactly as a normal keyboard and mouse, meaning you don't need to install any software on the connected computer! For this reason, it will even work if the connected device is in its BIOS/UEFI. Even multimedia keys are supported, meaning you can send volume up/down keys to the connected computer to control media.
Bonus description for nerds: This app creates (and provides a simple UI for you to communicate with) a USB HID gadget consisting of a keyboard and mouse character device (/dev/hidg0
and /dev/hidg1
respectively). If you wanted to, you could just use this app to create the character device, then communicate solely through some C program, shell script, or whatever else you wanted as long as it had the right permissions to access the character devices. Beware of SELinux policies. If anyone is actually doing that, let me know, I'd be glad to help if necessary.
For details on setup and usage, please consult the project's Readme.