107 comments

[ 3.9 ms ] story [ 90.0 ms ] thread
(comment deleted)
I don't suppose this is going to work well with their comics/graphic novels, will it?

I stopped buying ebooks from Amazon some time ago and switched completely to Kobo (and their much-more-easily-defeated DRM), but Amazon's acquisition of Comixology means they've still got by far the best collection of digital comics on the market.

I’m sure you already know this but I’ve actually had a lot of success getting comics on hoopla with my library card. Obviously this completely depends on your local library but if you haven’t it’s worth looking in to! Has what I want a solid 35% of the time. Not the newest releases but I’ve gotten stuff that’s only 6 to 12 months old without much issue
Comics need a full "image" for the page, so this is unlikely to work. Can you inspect the requests and see what you get?

Or to the author: what happens to images in the ebook?

I haven't gotten images working yet, they have some weird obfuscation applied to them as well
I always love a story of anger based (reverse)engineering.
Spite is an underated productivity tool.
aka "Hate driven development"
I personally have bought many fewer books over the last couple of years, from amazon, as they've made it harder and harder to, you know, read the books I've paid for.

Pirating books is not hard. They're probably the smallest possible thing that people are interested in copying with the broadest variation in acceptable formats.

I know I'm screaming into the void, but if I'm paying real money why is the experience from piracy sites better?

This is a beautiful solution to a tedious problem that shouldn't exist in the first place! Great work.
I don't know what state it's in (haven't used it in years), but do apprenticealf's DeDRM tools, which has been forked to nodrm/DeDRM_tools, still handle kindle PC app downloads? Tinkering with old versions of the PC app might work even if the current version doesn't, and there's a registry hack to disable kfx downloading and get azw3 instead, which worked at some point... it's outlined in apprenticealf's DeDRM repo, at the wiki link provided at the top of the repo's README, in the short section saying it's no longer maintained.

That would provide a closer-to-original version of the ebook, rather than just a visually similar one.

That any of this is necessary at all is absurd. Hats off to anyone with the patience to bypass Amazon's DRM rather than giving up on the Amazon ebook ecosystem entirely.

I could feel the anger of the author oozing through the writing. Great work!
My main peeve with rendering in the Kindle app is that formula-type content (often even minor stuff like x²) is rendered as images that (a) are low-resolution and (b) don’t invert in dark mode.

A second peeve is that in dark mode you can only have gray on black, not white on black.

At one point I did the same for a comic app which was getting the earliest releases of a manga I wanted to read; I still don't read Japanese but was the buyer for my translation circle. They had similar forms of obscure obfuscation; They scrambled the image into chunks, then you got a metadata that remapped it into a finished image. Raw, it looked like one of those slide puzzles.

Over the course of a couple years they updated their scrambling; First to randomize the size of the regions, then to make them triangular instead of rectangular. It was an interesting if tedious challenge to reverse engineer.

Me too. When they removed the option to download books I liberated everything I had ever bought, moved to Kavita+koreader and will never buy a kindle book again.

I jailbroke both kindles. And use koreader on them which now supports progress sync with Kavita which is amazing! So I don't really lose functionality.

Okay, but where do you buy your epubs? IF you buy them?!
For now, if you buy from Kobo store, you can use Adobe Digital Editions to extract the epub in a format ready for Calibre.

Many websites sell epubs, with or without protection. The DRM is never usually that hard to break with Calibre. If you're into that sort of thing.

I have the same problem with O'Reilly / Safari ... I don't enjoy using the apps and find they get in the way of the reading experience, plus it's a very expensive subscription. Initially, its hard to tell if rendering problems are just a bad conversion or if the text rendering engine is just buggy / borked.

But there were plenty of other bugs like bookshelf management getting corrupted.

Your intention doesn’t matter to the shareholders. Straight to jail.
Hell hath no fury like an engineer angered! This was such a good read and epitomizes hacking:

"Was it worth it? To read one book? No. To prove a point? Absolutely. To learn about SVG rendering, perceptual hashing, and font metrics? Probably yes."

Well, it would be nice to be able to use my Kindle 4 again... Thanks to KOReader, it's no longer a brick, but most of my ebooks are kept hostages at Amazon.
For books only available through Amazon my workflow used to be buying it, downloading it with their desktop app, importing into Calibre, converting to epub and stripping DRM, then pushing it onto my Kobo.

They broke that a while ago by making their DRM even worse, so now I just pirate those books.

This is great work, but I’m not clear on why this qualifies as DRM at all. It sounds like the OP reverse engineered a protocol for rendering pages from a book to the web client. Sure, rotating the glyph ids every API call is annoying but it hardly qualifies as encryption or even obfuscation, just an extra mapping step the decoder needs to handle.

Sure seems like whoever at Amazon wrote this didn’t realize that it backdoors their DRM.

@op there's a typo: "You can now download the books you own books with my code"

second books seems erroneous

Don't stop there! If Amazon sues you, demand a jury trial and win a carve-out making it legal to unlock DRM you own.
>I paid money for this book >I can only read it in Amazon's broken app >I can't download it >I can't back it up >I don't actually own it >Amazon can delete it whenever they want

good that you didn't read the terms of amazon's kindle business model before buying that book; all that delicious rage and the interesting knowledge it spurred would have been lost to the world. tbh, i would have expected them to be more sophisticated. good job and kudos, enjoy your well earned book, it's yours now!

sadly i have no use for this, the only few books i ever bought on amazon were paperback, used and in good condition. good deals. but the mere fact that a provider requires me to use specific software to access content is simply unacceptable, making a detailed reading of their absurdly dystopian terms and conditions unnecessary.

i use amazon prime. for me it's very worth it just for the delivery savings as i live in a remote area. it includes access to their video streaming service. one day i decided to try it just to see what was there. i was immediately prompted with a download for some mandatory viewer/drm/codec. not going to happen, baby, so i just closed the tab, never bothered with it again and have the feeling that nothing of value was lost.

(comment deleted)
I hate Amazon's decision to do this. It doesn't even make business sense. You can't tell me they're making that much profit off of Kindles that it makes sense. The book sales have got to be worth more than that in the long run.

A lot of authors only ever offer on Amazon now, which leaves those of us without Kindles (I love my Kobo) in a difficult spot.

Frankly I would write it as anti-competitive. How are other e-reader companies supposed to survive when Amazon owns all the e-books and can just decide that only their e-readers are allowed? No one else has even a fraction of the market.