View Single Post
Old 03-09-2011, 04:04 PM   #6
delphin
Evangelist
delphin ought to be getting tired of karma fortunes by now.delphin ought to be getting tired of karma fortunes by now.delphin ought to be getting tired of karma fortunes by now.delphin ought to be getting tired of karma fortunes by now.delphin ought to be getting tired of karma fortunes by now.delphin ought to be getting tired of karma fortunes by now.delphin ought to be getting tired of karma fortunes by now.delphin ought to be getting tired of karma fortunes by now.delphin ought to be getting tired of karma fortunes by now.delphin ought to be getting tired of karma fortunes by now.delphin ought to be getting tired of karma fortunes by now.
 
Posts: 434
Karma: 346901
Join Date: Dec 2010
Device: SONY PRS-650
EDIT:

I just re-read this thread and realized that it may be a little confusing connecting all the dots and that perhaps a quick summary might help.


The bottom line is that you CAN get Adobe ADE working well in Ubuntu 10.04 under Wine, and that you should also be able to read your ADE downloaded books on your 505.


There are minor issues, but it will work quite nicely under Linux.

Here is a point by point explanation of how you can do this -

First of all, to read EPUB ebooks, the 505 will need to have been updated to Sony's latest version firmware.

Nearly all mainstream E-books purchased from stores, as well as those checked out from public libraries through Overdrive will use Adobe Digital Editions to handle DRM.

Adobe Digital Editions is not yet available for Linux, but the Win32 version will install and run under the Linux Wine environment (I am running ADE version 1.7.2).

The above ADE Wine install also needs libraries from Adobe Acrobat Reader, so you will also want to do a Wine install of the Win32 version of Acrobat (version 8 or 9 should work)

When installed, ADE will want to be 'authorized'. The quick anonymous authorization is enough to download and read library books, but you will want to go through the full authorization if you want to purchase books through Kobo or Google. Authorization gives your PC copy of ADE a unique crypto key needed by Adobe Web servers to let you download DRM protected books.

Once you have ADE authorized, you are ready to download books. The way this works is that the web site that you are downloading from will actually let you download a tiny .ascm file which points to the encrypted content on the Adobe Server. In Windows, clicking on an .ascm link in Firefox or Explorer will let you have the option to just 'Open with Adobe Digital Editions' which lets the web browser directly launch ADE to handle the file, but this doesn't seem to work in Linux. So in Linux, you will want to download the .ascm file to a folder, and then drag the file from that folder and drop it onto an open copy of Adobe Digital Editons main window. As a security measure, I changed my default winecfg so that wine doesn't mount the Linux root partition as a dos drive under wine, but then found that this can keep ADE from being able to use the drag and dropped .ascm files. If you run into this, the fix is to download the .ascm files into a folder that is linked under the Wine C:\ drive (any folder mounted or linked under ~/.wine/drive_c should work).

After you get ADE installed under Wine, get it authorized, and download some DRM protected books, there are basically two choices in trying to transfer ADE DRM protected books to a Sony Reader under linux.

1) Try to get your reader authorized (which keys it so it can decrypt DRM books) then use Calibre to transfer the titles to your reader with the DRM intact

2) Give up and strip the DRM so that Calibre and your reader see the files in a compatible freely readable format.

Option 1 only works for purchased books, but not for library books which need additional expire time info which can only be handled by transferring them using ADE.

Also, for early model readers like the 500 or 505, the authorization needed for option 1 above may not even be possible, because ADE needs special Sony supplied drivers which are only available for Windows and which are not Wine compatible. ADE under Wine can be made made to recognize some of the later Sony readers which appear as simple USB storage devices if their mount config in Wine is changed to show them as a removable drive, but this is more than most Linux users can deal with, and not an option at all for the 505, so you are basically stuck with option 2.

I have heard that some have been able to get the Sony Reader Library software to work under Wine in Linux, but I suspect this will NOT work for early models like the 505, due to the special USB driver required. In any case, ADE is working nicely for me now so I haven't tried this.

Since you probably have no choice but to remove the DRM to render your books readable. You should know that all the 'Apprentice Alf' DRM scripts and pluggins can be made to work perfectly under Linux without access to a Windowz box, though it's a little bit of a pain.

The DRM removal process involves, authorizing ADE normally, using a script to get your PC to cough up the Key, and then using another script or pluggin to actually strip the DRM.

The first gotcha is that the DRM key detection script is written specifically to run on a standard Windowz file system, so even if you have the required Python libraries loaded in Linux, you can't run the detection script from Linux directly.

The good news is, since Adobe ADE has to run under Wine anyway, it's already installed under a nice fake C:\ drive file system, so the keyfinder script will work fine IF IT IS ALSO RUN UNDER WINE.

We just need to load a Win32 version of Python libraries into Wine so that the script can run inside the virtual Windowz environment and it will work perfectly.

Once you get the keyfinder Python script to run under Wine and find your unique DRM key, you can use the resulting adeptkey.der file with the Calibre pluggin under Linux directly by moving a copy of the adepkey.der file into Calibre's config folder (Calibre and the DRM fixing plugin don't need to run under Wine but do need to be able to find the key file).

You can also use any of the stand alone I-heart-cabbages DRM stripping Python scripts directly from Linux without running them under Wine (only the initial key-finder script needs to run under Wine).

I did find though that to get some of the scripts found on the web run under Linux, I had to load them into GEdit and save them with NIX style line-feed-only line endings. Took me HOURS to find this simple issue because line ending codes are INVISIBLE.

Hard to believe that something as STUPID as the whole CR vs. CR-LF thing is still causing problems in the NIX world, but that just goes to show that just doesn't pay to underestimate the power of human STUPIDITY.

So there are a few minor issues, but ultimately everything can be made to work in Linux, including the all important key extraction, without the necessity of also having access to a Windowz box.

Last edited by delphin; 03-10-2011 at 06:21 PM.
delphin is offline   Reply With Quote