In the following tutorial I’ll describe two methods to customize the WDTV’s OSD. This guide will just cover the basics, and details two methods to compile your theme. Method #1 entails providing all of the osd xml files and images, and is flexible enough to allow full customization using custom binaries. Method #2 is suitable for small themes where mainly just the xml files have been changed. If you use method #1 you’ll be required to keep the device containing the *.osd.bin file attached, as with many app.bin’s. Method #2 loads the provided files into memory and cleans up after itself, so once your wdtv has booted you may remove the device containing the theme and the theme will persist until the next time your wdtv is fully shut down / power cycled. In order to take advantage of this tutorial you’ll need to be running either WDLXTV or ext3-boot, and have access to a Linux computer or Linux filesystem tools.
Method #1 – Full theming via *.osd.bin
Step 1
Download the full stock theme.
cd /tmp
slimrat http://rapidshare.com/files/232291968/stock.osd-0.3.bin
Step 2
Rename it something unique and mount it somewhere.
# mv /tmp/stock.osd-0.3.bin /tmp/farscape.osd.bin
# mkdir /tmp/osd
# mount -o loop /tmp/farscape.osd.bin /tmp/osd
Note the directory contains *every* file from the original osd directory.
Step 3
Now lets change around some osd files and exchange out some images.
First I’ll take care of the images. Most of the images I’m using were provided by Farscape for a theme he made a while back. The red WDLXTV logo was made by Pennhaven to match Farcapes red color scheme. Thanks to Farscape & Pennhaven for the graphics!
I’ll take the group of images and overwrite the original OSD images.
# cp /tmp/farscape/osd/images/* /tmp/osd/image
# cp /tmp/pennhaven/welcome_logo.png /tmp/osd/image
Step 4
That was easy. Now lets modify the xml files to change the text from light blue to a darker red
We need to edit the following files:
- audio_run.xml
- basic_browse_thumb_video.xml
- basic_browse_thumb_video.4.xml
- basic_browse_thumb_video.8xml
- basic_browse_thumb.xml
- basic_browse.xml
- basic_browse.4.xml
- basic_browse.6.xml
- chapter_list.xml
- home.xml
- inc_messagebox.xml
- inc_thumb_browse.xml
- inc_video_thumb_browse.xml
- inc_video_thumb_browse.4.xml
- inc_video_thumb_browse.8.xml
- ip-about.asp
- ip-welcome.asp
- picture_run.xml
- search_media_type.xml
- search_result.xml
- search_string.xml
- search_target_type.xml
- search_type.xml
- setup_about.xml
- setup_entry_basic.xml
- setup_entry_item_basic.xml
- setup_reset.xml
- welcome.xml
This is a fairly inclusive theme, at a minimum you’ll usually want to edit at least the following:
- basic_browse_thumb_video.xml
- basic_browse_thumb_video.4.xml
- basic_browse_thumb_video.8xml
- basic_browse_thumb.xml
- basic_browse.xml
- basic_browse.4.xml
- basic_browse.6.xml
- home.xml
- inc_thumb_browse.xml
- inc_video_thumb_browse.xml
- inc_video_thumb_browse.4.xml
- inc_video_thumb_browse.8.xml
The parts we want to change look as follows:
<text text="Loading WDLXTV firmware..." x="320" y="420" w="680" h="38" fontsize="36" textcolor="0xFFFFFF" align="hcenter"/>
or
<text text="@@VERT_TITLE_TEXT_2" x="583" y="519" w="623" h="84" align="right" fontsize="76" textcolor="0x07B5FF"/>
The color codes 0xFFFFFF and 0×07B5FF are for white and baby blue respectively. We need to change all occurrences to 0xD70000, like below.
<text text="Loading WDLXTV firmware..." x="320" y="420" w="680" h="38" fontsize="36" textcolor="0xD70000" align="hcenter"/>
or
<text text="@@VERT_TITLE_TEXT_2" x="583" y="519" w="623" h="84" align="right" fontsize="76" textcolor="0xD70000"/>
I’ll use sed to edit all the files quickly.
# cd /tmp/osd
# sed -i -e 's/0xFFFFFF/0xD70000/i' -e 's/0x07B5FF/0xD70000/i' \
audio_run.xml basic_browse_thumb* basic_browse.* chapter_list.xml \
home.xml inc_messagebox.xml inc_thumb_browse.xml \
inc_video_thumb_browse.* ip-about.asp ip-welcome.asp \
picture_run.xml search_* setup_about.xml setup_entry* \
setup_reset.xml welcome.xml
Step 5
Now that we've changed the xml files we're basically done, all we have to do is umount our theme and copy farscape.osd.bin over to the root of a device and boot our WDTV with it connected.
# umount /tmp/osd
# cp /tmp/farscape.osd.bin /media/memstick
Final product:
** farscape.osd.bin-0.1 **
Advanced features
So the changes I just made were fairly minor and it almost seems like providing the full overlay is overkill...well it is and thats what method #2 is for, but there are a few additional features you should be aware of with method #1. You may provide the following in the root of your *.osd.bin:
- etc/init.d/SXX startup scripts which will be executed when the system starts up, with the rest of the init.d scripts.
- additional binaries in directory bin/ to perform custom operations, they'll be added to PATH for system wide use.
- addtional libraries in directory lib/ to support the binaries you provide in bin/.
Therefore you have a great amount of flexibility when creating an osd overlay of this type, there aren't many limitations. There is a developer currently working on a full OSD replacement using a php fuse filesystem, which could even be implemented using this method.
Now onto something more lightweight...
Method #2 - Selective theming with an app.bin
Ok, onto method #2. Selective theming is a bit different from full theming. Whereas in a full theme we must provide all of the OSD files, here we're just going to provide the files that we've changed. For many themes this will only entail 10-12 xml files and a handful of small images. The average theme will therefore only be ~1MB max, including all the images, which makes it a good candidate to load directly into memory. Loading a theme directly into memory allows us the luxury of removing the device containing the app.bin that we'll produce after the WDTV has booted. Once the theme has been loaded into memory the theme will persist until the WDTV has been completely shut down (aka no power) or its power cycled / rebooted.
Step 1
Download the selective-theme-skeleton app.bin I've provided and rename it something unique.
# cd /tmp
# slimrat http://rapidshare.com/files/232296608/selective-theme.skeleton.app.bin
# mv selective-theme-skeleton.app.bin farscape.app.bin
selective-theme-skeleton.app.bin is a skeleton template, it lacks any OSD xml files or images. What it includes is the osd directory structure and the necessary script to load the theme into memory. All you have to do is provide the xml & images and automagic theme!
Step 2
Mount farscape.app.bin (renamed selective-theme-skeleton) someplace.
# mkdir /tmp/selective-theme
# mount -o loop /tmp/farscape.app.bin \ /tmp/selective-theme
Step 3
Copy the xml files and images that make up your theme into the directory where you've mounted the app.bin. I'll use all of the xml files & images I produced for method #1.
# cd /tmp/osd
# cp audio_run.* basic_browse_thumb.* basic_browse.* chapter_list.xml \ home.xml inc_messagebox.xml inc_thumb_browse.xml inc_video_thumb.* \ ip-about.asp ip-welcome.asp picture_run.xml search_* setup_about.xml \ setup_entry* setup_reset.xml welcome.xml /tmp/selective-theme/osd
#
# cp /tmp/farscape/osd/image/* /tmp/selective-theme/osd/image
Step 4
Unmount the app.bin, copy it to the root of a device and boot your wdtv with the device attached.
# umount /tmp/selective-theme
# cp /tmp/farscape.app.bin /media/memstick
Similar result (i didn't include all the images) as method #1, but now we may remove the device containing the app.bin without any detrimental affect
Final product:
** farscape.app.bin-0.1 **
End Notes
Go out and make some themes or complete OSD replacement for that matter, then post them in the theming thread at wdtvforum.
In review:
- *.osd.bin - full OSD overlay with ability to supply additional binaries, libraries, & modules.
- *.app.bin - selective theming; only replace modified xml/images, loads into memory, persists while wdtv is on, app.bin only required at boot.

