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 05-05-2014, 08:36 AM   #76
Nick_1964
Bookworm
Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.
 
Nick_1964's Avatar
 
Posts: 975
Karma: 768585
Join Date: Aug 2010
Location: Netherlands
Device: Sony prs-650, Kobo Glo HD (2x), Kobo Glo
Quote:
Originally Posted by tshering View Post
There must have happened something more than that. According to your earlier description, calibre refused to interact with the device on account of the firmware version. This shows that at that point, calibre had access to the database, and that therefore we can know that windows was able to find a driver (the generic mass storage driver). The usb problem appeared only later.
I did a short test. I modified the data on the device in a way that it identifies itself as eReader-99.10. As expected, windows does connect to the ereader.
But, did calibre recognises it to??... I only know that in between the reader does rebooted twice... I can try to repeat it, but I don't know the steps exactly anymore.. what I do noticed 5 seconds ago, my weather and Boat/plane radar system ( works on sended transponders on boats or planes ) doesn't work also.
All connected to a D-Link 7 ports USB hub.
So I put the input of the hub to another usb port on the computer.. all that stupid things are asking for drivers already installed but when you put them on another port,you have to re-install it again.. Then put it back again to the old one and there are my weather station and flight data again.
On my desk are 2 USB cables.. one connected to the D-Link, but second one is connected to the rear of the computer directly.
I know I did powered of and on the reader when used option one,because calibre say it could not read it's database.. some guy on the internet has written,when this happens restart your reader again without power supply cable attached... maybe I have switched then the cables and connected my reader on the D-Link that already was in error but I didn't was aware of until now.... that could do a lot of explaining... still not why it tries to download the firmware while it already was patched with version two..but it can explain the USB hussle.
I really don't know it anymore... option 2 works, calibre can read the database,what happened in between.. we would never know, I don't think I can reproduce it anymore... patch number two still stays the most good one..because with one it was at that moment attached to a working USB port like you say my dear Sherlock, but can't be read by calibre.
Nick_1964 is offline   Reply With Quote
Old 05-06-2014, 06:15 AM   #77
tshering
Wizard
tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.
 
Posts: 3,489
Karma: 2914715
Join Date: Jun 2012
Device: kobo touch
Quote:
Originally Posted by Nick_1964 View Post
But, did calibre recognises it to??...
I am not a calibre user and did not try. But I expect calibre to recognise it. Sorry for the late reply.
tshering is offline   Reply With Quote
Old 05-06-2014, 11:11 AM   #78
Nick_1964
Bookworm
Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.
 
Nick_1964's Avatar
 
Posts: 975
Karma: 768585
Join Date: Aug 2010
Location: Netherlands
Device: Sony prs-650, Kobo Glo HD (2x), Kobo Glo
With all crosses red, tried patch 1 again, this time no strange things but calibre says it doesn't understand the database on my reader, not even when I changed the driver into future versions, so back to number two again and calibre recognised it, I didn't tried to sync on number one,because of number one somehow failed I am on the wrong firmware,did sync on the second patch again, this time sync went okay, no update received.
Nick_1964 is offline   Reply With Quote
Old 05-17-2014, 04:54 AM   #79
doctorbook
Junior Member
doctorbook began at the beginning.
 
Posts: 6
Karma: 10
Join Date: May 2014
Device: Kobo Aura HD, Kindle Paperwhite
This patch works very well on firmware 3.1.1.

# Firmware 3.1.1 (761b066420)

<Patch>
patch_name = `prevent firmware update`
patch_enable = `yes`
# alternative 1
#change `5.0.0` , `99.10` , `999.9` or similar
#replace_string = 01105C10, `3.1.1`, `99.10`
# alternative 2
replace_string = 01106BB0, `https://api.kobobooks.com/1.0/UpgradeCheck/%1/%2/%3/%4/%5`, `https://api.kobobooks.com/1.0/UpgradeCheck/%1/%2/%3/9.9/N`
# alternative 3
#replace_string = 01106BB0, `https://api.kobobooks.com/1.0/UpgradeCheck/%1/%2/%3/%4/%5`, `https://api.kobobooks.com/1.0/UpgradeCheck/%1/%2/k/99.9/N`
</Patch>

