The code used by LiveBoot and FlashFire (way back when) to draw to screen from root, using SurfaceFlinger. Now available from GitHub.