Order it now! Amazon prioritizes orders on a first come, first served basis.


View Full Version : Kindle 1 Hacking question


lovebeta
03-30-2009, 05:19 PM
I was trying to hack the K1 so that it can handle unicode characters. Taking cue from similar successful hacks on K2, I was trying to modify /usr/java/lib/font.properties and a custom font, using the custom upgrade bin, to achieve that. However, as igor pointed out (http://igorsk.blogspot.com/2007/12/hacking-kindle-part-3-root-shell-and.html), /usr is not writable on K1. Here are the mount and df results:
devfs on /dev type devfs (rw)
/dev/bml0/6 on / type squashfs (ro)
/dev/stl0/8 on /opt type ext3 (rw,sync,noatime,nodiratime)
/proc on /proc type proc (rw,nodiratime)
sysfs on /sys type sysfs (rw)
devfs on /dev type devfs (rw)
usbdevfs on /proc/bus/usb type usbdevfs (rw)
devpts on /dev/pts type devpts (rw)
tmpfs on /tmp type tmpfs (rw)
/dev/bml0/7 on /mnt/dc type squashfs (ro)
/dev/stl0/9 on /mnt/us type vfat (rw,noatime,nodiratime,fmask=0022,dmask=0022)
/dev/mmc/blk0/part1 on /mnt/mmc type vfat (rw,sync,dirsync,noatime,nodiratime,fmask=0022,dma sk=0022)


Filesystem 1k-blocks Used Available Use% Mounted on
/dev/bml0/6 11200 11200 0 100% /
/dev/stl0/8 19766 12417 6329 66% /opt
/dev/bml0/7 15104 15104 0 100% /mnt/dc
/dev/stl0/9 186950 12986 173964 7% /mnt/us
/dev/mmc/blk0/part1 3971584 288 3971296 0% /mnt/mmc


So what shall I do now? many thanks for any of your input!!

sirbruce
03-30-2009, 06:30 PM
So remount it rw?

lovebeta
03-30-2009, 06:58 PM
I frankly am not very familiar with Linux, let alone embeded linux. Also I didn't have shell access to K1, which unlike K2, doesn't have the USBnetwork utility. So I am very cautious now, especially seeing there are several busted k2's.

Note that / was mounted as SquashFS, which is a ro FS for embeded system. Can I mount it as rw?

igorsk
03-31-2009, 10:30 AM
SquashFS is read-only. /opt is writable and I think it's symlinked somewhere from the root, but I think that symlink doesn't include Java stuff.
What might work is overwriting the fonts directory with a symlink pointing to somewhere in /opt or the USB storage.

sirbruce
03-31-2009, 11:06 AM
Oh, sorry, I don't understand how you're able to access such commands and "hack the K1" without shell access like igorsk did.

You'd mount a new union filesystem over the SquashFS one so you could modify files in that filesystem. But igorsk has a different suggestion.

lovebeta
03-31-2009, 11:39 AM
I found that "/" is mounted as ext2 in the recovery mode. it was much smaller and definitely didn't contain the same files as normal root filesystem. Is it only the small bootstrap recovery system? Will it be simpler if I try to mount and modify the /dev/bml0/6 in this mode?
devfs on /dev type devfs (rw)
/dev/root.old on / type ext2 (rw)
none on /dev type devfs (rw)
/proc on /proc type proc (rw,nodiratime)
sysfs on /sys type sysfs (rw)
tmpfs on /tmp type tmpfs (rw)
/dev/stl0/9 on /mnt/us type vfat (rw,noatime,nodiratime,fmask=0022,dmask=0022)
/dev/mmc/blk0/part1 on /mnt/mmc type vfat (rw,sync,dirsync,noatime,nodiratime,fmask=0022,dma sk=0022)

Filesystem 1k-blocks Used Available Use% Mounted on
/dev/root.old 2011 1604 407 80% /
/dev/stl0/9 186950 97716 89234 52% /mnt/us
/dev/mmc/blk0/part1 3971584 448 3971136 0% /mnt/mmc
Or, if I still want to do things in the regular mode as / was mounted as ro SquashFS, how can I create a symlink in /usr/java/lib? I guess I still have to remounted somehow as sirbruce suggested?

To sirbruce: you can use igor's update generator to wrap any shell script as an "update". So you can run any shell script this way but it is not interactive and very dangerous, at least until we can get a full recovery rom from Amazon.