1 | Introduction␊ |
2 | ------------␊ |
3 | ␊ |
4 | libgourou is a free implementation of Adobe's ADEPT protocol used to add DRM on ePub/PDF files. It overcome the lacks of Adobe support for Linux platforms.␊ |
5 | ␊ |
6 | ␊ |
7 | Architecture␊ |
8 | ------------␊ |
9 | ␊ |
10 | Like RMSDK, libgourou has a client/server scheme. All platform specific functions (crypto, network...) has to be implemented in a client class (that derives from DRMProcessorClient) while server implements ADEPT protocol.␊ |
11 | A reference implementation using Qt, OpenSSL and libzip is provided (in _utils_ directory).␊ |
12 | ␊ |
13 | Main fucntions to use from gourou::DRMProcessor are :␊ |
14 | ␊ |
15 | * Get an ePub from an ACSM file : _fulfill()_ and _download()_␊ |
16 | * Create a new device : _createDRMProcessor()_␊ |
17 | * Register a new device : _signIn()_ and _activateDevice()_␊ |
18 | * Remove DRM : _removeDRM()_␊ |
19 | * Return loaned book : _returnLoan()_␊ |
20 | ␊ |
21 | You can import configuration from (at least) :␊ |
22 | ␊ |
23 | * Kobo device : .adept/device.xml, .adept/devicesalt and .adept/activation.xml␊ |
24 | * Bookeen device : .adobe-digital-editions/device.xml, root/devkey.bin and .adobe-digital-editions/activation.xml␊ |
25 | ␊ |
26 | Or create a new one. Be careful : there is a limited number of devices that can be created bye one account.␊ |
27 | ␊ |
28 | ePub are encrypted using a shared key : one account / multiple devices, so you can create and register a device into your computer and read downloaded (and encrypted) ePub file with your eReader configured using the same AdobeID account.␊ |
29 | ␊ |
30 | For those who wants to remove DRM without adept_remove, you can export your private key and import it within [Calibre](https://calibre-ebook.com/) an its DeDRM plugin.␊ |
31 | ␊ |
32 | ␊ |
33 | Dependencies␊ |
34 | ------------␊ |
35 | ␊ |
36 | For libgourou :␊ |
37 | ␊ |
38 | _externals_ :␊ |
39 | ␊ |
40 | * libpugixml␊ |
41 | ␊ |
42 | _internals_ :␊ |
43 | ␊ |
44 | * uPDFParser␊ |
45 | ␊ |
46 | For utils :␊ |
47 | ␊ |
48 | * libcurl␊ |
49 | * OpenSSL␊ |
50 | * libzip␊ |
51 | * libpugixml␊ |
52 | ␊ |
53 | ␊ |
54 | Internal libraries are automatically fetched and statically compiled during the first run.␊ |
55 | When you update libgourou's repository, **don't forget to update internal libraries** with :␊ |
56 | ␊ |
57 | make update_lib␊ |
58 | ␊ |
59 | ␊ |
60 | Compilation␊ |
61 | -----------␊ |
62 | ␊ |
63 | Use _make_ command␊ |
64 | ␊ |
65 | make [CROSS=XXX] [DEBUG=(0*|1)] [STATIC_UTILS=(0*|1)] [BUILD_UTILS=(0|1*)] [BUILD_STATIC=(0*|1)] [BUILD_SHARED=(0|1*)] [all*|clean|ultraclean|build_utils|install|uninstall]␊ |
66 | ␊ |
67 | CROSS can define a cross compiler prefix (ie arm-linux-gnueabihf-)␊ |
68 | ␊ |
69 | DEBUG can be set to compile in DEBUG mode␊ |
70 | ␊ |
71 | BUILD_UTILS to build utils or not␊ |
72 | ␊ |
73 | STATIC_UTILS to build utils with static library (libgourou.a) instead of default dynamic one (libgourou.so)␊ |
74 | ␊ |
75 | BUILD_STATIC build libgourou.a if 1, nothing if 0, can be combined with BUILD_SHARED␊ |
76 | ␊ |
77 | BUILD_SHARED build libgourou.so if 1, nothing if 0, can be combined with BUILD_STATIC␊ |
78 | ␊ |
79 | * Default value␊ |
80 | ␊ |
81 | ␊ |
82 | Utils␊ |
83 | -----␊ |
84 | ␊ |
85 | First, add libgourou.so to your LD_LIBRARY_PATH␊ |
86 | ␊ |
87 | export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD␊ |
88 | ␊ |
89 | You can optionaly specify your .adept directory␊ |
90 | ␊ |
91 | export ADEPT_DIR=/home/XXX␊ |
92 | ␊ |
93 | Then, use utils as following :␊ |
94 | ␊ |
95 | You can import configuration from your eReader or create a new one with _utils/adept\_activate_ :␊ |
96 | ␊ |
97 | ./utils/adept_activate -u <AdobeID USERNAME>␊ |
98 | ␊ |
99 | Then a _/home/<user>/.config/adept_ directory is created with all configuration file␊ |
100 | ␊ |
101 | To download an ePub/PDF :␊ |
102 | ␊ |
103 | ./utils/acsmdownloader <ACSM_FILE>␊ |
104 | ␊ |
105 | To export your private key (for DeDRM software) :␊ |
106 | ␊ |
107 | ./utils/acsmdownloader --export-private-key [-o adobekey_1.der]␊ |
108 | ␊ |
109 | To remove ADEPT DRM :␊ |
110 | ␊ |
111 | ./utils/adept_remove <encryptedFile>␊ |
112 | ␊ |
113 | To list loaned books :␊ |
114 | ␊ |
115 | ./utils/adept_loan_mgt [-l]␊ |
116 | ␊ |
117 | To return a loaned book :␊ |
118 | ␊ |
119 | ./utils/adept_loan_mgt -r <id>␊ |
120 | ␊ |
121 | ␊ |
122 | You can get utils full options description with -h or --help switch␊ |
123 | ␊ |
124 | ␊ |
125 | Docker␊ |
126 | ------␊ |
127 | ␊ |
128 | A docker image (by bcliang) is available at [https://github.com/bcliang/docker-libgourou/](https://github.com/bcliang/docker-libgourou/)␊ |
129 | ␊ |
130 | ␊ |
131 | Copyright␊ |
132 | ---------␊ |
133 | ␊ |
134 | Grégory Soutadé␊ |
135 | ␊ |
136 | ␊ |
137 | License␊ |
138 | -------␊ |
139 | ␊ |
140 | libgourou : LGPL v3 or later␊ |
141 | ␊ |
142 | utils : BSD␊ |
143 | ␊ |
144 | ␊ |
145 | Special thanks␊ |
146 | --------------␊ |
147 | ␊ |
148 | * _Jens_ for all test samples and utils testing␊ |
149 | * _Milian_ for debug & code␊ |