06-01-2016, 05:40 AM | #226 |
Wizard
Posts: 3,489
Karma: 2914715
Join Date: Jun 2012
Device: kobo touch
|
I did.
This is at least what patchit.exe does, and until now I did not see any negative effects. Strictly speaking, I do not think the zeros are necessary (or have any effect at all) in this case. By the way, if the new compressed stream turns out to be longer than the original stream, patchit.exe tries again with compression level set to maximal. |
06-01-2016, 06:00 AM | #227 | |
Wizard
Posts: 3,489
Karma: 2914715
Join Date: Jun 2012
Device: kobo touch
|
Quote:
Spoiler:
For testing purposes, I would remove in the newpart section, lines that refer to devices other than the one you will test with, in order to make sure the resulting zlib stream is not longer than the original one. |
|
Advert | |
|
06-01-2016, 06:56 AM | #228 |
Connoisseur
Posts: 65
Karma: 200153
Join Date: Apr 2016
Device: Kobo Glo Hd
|
Thx for \x00 info ;-) I updated my python script to patch nickel and tested margin-top:100px in body but seems doesn't affect.
|
06-01-2016, 02:17 PM | #229 |
Connoisseur
Posts: 65
Karma: 200153
Join Date: Apr 2016
Device: Kobo Glo Hd
|
If bigbless or someone else wants to try css changes in nickel, the attached python scripts could be useful.
Tool to patch compressed streams inside nickel. - Copy your nickel file from your firmware to this folder. - Execute python extract.py to extract all compressed streams. - Browse extracted/ folder and view .css files to find out what you want to change. - Copy files you want to change to folder modified/ and change what you want. Note that resulting file after compression could not be larger than original one. Remove comments or code related to other devices if you need to shorten. - Execute python patch.py to create a nickel-modif with your patches. Check messages to verify modifications are well done. - Execute ./publish.sh to create KoboRoot.tgz and copy to folder .kobo/ in your device. Last edited by pipcat; 06-02-2016 at 02:08 AM. Reason: Updated zip to include empty folder extracted (needed for windows users) |
06-01-2016, 03:54 PM | #230 | |
Junior Member
Posts: 9
Karma: 10
Join Date: May 2016
Device: Kobo Aura HD
|
Quote:
I'm willing to do this and in case it doesn't work I don't mind changing epubs so that the top margin allows me to read them on the ebook. Thanks |
|
Advert | |
|
06-01-2016, 04:55 PM | #231 | |
Wizard
Posts: 3,489
Karma: 2914715
Join Date: Jun 2012
Device: kobo touch
|
Quote:
As for the larger top margin in epubs, you can try it without any danger. Have a look at Instructions for patching firmware 3.19.5761. Read the instructions in order to get a general understanding of how it works. Then open libnickel.so.1.0.0.patch. You are interested in `ePub fixed/adjustable top/bottom margins`. Find it and enable it (patch_enable = `yes`). Then find the line Code:
#replace_string = B8A1A4, `%\01`, `2\05` Code:
replace_string = B8A1A4, `%\01`, `4\05` Last edited by tshering; 06-01-2016 at 05:05 PM. |
|
06-02-2016, 06:14 PM | #232 | |
Junior Member
Posts: 9
Karma: 10
Join Date: May 2016
Device: Kobo Aura HD
|
Quote:
Code:
replace_string = B8A1A4, `%\01`, `9\05` Code:
replace_string = B8A1A4, `%\01`, `10\05` Code:
Extracting files to patch from 3.19.5761_source/kobo-update-3.19.5761.zip ... x ./usr/local/Kobo/libnickel.so.1.0.0 x ./usr/local/Kobo/librmsdk.so.1.0.0 x ./usr/local/Kobo/libadobe.so Read 263288 bytes from input file '/var/folders/pd/qytr69n55dv31rrxd252b8s00000gn/T/patch32lsb_XXXXXXXX.5YOJJPfn/original/./usr/local/Kobo/libadobe.so' Ignoring disabled patch `Remove PDF map widget shown during panning` Ignoring disabled patch `Preserve PDF pan position across page turns` Ignoring disabled patch `Remove PDF page turn arrows at left and right edges of page` Wrote 263288 bytes to output file '/var/folders/pd/qytr69n55dv31rrxd252b8s00000gn/T/patch32lsb_XXXXXXXX.5YOJJPfn/patched/./usr/local/Kobo/libadobe.so' Read 14928256 bytes from input file '/var/folders/pd/qytr69n55dv31rrxd252b8s00000gn/T/patch32lsb_XXXXXXXX.5YOJJPfn/original/./usr/local/Kobo/libnickel.so.1.0.0' Ignoring disabled patch `Disable reading footer` Ignoring disabled patch `Custom reading footer style` Applied patch `My 15 line spacing values` find_base_address: unique string at 00BF97E4 Applied patch `Custom left & right margins` Ignoring disabled patch `Custom font sizes` Applied patch `Brightness fine control` Applied patch `Search in Library by default` Ignoring disabled patch `Freedom to advanced fonts control` Ignoring disabled patch `Allow download all in Browser` tools/patch32lsb-Darwin: line 357 in '3.19.5761_source/libnickel.so.1.0.0.patch': replace_string replacement too long. Cleaning up /var/folders/pd/qytr69n55dv31rrxd252b8s00000gn/T/patch32lsb_XXXXXXXX.5YOJJPfn Last edited by bigbless; 06-02-2016 at 08:34 PM. |
|
06-03-2016, 02:32 AM | #233 | |
Connoisseur
Posts: 65
Karma: 200153
Join Date: Apr 2016
Device: Kobo Glo Hd
|
Quote:
Code:
replace_string = B8A1A4, `%\01\0p\0x\0 \00`, `1\05\00\0p\0x\0 ` Last edited by pipcat; 06-03-2016 at 02:44 AM. Reason: address in replace string is B8A1A4 |
|
06-03-2016, 05:11 AM | #234 | |
Junior Member
Posts: 9
Karma: 10
Join Date: May 2016
Device: Kobo Aura HD
|
Quote:
Thanks a lot it worked and now it transitions correctly, there is one last thing that I wanted to know if possible also to edit by patching lines it is the definition as you can see it popups most of the time at the top, and I can't see the full translation. Is there a way to patch that so that it appears at the bottom? I've included photos in attachment |
|
06-03-2016, 05:31 AM | #235 |
Connoisseur
Posts: 65
Karma: 200153
Join Date: Apr 2016
Device: Kobo Glo Hd
|
There is a patch to change dictionary frame size. Maybe you can customize it to your needs.
https://www.mobileread.com/forums/sho...0#post=3221040 |
06-03-2016, 06:33 AM | #236 | ||
I need a chapter break
Posts: 4,042
Karma: 56058267
Join Date: Mar 2015
Location: Israel
Device: Kobo Glo
|
Quote:
Quote:
|
||
06-04-2016, 06:11 AM | #237 |
Enthusiast
Posts: 25
Karma: 10
Join Date: Apr 2015
Device: Kobo glo, LifeBook plus
|
Hi, I'm update my kobo Glo to 3.19.5761 FW
I had been patch, and replace font to Arial. The problem : In Dictionary view is not Arial. How i can change the font in "Dictionary view"? Thanks all! |
06-04-2016, 08:42 AM | #238 |
Wizard
Posts: 3,489
Karma: 2914715
Join Date: Jun 2012
Device: kobo touch
|
In libnickel.so.1.0.0.txt there is an example, look for "name=Dictionary (Georgia)." Instead of Georgia you can take any font name. Do not forget to enable this patch (enabled=false), and disable the patch named "Dictionary (font chosen by software)."
|
06-04-2016, 11:02 AM | #239 |
Enthusiast
Posts: 25
Karma: 10
Join Date: Apr 2015
Device: Kobo glo, LifeBook plus
|
Thanks "tshering" for quick reply!
I got it! Now with this file you can change to a Unicode Font: Arial. |
06-07-2016, 03:47 AM | #240 |
Wizard
Posts: 3,489
Karma: 2914715
Join Date: Jun 2012
Device: kobo touch
|
Since there seems to be a certain interest in investigating the css blocks of nickel and libnickel.so.1.0.0 (cf. this thread), I publish those css blocks that I could easily find (that means: I do not claim that all css blocks are included).
Last edited by tshering; 06-07-2016 at 04:36 AM. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Which Ebook reader is easiest on the eyes? i.e doesn't strain your eyes when reading | Berabouman | Which one should I buy? | 2 | 02-08-2013 09:07 AM |
Glo Is the screen of my Glo bad or is it my eyes? | Polly7 | Kobo Reader | 5 | 01-29-2013 03:56 AM |
help with some modifications | moller | Kindle Developer's Corner | 3 | 10-12-2012 02:31 PM |
Eyes of Silver, Eyes of Gold, historical romance | ellenoc | Self-Promotions by Authors and Publishers | 18 | 08-22-2011 02:34 PM |
iLiad Registry modifications | Martijn | iRex Developer's Corner | 7 | 03-27-2008 05:37 PM |