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

Go Back   MobileRead Forums > E-Book Readers > Amazon Kindle > Kindle Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 06-15-2016, 12:52 PM   #1
encol
Zealot
encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.
 
Posts: 123
Karma: 317338
Join Date: Apr 2016
Device: Kindle PW3 5.7.4.1
Customize title bar

Hello, there is any way to customize the title bar in recent firmwares?

I tried this but doesn't work
encol is offline   Reply With Quote
Old 06-15-2016, 08:20 PM   #2
geekmaster
Grand Sorcerer
geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.
 
geekmaster's Avatar
 
Posts: 6,046
Karma: 9434698
Join Date: Nov 2011
Device: Kindles,Nooks,etc.
Your link shows ixtab's older method:
PHP Code:
lipc-set-prop com.lab126.pillow configureChrome '{"appId":"com.lab126.booklet.home","titleBar":{"clientParams":{"secondary":"Hello World","useDefaultPrimary":false}}}' 
I recently tried the method in Branch Delay's jb, and it worked for me on newer firmware:
PHP Code:
lipc-set-prop com.lab126.pillow configureChrome "{\"titleBar\":{\"clientParams\":{\"secondary\":\"Hello World\",\"useDefaultPrimary\":false}}}" 
I see that Branch Delay escaped the inner quotes, rather than a mixture of single and double quotes, so he could pass in a parameter.

The important difference here is that he removed "appId:com.lab126.booklet.home" [does it really need those extra quotes?] from the older method.

Try it and report back.

Last edited by geekmaster; 06-15-2016 at 08:54 PM.
geekmaster is online now   Reply With Quote
Old 06-15-2016, 08:53 PM   #3
geekmaster
Grand Sorcerer
geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.
 
geekmaster's Avatar
 
Posts: 6,046
Karma: 9434698
Join Date: Nov 2011
Device: Kindles,Nooks,etc.
I tried to test this on my PW2 using USBnet (because flaky touchscreen). On this computer I have Tobii eye tracker drivers installed for some of my eye tracker development. My eye tracker device is not plugged in. My PW3 is detected as a Tobii eye tracker "networking device" and the WRONG DRIVERS are loaded into win10!

I was able to configure an IP address anyway, even though it identified as a Tobii eye tracker instead of RNDIS. It must just be a customized RNDIS driver. I got in via ssh on my win10 bash shell.

