![]() |
#31 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 645
Karma: 1888888
Join Date: Jun 2009
Device: prs-505, Kindle Keyboard 3g, PW3
|
Just downgraded to 5.7.4 factory on my PW3 from 5.9.something.
I did have to reboot between adding it into here, and running it. Code:
[root@kindle pillow]# head -n 5 debug_cmds.json { ";coplate" : "/var/local/flash.sh", ";dm" : "/usr/bin/dm.sh", ";dmcc" : "/usr/bin/dmcc.sh", ";dh" : "/usr/bin/dh.sh", [root@kindle pillow]# ls -alrt /var/local/flash.sh -rwxrwxrwx 1 root javauser 31 Aug 21 23:38 /var/local/flash.sh [root@kindle pillow]# reboot Broadcast message from root@kindle (/dev/pts/0) at 0:49 ... The system is going down for reboot NOW! [root@kindle pillow]# <reboot and reconnected to usbnet telnet, the kindle usbnet seems to be running on the ssh port until I rebooted a few more time.> Welcome to Kindle! ################################################# # N O T I C E * N O T I C E * N O T I C E # ################################################# Rootfs is mounted read-only. Invoke mntroot rw to switch back to a writable rootfs. ################################################# [root@kindle root]# tail -f /var/log/messages 170823:005221 cvm[4359]: at sun.net.www.http.HttpClient.New(Unknown Source) 170823:005221 cvm[4359]: at sun.net.www.http.HttpClient.New(Unknown Source) 170823:005221 cvm[4359]: at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source) 170823:005221 cvm[4359]: at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source) 170823:005221 cvm[4359]: at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source) 170823:005221 cvm[4359]: at com.amazon.kindle.restricted.content.instantsearch.f.smB(qge:653) 170823:005221 cvm[4359]: at com.amazon.kindle.restricted.content.instantsearch.f.run(qge:1711) 170823:005221 cvm[4359]: at java.lang.Thread.startup(Unknown Source) 170823:005221 cvm[4359]: I StoreSuggestionsProvider:Information::Waiting for new Instant Search Task 170823:005221 cvm[4359]: I InstantSearchProvider:Information::Waiting for new Instant Search Task 170823:005222 cvm[4359]: I HeapMonitor:HeapInfo:max=27262976,alloc=20410368,avail=7927896: 170823:005224 Xorg: I GestureEngine:perfScenario::Sending button 1 down 1503449544.306951 170823:005224 powerd[2280]: I lipc:evts:name=t1TimerReset, origin=com.lab126.powerd:Event sent 170823:005224 Xorg: I GestureEngine:perfScenario::Sending button 1 up 1503449544.540623 170823:005224 framework: perfScenario CVM posting KeyEvent[KeyPress] time=1503449544552 170823:005224 framework: perfScenario CVM posting KeyEvent[KeyRelease] time=1503449544553 170823:005224 cvm[4359]: I GoButtonTask:Information::Debug command entered 170823:005224 SCRIPTEXECUTOR[5883]: I script-Executor:main:Ready for execution:Command=/var/local/flash.sh 170823:005224 powerd[2280]: I def:battinfo:batt_type = PRIMARY, capav=94%, mAh=1371mAh, volt=4201mV, current=167mA, temp=78F, lmd=1408mAh, cycl=8: 170823:005224 powerd[2280]: I def:battinfo-misc:batt_type = PRIMARY caprep=94%, capmix=97%, mAhav=1371mAh, mAhmix=1378mAh: 170823:005229 cvm[4359]: W lipc:perf:prop=executeDebugCommand, source=com.lab126.system, ms=5027:lipc property access took too long 170823:005229 winmgr[3068]: I lua:window_manager::creating new trigger window=L:C_N:searchBar_ID:system_RC:true_KIWI:CVM, triggerType=0, flashFid=1, timeout=2000, afterDamageTimeout=0, flags=0 170823:005229 kb[3502]: I kb:close:data=com.amazon.kindle.inputMethod,log_candidate_selected=0:hide keyboard 170823:005229 kb[3502]: I kb:draw:id=0,language=en_US,languages=en_US,lang=1,diacritical=0:redraw keyboard |
![]() |
![]() |
![]() |
#32 |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 475
Karma: 445678
Join Date: Feb 2010
Device: Too many..
|
Coplate, Sorry!
Your search bar command did run! But I failed to see the small "0" it had printed in the top left corner. I checked the /var/log/messages: For your command, I got the identical log like yours: Code:
170823:191337 cvm[4740]: I GoButtonTask:Information::Debug command entered 170823:191337 SCRIPTEXECUTOR[6137]: I script-Executor:main:Ready for execution:Command=/var/local/flash.sh 170823:191342 cvm[4740]: W lipc:perf:prop=executeDebugCommand, source=com.lab126.system, ms=5026:lipc property access took too long Code:
170823:191637 cvm[4740]: I GoButtonTask:Information::Debug command entered 170823:191637 SCRIPTEXECUTOR[6524]: I script-Executor:main:Ready for execution:Command=/mnt/us/extensions/kterm/bin/kterm.sh 170823:191637 cvm[4740]: E def:jlipc:source=com.lab126.system,name=executeDebugCommand,value=;kt,errcode=2:LipcJNI cannot set string property 170823:191637 cvm[4740]: E GoButtonTask:Error::Cannot perform lipc set prop 170823:191637 cvm[4740]: com.amazon.kindle.util.lipc.LipcException: Cannot Set Property ErrCode=2 170823:191637 cvm[4740]: at com.lab126.linux.arm.LipcImpl.setProperty0(Native Method) 170823:191637 cvm[4740]: at com.lab126.linux.arm.LipcImpl.setProperty(crb:1233) 170823:191637 cvm[4740]: at com.amazon.kindle.util.lipc.impl.LipcTargetImpl.setProperty(uzb:1088) 170823:191637 cvm[4740]: at com.amazon.kindle.restricted.device.chrome.c.M.yK(lvd:488) 170823:191637 cvm[4740]: at com.amazon.kindle.restricted.device.chrome.k.run(poe:254) 170823:191637 cvm[4740]: at java.lang.Thread.run(Unknown Source) 170823:191637 cvm[4740]: at java.lang.Thread.startup(Unknown Source) Request our experts' help to understand these error messages! |
![]() |
![]() |
![]() |
#33 | ||
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 645
Karma: 1888888
Join Date: Jun 2009
Device: prs-505, Kindle Keyboard 3g, PW3
|
Quote:
Quote:
Code:
lipc-set-string com.lab126.system executeDebugCommand ";kt" I've only seen this before when trying to run a debug command that had special characters in it, like '%, |, &' and so on trying to inject commands. You've probably just run into some other protection, maybe 'kt' is reserved, or you cannot use /mnt/us in the command? Try putting that script into '/var/local' first, or put flash.sh into /mnt/us and see which one fails. |
||
![]() |
![]() |
![]() |
#34 |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 475
Karma: 445678
Join Date: Feb 2010
Device: Too many..
|
Thanks, coplate!
Already tried changing ";kt" to ";kterm" with the same result. Will try moving the script into /var/local or similar, as you suggested. All this works OK in the PW1! I checked the log - it only shows touch events when the shortcut commands are run. |
![]() |
![]() |
![]() |
#35 |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 475
Karma: 445678
Join Date: Feb 2010
Device: Too many..
|
I've tried the following, all with no result. Just keep getting the same error message in the logs (cannot set string property..):
I can try some more permutations, but doesn't look promising... |
![]() |
![]() |
![]() |
#36 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 645
Karma: 1888888
Join Date: Jun 2009
Device: prs-505, Kindle Keyboard 3g, PW3
|
#2 you said that mine worked, replacing the contenets of it shoudl still work.
What is the contents of your script that you put into it, still using ';coplate'? |
![]() |
![]() |
![]() |
#37 |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 475
Karma: 445678
Join Date: Feb 2010
Device: Too many..
|
Contents of "kterm.sh" is:
Code:
/mnt/us/extensions/kterm/bin/kterm If I replace the contents of "flash.sh", it only shows the errors in the log. |
![]() |
![]() |
![]() |
#38 | |
Going Viral
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Quote:
Check your scripting to see if there is anything dependent on the setting of the current working directory (pwd). |
|
![]() |
![]() |
![]() |
#39 |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 475
Karma: 445678
Join Date: Feb 2010
Device: Too many..
|
I changed coplate's script /var/local/flash.sh to:
Code:
#!/bin/sh sleep 5 eips 0 0 -f cd /mnt/us/extensions/kterm/bin/ ./kterm It printed a "0" in the top left corner. But kterm didn't run. Output from /var/log/messages: Code:
170826:233633 cvm[4579]: I GoButtonTask:Information::Debug command entered 170826:233639 cvm[4579]: W lipc:perf:prop=executeDebugCommand, source=com.lab126.system, ms=5103:lipc property access took too long 170826:233639 cvm[4579]: E def:jlipc:source=com.lab126.system,name=executeDebugCommand,value=;coplate,errcode=2:LipcJNI cannot set string property 170826:233639 cvm[4579]: E GoButtonTask:Error::Cannot perform lipc set prop 170826:233639 cvm[4579]: com.amazon.kindle.util.lipc.LipcException: Cannot Set Property ErrCode=2 170826:233639 cvm[4579]: at com.lab126.linux.arm.LipcImpl.setProperty0(Native Method) 170826:233639 cvm[4579]: at com.lab126.linux.arm.LipcImpl.setProperty(crb:1233) 170826:233639 cvm[4579]: at com.amazon.kindle.util.lipc.impl.LipcTargetImpl.setProperty(uzb:1088) 170826:233639 cvm[4579]: at com.amazon.kindle.restricted.device.chrome.c.M.yK(lvd:488) 170826:233639 cvm[4579]: at com.amazon.kindle.restricted.device.chrome.k.run(poe:254) 170826:233639 cvm[4579]: at java.lang.Thread.run(Unknown Source) 170826:233639 cvm[4579]: at java.lang.Thread.startup(Unknown Source) |
![]() |
![]() |
![]() |
#40 |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 416
Karma: 765432
Join Date: Apr 2016
Location: Italy
Device: Kindle PW3 5.8.5.0.1
|
Try to add a & after kterm
|
![]() |
![]() |
![]() |
#41 |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 475
Karma: 445678
Join Date: Feb 2010
Device: Too many..
|
|
![]() |
![]() |
![]() |
#42 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 645
Karma: 1888888
Join Date: Jun 2009
Device: prs-505, Kindle Keyboard 3g, PW3
|
definitely take the sleep 5 out of there as well, that was just so I can tell the difference between it closing and it running.
Are you logged into the kindle, it might be runnig in the background. But I think the duug command handler may kill things after a minute, so may have to have like a daemon launcher. Take the sleep command out. Can you run that, and give the output of 'ps -ef' ? Can you link me the kterm install stuff and I cna try some things. Last edited by coplate; 08-26-2017 at 09:09 PM. |
![]() |
![]() |
![]() |
#43 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 645
Karma: 1888888
Join Date: Jun 2009
Device: prs-505, Kindle Keyboard 3g, PW3
|
Ok, so it you want to run these from the command line, this is the syntax:
Code:
lipc-set-prop com.lab126.system executeDebugCommand ';kt' Code:
From messages file: 170826:214338 lipc-set-prop[5961]: E def:fail:source=com.lab126.system, prop=executeDebugCommand:Failed to set property From command line: com.lab126.system failed to set value for property executeDebugCommand (0x2 lipcErrInternal) I noticed you were calling kterm directly, instead of calling kterm.sh, so I tried that, but got the same problem. I went into kterm.sh and removed the actual call to kterm, and that worked. I have found that the call to actual kterm exits in failure code 1. and that the debug handler propagates that error. If you put an echo statement after the call to kterm, then the debug handler will not thrown an error. I have got the erro message that is actualliy killing kterm. this flash.sh Code:
#!/bin/bash set +e EXTENSION=/mnt/us/extensions/kterm DPI=`cat /var/log/Xorg.0.log | grep DPI | sed -n 's/.*(\([0-9]\+\), [0-9]\+).*/\1/p'` #use different layouts for high resolution devices if [ ${DPI} -gt 290 ]; then PARAM="-l ${EXTENSION}/layouts/keyboard-300dpi.xml" elif [ ${DPI} -gt 200 ]; then PARAM="-l ${EXTENSION}/layouts/keyboard-200dpi.xml" fi echo 111111111111111111111111111111111 > /dev/kmsg ${EXTENSION}/bin/kterm -d ${PARAM} "$@" /dev/kmsg 2> /dev/kmsg echo kterm exited with status code $? > /dev/kmsg 2> /dev/kmsg echo 2222222222222222222222222222222 > /dev/kmsg Code:
170826:220909 SCRIPTEXECUTOR[7972]: I script-Executor:main:Ready for execution:Command=/var/local/flash.sh 170826:220909 [ 2016.031417] 111111111111111111111111111111111 170826:220909 [ 2016.072584] 170826:220909 [ 2016.072590] (kterm:7979): Gtk-WARNING **: cannot open display: 170826:220909 [ 2016.075732] kterm exited with status code 1 170826:220909 [ 2016.075995] 2222222222222222222222222222222 And here it is, this script works for flash.sh. You can call this /var/local/kterm_launch.sh or whatever you like, no need to change the kterm.sh in the externsions directory.: Code:
#!/bin/bash eips 0 0 kterm DISPLAY=':0.0' /mnt/us/extensions/kterm/bin/kterm.sh & I banged that in place, and everything seems to be working just fine. Last edited by coplate; 08-27-2017 at 01:17 AM. |
![]() |
![]() |
![]() |
#44 |
Going Viral
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
The Amazon system includes a global LD_PRELOAD library that 'sanitizes' the environment to what they think is required.
You can find it using the LD_DEBUG environment variable settings on the kTerm execution command (just like you are setting DISPLAY). Of course, that isn't triggered by command line commands, only by loading an executable. We never have found a good reason to remove it, so we never have. It is most likely one of the security features to prevent "environment variable attacks" - but you have to be jail broken before you can remove it from the system. ![]() Last edited by knc1; 08-27-2017 at 09:27 AM. |
![]() |
![]() |
![]() |
#45 |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 475
Karma: 445678
Join Date: Feb 2010
Device: Too many..
|
coplate,
Great job done in troubleshooting and fixing this behaviour! Your fix: DISPLAY ":0.0" before the script works OK for me too. Thanks a lot for your time and effort! One small point. In your earlier script, you had used the shebang "#!/bin/sh", which you have changed in your latest to "#!/bin/bash". When I set up my script with "#!/bin/sh", it didn't work. Worked only with "#!/bin/bash"! Also, it works even if the "&" is removed from the end, but now the kindle search box remains visible inside the kterm window. Have to do a clear or turn the screensaver on and off! So, one more thing which was working OK on the PW1 but not on PW3/KT3 is fixed. Will check and confirm on KT3 next. Last edited by nasser; 08-28-2017 at 01:44 PM. Reason: Added last line |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Author link to authors:"=xxx" | oyvey | Library Management | 1 | 12-18-2012 11:08 PM |
Wait, no "Search" option for Kobo iPad/iPhone app?! | andsoitgoes | Kobo Reader | 1 | 04-03-2012 10:07 AM |
Adding private commands to the search bar | Leeron | Kindle Developer's Corner | 8 | 07-07-2011 02:53 AM |
What are "`usbQa" and "`usbNetwork" commands ? | meem | Amazon Kindle | 0 | 08-04-2010 03:26 AM |
Error message whenever cursor passes over "Search" bar | FizzyWater | Calibre | 2 | 02-22-2009 09:37 AM |