Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Kobo Reader > Kobo Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 04-28-2018, 05:30 AM   #31
oren64
I need a chapter break
oren64 ought to be getting tired of karma fortunes by now.oren64 ought to be getting tired of karma fortunes by now.oren64 ought to be getting tired of karma fortunes by now.oren64 ought to be getting tired of karma fortunes by now.oren64 ought to be getting tired of karma fortunes by now.oren64 ought to be getting tired of karma fortunes by now.oren64 ought to be getting tired of karma fortunes by now.oren64 ought to be getting tired of karma fortunes by now.oren64 ought to be getting tired of karma fortunes by now.oren64 ought to be getting tired of karma fortunes by now.oren64 ought to be getting tired of karma fortunes by now.
 
oren64's Avatar
 
Posts: 4,042
Karma: 56058267
Join Date: Mar 2015
Location: Israel
Device: Kobo Glo
kobopatch v0.5.0 beta:

It's not working for me, it's not generating librmsdk.so.1.0.0 and libadobe.so files, the output files are not patched correctly, the files size it smaller.

I used
kobopatch-windows-32bit.exe
kobopatch-windows-64bit.exe
Attached Files
File Type: zip usr64.zip (8.42 MB, 204 views)
File Type: txt log64.txt (605.4 KB, 236 views)
File Type: zip usr32.zip (8.42 MB, 212 views)
File Type: txt log32.txt (605.4 KB, 213 views)

Last edited by oren64; 04-28-2018 at 05:34 AM.
oren64 is offline   Reply With Quote
Old 04-28-2018, 10:37 AM   #32
geek1011
Wizard
geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.
 
Posts: 2,804
Karma: 7025947
Join Date: May 2016
Location: Ontario, Canada
Device: Kobo Mini, Aura Edition 2 v1, Clara HD
Hmm. I'll have to test this on windows. I think it's having path issues like I did with kepubify a while ago. It worked perfectly with matching checksums on Linux and macOS. Can someone test this with Linux or macOS too?

Thanks for testing it!

EDIT: It seems like the issue oren64 had was due to the tgz file not completely flushing to the disk. I'll try changing a few things and see if it works.

Last edited by geek1011; 04-28-2018 at 10:40 AM.
geek1011 is offline   Reply With Quote
Old 04-28-2018, 12:16 PM   #33
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,252
Karma: 16544692
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
@geek1011,

Here are my results using kobopatch v5:

Test details:
I used the Win64 version of kobopatch.

I used my own values in the various .yaml files. This includes:
  • some different replacement values than those in GeoffR's default .patch files
  • a lot of disabled patches
  • a couple of extra personal patches for libnickel.so.1.0.0 not present in GeoffR's defaults
Good News:
Comparing the GeoffR version of KoboRoot.tgz with the kobopatch version of KoboRoot.tgz ...
Checksums (both md5 and sha256) for each of the 4 files included in KoboRoot.tgz compared exactly.

Bad News: nickel.yaml only ...
When I tried to uncomment the last line of patch "Custom reading footer style", kobopatch fell in a heap with this error message
Code:
Fatal: Could not read and parse patch file nickel.yaml: error parsing patch file: yaml: line 73: did not find expected ',' or '}'
I think you can easily reproduce it yourself just by uncommenting line 74 (not 73 ???) in the nickel.yaml file you supplied in kobopatch_4.8.10956.zip.

Clutching at straws ... is it something to do with the fact that this option is one of the few which doesn't have same string lengths for Find and Replace? The Replace option is terminated early with a trailing /0, which works OK in the current patching system.
jackie_w is offline   Reply With Quote
Old 04-28-2018, 01:50 PM   #34
oren64
I need a chapter break
oren64 ought to be getting tired of karma fortunes by now.oren64 ought to be getting tired of karma fortunes by now.oren64 ought to be getting tired of karma fortunes by now.oren64 ought to be getting tired of karma fortunes by now.oren64 ought to be getting tired of karma fortunes by now.oren64 ought to be getting tired of karma fortunes by now.oren64 ought to be getting tired of karma fortunes by now.oren64 ought to be getting tired of karma fortunes by now.oren64 ought to be getting tired of karma fortunes by now.oren64 ought to be getting tired of karma fortunes by now.oren64 ought to be getting tired of karma fortunes by now.
 
oren64's Avatar
 
