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 11-01-2013, 06:05 AM   #16
cosmo666
Member
cosmo666 began at the beginning.
 
Posts: 13
Karma: 10
Join Date: Oct 2013
Device: prs-650, kobo aura
yes davidfor, i saw the options for using book covers as screensavers. however, i was thinking of swapping the affiliate screensaver with something else, which is not a book cover but a personal pic, and which is shown every time regardless of which book is read(the device would thing, for all intents and purposes, that it is showing the affiliate screensaver). i believe this would, in essence, become a true custom saver, which was what the OP wanted (and i myself as well).

this is what i aim to do, but i lack the programming knowledge to dig through this, hence here i am, trying to see if there are any ideea of how to find the affiliate picture stored on the device.


(p.s.- sorry to everyone for the triple post regarding the screensaver affiliates)
cosmo666 is offline   Reply With Quote
Old 11-01-2013, 06:35 AM   #17
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: 24,907
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Sorry, I didn't reread the thread and missed that part.

The images for each affiliate are probably compiled into the libraries somewhere. They aren't in the visible part of the drive and they don't seem to be separate images in the firmware files.

From looking at the libraries on the device, there is a string ":/images/dialogs/mondadori_%2_%1.png" plus one for some of the other affiliates. Creating a file with the correct name and type in the correct place might do it.

From something PeterT posted, I think "%2" will be either "black" or "white". And "%1" is the codename that Kobo use for the device. This is "trilogy" for the Touch, "pixie" - Mini, "kraken" - Glo, "dragon" - Aura HD and "phoenix" - Aura.

The problem then is where. I ".kobo/images/dialogs". It didn't work, but, the sleep screen wasn't displayed properly. That might mean that the resolution or dimensions of the image wasn't correct. Or maybe I had the file name wrong. Or I have drawn a completely wrong conclusion.
davidfor is offline   Reply With Quote
Old 11-01-2013, 11:59 AM   #18
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 davidfor View Post
From looking at the libraries on the device, there is a string ":/images/dialogs/mondadori_%2_%1.png" plus one for some of the other affiliates. Creating a file with the correct name and type in the correct place might do it.
It seems ":/images/dialogs/mondadori_%2_%1.png" points rather to the compiled-in resource and does therefore not correspond to any location of the file system of the device, cf. this description. But then it becomes difficult to explain why your putting an image file in .kobo/images/dialogs did have an effect.
tshering is offline   Reply With Quote
Old 11-01-2013, 12:45 PM   #19
cosmo666
Member
cosmo666 began at the beginning.
 
Posts: 13
Karma: 10
Join Date: Oct 2013
Device: prs-650, kobo aura
but if the pointer is ":/images/dialogs/mondadori_%2_%1.png" , that means the file should be a png file, most likely called mondadori_%2_%1.png. also, for the aura there is no "dialogs" folder... where did you find that line? (i even deleted the whole images folder, and it still showed the affiliate screen)

also, there is 1 mb of data that i can't find (between drive properties->used space, and all file properties). this could be partition data, or probably the elusive pngs? the only script-like files that i see are a 238kb file in kepub, and a 352kb koboreader.sqlite in root. all the others are confs, or dictionaries, and a xml that has device info on it. it feels like it's way too small. could there be a hidden system partition or something?
cosmo666 is offline   Reply With Quote
Old 11-01-2013, 01:12 PM   #20
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 cosmo666 View Post
but if the pointer is ":/images/dialogs/mondadori_%2_%1.png" , that means the file should be a png file, most likely called mondadori_%2_%1.png.
As David suggested %1 and %2 are variables.

Quote:
Originally Posted by cosmo666 View Post
also, for the aura there is no "dialogs" folder... where did you find that line? (i even deleted the whole images folder, and it still showed the affiliate screen)
David found it presumably in nickel or libnickel.so.1.0.0. In libnickel.so.1.0.0 of FW 2.6.1, you can find for instance :/images/dialogs/mondadori_sleep_%1.png.

Quote:
Originally Posted by cosmo666 View Post
also, there is 1 mb of data that i can't find (between drive properties->used space, and all file properties). this could be partition data, or probably the elusive pngs? the only script-like files that i see are a 238kb file in kepub, and a 352kb koboreader.sqlite in root. all the others are confs, or dictionaries, and a xml that has device info on it. it feels like it's way too small. could there be a hidden system partition or something?
The path :/images/dialogs/ refers to the file system of the developer's machine, not on the kobo device. The image files were there at the time of compilation. On the kobo device the image files are inside of a file, probably libnickel.so.1.0.0 or nickel (in any case, it should be in the same file as the :/images/dialogs/... string).

Last edited by tshering; 11-01-2013 at 01:22 PM.
tshering is offline   Reply With Quote
Old 11-01-2013, 01:13 PM   #21
cosmo666
Member
cosmo666 began at the beginning.
 
Posts: 13
Karma: 10
Join Date: Oct 2013
Device: prs-650, kobo aura
the alias thing tshering linked at is pretty interesting. perhaps there is a function that calls ":/images/dialogs/mondadori_%2_%1.png" and is supposed to return NULL, and a file with that name messes it up? though that would be sloppy coding...
also, i wonder if aliases can change the name/extension of the file as well, like declaring strings.
cosmo666 is offline   Reply With Quote
Old 11-01-2013, 01:19 PM   #22
Ken Maltby
Wizard
Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.
 
Ken Maltby's Avatar
 
