Writing to /dev/log/main from command line It is possible to write encoded messages into /dev/log/main and then see them in the adb logcat output. 

The command should be executable through adb from the host PC. Ideally, it should look like:

adb shell ... my log message


Is there some way to encode the logs without installing anything? 

So far, we have used very simple native application, which will print whatever is passed over its command line to the log.
Write the following in terminal (replace 123456789 with the device serial number/id):

adb -s 123456789 shell log -t "TAG" "MESSAGE"