Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Sony Reader > Sony Reader Dev Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 10-21-2006, 08:51 AM   #1
igorsk
Wizard
igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.
 
Posts: 3,442
Karma: 300001
Join Date: Sep 2006
Location: Belgium
Device: PRS-500/505/700, Kindle, Cybook Gen3, Words Gear
lbhook.sh support patch

igorsk 1 - cramfs 0
Read the provided readme.txt for instructions.
Here's a sample script:
Code:
#! /bin/bash

PATH="/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games:/usr/local/sony/bin:/usr/sbin"
LD_LIBRARY_PATH="/opt/sony/ebook/application:/lib:/usr/lib:/usr/local/sony/lib:/opt/sony/ebook/lib"
export PATH LD_LIBRARY_PATH

pstree -a -c -l >/tmp/pstree.log &
and its output (retrieved with "ebook.py get /tmp/pstree.log"):
Code:
init) 
  |-getty) console 
  |-(jffs2_gcd_mtd15)
  |-(jffs2_gcd_mtd16)
  |-(keventd)
  |-lbhook.sh) /tmp/lbhook.sh 
  |   `-pstree) -a -c -l 
  |-(msbdrv_thread)
  |-(mtdblockd)
  |-(sdbdrv_thread)
  `-tinyhttp.sh) /opt/sony/ebook/bin/tinyhttp.sh 
      `-tinyhttp)
Attached Files
File Type: zip PRSPatch-0.1.zip (78.3 KB, 2433 views)
igorsk is offline   Reply With Quote
Old 10-21-2006, 09:12 AM   #2
gseryakov
Enthusiast
gseryakov began at the beginning.
 
Posts: 27
Karma: 10
Join Date: Oct 2006
Device: Sony Reader
Quote:
Originally Posted by igorsk
igorsk 1 - cramfs 0
Read the provided readme.txt for instructions.
This is the breakthrough! Just a couple of questions to clarify.

Quote:
Originally Posted by readme.txt
1. dump the current Rootfs:
>ebook.py get /dev/mtd13 0x863000
...
5. upload new Rootfs:
>ebook.py pwrite "Rootfs" Rootfs.new
So Reader lets you read the flash partitions by addresses and write by names? Is there any way to read them by names?

What is the difference between cramfs from Reader and Librie? I mean - after mounting the cramfs-es.
gseryakov is offline   Reply With Quote
Old 10-21-2006, 09:39 AM   #3
arivero
Guru
arivero knows what time it isarivero knows what time it isarivero knows what time it isarivero knows what time it isarivero knows what time it isarivero knows what time it isarivero knows what time it isarivero knows what time it isarivero knows what time it isarivero knows what time it isarivero knows what time it is
 
arivero's Avatar
 
Posts: 607
Karma: 2157
Join Date: Oct 2005
Device: NCR3125, Nokia 770,...
Quote:
Originally Posted by gseryakov
So Reader lets you read the flash partitions by addresses and write by names?
Amazed of this. I was afraid that you were going to need to dd it, and of course you can not dd if you can not to run scripts. But straight access to the partition is a bless! Moreover tiu need it, because a file by file extract is not able to recover ln files, /dev things and all these "minor" issues.

Quote:
Today 01:51 PM
Did you got to sleep, igorsk ?

Quote:
What is the difference between cramfs from Reader and Librie? I mean - after mounting the cramfs-es.
Judging from the filesystem dumps, the architecture of the aplication has changed, but it seems that the Operating System is the same. Meaning that perhaps the communication trick (console access via usb) could work straight from librie to reader without modification, and perhaps even the display utilities to upload jpg from scripts. Next steps are, in random order:

a) try for console access via USB.
b) try to show a picture in the display using command line utilities.
c) try my command line utilities for DJVU files.
d) review how to compile Andrew's "simple reader", of if it works straighforward.
e) if not console access, create a "SMS-phone" way to enter text to show it in the console. Note that the netpbm utilities, a lot of them, are included in the djvu package, and this includes some text display utility, I believe to remember.
arivero is offline   Reply With Quote
Old 10-21-2006, 09:55 AM   #4
Slava
Addict
Slava doesn't litterSlava doesn't litter
 
Slava's Avatar
 
Posts: 285
Karma: 129
Join Date: Sep 2006
Location: New England
Device: PRS-500 · iPad · K3
Quote:
Originally Posted by arivero
... Next steps are, in random order:

a) try for console access via USB.
b) try to show a picture in the display using command line utilities.
c) try my command line utilities for DJVU files.
d) review how to compile Andrew's "simple reader", of if it works straighforward.
e) if not console access, create a "SMS-phone" way to enter text to show it in the console.
Next step will be to copy Russian fonts to /opt/....


Quote:
Originally Posted by igorsk
igorsk 1 - cramfs 0
Excellent
Slava is offline   Reply With Quote
Old 10-21-2006, 10:22 AM   #5
gseryakov
Enthusiast
gseryakov began at the beginning.
 
Posts: 27
Karma: 10
Join Date: Oct 2006
Device: Sony Reader
Quote:
Originally Posted by Slava
Next step will be to copy Russian fonts to /opt/....
Yeah! It was a Russian party from the beginning, because the Reader hack is of terrible need for Russians to drink^Wsmoke^Wread Russian books!
gseryakov is offline   Reply With Quote
Old 10-21-2006, 10:42 AM   #6
Slava
Addict
Slava doesn't litterSlava doesn't litter
 
Slava's Avatar
 
Posts: 285
Karma: 129
Join Date: Sep 2006
Location: New England
Device: PRS-500 · iPad · K3
Igor,

I wonder if it's possible to create softlinks for directories under /opt tree to updatable filesystem like /Data? It will make updating fonts and graphics much easier.
Slava is offline   Reply With Quote
Old 10-21-2006, 10:46 AM   #7
NatCh
Gizmologist
NatCh ought to be getting tired of karma fortunes by now.NatCh ought to be getting tired of karma fortunes by now.NatCh ought to be getting tired of karma fortunes by now.NatCh ought to be getting tired of karma fortunes by now.NatCh ought to be getting tired of karma fortunes by now.NatCh ought to be getting tired of karma fortunes by now.NatCh ought to be getting tired of karma fortunes by now.NatCh ought to be getting tired of karma fortunes by now.NatCh ought to be getting tired of karma fortunes by now.NatCh ought to be getting tired of karma fortunes by now.NatCh ought to be getting tired of karma fortunes by now.
 
NatCh's Avatar
 
Posts: 11,615
Karma: 929550
Join Date: Jan 2006
Location: Republic of Texas Embassy at Jackson, TN
Device: Pocketbook Touch HD3
igorsk, You Da Man! You Da Man!
NatCh is offline   Reply With Quote
Old 10-21-2006, 10:55 AM   #8
igorsk
Wizard
igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.
 
Posts: 3,442
Karma: 300001
Join Date: Sep 2006
Location: Belgium
Device: PRS-500/505/700, Kindle, Cybook Gen3, Words Gear
Quote:
Originally Posted by gseryakov
So Reader lets you read the flash partitions by addresses and write by names? Is there any way to read them by names?
Download /proc/mtd to see mapping between device numbers and partitions. Then you can use "ebook.py pinfo" command to get the partition info (there ain't much). You can also execute "/usr/local/sony/bin/nblsdm list" with redirection via the script hook.
Quote:
Originally Posted by gseryakov
What is the difference between cramfs from Reader and Librie? I mean - after mounting the cramfs-es.
You can always extract both and compare From what I've seen, they're almost the same - Reader has an extra SD driver but that's about it. The main difference is the reading application.
Quote:
Originally Posted by gseryakov
I wonder if it's possible to create softlinks for directories under /opt tree to updatable filesystem like /Data? It will make updating fonts and graphics much easier.
Probably the same trick as with /etc would work, i.e. copy files to ramdisk and remount under a subdir. However, currently the hook script runs after tinyhttp so I'm not sure if the updated fonts will be loaded.
igorsk is offline   Reply With Quote
Old 10-21-2006, 11:20 AM   #9
igorsk
Wizard
igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.
 
Posts: 3,442
Karma: 300001
Join Date: Sep 2006
Location: Belgium
Device: PRS-500/505/700, Kindle, Cybook Gen3, Words Gear
For the brave, here's modified cramfs tools from Cygwin which I used to extract and reassemble the cramfs image. To make sure you get the same permissions in your new filesystem, use a devtable file (-d in cramfsk and -D in mkcramfs).
A few things to know to minimize a chance to brick your device:
1) Linux0 and Rootfs2 are kernel and root fs used in the recovery (update) mode. It's best not to touch them.
2) USB control is handled by switcher.so (loaded by tinyhttp) in normal mode, and by /opt0/UsbUpdater in recovery mode. So, disabling any of them will leave you without a way to control the unit via USB.
3) Using USB interface, in normal mode you cannot write flash partitions and in recovery mode you cannot read and write files.
Attached Files
File Type: zip cramfs-tools.zip (1.52 MB, 7950 views)
igorsk is offline   Reply With Quote
Old 10-21-2006, 02:49 PM   #10
arivero
Guru
arivero knows what time it isarivero knows what time it isarivero knows what time it isarivero knows what time it isarivero knows what time it isarivero knows what time it isarivero knows what time it isarivero knows what time it isarivero knows what time it isarivero knows what time it isarivero knows what time it is
 
arivero's Avatar
 
Posts: 607
Karma: 2157
Join Date: Oct 2005
Device: NCR3125, Nokia 770,...
Quote:
Originally Posted by igorsk
However, currently the hook script runs after tinyhttp so I'm not sure if the updated fonts will be loaded.
It can kill tinyhttp and relaunch it, in any case.
arivero is offline   Reply With Quote
Old 10-21-2006, 05:56 PM   #11
TadW
Uebermensch
TadW ought to be getting tired of karma fortunes by now.TadW ought to be getting tired of karma fortunes by now.TadW ought to be getting tired of karma fortunes by now.TadW ought to be getting tired of karma fortunes by now.TadW ought to be getting tired of karma fortunes by now.TadW ought to be getting tired of karma fortunes by now.TadW ought to be getting tired of karma fortunes by now.TadW ought to be getting tired of karma fortunes by now.TadW ought to be getting tired of karma fortunes by now.TadW ought to be getting tired of karma fortunes by now.TadW ought to be getting tired of karma fortunes by now.
 
TadW's Avatar
 
Posts: 2,583
Karma: 1094606
Join Date: Jul 2003
Location: Italy
Device: Kindle
Quote:
Originally Posted by igorsk
igorsk 1 - cramfs 0
You rock, igor!
TadW is offline   Reply With Quote
Old 10-21-2006, 07:19 PM   #12
porkupan
Fanatic
porkupan ought to be getting tired of karma fortunes by now.porkupan ought to be getting tired of karma fortunes by now.porkupan ought to be getting tired of karma fortunes by now.porkupan ought to be getting tired of karma fortunes by now.porkupan ought to be getting tired of karma fortunes by now.porkupan ought to be getting tired of karma fortunes by now.porkupan ought to be getting tired of karma fortunes by now.porkupan ought to be getting tired of karma fortunes by now.porkupan ought to be getting tired of karma fortunes by now.porkupan ought to be getting tired of karma fortunes by now.porkupan ought to be getting tired of karma fortunes by now.
 
porkupan's Avatar
 
Posts: 556
Karma: 1057213
Join Date: Sep 2006
Location: North Eastern U.S.
Device: Sony Reader
Igor,
Just wondering, why are you dumping 0x863000 bytes of Rootfs while the actual size of the filesystem is supposed to be 0x980000? Did you try dumping the whole 0x980000 bytes?
porkupan is offline   Reply With Quote
Old 10-21-2006, 08:57 PM   #13
igorsk
Wizard
igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.
 
Posts: 3,442
Karma: 300001
Join Date: Sep 2006
Location: Belgium
Device: PRS-500/505/700, Kindle, Cybook Gen3, Words Gear
The partition size is 0x980000. However, the actual size used by the cramfs image is 0x863000. You can check it yourself, it's specified in the second dword of the image.
igorsk is offline   Reply With Quote
Old 10-23-2006, 10:20 PM   #14
porkupan
Fanatic
porkupan ought to be getting tired of karma fortunes by now.porkupan ought to be getting tired of karma fortunes by now.porkupan ought to be getting tired of karma fortunes by now.porkupan ought to be getting tired of karma fortunes by now.porkupan ought to be getting tired of karma fortunes by now.porkupan ought to be getting tired of karma fortunes by now.porkupan ought to be getting tired of karma fortunes by now.porkupan ought to be getting tired of karma fortunes by now.porkupan ought to be getting tired of karma fortunes by now.porkupan ought to be getting tired of karma fortunes by now.porkupan ought to be getting tired of karma fortunes by now.
 
porkupan's Avatar
 
Posts: 556
Karma: 1057213
Join Date: Sep 2006
Location: North Eastern U.S.
Device: Sony Reader
Thank you, igorsk!

porkupan is offline   Reply With Quote
Old 10-23-2006, 10:32 PM   #15
NatCh
Gizmologist
NatCh ought to be getting tired of karma fortunes by now.NatCh ought to be getting tired of karma fortunes by now.NatCh ought to be getting tired of karma fortunes by now.NatCh ought to be getting tired of karma fortunes by now.NatCh ought to be getting tired of karma fortunes by now.NatCh ought to be getting tired of karma fortunes by now.NatCh ought to be getting tired of karma fortunes by now.NatCh ought to be getting tired of karma fortunes by now.NatCh ought to be getting tired of karma fortunes by now.NatCh ought to be getting tired of karma fortunes by now.NatCh ought to be getting tired of karma fortunes by now.
 
NatCh's Avatar
 
Posts: 11,615
Karma: 929550
Join Date: Jan 2006
Location: Republic of Texas Embassy at Jackson, TN
Device: Pocketbook Touch HD3
Y'all did it! Excellent!
NatCh is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Hello from Pixie's briar patch! sweetPixiesmile Introduce Yourself 10 08-08-2010 08:33 PM
1.7.1 Patch Released curbarthedog iRex 22 11-18-2009 02:03 PM
Latest MobiDeDRM Patch pdurrant Kindle Formats 65 08-09-2009 03:02 PM
New patch: 2.9.1 vranghel iRex 10 03-16-2007 04:51 AM
MSBlaster patch emale07 Lounge 0 08-13-2003 11:17 AM


All times are GMT -4. The time now is 07:17 PM.


MobileRead.com is a privately owned, operated and funded community.