I want to be a kindle(or such as devices) developer. Which programming languages Must i know. i am a enthusiastic learner. And i also know Action-Script 3 and ASP. And i will be pleased if you share some books that are about this programming languages.
I was poking around, and found that the K3 contains a startx script in /usr/bin/ .... I went ahead and ran it, and it stopped the framework, went like it wanted to start X, then complained about missing /usr/share/X11.
I wonder if we could get X to run on the K3 by finding a replacement for that folder or somthing to that effect.
This is a great resource. however I like my resources offline where I can.
The licensing seems permissive of this effort.
As I say: prefer to read this stuff offline so. meh. sharing.
The index is a bit of a fudge but seems usable.
Re the index:
Some entries do still leach off to one side in the secondary index.
"Xlib programming manual: function index"
Feel free to fix it. I search the stuff I want so this doesn't matter to me so much.
It's all still "clickable".
I use huge fonts, it works better in smaller fonts if you really want to use the index
kindle:0.0 - GVncViewer_114.png = pictured big fonts running off right hand side. meh.
Re credits:
Huge thanks to Baf and Christophe Tronche for making me aware of this and providing this.
I just received my PW without ads and want to replace the stock wallpaper/screensaver with my pics. Need help plz. Can someone give me step by step as to how to do this. I GREATLY appreciate any help I can get......:):):)
After tons of reading I installed the kindle-jailbreak-1.4.N as instructed in the read me file. Confirmed on re-start the the PW is jailbroken.....NOW
Just need directions for installing new screensavers.....
Amazon needlessly limits the functionality of your unregistered Kindle Paperwhite, such as disabling the Collections and Wikipedia widget features.
To unlock all of your Kindle's functionality you either have to register (and grant them access to juicy analytics) or trick the Kindle into thinking it's registered.
The following process is only for developers who are comfortable with SSH, SCP, and the possibility of bricking their devices. Someone better than myself can make this into a more streamlined process. I've only done this on my own Kindle Paperwhite Wi-Fi running 5.2.0 (1729740065).
Overview:
Like previous versions, the /var/local/java/prefs/reginfo file must be populated with your account credentials. This file can be created locally and sent to your Kindle via SSH/scp.
Unlike previous versions Amazon will remotely unregister your Kindle whenever it phones home, which happens periodically and whenever you connect to Wi-Fi. To prevent this I've added iptables rules that run as soon as an interface is brought up. Note that I've created a blacklist of individual IPs...I currently believe that this list isn't comprehensive, and more work needs to be done by developers to add to it or create a more robust solution.
Procedure:
Update:
Twobob and knc1 replied with some excellent comments on this procedure. Notably the individual IP addresses can be replaced with ranges of IPs, which will all but guarantee the device will never communicate with Amazon's update servers, and there's an existing iptables configuration file that can be used as the target for iptables-save.
I've updated the relevant steps to include these better procedures.
0. Pray to your personal God that you don't create a foolish iptables rule that locks you out of USB networking.
1. Jailbreak
2. Enable USB networking and set your SSH password
3. Go into airplane mode
4. Plug in USB and connect. You'll have to set your IP address to something in the 192.168.15.x range (not 254)
5. Create a reginfo file on your local computer that fits the following template:
Code:
#Tue Oct 09 08:30:44 GMT+12:56 2012
givenName=NAME
deviceName=NAME's Kindle
userName=RANDOM NAME
deviceEmailAddress=FAKE@EMAIL.com
6. Push this to your device over scp. The destination directory is /var/local/java/prefs/
The chattr sets a flag that marks the file as immutable...it cannot be changed unless you run chattr -i.
7. Reboot and verify that your Kindle thinks it's registered. Don't proceed if this step doesn't work.
It's now necessary to prevent your Kindle from phoning home with Amazon's servers.
Deprecated instructions:
Spoiler:
I've determined these IPs by letting my Kindle sync and then checking its active connections...As such, I can guarantee that this isn't an inclusive list and it's probably dependent on your locale. Thus your Kindle may still spontaneously de-register until developers have fully populated this list of Amazon servers. (Alternatively, maybe we can figure out a domain to block.)
8. Enable USB networking again and SSH into the device
9. Start adding iptables rules in the shell. If at this point you totally screw up, you can reboot and your changes won't be saved.
iptables -I inserts a rule and iptables -D deletes one.
Code:
iptables -I OUTPUT -m iprange --dst-range 23.0.0.0-23.15.255.255 -j DROP
iptables -I OUTPUT -m iprange --dst-range 50.16.0.0-56.19.255.255 -j DROP
iptables -I OUTPUT -m iprange --dst-range 72.21.192.0-72.21.223.255 -j DROP
iptables -I OUTPUT -m iprange --dst-range 107.20.0.0-107.23.255.255 -j DROP
iptables -I OUTPUT -m iprange --dst-range 184.72.0-184.75.255.255 -j DROP
iptables -I OUTPUT -m iprange --dst-range 204.246.160.0-204.246.191.255 -j DROP
iptables -I OUTPUT -m iprange --dst-range 205.251.192.0-205.251.255.255 -j DROP
iptables -I OUTPUT -m iprange --dst-range 207.171.160.0-207.171.191.255 -j DROP
Thanks to knc1 and Twobob for the IP address ranges!
Deprecated instructions:
Spoiler:
Code:
iptables -I OUTPUT -d 72.21.194.114 -j DROP
iptables -I OUTPUT -d 72.21.203.200 -j DROP
iptables -I OUTPUT -d 72.21.211.191 -j DROP
iptables -I OUTPUT -d 72.21.214.149 -j DROP
iptables -I OUTPUT -d 72.21.214.150 -j DROP
iptables -I OUTPUT -d 72.21.215.58 -j DROP
These commands instruct your Kindle's firewall to silently drop all outbound requests to those destinations. Again, there may be other Amazon auth servers that will have to be discovered via trial and error.
10. Run iptables -L and verify that these entries exist. Run something like
iptables -D OUTPUT -m iprange --dst-range 207.171.160.1-207.171.191.254 -j DROP
Deprecated instructions:
Spoiler:
iptables -D OUTPUT -d 72.21.194.114 -j DROP
if you want to remove a rule.
11. In the SSH session run iptables-save (first by itself to verify that it spits out a list of rules) then run:
Code:
iptables-save > /etc/sysconfig/iptables
This produces a file that contains the current state of your firewall, and it will be automatically loaded.
Deprecated instructions:
Spoiler:
Code:
iptables-save > /etc/iptables.conf
This produces a file that contains the current state of your firewall, and can be loaded to restore this state.
We're going to instruct the Kindle to load these rules whenever it connects to a network.
12. Set the permissions on that file by running these commands in your SSH shell:
# Note: if bad rules are inadvertently (or purposely) saved it could block
# access to the server except via a local shell.
# Paths verified only on Kindle 5.2.0
RESTORE=/usr/sbin/iptables-restore
STAT=/bin/stat
IPSTATE=/etc/iptables.conf
test -x $RESTORE || exit 0
test -x $STAT || exit 0
# Check permissions and ownership (rw------- for root)
if test `$STAT --format="%a" $IPSTATE` -ne "600"; then
echo "Permissions for $IPSTATE must be 600 (rw-------)"
exit 0
fi
# Since only the owner can read/write to the file, we can trust that it is
# secure. We need not worry about group permissions since they should be
# zeroed per our previous check; but we must make sure root owns it.
if test `$STAT --format="%u" $IPSTATE` -ne "0"; then
echo "The superuser must have ownership for $IPSTATE (uid 0)"
exit 0
fi
# Now we are ready to restore the tables
$RESTORE < $IPSTATE
14. On your local machine, use scp to push this file to the Kindle, in the directory /etc/network/if-pre-up.d/iptables:
The scripts inside that directory are run whenever an interface is activated. Thus your "iptables" script will be executed automatically, and your firewall will revert to the state you've saved in /etc/iptables.conf.
Thus, you can see that if you want to make future changes to your firewall, you must update the iptables.conf file using
Code:
iptables-save > /etc/iptables.conf
15. In your SSH session, set the permissions on the iptables file:
16. Finally, turn airplane mode off and connect to a WiFi network.
17. Verify that your Kindle still appears to be registered. If step 7 worked but your Kindle has now de-registered, it's because it's chosen a new Amazon auth server. If you wish to help this hack you may now:
a. Run
Code:
netstat -n
in your SSH session. Find any "ESTABLISHED" connections to suspicious-looking IPs.
b. Block these IP addresses with iptables. If all is well (you didn't lock yourself out) update your saved firewall rules.
c. Reboot. If it worked, please post the IP address(es) you added here!
Your Kindle now believes it's registered, and it's prevented from discovering the truth thanks to the Kindle's firewall.
Sorry to bother the forum with what's probably a simple issue. I'm trying to get shell access to my kindle 5/Touch and have been following the example on the wiki. Right now my device is jailbroken and I've installed USBnetworking, which I can toggle on and off. However, I don't know how to connect to the device once it's in networking mode. When I connected it to my Windows 7 PC via USB it said that it successfully installed the RNDIS driver. I also tried to install the INF file in the instructions but it gives me a "the inf file you selected does not support this method of installation" error when I try to install it. I've tried connecting to it using just the IP address "192.168.15.244" but no luck. Can anyone provide some guidance to me?
I also have cygwin installed if it helps, and I could use a linux computer if I needed to.
cp'd the bins out of games to /usr/bin (rather than adding to path)
[root@kindle lbreakout2]# lbreakout2server
Spoiler:
Quote:
UDP socket bound to 127.0.0.1:8000
loaded 0 levelsets from directory /usr/share/games/lbreakout2/levels
user limit is 50
FPS: 20 (delay: 50 ms)
channel added: MAIN
user added: BOT1-800 (2) from 127.0.0.1
user added: BOT2-1000 (3) from 127.0.0.1
^Cserver is going down...
channel deleted: MAIN (2 users)
UDP socket closed
server halted
[root@kindle lbreakout2]# lbreakout2server
UDP socket bound to 127.0.0.1:8000
loaded 0 levelsets from directory /usr/share/games/lbreakout2/levels
user limit is 50
FPS: 20 (delay: 50 ms)
channel added: MAIN
user added: BOT1-800 (2) from 127.0.0.1
user added: BOT2-1000 (3) from 127.0.0.1
user added: player (4) from 192.168.1.65
user added: player2 (5) from 192.168.1.65
player2 (5) disconnected
user removed: player2 (5)
player (4) disconnected
user removed: player (4)
^Cserver is going down...
channel deleted: MAIN (2 users)
UDP socket closed
server halted
[root@kindle lbreakout2]# lbreakout2server
UDP socket bound to 127.0.0.1:8000
N_Arenas v1.00: 6 levels
N_Snapshots v1.00: 10 levels
loaded 2 levelsets from directory /usr/share/games/lbreakout2/levels
user limit is 50
FPS: 20 (delay: 50 ms)
channel added: MAIN
user added: BOT1-800 (2) from 127.0.0.1
user added: BOT2-1000 (3) from 127.0.0.1
user added: player2 (4) from 192.168.1.65
game added: N_Arenas (5): 6 rounds: player2 vs. BOT2-1000
game 5: 192.168.1.65: state 1: invalid message 1c: skipping 2 bytes
game 5: 192.168.1.65: state 1: invalid message 1c: skipping 2 bytes
game 5: 192.168.1.65: state 1: invalid message 1c: skipping 2 bytes
game 5: 192.168.1.65: state 1: invalid message 1c: skipping 2 bytes
game deleted: N_Arenas (5)
player2 (4) disconnected
user removed: player2 (4)
user added: player2 (6) from 192.168.1.65
192.168.1.65: dropped 1 packets at 2
game added: N_Snapshots (7): 10 rounds: player2 vs. BOT2-1000
game 7: 192.168.1.65: state 1: invalid message 1c: skipping 2 bytes
game 7: 192.168.1.65: state 1: invalid message 1c: skipping 2 bytes
game deleted: N_Snapshots (7)
As you can see connected client from PC. works great.
now to see about a native client. ;)
SDL support is a bit shaky so MMMV. (My Milage May Vary)
I've been looking at learning Go, google's programming language, and decided, "Hey wouldn't it be nice if could get Go binaries to run on the Kindle?"
Guess what. With a simple
You produced go, gofmt, and godoc binaries that run on the kindle.
But wait! Trouble looms ahead. The backend ARMv5 compilers that were supposed to be built along with those shiny frontends didn't and probably wont get built until someone hooks a crosscompiler into the mix to cross compile 4 compilrs for go....
But, you can still crosscompile go binaires, much easier than crosscompiling other things. (from what ive seen here...)
With a simple
Code:
export GOARCH=arm
export GOOS=linux
export ARM=5
go build helloworld.go
You should end up with a nice shiny ARMv5 binary.
TLDR: crosscompiling Go binaries for the K3 and above is a breeze, however Go natively on the kindles may have to wait a little while...
(Feel free to correct glaring errors! did this from my kindle :D)
How hard would it be to combine two paperwhites? An external frame holding the two side by side, and software manging them both as a book? Frame should have the capability to "close" the book, having the two screens face each other, thus protectd during travel?
if you have it hanging like this? it appears to be something to do with not handling signals gracefully on exit. It's an artefact of no proper event handling within the parent application, leaving SDL in an interim state.
Best bet is to simply shutdown -r now. SDL will now work again.
To actually fix the issue more permanently:
Quote:
If signal handler for eg. SIGTERM signal is installed that looks like this:
void sigproc (int sig);
void sigproc (int sig)
{
SDL_Quit();
exit(1);
}
int main ()
{
..
signal(SIGTERM, sigproc);
..
}
Then killing a SDL app with "kill -15 AppPid" gracefully terminates the app, and subsequent invocations of the SDL app succeed.
:offtopic:
Spoiler:
Whilst researching this (thinly documented) issue I happened across a LOVELY wordwar between two devs.
the critic doesn't like if( and if ( being in the same code stanza ;)
the coder is deep-diving age old VT and tty code and couldnt give a monkeys about the critics opinion.
Hello lurkers and devs. My problem seems more connected to the dev part of the forum, hence the location of this post.
Today I tried to update my Kindle 3G +WiFi (US) from version 3.1 to version 3.4. The update failed. I tried to do a ;dumpMessages but nothing appeared in the "documents" directory.
Due to my stupidity, my device was littered with all kinds of mods and hacks. Luckily, I kept a log of all the install and uninstall files that I had used in the past. You know how it is - new device, hands itchy to hack it and mess with it. My behaviour has changed since that period, but the fact remains - my K3 is stuck at firmware 3.1.
I tried uninstalling everything:
ss hack
font hack
physkeyb
lpad
freedownload mod
usbnet
readability mod
dev keys
jailbreak
After the uninstalls did not help, I tried a factory reset, as suggested in a similar thread with a user who had to uninstall all their customizations. Still no progress.
Being radical and impulsive regarding electronic devices, I decided that I would go the "clean slate" route - a recovery with ATK to 3.0.2. I loaded it on a Virtual Win XP machine. It installed fine. When I tried to follow the wizard in ATK, I got an error message: "No USB detected", as if the drivers had not installed correctly. That might be the case, and then again, might not.
I find myself in a difficult and precarious situation, hence my cry for help from you guys and gals. My hopes lie with the knowledgeable users on this forum. I appreciate any help on the matter.