The lipc command fails on my recent firmware too. It worked on 5.6.5. Here was the reported error:
PHP Code:
com.lab126.pillow failed to set value for property configureChrome (0x8 lipcErrNoSuchProperty
It seems that recent firmware no longer supports the "configureChrome" lipc property.

Last edited by geekmaster; 06-16-2016 at 12:17 AM.
geekmaster is online now   Reply With Quote
Old 06-16-2016, 12:18 AM   #4
geekmaster
Grand Sorcerer
geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.
 
geekmaster's Avatar
 
Posts: 6,046
Karma: 9434698
Join Date: Nov 2011
Device: Kindles,Nooks,etc.
Looking for an alternate method. Perhaps they renamed something for obfuscation purposes...
geekmaster is online now   Reply With Quote
Old 06-16-2016, 01:42 AM   #5
geekmaster
Grand Sorcerer
geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.
 
geekmaster's Avatar
 
Posts: 6,046
Karma: 9434698
Join Date: Nov 2011
Device: Kindles,Nooks,etc.
A clue:
PHP Code:
[root@kindle bin]# lipc-probe -a|grep -B3 configureChrome
com.lab126.chromebar
        w       Str     activityIndicator
        w       Str     searchResults
        w       Str     configureChrome
[root@kindle bin]
And with that clue, changing "pillow" to "chromebar" in both examples, they work!

Ixtab's method (updated):
PHP Code:
lipc-set-prop com.lab126.chromebar configureChrome '{"appId":"com.lab126.booklet.home","titleBar":{"clientParams":{"secondary":"Hello World","useDefaultPrimary":false}}}' 
Branch Delay's method (updated):
PHP Code:
lipc-set-prop com.lab126.chromebar configureChrome "{\"titleBar\":{\"clientParams\":{\"secondary\":\"Hello Again\",\"useDefaultPrimary\":false}}}" 
Executing those two examples in sequence will change the display title to "Hello World", then to "Hello Again". It worked on my PW2 with the latest firmware. My PW3 still needs a jailbreak, which needs a TTL serial adapter, and those are still in hiding...

Now please tell me my time and effort was worth some karma. I also discovered some REALLY interesting stuff that will allow me to display interactive custom "pillow" forms from simple scripts, with my own contents. I could implement something like KUAL with pretty much just a lipc command and a long string of custom parameters...

Last edited by geekmaster; 06-16-2016 at 02:02 AM.
geekmaster is online now   Reply With Quote
Old 06-16-2016, 03:52 AM   #6
encol
Zealot
encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.
 
Posts: 123
Karma: 317338
Join Date: Apr 2016
Device: Kindle PW3 5.7.4.1
Thanks for your reply!


Quote:
Originally Posted by geekmaster View Post
Ixtab's method (updated):
PHP Code:
lipc-set-prop com.lab126.chromebar configureChrome '{"appId":"com.lab126.booklet.home","titleBar":{"clientParams":{"secondary":"Hello World","useDefaultPrimary":false}}}' 
this doesn't work for me (nothing happens), but:

Quote:
Originally Posted by geekmaster View Post
Branch Delay's method (updated):
PHP Code:
lipc-set-prop com.lab126.chromebar configureChrome "{\"titleBar\":{\"clientParams\":{\"secondary\":\"Hello Again\",\"useDefaultPrimary\":false}}}" 
this works!


Quote:
Originally Posted by geekmaster View Post
Now please tell me my time and effort was worth some karma.
huge karma for you

Quote:
Originally Posted by geekmaster View Post
I also discovered some REALLY interesting stuff that will allow me to display interactive custom "pillow" forms from simple scripts, with my own contents. I could implement something like KUAL with pretty much just a lipc command and a long string of custom parameters...
Very interesting... i'll wait for this!

Last edited by encol; 06-16-2016 at 04:05 AM.
encol is offline   Reply With Quote
Old 06-16-2016, 11:40 AM   #7
encol
Zealot
encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.
 
Posts: 123
Karma: 317338
Join Date: Apr 2016
Device: Kindle PW3 5.7.4.1
any way to change/add icons in the titlebar?
encol is offline   Reply With Quote
Old 06-16-2016, 01:00 PM   #8
geekmaster
Grand Sorcerer
geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.
 
geekmaster's Avatar
 
Posts: 6,046
Karma: 9434698
Join Date: Nov 2011
Device: Kindles,Nooks,etc.
Quote:
Originally Posted by encol View Post
any way to change/add icons in the titlebar?
Check out the battery pecentage icon change in the KUAL extension. Not sure if title can contain unicode/utf-8 "icon" characters -- worth a try (though it may vary with font, default language, or firmware version).

Last edited by geekmaster; 06-16-2016 at 01:03 PM.
geekmaster is online now   Reply With Quote
Old 06-16-2016, 01:56 PM   #9
encol
Zealot
encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.
 
Posts: 123
Karma: 317338
Join Date: Apr 2016
Device: Kindle PW3 5.7.4.1
Quote:
Originally Posted by geekmaster View Post
Check out the battery pecentage icon change in the KUAL extension. Not sure if title can contain unicode/utf-8 "icon" characters -- worth a try (though it may vary with font, default language, or firmware version).
in the script there is this check:
Code:
	# Broken on FW >= 5.5.x
	fw_is_supported="false"
	kpver="$(grep '^Kindle 5' ${ROOT}/etc/prettyversion.txt 2>&1)"
	khminver="$(echo ${kpver} | sed -n -r 's/^(Kindle)([[:blank:]]*)([[:digit:]]*)(\.)([[:digit:]]*)([[:digit:].]*)(.*?)$/\5/p')"
	if [ ${khminver} -lt 5 ] ; then
		fw_is_supported="true"
	fi

	if [ "${fw_is_supported}" == "false" ] ; then
		eips_print_bottom_centered "unsupported on your FW version, aborting" 0
		exit 1
	fi
it seems that new fws are not supported
encol is offline   Reply With Quote
Old 06-16-2016, 02:08 PM   #10
geekmaster
Grand Sorcerer
geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.
 
geekmaster's Avatar
 
Posts: 6,046
Karma: 9434698
Join Date: Nov 2011
Device: Kindles,Nooks,etc.
Quote:
Originally Posted by encol View Post
in the script there is this check:
Code:
	# Broken on FW >= 5.5.x
	fw_is_supported="false"
	kpver="$(grep '^Kindle 5' ${ROOT}/etc/prettyversion.txt 2>&1)"
	khminver="$(echo ${kpver} | sed -n -r 's/^(Kindle)([[:blank:]]*)([[:digit:]]*)(\.)([[:digit:]]*)([[:digit:].]*)(.*?)$/\5/p')"
	if [ ${khminver} -lt 5 ] ; then
		fw_is_supported="true"
	fi

	if [ "${fw_is_supported}" == "false" ] ; then
		eips_print_bottom_centered "unsupported on your FW version, aborting" 0
		exit 1
	fi
it seems that new fws are not supported
I will be busy so I cannot check until later. You may want to do a search for the missing functions with "lipc-probe -a" like I did (as posted previously) to find whatever they renamed. I think "chromebar" makes more sense than "pillow", actually...
geekmaster is online now   Reply With Quote
Old 06-17-2016, 01:41 AM   #11
geekmaster
Grand Sorcerer
geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.
 
geekmaster's Avatar
 
Posts: 6,046
Karma: 9434698
Join Date: Nov 2011
Device: Kindles,Nooks,etc.
I have been trying to figure out how to update icons on the titlebar, but in the meantime I simplified the command to update the title text. If you select the primary title, you do not need that last parameter that says to NOT use the primary title, like this:
PHP Code:
lipc-set-prop com.lab126.chromebar configureChrome '{"titleBar":{"clientParams":{"primary":"Hello \u2708"}}}' 
And as you can see, there is a UTF-8 airplane character in the title. Not the same as airplane mode, but there are lots of useful UTF-8 icon characters. That is a start...

Here are some more: http://csbruce.com/software/utf-8.html
geekmaster is online now   Reply With Quote
Old 06-17-2016, 02:59 AM   #12
encol
Zealot
encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.
 
Posts: 123
Karma: 317338
Join Date: Apr 2016
Device: Kindle PW3 5.7.4.1
Quote:
Originally Posted by geekmaster View Post
I have been trying to figure out how to update icons on the titlebar, but in the meantime I simplified the command to update the title text. If you select the primary title, you do not need that last parameter that says to NOT use the primary title, like this:
PHP Code:
lipc-set-prop com.lab126.chromebar configureChrome '{"titleBar":{"clientParams":{"primary":"Hello \u2708"}}}' 
And as you can see, there is a UTF-8 airplane character in the title. Not the same as airplane mode, but there are lots of useful UTF-8 icon characters. That is a start...

Here are some more: http://csbruce.com/software/utf-8.html
Thanks, this work fine!

I'm investigating about icons too, it seems we have to do some javascript, or edit the default_status_bar.html in the /usr/share/webkit-1.0/pillow folder

EDIT:

Quote:
Originally Posted by encol View Post
Ixtab's method (updated):
PHP Code:
lipc-set-prop com.lab126.chromebar configureChrome '{"appId":"com.lab126.booklet.home","titleBar":{"clientParams":{"secondary":"Hello World","useDefaultPrimary":false}}}' 

this doesn't work for me (nothing happens), but:
i was wrong, it worked, but i was in the wrong place (i was in the reader booklet): this method depends from the current booklet, my bad

Last edited by encol; 06-17-2016 at 03:04 AM.
encol is offline   Reply With Quote
Old 06-17-2016, 03:24 AM   #13
geekmaster
Grand Sorcerer
geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.
 
geekmaster's Avatar
 
Posts: 6,046
Karma: 9434698
Join Date: Nov 2011
Device: Kindles,Nooks,etc.
And of course, if you want to feed it a variable title like Branch Delay did, you can do it like this (also stuffed into a function like he used):
PHP Code:
title() {
  
VAL="{\"titleBar\":{\"clientParams\":{\"primary\":\"$@\"}}}"  
  
lipc-set-prop com.lab126.chromebar configureChrome "$VAL"
}

title Hello world!; sleep 3title "This;is;quoted." 
Much like 'echo', quotes are not needed except for some special chars like ';' or '$(', if we use the '$@' parameter instead of '$1'. But still safest to use quotes (and even then some things need a '\' to escape them);

I tried putting a Lenny Face ( ͡° ͜ʖ ͡°) on the title bar, but it does not pack the combined characters together, so the face is broken. However, if you want to try it anyway, here:
PHP Code:
title "\u0028\u0020\u0361\u00B0\u0020\u0035C\u0296\u0020\u0361\u00B0\u0029" 
My PW2 required those extra zeroes (4-digit UTF-8).

Last edited by geekmaster; 06-17-2016 at 04:06 AM.
geekmaster is online now   Reply With Quote
Old 06-17-2016, 04:30 AM   #14
geekmaster
Grand Sorcerer
geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.
 
geekmaster's Avatar
 
Posts: 6,046
Karma: 9434698
Join Date: Nov 2011
Device: Kindles,Nooks,etc.
Quote:
Originally Posted by encol View Post
I'm investigating about icons too, it seems we have to do some javascript, or edit the default_status_bar.html in the /usr/share/webkit-1.0/pillow folder
Actually, it looks like default_status_bar.css is the key. It defines loads of PNG images for progress spinner, radio signal strength, airplane mode, battery, and more. It also defines absolute positions and sizes. If you model code on that you could probably change the URLs to http:// addresses instead of relative addresses to the assets folder (worth a try), and use any images of appropriate size, though this may be firewall limited in some cases. And "statusBarRightIconDock" is probably of interest. Some variant of the existing battery icon KUAL extension would be needed. This stuff is all new to me, so not obvious at all...

What I could do practically in my sleep is direct framebuffer manipulation. Monitor the selected portion of the screen and when it changes re-blit the title image (pre-rendered text and/or images). You may see a quick glitch when it redraws over whatever just changed (perhaps every minute when the time changes, if the entire title bar redrawn). Redrawing the entire title bar seems inefficient and unlikely though. And native mode title bar updates would inevitably need to deal with when the title bar is hidden or rotated, and such...

But at least interrogatePillow is in libpillow.so, so a native mode C program could link to that, and its embedded functions probably use similar symbols as their javascript counterparts. But I am losing interest. Javascript is not what I want to mess with at the moment.

I hope some of what I posted above might be useful to somebody -- I spent plenty of time looking for interesting stuff. But my attention on this is spent -- other things are calling for my attention.

Last edited by geekmaster; 06-17-2016 at 10:46 AM.
geekmaster is online now   Reply With Quote
Old 06-17-2016, 06:34 AM   #15
encol
Zealot
encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.
 
Posts: 123
Karma: 317338
Join Date: Apr 2016
Device: Kindle PW3 5.7.4.1
Quote:
Originally Posted by geekmaster View Post
I hope some of what I posted above might be useful to somebody -- I spent plenty of time looking for interesting stuff. But my attention on this is spent -- other things are calling for my attention.
What you posted is very interesting to me, i have to investigate a bit more
encol is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I get rid of the title bar in Onyx Neo Reader? kuromusha Onyx Boox 1 07-18-2015 04:11 AM
Kepub Title Bar Patching aluisscp Kobo Reader 3 07-25-2014 06:02 AM
Glo Remove title bar when reading? ShellShock Kobo Reader 11 10-19-2012 05:43 AM
Pubit!/Add Title Previewer shows ellipsis in title bar schooner1892 General Discussions 0 09-15-2012 07:04 PM
Two Errors Title Bar and Book Titles Rifle-ben Amazon Kindle 2 04-13-2010 08:16 PM


All times are GMT -4. The time now is 12:05 PM.


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