Its creator has done an excellent job. Congratulations!
My question is: is it possible to create a version that works on firmware 3.2.0 or 3.3.0?
Thanks

I apologize for my bad English (google translator)
doctorbook is offline   Reply With Quote
Old 05-20-2014, 06:40 AM   #80
tshering
Wizard
tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.
 
Posts: 3,489
Karma: 2914715
Join Date: Jun 2012
Device: kobo touch
Quote:
Originally Posted by doctorbook View Post
My question is: is it possible to create a version that works on firmware 3.2.0 or 3.3.0?
You just need to replace 01106BB0 of the 3.1.1 version by the position of the string https://api.kobobooks.com/1.0/UpgradeCheck/%1/%2/%3/%4/%5 in libnickel.so.1.0.0. (The first byte of the file has the position 0). You cannot do any harm, since the patch executable will refuse to do the job if you set a wrong position value.
tshering is offline   Reply With Quote
Old 05-20-2014, 11:23 AM   #81
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 46,288
Karma: 169098402
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by doctorbook View Post
This patch works very well on firmware 3.1.1.

Its creator has done an excellent job. Congratulations!
My question is: is it possible to create a version that works on firmware 3.2.0 or 3.3.0?
Thanks

I apologize for my bad English (google translator)
For 3.3.0, you can try:
Code:
<Patch>
patch_name = `prevent firmware update`
patch_enable = `yes`
# alternative 1
#change `5.0.0` , `99.10` , `999.9` or similar
#replace_string = C3E87C, `3.1.1`, `5.9.9`
# alternative 2
replace_string = C48280, `https://api.kobobooks.com/1.0/UpgradeCheck/%1/%2/%3/%4/%5`, `https://api.kobobooks.com/1.0/UpgradeCheck/%1/%2/%3/9.9/N`
# alternative 3
#replace_string = C48280, `https://api.kobobooks.com/1.0/UpgradeCheck/%1/%2/%3/%4/%5`, `https://api.kobobooks.com/1.0/UpgradeCheck/%1/%2/k/99.9/N`
</Patch>
For 3.3.1 you can try:
Code:
<Patch>
patch_name = `prevent firmware update`
patch_enable = `yes`
# alternative 1
#change `5.0.0` , `99.10` , `999.9` or similar
#replace_string = C41874, `3.1.1`, `5.9.9`
# alternative 2
replace_string = C4B2A0, `https://api.kobobooks.com/1.0/UpgradeCheck/%1/%2/%3/%4/%5`, `https://api.kobobooks.com/1.0/UpgradeCheck/%1/%2/%3/9.9/N`
# alternative 3
#replace_string = C4B2A0, `https://api.kobobooks.com/1.0/UpgradeCheck/%1/%2/%3/%4/%5`, `https://api.kobobooks.com/1.0/UpgradeCheck/%1/%2/k/99.9/N`
</Patch>
Regards,
David
DNSB is offline   Reply With Quote
Old 05-20-2014, 01:35 PM   #82
doctorbook
Junior Member
doctorbook began at the beginning.
 
Posts: 6
Karma: 10
Join Date: May 2014
Device: Kobo Aura HD, Kindle Paperwhite
Thank you. You guys are great! I try now to apply the patch for 3.3.0.

Quote:
Originally Posted by tshering View Post
You just need to replace 01106BB0 of the 3.1.1 version by the position of the string https://api.kobobooks.com/1.0/UpgradeCheck/%1/%2/%3/%4/%5 in libnickel.so.1.0.0. (The first byte of the file has the position 0). You cannot do any harm, since the patch executable will refuse to do the job if you set a wrong position value.
I did not understand. Could you explain in a simpler way?
OK I need to replace string 01106BB0 of the 3.1.1 version but...
How do I find the number of the string to the file libnickel?


Last edited by doctorbook; 05-20-2014 at 01:38 PM.
doctorbook is offline   Reply With Quote
Old 05-20-2014, 01:54 PM   #83
doctorbook
Junior Member
doctorbook began at the beginning.
 
