Reflashing the Reader for lbhook.sh support.
Inpired by the original Librie hack by Marko Bolowski.

WARNING: THIS PROCEDURE MIGHT RENDER YOUR UNIT UNUSABLE AND VOID YOUR WARRANTY. USE AT YOUR OWN RISK.

* Procedure

0. unpack the zip into some directory.
Copy there ebookUsb.dll and prsctr.dll from "C:\Program Files\Sony\CONNECT Reader\Data".
Open a command prompt and go to that directory.
Connect the Reader.

1. dump the current Rootfs:
>ebook.py get /dev/mtd13 0x863000

2. patch Rootfs:
>bspatch.exe mtd13 Rootfs.new Rootfs.bspatch

3. check its md5:
>md5sum.exe Rootfs.new
0b1fb70c3ce7176cbbb96302ea748930 *Rootfs.new
Do not continue if you got a different result!

4. switch Reader to update mode:
>ebook.py um recovery
After a few seconds, Reader will reboot. Don't disconnect the unit.
Wait until you get the "Updating firmware now..." message

5. upload new Rootfs:
>ebook.py pwrite "Rootfs" Rootfs.new

6. switch to normal mode:
>ebook.py um normal
The reader will reboot again, now into the normal mode.


* What it does

The patch adds the following lines to the S98librostart script:

/bin/rm -rf /tmp/lbhook.sh
/usr/bin/mcopy a:/lbhook.sh /tmp
/usr/bin/mcopy b:/lbhook.sh /tmp
/bin/chmod ugo+rwx /tmp/lbhook.sh
/tmp/lbhook.sh &

In short, it tries to copy a file called "lbhook.sh" from either memory
stick or SD card and then execute it. This happens on boot, after the main
Reader app (tinyhttp) starts. Thus, you will need to reset the unit each
time you need to run it.


by Igor Skochinsky <skochinsky@mail.ru>
2006/10/21
