![]() |
#1 |
Linux devotee
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 598
Karma: 2069047
Join Date: Feb 2011
Device: Kindle 3, Kindle 4B, Kindle PW2
|
![]()
FreeDownload
EDIT: Uninstall this hack before upgrading the firmware or the upgrade would fail. After upgrade you can install it again. This hack is a workaround for Kindle browser extension/mime type restrictions. The browser permits downloading only .prc, .mobi, .azw and .azw1 files. Yet it may be handy to download other file types as well, e.g. .pdf, .epub, .rtf, .zip, .cbz ... FreeDownload doesn't modify the browser itself, instead it turns on logging of some interesting info the browser is able to produce. Then it processes the info generated by the browser, i.e. the complete URIs the browser is about to download. If the URI has one of the specified extensions, FreeDownload passes it to curl for download. At the same time it tries to inform user about downloading at the bottom of the screen. Despite the nagging message box being displayed, your file WILL be downloaded. Works over Wi-Fi only ATM. FreeDownload's behaviour can be controlled by modifying freedownload.conf located in [USER STORE]/freedownload/ directory. Default contents of freedownload.conf : Code:
# List extensions you want to have downloaded by FreeDownload # Make sure you don't specify permitted extensions like azw or mobi, your files would be downloaded twice ALLOWED_EXTENSIONS='pdf epub rtf zip cbz mp3' # Where should FreeDownload put your files ? The directory will be created if not present # If / is missing at the beginning of the path, "/mnt/base-us/" (AKA user store) is prepended DOWNLOAD_DIR=documents/Downloaded # Where should FreeDownload put files with 'mp3' extension ? The directory will be created if not present # You can specify separate download directory for any extension in a similar way DOWNLOAD_DIR_mp3=music # Where should FreeDownload put files with 'aax' extension DOWNLOAD_DIR_aax=audible # Resume previous download if a local file with the same name exists # Target files are overwritten if this option is disabled RESUME_DOWNLOADS=yes # Unzip any file with .zip extension into its own subdirectory after download # ZIP archives containing illegal (non-utf8) file names won't be unzipped #AUTO_UNZIP=yes # Log all downloads and errors to freedownload/freedownload.log #LOG=yes Changelog: 0.4 - Tried to fix CPU overload occuring in some situations 0.3 - Fixed serious issue causing damaged user store (redesigned, autosuspend the service when USB connection is detected) - Curl now tries to use browser's cookies file - Reporting now works in landscape mode - Progress is displayed when downloading - ZIP archives containing filenames with FAT32-illegal and non-ascii characters are not autounzipped - Separate download directory can be defined for each extension - No need to specify full paths for download directories - In freedownload.conf Windows line endings are converted to UNIX line endings on start - Added option that controls resuming/overwriting downloads 0.2 - Used curl instead of wget to support https (DropBox Public files download fixed) - Added option AUTO_UNZIP 0.1 - Initial release Last edited by dsmid; 10-31-2011 at 04:34 AM. |
![]() |
![]() |
![]() |
#2 |
Member
![]() Posts: 15
Karma: 10
Join Date: Dec 2010
Device: Kindle 3G, Nokia N810
|
Dsmid, that's great! Good job!
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Linux devotee
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 598
Karma: 2069047
Join Date: Feb 2011
Device: Kindle 3, Kindle 4B, Kindle PW2
|
New version 0.2 :
|
![]() |
![]() |
![]() |
#4 |
Junior Member
![]() Posts: 4
Karma: 10
Join Date: Dec 2010
Device: Amazon Kindle
|
Thank you for your work. Can you make different download directory for different file extension? For example, '/mnt/us/documents' - 'mobi', '/mnt/us/music' - 'mp3', etc.
|
![]() |
![]() |
![]() |
#5 |
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 110
Karma: 5368
Join Date: Apr 2010
Location: Italy
Device: Sony PRS-T1 Sony PRS-350 Nook Touch Glow
|
Graphite
I wonder if it works with the kindle dx graphite.
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Junior Member
![]() Posts: 8
Karma: 10
Join Date: Nov 2010
Device: Amazon Kindle 3 WiFi+3G
|
Warning! if you download and unzip the archive containing the files whose names contain non Latin characters, then:
1) Unzip the files will have incorrect names 2) Kindle will not see them 3) some files will not delete! |
![]() |
![]() |
![]() |
#7 |
Member
![]() Posts: 15
Karma: 10
Join Date: Dec 2010
Device: Kindle 3G, Nokia N810
|
I had also problems to uninstal the first version (0.1).
|
![]() |
![]() |
![]() |
#8 |
Linux devotee
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 598
Karma: 2069047
Join Date: Feb 2011
Device: Kindle 3, Kindle 4B, Kindle PW2
|
![]()
Please don't install this hack (versions 0.1 and 0.2), it will disable copying files over USB storage and as a result installing any hacks or updates (UPDATE ERROR: 3).
I didn't find out because I don't use the USB connection at all, I use sftp over Wi-Fi instead. Sorry for any inconvenience. If you already did install it, here's how to get rid of it and make the user store usable again:
Last edited by dsmid; 02-14-2011 at 02:06 AM. |
![]() |
![]() |
![]() |
#9 | |
Linux devotee
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 598
Karma: 2069047
Join Date: Feb 2011
Device: Kindle 3, Kindle 4B, Kindle PW2
|
Quote:
If the filenames are encoded in UTF-8 (the only reasonable standard today), everything's OK. |
|
![]() |
![]() |
![]() |
#10 |
Linux devotee
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 598
Karma: 2069047
Join Date: Feb 2011
Device: Kindle 3, Kindle 4B, Kindle PW2
|
When I properly fix the issues with user store access, I'll implement this feature. Stay tuned.
|
![]() |
![]() |
![]() |
#11 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 82
Karma: 5072
Join Date: Nov 2010
Device: KPW
|
Maybe the freedownloader should run from somewhere else than /mnt/us ? Or it could stay stored there but run from a temporary location? I don't think the non-unicode characters are the only problem.
|
![]() |
![]() |
![]() |
#12 | |
Linux devotee
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 598
Karma: 2069047
Join Date: Feb 2011
Device: Kindle 3, Kindle 4B, Kindle PW2
|
Quote:
Another option is to stop the service whenever the USB connection is detected - I suppose usbnetwork's ssh daemon is working like that. Last edited by dsmid; 02-14-2011 at 08:57 AM. |
|
![]() |
![]() |
![]() |
#13 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 82
Karma: 5072
Join Date: Nov 2010
Device: KPW
|
Stopping the service would be the best solution. Otherwise, it should run from somewhere else and it might download the file to some temp location and once it's finished, copy it over to the /mnt/us. The only problem would be if somebody started to download stuff with the hack while having the USB plugged in.
|
![]() |
![]() |
![]() |
#14 |
Linux devotee
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 598
Karma: 2069047
Join Date: Feb 2011
Device: Kindle 3, Kindle 4B, Kindle PW2
|
I agree. Stopping the service would be the safest solution.
I had the idea with temp location for downloads before but I was afraid the tmpfs partition is not big enough to hold large downloads and I don't support the idea of dowloading anything to the system partition (running out of disk space there doesn't sound safe). |
![]() |
![]() |
![]() |
#15 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 987
Karma: 8641
Join Date: Aug 2010
Device: Kindle 3G+WiFi
|
Running out of space on the user store makes the Kindle go nuts so filling the other partitions is a really bad idea!
|
![]() |
![]() |
![]() |
Tags |
hacks |
Thread Tools | Search this Thread |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
want to use Chinese hack on 1.0.02 | sujin | Sony Reader | 0 | 08-29-2010 07:52 PM |
Book titles hack? Time delay hack? | re838uk | Sony Reader | 0 | 10-08-2009 05:29 AM |
.lit hack | Cutter74 | Sony Reader Dev Corner | 7 | 12-24-2008 12:38 PM |
Hack Attack! Esquire wants us to hack their e-paper cover | TadW | News | 26 | 10-22-2008 03:51 AM |
iLiad still possible to hack iliad? | joblack | iRex Developer's Corner | 2 | 02-06-2007 10:27 AM |