Posts: 6
Karma: 10
Join Date: May 2014
Device: Kobo Aura HD, Kindle Paperwhite
I tried the patch for version 3.3.0 but it seems that does not work.
kpg.exe does not create the file koboroot.tgz

<Patch>
patch_name = `prevent firmware update`
patch_enable = `yes`
# alternative 1
#change `5.0.0` , `99.10` , `999.9` or similar
#replace_string = C3E87C, `3.1.1`, `5.9.9`
# alternative 2
replace_string = C48280, `https://api.kobobooks.com/1.0/UpgradeCheck/%1/%2/%3/%4/%5`, `https://api.kobobooks.com/1.0/UpgradeCheck/%1/%2/%3/9.9/N`
# alternative 3
#replace_string = C48280, `https://api.kobobooks.com/1.0/UpgradeCheck/%1/%2/%3/%4/%5`, `https://api.kobobooks.com/1.0/UpgradeCheck/%1/%2/k/99.9/N`
</Patch>

Last edited by doctorbook; 05-20-2014 at 01:56 PM.
doctorbook is offline   Reply With Quote
Old 05-20-2014, 07:17 PM   #84
tshering
Wizard
tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.
 
Posts: 3,489
Karma: 2914715
Join Date: Jun 2012
Device: kobo touch
Quote:
Originally Posted by doctorbook View Post
I tried the patch for version 3.3.0 but it seems that does not work.
At the moment, I cannot find https://api.kobobooks.com in FW 3.3.0 and 3.3.1, but since DNSB evidently sees them, this might just be me.

Edit: DNSB has of course the correct address. The encoding however has changed. Each char is now two bytes. For our purpose, every second byte has to have a value of 0; e.g. h\x00t\x00t\x00p\x00s\x00:\x00/\x00/\x00a\x00p\x00i\x00 instead of https://api. I am in a hurry and cannot write the code myself now. Edit 2: Looking at it again, I think it would be more appropriate to interpret the pattern as \x00h instead of h\x00 and so on, and decrease the offset by one.

Another thought: Couldn't we try to prevent the updating by redirecting the url in the host file, rather than patching the library?

Last edited by tshering; 05-21-2014 at 11:44 AM.
tshering is offline   Reply With Quote
Old 05-20-2014, 10:23 PM   #85
Nick_1964
Bookworm
Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.
 
Nick_1964's Avatar
 
Posts: 975
Karma: 768585
Join Date: Aug 2010
Location: Netherlands
Device: Sony prs-650, Kobo Glo HD (2x), Kobo Glo
Quote:
Originally Posted by tshering View Post
At the moment, I cannot find https://api.kobobooks.com in FW 3.3.0 and 3.3.1, but since DNSB evidently sees them, this might just be me.

Edit: DNSB has of course the correct address. The encoding however has changed. Each char is now two bytes. For our purpose, every second byte has to have a value of 0; e.g. h\x00t\x00t\x00p\x00s\x00:\x00/\x00/\x00a\x00p\x00i\x00 instead of https://api. I am in a hurry and cannot write the code myself now.

Another thought: Couldn't we try to prevent the updating by redirecting the url in the host file, rather than patching the library?
After patching the 5 of the keyboard is replaced by an N, i can't type in my password with wifi, the 5 is in it but its gone...
Nick_1964 is offline   Reply With Quote
Old 05-20-2014, 11:22 PM   #86
GeoffR
Wizard
GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.
 
GeoffR's Avatar
 
Posts: 3,821
Karma: 19162882
Join Date: Nov 2012
Location: Te Riu-a-Māui
Device: Kobo Glo
Quote:
Originally Posted by tshering View Post
Edit: DNSB has of course the correct address. The encoding however has changed. Each char is now two bytes. For our purpose, every second byte has to have a value of 0; e.g. h\x00t\x00t\x00p\x00s\x00:\x00/\x00/\x00a\x00p\x00i\x00 instead of https://api. I am in a hurry and cannot write the code myself now.
These are C++ QString objects, they have length, character width, and some other fields preceding the string of 16-bit characters. if you modify them you need to either keep the length of the string unchanged, or else update the length field. and add a 16-bit null terminator \x00\x00.