Posts: 4,042
Karma: 56058267
Join Date: Mar 2015
Location: Israel
Device: Kobo Glo
@jackie_w I wonder why it works for you on Windows and not for me, I tried to disable all the patches and it's still didn't work, I'm using Win10.
oren64 is offline   Reply With Quote
Old 04-28-2018, 02:58 PM   #35
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,252
Karma: 16544692
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
Quote:
Originally Posted by oren64 View Post
@jackie_w I wonder why it works for you on Windows and not for me, I tried to disable all the patches and it's still didn't work, I'm using Win10.
This is how I did the preparation in detail in case anything odd strikes you. I'm using Win10 64bit:
  1. Go to the Release v0.5.0 link from post #30 above
  2. Download kobopatch_4.8.10956.zip and unpack to new directory
  3. Download kobopatch-windows-64bit.exe. Copy to same directory as above and rename to kobopatch.exe. Filesize is 2357760 bytes.
  4. Download firmware kobo-update-4.8.10956.zip from the usual firmware source and copy zip to same directory. I used the mark6 fw but I don't think it should matter - at least it doesn't normally.
  5. Prepare the 4 .yaml files (leave kobopatch.yaml and demo.yaml alone).
  6. Double-click kobopatch.exe
... and that's it.

Last edited by jackie_w; 04-28-2018 at 03:03 PM. Reason: demo.yaml
jackie_w is offline   Reply With Quote
Old 04-28-2018, 03:28 PM   #36
oren64
I need a chapter break
oren64 ought to be getting tired of karma fortunes by now.oren64 ought to be getting tired of karma fortunes by now.oren64 ought to be getting tired of karma fortunes by now.oren64 ought to be getting tired of karma fortunes by now.oren64 ought to be getting tired of karma fortunes by now.oren64 ought to be getting tired of karma fortunes by now.oren64 ought to be getting tired of karma fortunes by now.oren64 ought to be getting tired of karma fortunes by now.oren64 ought to be getting tired of karma fortunes by now.oren64 ought to be getting tired of karma fortunes by now.oren64 ought to be getting tired of karma fortunes by now.
 
oren64's Avatar
 
Posts: 4,042
Karma: 56058267
Join Date: Mar 2015
Location: Israel
Device: Kobo Glo
This is what I did, but it didn't work, it writes in the end "successfully save..." but it didn't generate librmsdk.so.1.0.0 and libadobe.so files or patch correctly, I'll wait for geek1011.

Last edited by oren64; 04-28-2018 at 03:48 PM.
oren64 is offline   Reply With Quote
Old 04-28-2018, 03:47 PM   #37
geek1011
Wizard
geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.
 
Posts: 2,804
Karma: 7025947
Join Date: May 2016
Location: Ontario, Canada
Device: Kobo Mini, Aura Edition 2 v1, Clara HD
Quote:
Originally Posted by jackie_w View Post
Bad News: nickel.yaml only ...
When I tried to uncomment the last line of patch "Custom reading footer style", kobopatch fell in a heap with this error message
Code:
Fatal: Could not read and parse patch file nickel.yaml: error parsing patch file: yaml: line 73: did not find expected ',' or '}'
I think you can easily reproduce it yourself just by uncommenting line 74 (not 73 ???) in the nickel.yaml file you supplied in kobopatch_4.8.10956.zip.

Clutching at straws ... is it something to do with the fact that this option is one of the few which doesn't have same string lengths for Find and Replace? The Replace option is terminated early with a trailing /0, which works OK in the current patching system.
Thanks for testing it! I just had a look at your issue, and it seems I forgot to escape some quotes in the string in the commented line. I'll fix that for the next version or you could just escape the double quotes with a backslash for now.
geek1011 is offline   Reply With Quote
Old 04-28-2018, 03:50 PM   #38
geek1011
Wizard
geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.
 
Posts: 2,804
Karma: 7025947
Join Date: May 2016
Location: Ontario, Canada
Device: Kobo Mini, Aura Edition 2 v1, Clara HD
Quote:
Originally Posted by oren64 View Post
This is what I did but it didn't work, it write in the end "successfully save..." but it didn't generating librmsdk.so.1.0.0 and libadobe.so files or patch correctly, I wait for geek1011.
After playing with the code and looking at the logs a bit, I think I've figured out your issue. There seems to be a race condition in writing the tgz, which results in some of the file not being written. Can you try running it 2 or 3 times and tell me if the file size is different each time so I can make sure my theory is correct before I try to fix it?

