Author Topic: Unpacking WDTV Live firmware - SOLVED  (Read 28995 times)

November 17, 2009, 04:31:23 PM
Read 28995 times

pibos

  • Full Member

  • Offline
  • ***

  • 235
Since first version was released, I tryied to unpack it using regular tools dd && cramfs-1.1 but i only got a sagmentation fault while cramfs was trying to uncompress the first file in the image.
Files are stored in cramfs image as a number of consecutive compressed chunks.
Turns out that the chunk size was bigger in the version of cramfs they used to create the image ( ... why?);

So, in order to make it work, do the following in your favorite linux shell:

strip the md5 checksum from the image
 dd if=wdtvlive.bin of=unpacked.img bs=32 skip=1c

get cramfs version 1.1 sources and unpack them
modify cramfsck.c as following:

Line 68, replace
#define PAGE_CACHE_SIZE (4096)
with
#define PAGE_CACHE_SIZE (4096 * 4)


line 88, replace
#define ROMBUFFER_BITS   13
with
#define ROMBUFFER_BITS   14

save and close the file
do a make -f GNUmakefile

you now have an executable of cramfsck

run it:
./cramfsck -v -x rootfs unpacked.img

and you should now have all the files from the image in rootfs subdirectory

or you can get the sources and ubuntu 8 binaries from here http://www.mediafire.com/?v2u2zzz4mym


pibos out







« Last Edit: November 17, 2009, 04:38:47 PM by pibos »
Wanna help WDTVExt for WDTVLive and RemoteView?

November 17, 2009, 11:23:00 PM
Reply #1

lilibabe

  • Hero Member

  • Offline
  • *****

  • 1462
    • http://wdtv.free.fr/
Cool ! Thank you pibos, I will try it...

And what about repacking ?
If you appreciate my work and want to contribute, feel free to donate at http://wdtv.free.fr/

November 18, 2009, 12:04:53 AM
Reply #2

pibos

  • Full Member

  • Offline
  • ***

  • 235
Cool ! Thank you pibos, I will try it...

And what about repacking ?

will do, this weekend
Wanna help WDTVExt for WDTVLive and RemoteView?

November 21, 2009, 11:25:19 PM
Reply #3

samuf

  • Newbie

  • Offline
  • *

  • 5
Hi

If I try mkcramfs in the directory where i unpack the image, it's create a different image (not only the md5 hash in the file begin). Its not problem?

November 22, 2009, 05:30:12 AM
Reply #4

pibos

  • Full Member

  • Offline
  • ***

  • 235
Hi

If I try mkcramfs in the directory where i unpack the image, it's create a different image (not only the md5 hash in the file begin). Its not problem?

Still working on packing an image back, I would not recommend using one generated this way.
I'll let you know when I got that procedure inplace.
Wanna help WDTVExt for WDTVLive and RemoteView?

November 27, 2009, 11:45:31 AM
Reply #5

lilibabe

  • Hero Member

  • Offline
  • *****

  • 1462
    • http://wdtv.free.fr/
@pibos : you still haven't found the solution to recreate the .bin file ?
If you appreciate my work and want to contribute, feel free to donate at http://wdtv.free.fr/

November 30, 2009, 12:26:05 AM
Reply #6

pibos

  • Full Member

  • Offline
  • ***

  • 235
@lilibabe: I am down with a bad flu, not quite able to work on it
Wanna help WDTVExt for WDTVLive and RemoteView?

November 30, 2009, 04:20:13 AM
Reply #7

lilibabe

  • Hero Member

  • Offline
  • *****

  • 1462
    • http://wdtv.free.fr/
@lilibabe: I am down with a bad flu, not quite able to work on it

I hope this is not serious (H1N1) and that you can quickly work on the WDTV...
If you appreciate my work and want to contribute, feel free to donate at http://wdtv.free.fr/

December 10, 2009, 04:18:51 AM
Reply #8

lilibabe

  • Hero Member

  • Offline
  • *****

  • 1462
    • http://wdtv.free.fr/
Hi pibos, how are you ? Still ill ?

Hope to have fresh news (on your health and the .bin file !) soon...  ;)
If you appreciate my work and want to contribute, feel free to donate at http://wdtv.free.fr/

December 12, 2009, 08:23:37 PM
Reply #9

rodfeli

  • Full Member

  • Offline
  • ***

  • 148
Hi pibos, how are you ? Still ill ?
           
Hope to have fresh news (on your health and the .bin file !) soon...  ;)

No news are NOT good news in this case...  :-[ :'(
You need this to repack a new OSD right?                                                                                                                                                               
WDTV LIVE | FW 1.02.21 | Lilibabe's Picto OSD Mod
WDTV1 | FW 1.03.01 | Lilibabe's v2.0 OSD Mod

December 18, 2009, 11:08:36 AM
Reply #10

lilibabe

  • Hero Member

  • Offline
  • *****

  • 1462
    • http://wdtv.free.fr/
Yes, that's true !

Even if I don't know exactly where I am in my work since I stopped working on it for over a month !

...especially since I will not have time to work on it for over a month !

By then, I hope I will have all the info needed...
If you appreciate my work and want to contribute, feel free to donate at http://wdtv.free.fr/

December 18, 2009, 09:19:49 PM
Reply #11

b33rm4t

  • Newbie

  • Offline
  • *

  • 4
    • WD TV HD, LIVE, REV2 - Magyarul
The solution is before your nose.
Pibos wrote the solution down.
I know it loosely already who and back up to pack.
Beautifully settlement.


excuse me for the bad English
WD TV HD, LIVE, REV2 - Magyarul - http://b33rm4t.ith.hu/

December 19, 2009, 03:21:21 AM
Reply #12

pibos

  • Full Member

  • Offline
  • ***

  • 235
Yes, that's true !

Even if I don't know exactly where I am in my work since I stopped working on it for over a month !

...especially since I will not have time to work on it for over a month !

By then, I hope I will have all the info needed...

Lilibabe,

I don't have enough time wright now to get into cramfs packer but i have disclosed all the details that I know related to it here
http://wdtvforum.com/main/index.php?topic=3594.0

Maybe someone else has the time and knowledge to do it...?
Wanna help WDTVExt for WDTVLive and RemoteView?

December 19, 2009, 08:46:41 AM
Reply #13

lilibabe

  • Hero Member

  • Offline
  • *****

  • 1462
    • http://wdtv.free.fr/
Yes, thank you pibos, I already read your other topic, but it's gibberish to me !!
If you appreciate my work and want to contribute, feel free to donate at http://wdtv.free.fr/

December 20, 2009, 10:45:54 AM
Reply #14

b33rm4t

  • Newbie

  • Offline
  • *

  • 4
    • WD TV HD, LIVE, REV2 - Magyarul
Lilibabe master \o/

Unpacking
get cramfs version 1.1 sources and unpack them
modify cramfsck.c as following:

Line 68, replace
#define PAGE_CACHE_SIZE (4096)
with
#define PAGE_CACHE_SIZE (4096 * 4)

line 88, replace
#define ROMBUFFER_BITS   13
with
#define ROMBUFFER_BITS   14

Packing
modify mkcramfs.c as following:

#define PAGE_CACHE_SIZE (4096)
with
#define PAGE_CACHE_SIZE (4096 * 4)


mkcramfs rootfs wdtvlive.cramfs
md5sum wdtvlive.cramfs | dd bs=32 count=1 > wdtvlive.md5
cat wdtvlive.md5 wdtvlive.cramfs > wdtvlive.bin
WD TV HD, LIVE, REV2 - Magyarul - http://b33rm4t.ith.hu/