Last edited by GeoffR; 05-21-2014 at 03:37 PM. Reason: null terminator not needed for QString
GeoffR is offline   Reply With Quote
Old 05-20-2014, 11:23 PM   #87
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
Posts: 13,533
Karma: 78910202
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
Quote:
Originally Posted by Nick_1964 View Post
After patching the 5 of the keyboard is replaced by an N, i can't type in my password with wifi, the 5 is in it but its gone...
LOL... I'm sure I had mentioned that back in a post when I was trying the WiFi patch at one point....


Sure did See https://www.mobileread.com/forums/sho...1&postcount=72

Dumb suggestion though. Change the replace string from ending in 9/N to 9/5
PeterT is offline   Reply With Quote
Old 05-20-2014, 11:48 PM   #88
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 46,288
Karma: 169098402
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by doctorbook View Post
I tried the patch for version 3.3.0 but it seems that does not work.
kpg.exe does not create the file koboroot.tgz
My apologies for not testing the patch properly. The address is correct but the string now has a different format and the replace_string function does not work with it. I suspect a unicode replace would work however the string starts with some extra information and terminates with a \x00\x00 pair. This would make keeping the string length the same rather important.

A quick look at the 3.3.1 libnickel file suggests the 39 at C4B294 is the string length (0x39 or 57 decimal), the 10 at C4B29C is the character width (0x10 or 16) and the 114 bytes from C4B2A0 to C4B311 are the 57 characters in the string while the 2 \x00 characters at C4B312 are the terminating null character.

The easiest way to make the change might be just to do a replace byte on the %4 string.

Something like:
3.3.1
replace_bytes = C4B308, 25 00 34 00, 39 00 39 00

3.3.0
replace_bytes = C482E8, 25 00 34 00, 39 00 39 00

Which keeps the length of the string the same but changes %4 to 99 which should make the wireless update dysfunctional. And we can hope no other chunk of code references that substring.


Regards,
David

Last edited by DNSB; 05-21-2014 at 12:15 AM. Reason: Add 3.3.0 suggested change
DNSB is offline   Reply With Quote
Old 05-21-2014, 12:04 AM   #89
GeoffR
Wizard
GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.
 
GeoffR's Avatar
 
Posts: 3,821
Karma: 19162882
Join Date: Nov 2012
Location: Te Riu-a-Māui
Device: Kobo Glo
Quote:
Originally Posted by PeterT View Post
LOL... I'm sure I had mentioned that back in a post when I was trying the WiFi patch at one point....


Sure did See https://www.mobileread.com/forums/sho...1&postcount=72

Dumb suggestion though. Change the replace string from ending in 9/N to 9/5
This is probably due to a compiler optimisation: If there are two objects with common members such as strings "abc" and "bc", and both are known to be constants, then the compiler can save some space by overlapping them in memory.
GeoffR is offline   Reply With Quote
Old 05-21-2014, 12:29 AM   #90
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
Posts: 13,533
Karma: 78910202
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
Quote:
Originally Posted by GeoffR View Post
This is probably due to a compiler optimisation: If there are two objects with common members such as strings "abc" and "bc", and both are known to be constants, then the compiler can save some space by overlapping them in memory.
Exactly. Scares me as to what OTHER optimizations we might be mucking with!
PeterT is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Firmware not updating (M92) martienne Onyx Boox 9 02-14-2014 06:03 AM
Updating with EU-firmware Eures Amazon Kindle 5 01-20-2012 09:37 AM
Not updating firmware? zeekthegeek Kobo Reader 1 03-30-2011 10:20 PM
Firmware Update Please help on updating K2 firmware from 2.3 to 2.5 PS Kindle Amazon Kindle 13 01-21-2011 11:49 AM
Firmware Update Preventing firmware upgrade kindoru Amazon Kindle 5 05-04-2010 07:50 PM


All times are GMT -4. The time now is 09:25 AM.


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