Thanks for testing!
geek1011 is offline   Reply With Quote
Old 04-28-2018, 04:12 PM   #39
oren64
I need a chapter break
oren64 ought to be getting tired of karma fortunes by now.oren64 ought to be getting tired of karma fortunes by now.oren64 ought to be getting tired of karma fortunes by now.oren64 ought to be getting tired of karma fortunes by now.oren64 ought to be getting tired of karma fortunes by now.oren64 ought to be getting tired of karma fortunes by now.oren64 ought to be getting tired of karma fortunes by now.oren64 ought to be getting tired of karma fortunes by now.oren64 ought to be getting tired of karma fortunes by now.oren64 ought to be getting tired of karma fortunes by now.oren64 ought to be getting tired of karma fortunes by now.
 
oren64's Avatar
 
Posts: 4,042
Karma: 56058267
Join Date: Mar 2015
Location: Israel
Device: Kobo Glo
Yes, the file size is different by 2-3 byte every run.
oren64 is offline   Reply With Quote
Old 04-28-2018, 04:37 PM   #40
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,252
Karma: 16544692
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
Quote:
Originally Posted by oren64 View Post
This is what I did, but it didn't work, it writes in the end "successfully save..." but it didn't generate librmsdk.so.1.0.0 and libadobe.so files or patch correctly, I'll wait for geek1011.
Looking closer I have spotted something a bit strange. Did you physically unpack the kobopatch KoboRoot.tgz or just view the archive and drill down using something like 7-Zip or WinRar?

If I physically unpack the kobopatch KoboRoot.tgz with 7-Zip I find 4 files.

If I just view in WinRar and drill down I only see 2 listed (nickel, librmsdk.so.1.0.0)
If I try to physically unpack the kobopatch KoboRoot.tgz with WinRar it tells me the file is corrupt and only unpacks the 2 files.

If I use 7-Zip rather than WinRar to view I see all 4 files if I drill down.

Also, there appears to be an extra directory level in the kobopatch KoboRoot.tgz file. I've attached an image of old (top) vs. new (bottom) when both .tgz files are viewed in 7-Zip:
Code:
old patcher: \KoboRoot.tgz\KoboRoot.tar\usr\local\Kobo\
  kobopatch: \KoboRoot.tgz\KoboRoot.tar\.\usr\local\Kobo\
I'm out of my comfort zone now so I'm going to stop digging until geek1011 returns.
Attached Thumbnails
Click image for larger version

Name:	old_vs_new_patcher.jpg
Views:	241
Size:	145.9 KB
ID:	163718  
jackie_w is offline   Reply With Quote
Old 04-28-2018, 04:58 PM   #41
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,252
Karma: 16544692
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
Quote:
Originally Posted by geek1011 View Post
I just had a look at your issue, and it seems I forgot to escape some quotes in the string in the commented line. I'll fix that for the next version or you could just escape the double quotes with a backslash for now.
I escaped the 2 double-quotes ("#caption[qApp_localeName=\"ja_JP\"]...") and it all runs through without error now and checksums match for all 4 files.

The non-matching directory structure I mentioned in my previous post still exists though.
jackie_w is offline   Reply With Quote
Old 04-28-2018, 05:00 PM   #42
oren64
I need a chapter break
oren64 ought to be getting tired of karma fortunes by now.oren64 ought to be getting tired of karma fortunes by now.oren64 ought to be getting tired of karma fortunes by now.oren64 ought to be getting tired of karma fortunes by now.oren64 ought to be getting tired of karma fortunes by now.oren64 ought to be getting tired of karma fortunes by now.oren64 ought to be getting tired of karma fortunes by now.oren64 ought to be getting tired of karma fortunes by now.oren64 ought to be getting tired of karma fortunes by now.oren64 ought to be getting tired of karma fortunes by now.oren64 ought to be getting tired of karma fortunes by now.
 
oren64's Avatar
 
Posts: 4,042
Karma: 56058267
Join Date: Mar 2015
Location: Israel
Device: Kobo Glo
Quote:
Originally Posted by jackie_w View Post
Looking closer I have spotted something a bit strange. Did you physically unpack the kobopatch KoboRoot.tgz or just view the archive and drill down using something like 7-Zip or WinRar?

If I physically unpack the kobopatch KoboRoot.tgz with 7-Zip I find 4 files.

If I just view in WinRar and drill down I only see 2 listed (nickel, librmsdk.so.1.0.0)
If I try to physically unpack the kobopatch KoboRoot.tgz with WinRar it tells me the file is corrupt and only unpacks the 2 files.

If I use 7-Zip rather than WinRar to view I see all 4 files if I drill down.

