View Full Version : telnetd / gaining root
jesse 03-06-2009, 12:42 AM I'm not quite as gutsy as igorsk when it comes to publishing actual reverse engineering tools, but this evening I managed to get a telnetd onto my K2.
If you know how to build update packages, it should be straightforward for you to knock something together.
http://blog.fsck.com/2009/03/a-productive-evening-so-far.html
http://blog.fsck.com/2009/03/root.html
kylecronan 03-06-2009, 01:49 AM Did you just create an init.d script for your telnetd and link to it from /etc/rc5.d? I tried this (and a couple other methods) with a script that just ran netcat to listen and spawn a shell, but it didn't work for some reason. I'm working on crosscompiling telnetd now.
And no, I don't have any intention to do things Amazon wouldn't like. They must not care too much anyway, because they apparently did nothing to make the K2 any different/harder to hack than the K1 (which had published info on it!)
Kyle
jesse 03-06-2009, 01:59 AM see if debugMessages shows you what happened when your update ran. (But you don't need to build your own telnet. you can use a statically linked busybox built for android or maemo.
kylecronan 03-06-2009, 02:36 AM I haven't noticed anything called debugMessages. What's that?
goldfinger 03-06-2009, 09:48 PM I'm just interested in getting custom screensavers. I don't care about getting free internet. Just a Java developer interested in tinkering with my Kindle. I go a compiled andriod busybox, but having problems creating the update*.bin file.
daffy4u 03-06-2009, 10:02 PM I'm just interested in getting custom screensavers. I don't care about getting free internet. Just a Java developer interested in tinkering with my Kindle. I go a compiled andriod busybox, but having problems creating the update*.bin file.
Another member has already come up with a hack for screensavers on K2. See post #53 of this (http://www.mobileread.com/forums/showthread.php?t=40302) thread.
slayda 03-06-2009, 10:14 PM daffy4u, do you have any idea if this will work the same for the K1?
daffy4u 03-06-2009, 10:16 PM daffy4u, do you have any idea if this will work the same for the K1?
There is a different set-up for K1. Those instructions are here (http://www.mobileread.com/forums/showpost.php?p=281787&postcount=77).
daffy4u 03-06-2009, 10:17 PM I'm not quite as gutsy as igorsk when it comes to publishing actual reverse engineering tools, but this evening I managed to get a telnetd onto my K2.
If you know how to build update packages, it should be straightforward for you to knock something together.
http://blog.fsck.com/2009/03/a-productive-evening-so-far.html
http://blog.fsck.com/2009/03/root.html
You're all over the place. You keep popping up in my Google Reader. :)
lovebeta 03-07-2009, 03:01 AM I was wondering if one can exchange the font and get unicode support after gaining root. Any idea? :D
stevenmoy 03-07-2009, 03:07 PM The device supports unicode already and its the font that they are shipping missing the glyphs that you want. (I know minor difference but everyone seems to forget the difference between supporting unicode and the glyphs required to display the characters)
Obviously its possible to hack the device and replace the font, just remember that font itself is a copyrighted work, and Microsoft didn't spends years + tons of money to make a font for you to use it in the Kindle =D
clarknova 03-07-2009, 04:59 PM Obviously its possible to hack the device and replace the font, just remember that font itself is a copyrighted work, and Microsoft didn't spends years + tons of money to make a font for you to use it in the Kindle =D
Copyrighted doesn't mean unusable. Microsoft's EULA for Times/Arial/Courier gives you the right to install all you want, wherever you want. Which is why they're freely downloadable.
Though MS is not even close to being the only source for Unicode fonts.
jesse 03-07-2009, 07:02 PM I have some ideas about getting proper and free fonts onto the Kindle. If I can make it go, I'll package an "upgrade"
lovebeta 03-07-2009, 09:22 PM I have some ideas about getting proper and free fonts onto the Kindle. If I can make it go, I'll package an "upgrade"
That could be the best news EVER! :thanks:
stevenmoy 03-07-2009, 11:49 PM I should mention that whatever package you dream of releasing, indicate the change in the version string file; otherwise, customer service has no idea that someone reports a problem with all these misc. packages installed. Costs both the dev + qa griefs on hunting ghosts.
kylecronan 03-08-2009, 07:45 PM jesse, it appears unable to bring the wan interface up while usb networking is in use. have you looked at whether there is any way around this?
Nate the great 03-08-2009, 08:15 PM jesse, it appears unable to bring the wan interface up while usb networking is in use. have you looked at whether there is any way around this?
I bet he could, and I bet he won't. If you have both the USB networking and the 3G on at the same time, wouldn't that be one step closer to using the K2 as a modem?
kylecronan 03-08-2009, 08:21 PM I guess that's true. I was just looking for some way that I can leave the USB networking on all the time, to make it easier to telnet in whenever.
jesse 03-08-2009, 09:25 PM @kylekronan I've been pondering an "easier" way to turn on USB Networking, but for now I'm content as is.
@stevenmoy - Indeed. It's really important to me that anything I release for the Kindle makes it _really_ obvious that it's a hacked up OS.
clarknova 03-08-2009, 10:26 PM I have some ideas about getting proper and free fonts onto the Kindle. If I can make it go, I'll package an "upgrade"
Jesse, have you made any progress with this? I've managed to get unicode support on the home menu, but not in the reader. It almost seems like the actual reader app is not even attempting to do anything but Latin-1, since they're using the same fonts and fonts config.
jesse 03-09-2009, 06:25 AM I've been focused elsewhere (crosscompiler).
Did you modify /usr/java/lib/font.properties or did you just drop new fonts into /usr/java/lib/ with the same names as existing fonts?
Which did you replace?
clarknova 03-09-2009, 12:00 PM Which did you replace?
Ha. I'm a putz. I only replaced the Serif to test with, but just realized that my test .mobi file was made from a HTML file that was enclosed entirely in <pre> tags, and was rendering mono-spaced (using the KindleBlackbox font). Oh well.
Everything works as expected, now to find some better fonts than the ugly GNU FreeFonts.
daffy4u 03-09-2009, 12:04 PM I just want to say "I love you people"! I don't know if I'll be able to take advantage of the cool stuff you're doing (most of it flies over my head) but I love that you're doing it. Thanks! :)
kylecronan 03-09-2009, 02:42 PM clarknova, that's very impressive and quite a useful hack! So what's a good font that supports many or most of the Unicode code blocks?
clarknova 03-09-2009, 04:41 PM clarknova, that's very impressive and quite a useful hack! So what's a good font that supports many or most of the Unicode code blocks?
That's the $25,000 question. I don't think there are any universal multilingual fonts that look very good. For most western language speakers the Times/Arial/Courier combo will do it. However the fonts are not redistributable outside of their unaltered form, which means people would have to download the original packages, extract the fonts and build the updates themselves.
For the CJK, Thai, Indian, and other non-latin based languages, different font sets would be needed, and again the updates would have to be built individually.
Technically you could probably use BitStream Cyberbit and Arial Unicode as your Serif and Sans fonts if you wanted all of the unicode glyphs, but this is overkill and would cost you the ability to have bold or italics.
jesse 03-09-2009, 05:41 PM @clarknova, Nice work!
Try out DejaVu and Droid Sans Fallback.
http://dejavu-fonts.org/wiki/index.php?title=Download
http://en.wikipedia.org/wiki/Droid_(font)
(for the droid ffonts, go to the git repo to download)
I'm happy to try out what you've got or chat about packaging once you've got something useful
stevenmoy 03-10-2009, 03:32 AM Or this community can pull together $1 million dollar prize pool to hire a graphic artist to crunch out the entire unicode set and distribute for free.
lovebeta 03-10-2009, 01:39 PM That's the $25,000 question. I don't think there are any universal multilingual fonts that look very good. For most western language speakers the Times/Arial/Courier combo will do it. However the fonts are not redistributable outside of their unaltered form, which means people would have to download the original packages, extract the fonts and build the updates themselves.
For the CJK, Thai, Indian, and other non-latin based languages, different font sets would be needed, and again the updates would have to be built individually.
Technically you could probably use BitStream Cyberbit and Arial Unicode as your Serif and Sans fonts if you wanted all of the unicode glyphs, but this is overkill and would cost you the ability to have bold or italics.
Maybe you can just teach us how to make the update ourselves then? I think all hacks are not meant to be used by the average joes anyway. :thanks:
BTW, Droid is a good font. It is also relatively tiny w.r.t the blocks it covered.
kylecronan 03-10-2009, 08:29 PM lovebeta, do you know how to write shell scripts? If so, it's just a matter of using Igor's updatemaker script to make an update that installs telnetd or something similar.
Google "android busybox binary". This binary will act like telnetd if run with that name (ie, change the name to 'telnetd' or symlink 'telnetd' -> 'busybox'). Add your startup script to /etc/rc5.d.
superzhou 03-14-2009, 07:51 PM I got Chinese font displayed on Kindle 2 also.:)
Nate the great 03-14-2009, 08:05 PM I got Chinese font displayed on Kindle 2 also.:)
How is the text to speech? ;)
superzhou 03-14-2009, 10:27 PM How is the text to speech? ;)
It said "back quote, back quote"
Blog Kindle 03-23-2009, 08:04 AM I've been focused elsewhere (crosscompiler).
Did you modify /usr/java/lib/font.properties or did you just drop new fonts into /usr/java/lib/ with the same names as existing fonts?
Which did you replace?
Just bricked my Kindle 2 :(
here's how:
1) created subfolder fonts subfolder under system folder on the Kindle drive and copied unicode fonts there.
2) /usr/java/lib/font.properties (replaced font file names and added appendedfontpath=/mnt/us/system/fonts)
3) copied edited file to Kindle drive along with the update that would copy it over the original file
4) installed the update
Unfortunately for me I made a typo in the appendedfontpath value so when Kindle tried to load the fonts it fails and screen goes dark (just about the time boot progress bar gets to letter "n" in the word amazon)
USB drive still mounts though. I put an update that would revert /usr/java/lib/font.properties to the origianl state and tried forcing the update blindly (pressing menu-down-down-down-click-menu-down-down-click-click). Nothing happens though. I guess that the app that is supposed to receive keyboard input never starts because of the font issue.
Tried waiting for 10 minutes until it would fall asleep and install the update automatically and then reboot. But I guess that it only autoinstalls updates that are download from Whispernet.
Turning it on and off as well and hard reset still work.
I guess it's officially bricked now unless someone can point me to a way to forcing it to install the update package that is there on the USB drive right after it starts up.
I knew what I was risking when I started messing with it so I don't blame anyone except myself.
|