Open Melsuvia opened 5 years ago
Rooted devices aside, I have the key I've been using since just before they discontinued Nook for PC. It doesn't work now with the W10 software. A number of posts here claim that it should. What's the real story?
@ktjones Last I checked, the key I've had for ages still works for the Windows Nook app books. But I know some have reported key changes. And occasionally people will find that a key that works for the Android app doesn't work for the Windows app.
@LavaIce
Hmm, I see upthread that @fitzshayla had a blank cchashdata.db on a rooted phone, but was able to get things working with a virtual android device.
Big thanks to @acavender for the good instruction. I used Parallels on Hackintosh (don't ask me why lol) with Windows 10 and Android Studio inside it. You need to enable Nested virtualization
option in Parallels (or Hyper-V) for better perfomance in VM.
VM need more RAM (6 GB in my laptop with 12GB installed, with previous 3GB perfomance was sooo sloooooow) for Emulator. I used Nexus 4 with Android 7.1 (Google API). Maybe you can use Android 4 with more Emulator speed, I didn't try.
adb
doesn't work in terminal after the installation, this comment helped me to add it in PATH: https://stackoverflow.com/a/40754030/4827198
For SQLite DB view I used TablePlus, it has Windows and Mac version. Desireble table is cc_hash_data
, column hash
with 28 symbols key.
Calibre with DeDRM done the job. Same key works for me with books from Windows Store and Android Emulator.
p.s. I think we need to update README, because it taked 2 days for me to compete this deDRM mission 🥇
@Sogl Thanks for the additional info.
Not sure if this helps anyone, but I recently went through this process myself to decrypt my own Nook books. This thread was super helpful. I did run into a couple "gotchas" though and documented the process I used on my personal blog: https://www.aricrenzo.gq/2019-12-13-Liberate-Your-Nook-Ebooks/
I figured I'd post the link here in case it helps anyone else.
@aric49
Excellent! Thanks for taking the time to write it all up and letting us know.
@aric49 Thanks so much for the guide! For some reason when I first picked a different Android version/device combo (it was Android 9 on a Nexus 6, I think) I ended up with a nearly-blank cchashdata.db file--sounds like what @LavaIce experienced. I was also using a more current version of the B&N app, I think. When I used the combo of Android version/device/Nook app in your tutorial, I got the key on the first try.
@aric49 Thanks for taking the time to make a nice well laid out guide. It seems like going to the older version of Android was the trick. I thought I had tried something like that before, @andyj682 I had tried several versions of the Nook app with the same results on Android 9. I used a Nexus 4 with Android 7.1.1 and download a similar version of the Nook app. For whatever reason, my files were all under /data/data/bn.ereader which wasn't hard to determine from the other post here and my prior attempts.
A potential Barnes & Noble PDF DeDRM solution?
You'll need to change the name to 'ignoblepdf.py' and make it executable. If you have Python installed, it /should/ just work, but it's alpha code at best. Hopefully one of the real DeDRM gurus can extend it.
Enjoy!
@fondfire Interesting! Have to try it when I get a chance.
Not sure if this helps anyone, but I recently went through this process myself to decrypt my own Nook books. This thread was super helpful. I did run into a couple "gotchas" though and documented the process I used on my personal blog: https://www.aricrenzo.gq/2019-12-13-Liberate-Your-Nook-Ebooks/
I figured I'd post the link here in case it helps anyone else.
I'm working my way through this, but I don't know too much about this kind of thing. I rooted my nook YEARS ago, but I was given a B&N gift card, and bought a nook book... and now want the DRM off of it. (Thankfully I stripped the DRM from the rest of my nook books a couple of years ago when the Calibre plugin worked.)
Anyway, I've followed all the directions well enough up to this point... and I don't know what this means:
Where and how do you execute this? I'm sure it's obvious to all of you, but I'm drawing a blank. Is this something you do within the virtual Android? Or in "My Application"? Or in Windows using the DOS prompt? I'd appreciate it very much if someone can give me more specific directions!
From a command prompt. Do this in the directory where you have the Android SDK Platform Tools.
A potential Barnes & Noble PDF DeDRM solution?
You'll need to change the name to 'ignoblepdf.py' and make it executable. If you have Python installed, it /should/ just work, but it's alpha code at best. Hopefully one of the real DeDRM gurus can extend it.
Enjoy!
Holy cow! This works perfectly. Just using the Nook b64 key, fast and easy.
@fondfire you should have this either linked to issue#79 or as part of the FAQ. It's really a great tool, and I had I lot of problems finding a reference to this. Only by searching on old issue (for PDF and Nook) I was able to find it
Thanks!
Holy cow! This works perfectly. Just using the Nook b64 key, fast and easy.
@fondfire you should have this either linked to issue#79 or as part of the FAQ. It's really a great tool, and I had I lot of problems finding a reference to this. Only by searching on old issue (for PDF and Nook) I was able to find it
Thanks!
Very glad to hear it worked for you, @robcazzaro ! My Python is pretty weak... I was just altering the ignobleepub.py with reference to how ineptepub.py and ineptpdf.py differed from one another. And I got a bit lucky. I was lucky to even find the time to work on it properly.
Can any user alter the FAQ? I did add a comment to issue #79 ...
I went ahead and added pull request #1095 to make ignoblepdf.py official. If it's accepted by one of the maintainers, it will be included in future versions of DeDRM_tools and simply be available to everyone. Further, these talented developers can help to maintain it for everyone.
I've never tried contributing to a GitHub repository before. I was very surprised by just how easy it is to create a pull request!
Not sure if this helps anyone, but I recently went through this process myself to decrypt my own Nook books. This thread was super helpful. I did run into a couple "gotchas" though and documented the process I used on my personal blog: https://www.aricrenzo.gq/2019-12-13-Liberate-Your-Nook-Ebooks/
I figured I'd post the link here in case it helps anyone else.
@aric49 I was going to follow the instructions, but your website seems to be down.
@ksze --- Thanks for pointing that out, I am in the process of migrating my site over to a new domain. In the mean time, you can read my post through my GitHub repo: https://github.com/aric49/aric49.github.io/blob/master/_posts/2019-12-13-Liberate-Your-Nook-Ebooks.md
I'll post here when I have a new or fixed domain name. Thanks!
Update your bookmarks, my new and improved blog is now available at: https://www.aricrenzo.com/2019-12-13-Liberate-Your-Nook-Ebooks/
I also added some updates provided to me by Jessi Grieser who was kind enough to write in with some improvements for commands executed by Windows users. If anyone else has suggestions on how to improve my post, do let me know!
Thanks for your blog @aric49 (which is what I used when it was on the old domain).
I would highly recommend to add a note on how to use ignoblepdf.py from @fondfire to convert Nook ebooks in PDF format, so that your blog can be an all-in-one stop. Some of the Nook books are provided in PDF format when the formatting is too complex for the standard format. For example I had an ebook on fonts, and that was in PDF format and would not convert with the steps outlined in your blog
I simple launched the script, it shows a menu where you choose the original file, the b64 key file, and the destination file. After executing, you get a decrypted, working PDF ready to be used in Calibre
I'm hoping that ignoblepdf.py gets accepted into the main branch, gets developed a little further, and becomes part of the main release a bit sooner than later. 🤞
--fondfire
-- Sent from my Moto E4 Plus with K-9 Mail.
-------- Original Message -------- From: robcazzaro Sent: May 20, 2020 12:31:17 PM CDT To: apprenticeharper/DeDRM_tools DeDRM_tools@noreply.github.com Cc: fondfire, Mention Subject: Re: [apprenticeharper/DeDRM_tools] DeDRM with Nook (#814)
Thanks for your blog @aric49 (which is what I used when it was on the old domain).
I would highly recommend to add a note on how to use ignoblepdf.py from @fondfire to convert Nook ebooks in PDF format, so that your blog can be an all-in-one stop. Some of the Nook books are provided in PDF format when the formatting is too complex for the standard format. For example I had an ebook on fonts, and that was in PDF format and would not convert with the steps outlined in your blog
I simple launched the script, it shows a menu where you choose the original file, the b64 key file, and the destination file. After executing, you get a decrypted, working PDF ready to be used in Calibre
-- You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub: https://github.com/apprenticeharper/DeDRM_tools/issues/814#issuecomment-631618103
So for clarification, how can we currently decrypt books from the B&N desktop program?
The link in @aric49's last comment shows you how to get your key. This usually works on any B&N books from the same account.
@aric49 approach focuses on getting the books off of your phone or tablet, right. Is there a way to get your books from the windows B&N app itself like we used to and decrypt them in Calibre?
@ktjones --- If you look at my write up, under the section titled, "Create a Virtual Android Device" -> Step 3, it shows you where the Windows B&N app stores the downloaded epub files:
Sign into your Barnes and Noble Nook account in the virtual Nook app and download the books you wish to retain. Windows Users: you can also use the Nook for PC app to download the books. When you go to load the books into Calibre, the books will be in C:\Users\~username\AppData\Local\Packages\BarnesNoble.Nook_ahnzqzva31enc\LocalState and will be numbered .epub files.
Then grab the key by creating the virutal android device, import the key into Calibre and you should be off to the races.
It uses an Android emulator to get the key. Then you add that key to DeDRM. The same key usually works for books from the Windows Nook app or any other device/app/emulator logged into the same BN account.
Ok, I will use @aric49 's post to get the key for now.
Can anything be done to get the method built into Calibre to work though?
The methods for retrieving the key that are in DeDRM broke when BN cut off the old desktop programs. If someone figured out a method for retrieving the key from the Windows Nook program, that could be incorporated into DeDRM. For this method, you'd still need a virtual Android device for DeDRM to extract the key from.
@ElleKayEm Ok, thanks for the info.
I know your not really the person to ask but by following the guide @aric49 posted, I was able to get the emulator up and running and I installed 5.0.2.38 as the guide did. I rooted into the file system and went to /data/data/
, but there's nothing regarding B&N or Nook, running it just yields just android services and functions:
generic_x86_arm:/ # cd /data/data generic_x86_arm:/data/data # ls android android.auto_generated_rro_product__ bn.ereader com.android.angle com.android.backupconfirm com.android.bips com.android.bips.auto_generated_rro_product__ com.android.bluetooth com.android.bluetoothmidiservice com.android.bookmarkprovider com.android.calllogbackup com.android.camera2 com.android.carrierconfig com.android.carrierconfig.auto_generated_rro_product__ com.android.carrierdefaultapp com.android.cellbroadcastreceiver com.android.certinstaller com.android.chrome com.android.companiondevicemanager com.android.contacts com.android.cts.ctsshim com.android.cts.priv.ctsshim com.android.dreams.basic com.android.dynsystem com.android.egg com.android.emergency com.android.emergency.auto_generated_rro_product__ com.android.emulator.multidisplay com.android.emulator.radio.config com.android.externalstorage com.android.htmlviewer com.android.inputdevices com.android.internal.display.cutout.emulation.corner com.android.internal.display.cutout.emulation.double com.android.internal.display.cutout.emulation.hole com.android.internal.display.cutout.emulation.tall com.android.internal.display.cutout.emulation.waterfall com.android.internal.systemui.navbar.gestural com.android.internal.systemui.navbar.gestural_extra_wide_back com.android.internal.systemui.navbar.gestural_narrow_back com.android.internal.systemui.navbar.gestural_wide_back com.android.internal.systemui.navbar.threebutton com.android.internal.systemui.navbar.twobutton com.android.keychain com.android.localtransport com.android.location.fused com.android.managedprovisioning com.android.managedprovisioning.auto_generated_rro_product__ com.android.mms.service com.android.mtp com.android.musicfx com.android.nfc com.android.nfc.auto_generated_rro_product__ com.android.omadm.service com.android.ons com.android.pacprocessor com.android.phone com.android.phone.auto_generated_rro_product__ com.android.printspooler com.android.providers.blockednumber com.android.providers.calendar com.android.providers.contacts com.android.providers.contacts.auto_generated_rro_product__ com.android.providers.downloads com.android.providers.downloads.ui com.android.providers.media com.android.providers.partnerbookmarks com.android.providers.settings com.android.providers.settings.auto_generated_rro_product__ com.android.providers.telephony com.android.providers.telephony.auto_generated_rro_product__ com.android.providers.userdictionary com.android.proxyhandler com.android.safetyregulatoryinfo com.android.se com.android.server.telecom com.android.server.telecom.auto_generated_rro_product__ com.android.service.ims com.android.service.ims.presence com.android.settings com.android.settings.auto_generated_rro_product__ com.android.settings.intelligence com.android.sharedstoragebackup com.android.shell com.android.simappdialog com.android.simappdialog.auto_generated_rro_product__ com.android.soundpicker com.android.statementservice com.android.stk com.android.storagemanager com.android.systemui com.android.systemui.auto_generated_rro_product__ com.android.systemui.plugin.globalactions.wallet com.android.theme.color.black com.android.theme.color.cinnamon com.android.theme.color.green com.android.theme.color.ocean com.android.theme.color.orchid com.android.theme.color.purple com.android.theme.color.space com.android.theme.font.notoserifsource com.android.theme.icon.pebble com.android.theme.icon.roundedrect com.android.theme.icon.squircle com.android.theme.icon.taperedrect com.android.theme.icon.teardrop com.android.theme.icon.vessel com.android.theme.icon_pack.circular.android com.android.theme.icon_pack.circular.launcher com.android.theme.icon_pack.circular.settings com.android.theme.icon_pack.circular.systemui com.android.theme.icon_pack.circular.themepicker com.android.theme.icon_pack.filled.android com.android.theme.icon_pack.filled.launcher com.android.theme.icon_pack.filled.settings com.android.theme.icon_pack.filled.systemui com.android.theme.icon_pack.filled.themepicker com.android.theme.icon_pack.rounded.android com.android.theme.icon_pack.rounded.launcher com.android.theme.icon_pack.rounded.settings com.android.theme.icon_pack.rounded.systemui com.android.theme.icon_pack.rounded.themepicker com.android.timezone.updater com.android.traceur com.android.vending com.android.vpndialogs com.android.wallpaper.livepicker com.android.wallpaperbackup com.breel.wallpapers18 com.google.android.apps.docs com.google.android.apps.enterprise.dmagent com.google.android.apps.maps com.google.android.apps.messaging com.google.android.apps.nexuslauncher com.google.android.apps.nexuslauncher.auto_generated_rro_product__ com.google.android.apps.photos com.google.android.apps.pixelmigrate com.google.android.apps.restore com.google.android.apps.wallpaper com.google.android.apps.wallpaper.nexus com.google.android.calendar com.google.android.captiveportallogin com.google.android.cellbroadcastreceiver com.google.android.cellbroadcastservice com.google.android.configupdater com.google.android.deskclock com.google.android.dialer com.google.android.documentsui com.google.android.ext.services com.google.android.ext.shared com.google.android.feedback com.google.android.gm com.google.android.gms com.google.android.googlequicksearchbox com.google.android.gsf com.google.android.hotspot2.osulogin com.google.android.inputmethod.latin com.google.android.markup com.google.android.modulemetadata com.google.android.music com.google.android.networkstack com.google.android.networkstack.permissionconfig com.google.android.networkstack.tethering com.google.android.onetimeinitializer com.google.android.overlay.emulatorconfig com.google.android.overlay.googleconfig com.google.android.overlay.googlewebview com.google.android.overlay.permissioncontroller com.google.android.overlay.pixelconfigcommon com.google.android.packageinstaller com.google.android.partnersetup com.google.android.permissioncontroller com.google.android.printservice.recommendation com.google.android.projection.gearhead com.google.android.providers.media.module com.google.android.sdksetup com.google.android.setupwizard com.google.android.soundpicker com.google.android.syncadapters.contacts com.google.android.tag com.google.android.trichromelibrary_410410181 com.google.android.tts com.google.android.videos com.google.android.webview com.google.android.wifi.resources com.google.android.youtube org.chromium.webview_shell generic_x86_arm:/data/data #
bn.ereader would be the Nook app. Have you logged in?
@ElleKayEm bn.reader does it appear to be it (I don't know how I missed that). I have logged into the nook app.
In my case all I need is the cchashdata.db
file. However, when I try to run
./adb pull /data/data/bn.ereader/databases/cchashdata.db
or any variation such as starting with .\adb
or just adb
I keep getting the same error
/system/bin/sh: ./adb: inaccessible or not found
I see this from an earlier post in this thread:
If, when trying the cat or pull command, you get a message saying that the file or directory you're trying to access doesn't exist, enter the command ./adb root, then re-run the command that produced the error. The data you're trying to access is only visible to root.
@ElleKayEm That doesn't appear to fix my issue, however if I back out of adb and go back to the Windows file system where adb.exe is located. And then I type adb pull /data/data/bn.ereader/databases/cchashdata.db
it pulls it just fine.
I'm now able to decrypt my books perfectly! Thanks for your help!
I was able to get my key from a rooted Android device. However, DeDRM fails to decrypt any of my Nook books from the Windows Store Nook application. The log includes
DeDRM v6.8.0: "2940153575360.epub" is neither an Adobe Adept nor a Barnes & Noble encrypted ePub
Interestingly, when I grab the epub file from the Nook Android app, the file is identical save that it includes META-INF/rights.xml
, which the epub file on the PC does not have. Previously, when I downloaded any Nook books with the Android app, the epubs it downloaded were DRM-free (it's just that your device had to be rooted for you to get at where they were). So, something about how Nook is handling DRM has changed.
And looking at epubor's FAQ, it says:
Updated 07/01/2020: Nook app has updated its Nook app about 1 month ago with the new NOOK DRM scheme.
Currently, the only way to remove Nook drm is generating a Nook key by us manually.
and if you want to use their software to decrypt your Nook books, you now have to literally give their support staff your B&N username and password so that they can create a key file that will work and send it to you.
I don't think that what B&N is changed completely, since the Android app has the cchashdata.db with a key just like folks here have described, but they do appear to have changed enough that DeDRM does not currently work with that key.
Some of the books from the Windows Nook app have the rights.xml info stored in a separate database. In my experience these have been comics or other books where the pages are all image files. You can extract the info from the database, create a rights.xml file, and insert it into the epub file. Then you can DeDRM it. The book is still only readable in the Nook app, but you can take the images and create a CBZ file or similar. Here's a comment over at the blog where I explained the details:
But if you have those books from the Android app with rights.xml already in there and your key, you should be able to DeDRM those (and they should work fine in any epub reader).
I suspect the Epubor folks are taking the login info and getting the key in the way described above. But I'd never, ever trust that. They'd have access to your credit card, billing address, your ebooks, etc. Big fat NOOO. I already think Epubor and other similar programs are pretty shady. This makes them look even worse.
But if you have those books from the Android app with rights.xml already in there and your key, you should be able to DeDRM those (and they should work fine in any epub reader).
That does appear to have worked. It wouldn't have occurred to me to try to decrypt the epub file from Android when the only difference was the rights.xml file. Thanks.
I suspect the Epubor folks are taking the login info and getting the key in the way described above. But I'd never, ever trust that. They'd have access to your credit card, billing address, your ebooks, etc. Big fat NOOO. I already think Epubor and other similar programs are pretty shady. This makes them look even worse.
I don't know why epubor would necessarily be shadier than any other program you buy online - at least if it worked without your login info. However, given that your login info is needed to go fetch your books for you, I don't think that they can avoid it given what the application is supposed to do. And if they need it for the key, then they obviously need it that much more. So, I think that it's all quite understandable from a technical perspective that they require your login info. The problem is that you then have to trust them with that information. It wouldn't surprise me at all if they weren't doing anything shady with it, but you have no way of knowing whether they are or not, so you're definitely taking a risk if you use their program. And if you have to manually hand over your information instead of it just being the application with that information, it's that much more likely that someone is from epubor is getting their hands on your information and using it for something shady. So, the current situation with the Nook DRM makes it all that much riskier.
DeDRM avoids those problems by requiring additional steps from the user, and it's open source, so any shadiness could be found quite easily. I very much do not want to end up in a position where I have to seriously consider using epubor, because DeDRM no longer does the job.
I consider Epubor shady because they are quite obviously using DeDRM code as the backend of their program. No, I doubt Epubor would actually do anything other then extract your key, but they could.
If someone with the know-how and the tools figured out how to extract the key from the Windows Nook program, that could be incorporated into DeDRM (similar to the way DeDRM used to get the key from the old Nook desktop programs). But I think in general most people have just moved away from BN so no one with the ability has the motivation.
Hello all. I am in way over my head with all this! I've gotten as far as getting the virtual android device up and running but when I download the nook app I get the following error when running it. "There was a problem parsing the package". I have BN account that I will be closing down and all I want to do is just download my library on there and save it to my PC to read later on.
Hmm, you're using the same Nook APK version from the same site that is given in Aric's instructions?
Yes as far as I can tell.
As a follow-up, I was able to complete the process. This was way beyond my skill set but thank you to Aric for the clear instructions. Very much appreciated.
Glad you were able to do it. What was the issue with installing the Nook app?
I'm not entirely sure. I created a new virtual phone and tried again and that worked. The most difficult parts for me were the next two steps. Without any experience in Linux or SQL, I needed some time to learn how to even get a directory listing of the device to find the files. Figuring out sqlite3 and what was happening there also wasn't really clear to me at first.
I have an issue I have not seen here. I installed the Nook app in a rooted Nox Android emulator. I logged in and can read a DRMed book in the Nook app, but I don't see a key in cchashdata.db. I used the Nox image and am using cygwin on Windows to view it. I also tried sqlite3 and it the key does not appear to be present.
Has anyone seen this?
Thanks!
@mxyzzy There are a couple mentions of this upthread. The solution seems to be using an older Android version. People had success with Android 7.1.1.
After reading this nice tip by aric49, I was able to retrieve my key, and my books from an emulated rooted Android phone. The emulator proved to be a bit fiddly, but I was able to download and install Nook on an emulated Nexus 6 with 1 GB RAM. There had been some Python 2 issues with the import/export of key files earlier, but I had fixed these already, so I was able to import my key. There were still some Python 2 issues with Calibre 5 and DeDRM when adding Barnes & Noble ebooks, but after fixing these, I was able to decrypt my books with Calibre 5.6 and the my modified DeDRM plugin.
I noticed that the desktop app isn't available at the moment, so the only way I could retrieve my books was with the Android app, but it looks like its the only way to retrieve the key anyway, so it will have to do for the moment.
Does anybody know if we will be able to use the desktop app to retrieve the key when, or rather if, the app is available again? And if the key retrieved from the Android app is the same as the key for the desktop app? In other words, can I use the Android key to decrypt books from the desktop app?
The methods for retrieving the keys which are currently in DeDRM depended on the old desktop programs which B&N cut off a while ago. A method for decrypting the key from the current Windows app has not been figured out as far as I'm aware...it's not in the current DeDRM at any rate. But most B&N accounts seem to use the same key for all books regardless of how they are downloaded. So yes, in most cases, you should be able to DeDRM books from the Windows app with the key extracted from the Android emulator.
Thanks! Actually, the Android method isn't that bad. I can do it now in less than 5 minutes. I've just retrieved the key successfully with an emulated Pixel 3 running Android 11.
It's been a long time since I've gotten anything from B&N, but in my experience the key rarely (if ever) changes.
I recently remove kindle drm with the method in this article: https://bestapps.medium.com/switch-nook-to-kindle-why-and-how-to-8dcae8f70c2c
Hello:
I have been a Nook owner for years, and recently decided to switch over to Kindle. Looking to covert my Nook books to my Kindle and have tried everything there is available on the net, but can't seem to get anything to work. No matter what program I use, I get to the point where I have to enter my Nook account login info, and it always come back telling me that I do not have the correct information. I have checked, double checked and triple checked, and I am positive that I have the correct information. I have seen in posts here that Barnes and Noble my have changed the way to get keys to remove the DRM. Is that the case, and is there no way to remove the DRM now?
BTW, I am working with a Windows 10 PC and a Nook HD. Any information would be a great help and much appreciated.