Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Readers > Kobo Reader

Notices

Reply
 
Thread Tools Search this Thread
Old 01-02-2019, 01:06 PM   #1
Karmylla
Junior Member
Karmylla began at the beginning.
 
Karmylla's Avatar
 
Posts: 4
Karma: 10
Join Date: Jan 2019
Device: Aura H2O
Unhappy KoboReader.sqlite - Event - Reading Stats



Hey everyone,

Long time lurker, I've finally decided to make an account and join your ranks, and I'm glad I did!

I come to you with an issue I've seen others fall victim to: I logged off my device and all my reading stats and awards went back to zero.
I went and checked back all the books I had read, but the total amount of hours remained zero; since I'm someone who loves statistics and checking the numbers, this reset broke my heart.

And so started my journey in search for an answer!
I found, thanks to this forum, that I must edit the EVENT page in the KoboReader.sqlite file. So far, so good! The issue is that I don't know how or where to add those numbers that translate to hours!
No, that's a lie, I know I have to edit the ExtraData but I'm a little lost regarding the binary code; blobs kinda suck.
Also, to add the total amount of hours - or the hours of each book, rather - I should edit the ones who have the EventType 5, correct? Or maybe 46? (Or maybe both, idk guys, I'm lost, can you tell?)

If someone could give me some guidance, I would very much appreciate it!

Cheers, and Happy New Year!
Karmylla is offline   Reply With Quote
Old 01-02-2019, 06:10 PM   #2
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 15,894
Karma: 25956868
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo,Aura H2O,Glo HD,Aura ONE,Clara HD,Forma;tolino epos
I would recommend just stopping. I have looked at the event table a lot over the years and posted what I know. But, I have never decoded the contents of the ExtraData column. I can see some things in it, but, not enough to do anything. And, there is also Checksum column. This is a checksum across more than one column in the table. I have no idea how it is calculated, but I know when I have tried fiddling with some of the data, it just didn't work.

If you have a backup of the database, then you can probably restore the data. But, I wouldn't recommend anything else.
davidfor is online now   Reply With Quote
Advert
Old 01-03-2019, 07:25 AM   #3
Karmylla
Junior Member
Karmylla began at the beginning.
 
Karmylla's Avatar
 
Posts: 4
Karma: 10
Join Date: Jan 2019
Device: Aura H2O
Welp, if davidfor says so, I must believe it.
All the answers regarding this issue have been given by you, so I'll just leave things as they are, sad I lost my statistics but alas, nothing can be done.
Thanks for replying, I'll be sure to backup my database all the time. Praise Kobo Utilities
Karmylla is offline   Reply With Quote
Old 01-03-2019, 10:12 AM   #4
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: 1,051
Karma: 2579295
Join Date: May 2016
Location: Ontario, Canada
Device: Kobo Mini, Kobo Aura Edition 2, Moto G5
No, there is a way I found a few versions ago. I made a patch which allows you to add an arbitrary amount to the reading stats
I just need to update it for the latest firmware. I'll post it here later today.
geek1011 is offline   Reply With Quote
Old 01-03-2019, 12:51 PM   #5
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: 1,051
Karma: 2579295
Join Date: May 2016
Location: Ontario, Canada
Device: Kobo Mini, Kobo Aura Edition 2, Moto G5
Here is the patch (for libnickel.so.1.0.0.yaml):

Code:
Manipulate reading stats:
  - Enabled: yes
  - Description: Always add 10 hours to the reading time every time you close a book.
  # in EventEngine::endReadingSession(*Volume) when recording end of reading session stats, change QDateTime::secsTo calls to a fixed value
  - ReplaceBytes: {Offset: 0x4D53A0, FindBLX: 0x425270, ReplaceH: 4F F6 FF 70} # MOV  r0, #65535
  - ReplaceBytes: {Offset: 0x4D53C0, FindBLX: 0x425270, ReplaceH: 4F F6 FF 70} # MOV  r0, #65535
Just apply it, open and close any epub book the # of hours you want / 10, then remove the patch.
geek1011 is offline   Reply With Quote
Advert
Old 01-06-2019, 10:01 AM   #6
Karmylla
Junior Member
Karmylla began at the beginning.
 
Karmylla's Avatar
 
Posts: 4
Karma: 10
Join Date: Jan 2019
Device: Aura H2O
Quote:
Originally Posted by geek1011 View Post
Here is the patch (for libnickel.so.1.0.0.yaml):

Code:
Manipulate reading stats:
  - Enabled: yes
  - Description: Always add 10 hours to the reading time every time you close a book.
  # in EventEngine::endReadingSession(*Volume) when recording end of reading session stats, change QDateTime::secsTo calls to a fixed value
  - ReplaceBytes: {Offset: 0x4D53A0, FindBLX: 0x425270, ReplaceH: 4F F6 FF 70} # MOV  r0, #65535
  - ReplaceBytes: {Offset: 0x4D53C0, FindBLX: 0x425270, ReplaceH: 4F F6 FF 70} # MOV  r0, #65535
Just apply it, open and close any epub book the # of hours you want / 10, then remove the patch.
Thanks for helping geek1011, but the truth is I don't know how to patch Kobo as you say!
I checked your patches but I truly don't know how to make them work. Do you perhaps have a tutorial for noobs like me?

Edit 1: Ok, I'm following your instructions at "Instructions for patching firmware 4.12.12111" (https://www.mobileread.com/forums/sh...=reading+stats)
Hopefully I'll be able to get this going!

Edit 2: Ok, I got it to work, surprisingly! Though, the hours went up 30 instead of 10, don't know what that was about, but it was all good, thank you!
I have a question you might be able to answer: I was more interested that, every time I tagged a book as finished, the number of hours from that book would be added the book's statistics as well as the total of hours; maybe I'm being picky, but might this be something that can be done?

Last edited by Karmylla; 01-07-2019 at 07:15 AM.
Karmylla is offline   Reply With Quote
Old 01-07-2019, 12:34 PM   #7
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: 1,051
Karma: 2579295
Join Date: May 2016
Location: Ontario, Canada
Device: Kobo Mini, Kobo Aura Edition 2, Moto G5
Quote:
Originally Posted by Karmylla View Post
Thanks for helping geek1011, but the truth is I don't know how to patch Kobo as you say!
I checked your patches but I truly don't know how to make them work. Do you perhaps have a tutorial for noobs like me?

Edit 1: Ok, I'm following your instructions at "Instructions for patching firmware 4.12.12111" (https://www.mobileread.com/forums/sh...=reading+stats)
Hopefully I'll be able to get this going!

Edit 2: Ok, I got it to work, surprisingly! Though, the hours went up 30 instead of 10, don't know what that was about, but it was all good, thank you!
I have a question you might be able to answer: I was more interested that, every time I tagged a book as finished, the number of hours from that book would be added the book's statistics as well as the total of hours; maybe I'm being picky, but might this be something that can be done?
No problem! And as for the 30 hours ... oops, I forgot to update the comment when I modified the patch.

I don't completely understand your last question. Could you give an example?
geek1011 is offline   Reply With Quote
Old 01-07-2019, 03:16 PM   #8
Karmylla
Junior Member
Karmylla began at the beginning.
 
Karmylla's Avatar
 
Posts: 4
Karma: 10
Join Date: Jan 2019
Device: Aura H2O
Quote:
Originally Posted by geek1011 View Post
No problem! And as for the 30 hours ... oops, I forgot to update the comment when I modified the patch.

I don't completely understand your last question. Could you give an example?
Ok, so, you know how in each book's statistics, it shows the total of hours you spent reading it (which correlates with the total amount of hours it takes to read each book)? Is there a way to add those numbers?
This would imply changing the number of hours in each finished book, so I don't know if it's manageable.
Karmylla is offline   Reply With Quote
Old 01-07-2019, 04:39 PM   #9
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: 1,051
Karma: 2579295
Join Date: May 2016
Location: Ontario, Canada
Device: Kobo Mini, Kobo Aura Edition 2, Moto G5
Quote:
Originally Posted by Karmylla View Post
Ok, so, you know how in each book's statistics, it shows the total of hours you spent reading it (which correlates with the total amount of hours it takes to read each book)? Is there a way to add those numbers?
This would imply changing the number of hours in each finished book, so I don't know if it's manageable.
Yes, but you'd need to do it for each book manually (until I finish reverse-engineering the checksum, which is quite a fun [but time consuming] challenge). To set the amount of time added in the patch, convert it to seconds, then go here: http://armconverter.com/ and enter MOVW R0, #65535, where 65535 is the number of seconds to add (65535 is the max). Then, copy the output in the Thumb HEX box into the ReplaceH part of the patch.
geek1011 is offline   Reply With Quote
Reply

Tags
database, event, koboreader.sqlite, reading stats, sqlite

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
KoboReader.sqlite: export and reimport annotations or edit gabryele Kobo Reader 1 05-25-2017 01:15 AM
Decode sqlite Event ExtraData BLOB NoOneHere Kobo Developer's Corner 1 03-16-2016 07:43 PM
Aura KoboReader.Sqlite help (stats lost) Skyfall Kobo Developer's Corner 6 03-29-2015 06:21 AM
Glo koboreader.sqlite File LaLaLia Kobo Reader 3 10-05-2014 09:05 PM
Koboreader.sqlite gundged maxwelledison Kobo Reader 21 01-12-2011 09:24 AM


All times are GMT -4. The time now is 07:59 PM.


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