Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Readers > Amazon Kindle > Kindle Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 07-03-2013, 11:03 PM   #1
Synthead
Member
Synthead will become famous soon enoughSynthead will become famous soon enoughSynthead will become famous soon enoughSynthead will become famous soon enoughSynthead will become famous soon enoughSynthead will become famous soon enough
 
Posts: 10
Karma: 536
Join Date: Jul 2013
Device: Kindle 4NT
Wirelessly uploading books to a Kindle from an Android phone

I figured this would be useful for people if I left this here. This video demonstrates uploading books to a Kindle from an Android phone and the instructions below tell you how to do it. Enjoy!

https://www.youtube.com/watch?v=jTRPfbjLOLI

Quote:
1. Install developer keys and obtain a root shell.
1a. Install developer keys: http://blitiri.com.ar/p/other/kindle...-external-keys
1b. Install and enable USB Networking and SSH: http://blitiri.com.ar/p/other/kindle/#usb-networking
1c. Obtain the root password based on your serial number: http://members.ping.de/~sven/kindle.html

2. Set up your Kindle to serve SSH and harden its security.
2a. Log in as root and change the "root" and "framework" passwords by running "passwd" and "passwd framework". On Windows, you can use PuTTY: http://www.chiark.greenend.org.uk/~s.../download.html. Linux and MacOS users can use the command line ssh.
2b. Create /etc/init.d/sshd on the Kindle with 755 permissions with this content: http://pastie.org/8107777 You can log in and use vi, use FileZilla, or whatever at this point. To apply 755 permissions on the file, from a root shell on the Kindle, run "chmod 755 /etc/init.d/sshd".
2c. Create a symlink, /etc/rc5.d/S83sshd, that links to ../init.d/sshd. You can do this while logged in from a root shell on the Kindle by running "ln -s ../init.d/sshd /etc/rc5.d/S83sshd".
2d. Edit the iptables firewall rules in /etc/sysconfig/iptables to allow incoming TCP connections on port 22. It should look like this: http://pastie.org/8107800 Notice lines 22-23. You can use vi in an SSH console, download, edit, and upload with FileZilla, or whatever.
2e. Restart the Kindle. On the Kindle via the UI, press Home, Menu > Settings, Menu > Restart. Alternatively, you can type "reboot" from a shell with SSH.

3. Set up Android as an access point, conect your Kindle to it, and install Android applications.
3a. Enable your phone as an access point: https://support.google.com/nexus/4/answer/2812516?hl=en
3b. Connect your Kindle to the running access point: http://www.amazon.com/gp/help/custom...deId=200690850
3c. Install AndFTP: https://play.google.com/store/apps/d...51bGwsMSwyLDNd
3d. Install ServerAssistant: https://play.google.com/store/apps/d...Npc3RhbnQiXQ..

4. Set up Android applications for uploading books to the Kindle.
4a. Find the IP address of the Kindle by running "cat /proc/net/arp" on your Android phone. You can do this with a "local" connection via ConnectBot: https://play.google.com/store/apps/d...5uZWN0Ym90Il0.
4b. In AndFTP, create a host using the obtained Kindle IP address as the hostname, "SFTP" as the server type, "root" as the username, the root password you set in 2a as the password, and /mnt/us/documents as the remote dir. Tap Save. Set the name as "Kindle" and tap Ok.
4c. In ServerAssistant, create a host using "Kindle" as the unitname, the obtained Kindle IP address for the SSH Server URL, "22" as the port, "root" as the user, and the root password you set in 2a as the password. Tap Save.
4d. Select the "Kindle" server from ServerAssistant. Press menu, Add command to unit. Use "Refresh books" as the name, and "dbus-send --system /default com.lab126.powerd.resuming int32:1" as the command. Tap Save.

5. Upload a book and refresh the Kindle's home screen.
5a. Make sure the Kindle is on (and not displaying a screen saver image).
5b. Open AndFTP, select Kindle, and tap Connect. Tap the Device file browser button, pick a file or directory with Kindle-compatible content, and tap Upload.
5c. Open ServerAssistant, tap Kindle, and tap "Refresh books". Your Kindle's home screen should refresh and the uploaded book should be available for reading!

Last edited by ixtab; 07-04-2013 at 02:10 AM. Reason: Replaced all shortened links by the actual destination link
Synthead is offline   Reply With Quote
Old 07-04-2013, 02:15 AM   #2
ixtab
(offline)
ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.
 
ixtab's Avatar
 
Posts: 2,907
Karma: 6736092
Join Date: Dec 2011
Device: K3, K4, K5, KPW, KPW2
Thanks for the info, and welcome to the forum!

Two notes:
1. Please do not use link shorteners; I've edited your post accordingly.
2. Don't be surprised if your posts don't show up immediately. To prevent spam, posts from new users are automatically put into the moderation queue (=have to be approved by a moderator) if they contain links. This limitation is lifted after 10 posts.
ixtab is offline   Reply With Quote
Advert
Old 07-04-2013, 10:05 AM   #3
Mike L
Wizard
Mike L ought to be getting tired of karma fortunes by now.Mike L ought to be getting tired of karma fortunes by now.Mike L ought to be getting tired of karma fortunes by now.Mike L ought to be getting tired of karma fortunes by now.Mike L ought to be getting tired of karma fortunes by now.Mike L ought to be getting tired of karma fortunes by now.Mike L ought to be getting tired of karma fortunes by now.Mike L ought to be getting tired of karma fortunes by now.Mike L ought to be getting tired of karma fortunes by now.Mike L ought to be getting tired of karma fortunes by now.Mike L ought to be getting tired of karma fortunes by now.
 
