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 cURL, 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 | other variables are DESTDIR and PREFIX to handle destination install directory␊ |
80 | ␊ |
81 | * Default value␊ |
82 | ␊ |
83 | ␊ |
84 | Utils␊ |
85 | -----␊ |
86 | ␊ |
87 | First, add libgourou.so to your LD_LIBRARY_PATH␊ |
88 | ␊ |
89 | export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD␊ |
90 | ␊ |
91 | You can optionaly specify your .adept directory␊ |
92 | ␊ |
93 | export ADEPT_DIR=/home/XXX␊ |
94 | ␊ |
95 | Then, use utils as following :␊ |
96 | ␊ |
97 | You can import configuration from your eReader or create a new one with _utils/adept\_activate_ :␊ |
98 | ␊ |
99 | ./utils/adept_activate -u <AdobeID USERNAME>␊ |
100 | ␊ |
101 | Then a _/home/<user>/.config/adept_ directory is created with all configuration file␊ |
102 | ␊ |
103 | To download an ePub/PDF :␊ |
104 | ␊ |
105 | ./utils/acsmdownloader <ACSM_FILE>␊ |
106 | ␊ |
107 | To export your private key (for DeDRM software) :␊ |
108 | ␊ |
109 | ./utils/acsmdownloader --export-private-key [-o adobekey_1.der]␊ |
110 | ␊ |
111 | To remove ADEPT DRM :␊ |
112 | ␊ |
113 | ./utils/adept_remove <encryptedFile>␊ |
114 | ␊ |
115 | To list loaned books :␊ |
116 | ␊ |
117 | ./utils/adept_loan_mgt [-l]␊ |
118 | ␊ |
119 | To return a loaned book :␊ |
120 | ␊ |
121 | ./utils/adept_loan_mgt -r <id>␊ |
122 | ␊ |
123 | ␊ |
124 | You can get utils full options description with -h or --help switch␊ |
125 | ␊ |
126 | ␊ |
127 | Docker␊ |
128 | ------␊ |
129 | ␊ |
130 | A docker image (by bcliang) is available at [https://github.com/bcliang/docker-libgourou/](https://github.com/bcliang/docker-libgourou/)␊ |
131 | ␊ |
132 | ␊ |
133 | Copyright␊ |
134 | ---------␊ |
135 | ␊ |
136 | Grégory Soutadé␊ |
137 | ␊ |
138 | ␊ |
139 | License␊ |
140 | -------␊ |
141 | ␊ |
142 | libgourou : LGPL v3 or later␊ |
143 | ␊ |
144 | utils : BSD␊ |
145 | ␊ |
146 | ␊ |
147 | Special thanks␊ |
148 | --------------␊ |
149 | ␊ |
150 | * _Jens_ for all test samples and utils testing␊ |
151 | * _Milian_ for debug & code␊ |
152 | * _Berwyn H_ for all test samples, feedbacks, patches and kind donation␊ |