Also, there appears to be an extra directory level in the kobopatch KoboRoot.tgz file. I've attached an image of old (top) vs. new (bottom) when both .tgz files are viewed in 7-Zip:
Code:
old patcher: \KoboRoot.tgz\KoboRoot.tar\usr\local\Kobo\
  kobopatch: \KoboRoot.tgz\KoboRoot.tar\.\usr\local\Kobo\
I'm out of my comfort zone now so I'm going to stop digging until geek1011 returns.


I used WinRar, there 2 files with WinRar, I tried now with 7zip and there is 4 files.
The files with 7zip seem to be okay, I'm a little confused with that.

See if the file KoboRoot.tgz size is different every run.
oren64 is offline   Reply With Quote
Old 04-28-2018, 05:13 PM   #43
geek1011
Wizard
geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.
 
Posts: 2,804
Karma: 7025947
Join Date: May 2016
Location: Ontario, Canada
Device: Kobo Mini, Aura Edition 2 v1, Clara HD
Quote:
Originally Posted by jackie_w View Post
Looking closer I have spotted something a bit strange. Did you physically unpack the kobopatch KoboRoot.tgz or just view the archive and drill down using something like 7-Zip or WinRar?

If I physically unpack the kobopatch KoboRoot.tgz with 7-Zip I find 4 files.

If I just view in WinRar and drill down I only see 2 listed (nickel, librmsdk.so.1.0.0)
If I try to physically unpack the kobopatch KoboRoot.tgz with WinRar it tells me the file is corrupt and only unpacks the 2 files.

If I use 7-Zip rather than WinRar to view I see all 4 files if I drill down.

Also, there appears to be an extra directory level in the kobopatch KoboRoot.tgz file. I've attached an image of old (top) vs. new (bottom) when both .tgz files are viewed in 7-Zip:
Code:
old patcher: \KoboRoot.tgz\KoboRoot.tar\usr\local\Kobo\
  kobopatch: \KoboRoot.tgz\KoboRoot.tar\.\usr\local\Kobo\
I'm out of my comfort zone now so I'm going to stop digging until geek1011 returns.
That's a really good observation! I think it has to do with the format of the tar archive (GNU/PAX/USTAR). I'll play around with it a bit once I install Windows in a virtual machine (I usually use Linux and macOS) and see what I can come up with.

As for the extra dot, that does not make a difference in the extraction, as it means the current directory. If it bothers you, I can remove it though.

Thanks for looking into this! It probably saved me a few hours of time.
geek1011 is offline   Reply With Quote
Old 04-28-2018, 05:14 PM   #44
geek1011
Wizard
geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.
 
Posts: 2,804
Karma: 7025947
Join Date: May 2016
Location: Ontario, Canada
Device: Kobo Mini, Aura Edition 2 v1, Clara HD
Quote:
Originally Posted by oren64 View Post
I used WinRar, there 2 files with WinRar, I tried now with 7zip and there is 4 files.
The files with 7zip seem to be okay, I'm a little confused with that.

See if the file KoboRoot.tgz size is different every run.
I think there were two issues. One is the one I mentioned above, and the other is due to the way I save the output (there may be a race condition).

Can you and jackie_w post the patched KoboRoot.tgz itself so I can try a few things with it (just add .txt to the file extension so you can upload it)?

Last edited by geek1011; 04-28-2018 at 05:18 PM.
geek1011 is offline   Reply With Quote
Old 04-28-2018, 05:56 PM   #45
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,252
Karma: 16544692
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
Quote:
Originally Posted by geek1011 View Post
Can you and jackie_w post the patched KoboRoot.tgz itself so I can try a few things with it (just add .txt to the file extension so you can upload it)?
Here's my patched KoboRoot.tgz The file was too big to be renamed as a .txt for MR so I've renamed it as a .zip

Last edited by jackie_w; 05-10-2018 at 06:06 AM. Reason: removed attachment - no longer required
jackie_w is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Glo [WIP] Port of Kindle Paperwhite OS giorgio130 Kobo Developer's Corner 59 04-26-2016 08:25 AM
Android [WIP] Overclocking the PE plasticarmyman enTourage eDGe 16 06-11-2012 07:08 PM
Seriously thoughtful I always knew Windows was a WIP GeoffC Lounge 4 02-06-2010 02:20 AM
Thirty - WIP - comments wanted ravenlife Writers' Corner 20 08-16-2009 12:10 PM
Opinions needed on a WIP ebook Nate the great Workshop 5 07-15-2009 11:38 AM


All times are GMT -4. The time now is 07:51 AM.


MobileRead.com is a privately owned, operated and funded community.