Mike L's Avatar
 
Posts: 1,479
Karma: 3846231
Join Date: Apr 2009
Location: Edinburgh, Scotland
Device: Kindle 3, Samsung Galaxy
Thanks for posting that, Synthead. I haven't studied the instructions in detail, as they look a bit too technical for me. But no doubt others will find them valuable.

That said, I wonder why this is necessary. I often transfer content between my Android tablet and my Kindle, simply by using a Windows PC as an intermediary.

On the Android device, I have an app called ES File Explorer (others are available), which lets me access the sharable folders on any PC on the same network. I can then copy files to and from these folders. That includes ebooks in the Kindle folder on the Android. I can also do that by physically connecting the tablet to the PC with a USB cable.

Once the files are on the PC, I can transfer them to the Documents folder on the Kindle in the usual way,

Maybe not all Android devices have that functionality. I noticed you referred specifially to Android phones, whereas I have a tablet rather than a phone. Perhaps tablets work differently in this respect (although the app I mentioned evidently works on all Adroid devices).

Mike
Mike L is offline   Reply With Quote
Old 07-04-2013, 10:23 AM   #4
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
@MikeL: Can't you just plug in the Kindle's USB cable to your tablet and use your ES file explore?

On a 'phone -
I would expect it to require micro-USB-host to micro-USB-device cable (Kindle is the "Device" end).
But I would expect that to work also. Disclaimer: Depending on the 'phone of course.

'phones are usually a USB-OTG port, and so is the Kindle (but not fully functional) - so the hardwired cable described above would be required to force the two devices into the required roles.
knc1 is offline   Reply With Quote
Old 07-04-2013, 11:41 AM   #5
thomass
Wizard
thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.
 
Posts: 1,669
Karma: 2300001
Join Date: Mar 2011
Location: Türkiye
Device: Kindle 5.3.7
No-hack version is here
(indexed both of them)
thomass is offline   Reply With Quote
Advert
Old 07-04-2013, 11:51 AM   #6
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by thomass View Post
No-hack version is here
(indexed both of them)
Nice, no special cable required.
Could have used that information a few weeks ago myself.

Once I read the link again (now) I recalled having seen it when posted.
Durn, if this forum has to depend on my memory - - - we are in big trouble.
knc1 is offline   Reply With Quote
Old 07-04-2013, 12:17 PM   #7
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,477
Karma: 26012492
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
Re: the OP, that's a bit overkill.

* The usbnet hack already properly supports sshd @boot without having to write an init script [BTW, the one linked by the OP will only work on devices using sysvinit, not those using upstart (k5/pw)], check the config file/the docs.

* The usbnet hack also properly supports sshd over WiFi, without having to play with the firewall, again, check the config file.

* I'd recommend simply authenticating via shared keys instead of playing around with passwords, but that's left to the reader's choice .

* And, err, that's all, anything that can speak SSH/SCP/SFTP will work. On Android, like Mike L said, I'm a big fan of ES Explorer.


Again, most of this is explained one way or the other in the USBNet doc. (Hint: if you want a seamless setup, sshfs?).



And, yep, on the 'vanilla' side, anything over HTTP should work (a simple webserver, like in the post linked above, or a nice OPDS thingy, like the Calibre content server, or any of the others [some of those are developed by MR users, check the Calibre forums]).

Last edited by NiLuJe; 07-04-2013 at 01:49 PM.
NiLuJe is offline   Reply With Quote
Old 07-04-2013, 01:32 PM   #8
Mike L
Wizard
Mike L ought to be getting tired of karma fortunes by now.Mike L ought to be getting tired of karma fortunes by now.Mike L ought to be getting tired of karma fortunes by now.Mike L ought to be getting tired of karma fortunes by now.Mike L ought to be getting tired of karma fortunes by now.Mike L ought to be getting tired of karma fortunes by now.Mike L ought to be getting tired of karma fortunes by now.Mike L ought to be getting tired of karma fortunes by now.Mike L ought to be getting tired of karma fortunes by now.Mike L ought to be getting tired of karma fortunes by now.Mike L ought to be getting tired of karma fortunes by now.
 
Mike L's Avatar
 
Posts: 1,479
Karma: 3846231
Join Date: Apr 2009
Location: Edinburgh, Scotland
Device: Kindle 3, Samsung Galaxy
Quote:
Originally Posted by knc1 View Post
@MikeL: Can't you just plug in the Kindle's USB cable to your tablet and use your ES file explore?
No, not in my case. Both devices have a mini-USB connector (I think that's what they're called). But even if you could rig up a cable, I'm not sure if it would work. The ES Explorer app can see the file system of a PC across the network, but it can't see devices attached directly. Maybe other apps are available that can do that. I don't know.

Mike
Mike L is offline   Reply With Quote
Reply

Tags
android, ssh, tether, upload, wireless

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
When I send books to my Android phone, they show up in the right folder and in the ++ ohemeffgee Devices 1 03-19-2013 03:33 AM
Best way to sync my Calibre books with Android/iPhone/Windows Phone? mcandre Devices 11 11-06-2012 08:24 AM
uploading books to kindle with calibre catman Library Management 3 03-03-2011 02:14 PM
Sending books wirelessly to kindle. mug2k Calibre 2 10-04-2010 11:29 AM
Classic Sync Books Between Nook and Android Phone RandyKlein Barnes & Noble NOOK 1 07-04-2010 10:23 AM


All times are GMT -4. The time now is 05:01 PM.


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