Posts: 4,465
Karma: 6900052
Join Date: Dec 2009
Location: The Heart of Texas
Device: Boox Note2, AuraHD, PDA,
It wouldn't matter where the image is if you can avoid asking for it in the suspend and poweroff routines. If someone were to patch in code just before the call image to display that was something like: If exists Root /myscreen.png then use that and skip the image selection code. Then all you would need to do is add your own .png in the root.
Or something like that.

Luck;
Ken
Ken Maltby is offline   Reply With Quote
Old 11-01-2013, 01:26 PM   #23
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 Ken Maltby View Post
It wouldn't matter where the image is if you can avoid asking for it in the suspend and poweroff routines. If someone were to patch in code just before the call image to display that was something like: If exists Root /myscreen.png then use that and skip the image selection code. Then all you would need to do is add your own .png in the root.
Or something like that.

Luck;
Ken
For poweroff this can be done. KevinShort explained it somewhere. I have it done on my reader and it works fine.
tshering is offline   Reply With Quote
Old 11-01-2013, 01:29 PM   #24
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.
 
PeterT's Avatar
 
Posts: 12,166
Karma: 73448616
Join Date: Nov 2007
Location: Toronto
Device: Nexus 7, Clara, Touch, Tolino EPOS
If you want a slightly convoluted approach that should be independent of changes by Lobo try writing a program based on the fmon add-on that monitors for a call to open the image to be used as the default screensaver and overwrite that file by the desired image.
PeterT is offline   Reply With Quote
Old 11-01-2013, 01:33 PM   #25
cosmo666
Member
cosmo666 began at the beginning.
 
Posts: 13
Karma: 10
Join Date: Oct 2013
Device: prs-650, kobo aura
Quote:
Originally Posted by tshering View Post
As David suggested %1 and %2 are variables.
ofc, but they would point to files with a name according to the variable. i didn't expect it to be writen the same in code.



Quote:
David found it presumably in nickel or libnickel.so.1.0.0. In libnickel.so.1.0.0 of FW 2.6.1, you can find for instance :/images/dialogs/mondadori_sleep_%1.png.
and where exactly can i find these nickel files? i suspect i'm not seing everything. is there a separate system partition that is not fat32? also, any way to make it visible on windows? the only thing i see on my device is a fat 32 partition with 32mb (atm) used, 18 of which are book covers. hardly enough for an os or libraries.


Quote:
The path :/images/dialogs/ refers to the file system of the developer's machine, not on the kobo device. The image files were there at the time of compilation. On the kobo device the image files are inside of a file, probably libnickel.so.1.0.0 or nickel
i see.... hmm, if that's the file source they used to compile from, should the destination not be close by, giving us the information the png was put under? some line of code should call this location or the function it's declared under. damn, i'd love to look into these files...
cosmo666 is offline   Reply With Quote
Old 11-01-2013, 01:37 PM   #26
cosmo666
Member
cosmo666 began at the beginning.
 
Posts: 13
Karma: 10
Join Date: Oct 2013
Device: prs-650, kobo aura
Quote:
Originally Posted by PeterT View Post
If you want a slightly convoluted approach that should be independent of changes by Lobo try writing a program based on the fmon add-on that monitors for a call to open the image to be used as the default screensaver and overwrite that file by the desired image.
exactly what i am trying to do, although without the code. at least at first.
would still require de/recompilaition though...
cosmo666 is offline   Reply With Quote
Old 11-01-2013, 02:01 PM   #27
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 cosmo666 View Post
and where exactly can i find these nickel files? i suspect i'm not seing everything. is there a separate system partition that is not fat32? also, any way to make it visible on windows? the only thing i see on my device is a fat 32 partition with 32mb (atm) used, 18 of which are book covers. hardly enough for an os or libraries.
Yes, there is a system partition. You can find nickel and so on in the FW update files.
tshering is offline   Reply With Quote
Old 11-01-2013, 02:13 PM   #28
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 PeterT View Post
If you want a slightly convoluted approach that should be independent of changes by Lobo try writing a program based on the fmon add-on that monitors for a call to open the image to be used as the default screensaver and overwrite that file by the desired image.
Do you think it would be possible to overwrite the lines

Code:
echo %1 > /sys/power/state-extended
echo mem > /sys/power/state
of libnickel by a call to a user script which prints the picture and then executes these two lines ("1" instead of "%1")?
tshering is offline   Reply With Quote
Old 11-01-2013, 03:05 PM   #29
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.
 
PeterT's Avatar
 
Posts: 12,166
Karma: 73448616
Join Date: Nov 2007
Location: Toronto
Device: Nexus 7, Clara, Touch, Tolino EPOS
Not sure but I will admit to being semi baffled. I've been using strace to monitor nicket and see no sign of it reading an image to display the screen saver. I must be missing something!
PeterT is offline   Reply With Quote
Old 11-01-2013, 03:10 PM   #30
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
In older FWs the PNG streams are in libnickel.so.1.0.0, in newer FWs (I have only 2.8.1b), they are in nickel. The streams start with \x89PNG (full signature is 89 50 4E 47 0D 0A 1A 0A) and end with IEND.

Last edited by tshering; 11-01-2013 at 03:17 PM.
tshering is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with custom screensaver hack HarryPottersWand Amazon Kindle 1 12-29-2012 05:30 PM
Hacks K3 custom screensaver w ads just_jeepin Amazon Kindle 0 08-31-2012 03:58 PM
KT with SO + Custom Screensaver 2.0 kerotan Amazon Kindle 1 02-04-2012 11:46 PM
Hacks Corrupted Custom Screensaver (K3) twowheels Amazon Kindle 0 01-09-2012 03:34 PM


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


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