View Single Post
Old 09-22-2011, 03:03 AM   #1
CdnBloodlust
Member
CdnBloodlust doesn't litterCdnBloodlust doesn't litter
 
Posts: 18
Karma: 120
Join Date: Sep 2011
Location: Edmonton, AB
Device: Kobo Touch
Kobo Touch Telnet Images

Just wanted to share my notes with everyone on how the kobo touch displays images and the conversion process. I've also created a custom boot animation if anyone's interested.

Code:
############################################################################################################

# raw to png

input=reboot.raw
output=output.png

ffmpeg -f rawvideo -pix_fmt rgb565 -s 800x600 -i <(head -c 960000 "$input") \
-vf transpose=1 -y "$output" < /dev/null

############################################################################################################

# png to raw

# note the extra.raw is to create an image just like the ones found in /etc/images. It's unkonwn to me if the extra bytes are needed but I add them just incase.

zcat ghostbuster.raw.gz | tail -c +960001 > extra.raw

input=on-0.png
output=testing.raw

ffmpeg -i "$input" \
-vf transpose=2 -f rawvideo -pix_fmt rgb565 -s 600x800 -y "$output" < /dev/null

cat extra.raw >> "$output"

############################################################################################################

# ssh and telnet

printf "user root\nput testing.raw" | ftp -in 192.168.0.158
telnet 192.168.0.158
user root
cat testing.raw | /usr/local/Kobo/pickel showpic

############################################################################################################

# extract all default images

cd /home/foo/unsorted/kobo/kobocopy/etc/images

for input in *.raw.gz; do
ffmpeg -f rawvideo -pix_fmt rgb565 -s 800x600 -i <(zcat "$input" | head -c 960000) \
-vf transpose=1 -y "${input%%.*}.png" < /dev/null
done

############################################################################################################

# get extra leading information

cd /home/foo/unsorted/kobo/kobocopy/etc/images

for input in *.raw.gz; do
zcat "$input" | tail -c +960001 > "${input%%.*}-extra.bin"
done

for input in *extra.bin; do
diff -s on-5-extra.bin "$input"
done

############################################################################################################

# notes

In the default images there's extra information at the end of each image, and it's exactly the same for each image.
The extra bytes are 1.2 MB (1219072 bytes) of null bytes minus the 7 bytes listed below. Significance unknown, maybe a watermark?

...
00000FFC   00 00 00 00  00 00 00 00  00 00 00 00  01 00 00 00  00 40 21 00  00 00 00 00  00 00 00 00  00 40 21 00  00 40 21 00  00 00 00 00  00 00 00 00  .................@!..........@!..@!.........
...

# what is this?
/usr/local/Kobo/pickel disable.rtc.alarm

############################################################################################################
Custom Boot Animation.



Edit: Added More Images.

Last edited by CdnBloodlust; 09-22-2011 at 08:30 AM.
CdnBloodlust is offline   Reply With Quote