I expect it to be something like
adb shell am start SomethingArcane ... "Hello, world"
and the message box pops up on screen, saying "Hello, world".
With DirectFB and root access, you can display the text on screen directly, without Android at all.
I've implemented a program for this: directfbtext.
( echo "Hello, world"; echo "FLIP"; sleep 2; echo "QUIT" ) | /h/bin/directfbtext --dfb:fbdev=/dev/graphics/fb0 --dfb:no-vt /system/fonts/DroidSans-Bold.ttf 30 120 200 255
Note that it is probably not that easy to get DirectFB working on Android, but I happen to have it already configured.
Update Per user request, I've created and tested a "portable" pre-built version of directfbtext. Setting up and running:
/data/local/tmp/
;adb shell
, go root (su
);cd /data/local/tmp/directfbtext
;Create symlink from /usr/lib/arm-linux-gnueabi/
to /data/local/tmp/directfbtext
:
# mount -o remount,rw / /
# mkdir /usr
# mkdir /usr/lib
# ln -s /data/local/tmp/directfbtext /usr/lib/arm-linux-gnueabi
Ensure display is on
LD_LIBRARY_PATH=. ./ld-linux.so.3 ./directfbtext --dfb:fbdev=/dev/graphics/fb0 --dfb:no-vt /system/fonts/DroidSans-Bold.ttf --dfb:system=fbdev 30 120 200 255
FBTrueType-android
I have written a native android program FBTrueType-android to print TrueType font text directly to the display on the device using ADB.
It has many features including clearing the framebuffer (display) and changing the *.ttf font used, font color, font size, x and y positions.
It also can run with Zygote (android interface) running and it can capture the framebuffer from Zygote in fullscreen.
I setup a github repository for it which you can access here, alternatively you can clone the repository like this:
$ git clone https://github.com/mikelinux/fbtruetype-android.git
You will need to be setup to cross compile for ARM, the README file has full instructions on doing this.
Enjoy, and please post your feedback.
Mike