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-02-2013, 10:12 AM   #16
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by Vava View Post
1) Yes, and that's how I want to use it

2) These scripts are called by the eventHandler (that's why I posted a reply instead of create a new thread)

3) Ok, that's what I would like to know. That means there is no chance I succeed to came back from standby mode without an external intervention ?

4) I do not see why it's dangerous. I thought that I was only sending the same command that the system send by pressing the physical button.
2) You are presuming you can create a "resume after delay" event in the system. Different topic.

3) Define your use of the word: "external"
If you mean "external to the software" - the answer is "yes".
If you mean "external to the device" - the answer is "no".

Software requires a computer processor to make use of it.
If you turn off the processor, what is going to execute the software?
Duh....

If you look at the kernel messages associated with the processor resuming operation, you can see that some of the hardware was still running - the messages include how many seconds the processor was shut down.
So there are resources external to the halted processor on the Kindle device.

4) You do not claim that what you post is the limit to what things you may try next.

Since you include powering down the Wifi (one of the things a system suspend does anyway), there is no telling from your post what other strange things you might try.

Hence, a bit of warning that the devices are not indestructible.
knc1 is offline   Reply With Quote
Old 06-02-2013, 11:30 AM   #17
Vava
Member
Vava began at the beginning.
 
Posts: 17
Karma: 10
Join Date: May 2013
Device: PaperWhite
I thought the standby mode only lowered the processor power, that's why I was hoping to do it in a "software" way.
You're right about the warning, never useless. Thanks.
Vava is offline   Reply With Quote
Advert
Old 06-02-2013, 01:23 PM   #18
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by Vava View Post
I thought the standby mode only lowered the processor power, that's why I was hoping to do it in a "software" way.
You're right about the warning, never useless. Thanks.
Read the kernel's dmesg buffer.

There is a KUAL button for that purpose - it copies (and clears) the kernel's ring buffer to a text document that you can view on the Kindle.
Document names are a date-time stamp, so you can keep the messages in order if split between two or more text documents.
knc1 is offline   Reply With Quote
Old 06-20-2013, 08:45 PM   #19
sparta
Junior Member
sparta began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Jun 2013
Device: Kindle 4
I'm trying to get this to work in a K4, but when I selected 'update your kindle' I got the message 'Update was NOT successful' and then after the reboot I'm not seeing a scripts directory in the user partition. (I am new to the Kindle, jailbroken today, but I'm assuming the user partition is what I see when I attach the Kindle to the computer?)
sparta is offline   Reply With Quote
Old 06-20-2013, 08:50 PM   #20
sparta
Junior Member
sparta began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Jun 2013
Device: Kindle 4
If it's useful: the error code displayed at "Update was NOT successful" was U006.
sparta is offline   Reply With Quote
Advert
Old 06-20-2013, 10:05 PM   #21
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by sparta View Post
If it's useful: the error code displayed at "Update was NOT successful" was U006.
Try the links indexed under that subject code:
https://wiki.mobileread.com/wiki/K4_Index#Update_Fails
knc1 is offline   Reply With Quote
Old 06-27-2013, 01:59 PM   #22
sparta
Junior Member
sparta began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Jun 2013
Device: Kindle 4
That link for the U006 error message is specific to a different screensaver hack/update. I did try it anyway but to no effect.
sparta is offline   Reply With Quote
Old 06-27-2013, 02:08 PM   #23
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by sparta View Post
That link for the U006 error message is specific to a different screensaver hack/update. I did try it anyway but to no effect.
The error codes are specific to the failure encountered not to any hack or update.

U006 is a failure of the system image to match the system manifest.
Which **should not** be checked by installing one of our install *.bin files.

Did you select: "restart" rather than "update" your Kindle? Use: menu -> settings -> menu -> update **ONLY** do not use "restart"

And do you have one of the Amazon system Update-*-.bin files in the user storage?
THAT type of file can fail with error U006.

Last edited by knc1; 06-27-2013 at 02:15 PM.
knc1 is offline   Reply With Quote
Old 06-27-2013, 03:40 PM   #24
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,477
Karma: 26012492
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
ERR_UPDATE_FAILED=U006

That's the catchall, fallback error if something unspecific went wrong.

Which, indeed, usually means something in the update script itself returned a non 0 exit code.

Which, given the fact that, according to the OP, this was only tested on a Touch/PW, is potentially expected .
NiLuJe is offline   Reply With Quote
Old 10-02-2013, 08:24 PM   #25
damaru
Enthusiast
damaru is kind to children and small, furry animalsdamaru is kind to children and small, furry animalsdamaru is kind to children and small, furry animalsdamaru is kind to children and small, furry animalsdamaru is kind to children and small, furry animalsdamaru is kind to children and small, furry animalsdamaru is kind to children and small, furry animalsdamaru is kind to children and small, furry animalsdamaru is kind to children and small, furry animalsdamaru is kind to children and small, furry animalsdamaru is kind to children and small, furry animals
 
damaru's Avatar
 
Posts: 45
Karma: 6672
Join Date: Apr 2011
Device: kindle
Is there a way to set an event on unmount, when the kindle is disconected from the computer ?
damaru is offline   Reply With Quote
Old 10-03-2013, 04:53 AM   #26
damaru
Enthusiast
damaru is kind to children and small, furry animalsdamaru is kind to children and small, furry animalsdamaru is kind to children and small, furry animalsdamaru is kind to children and small, furry animalsdamaru is kind to children and small, furry animalsdamaru is kind to children and small, furry animalsdamaru is kind to children and small, furry animalsdamaru is kind to children and small, furry animalsdamaru is kind to children and small, furry animalsdamaru is kind to children and small, furry animalsdamaru is kind to children and small, furry animals
 
damaru's Avatar
 
Posts: 45
Karma: 6672
Join Date: Apr 2011
Device: kindle
I see that I could modify your code with (I am putting wrong code here, but I am looking for what I would replace it with if it exist):

Code:
 mkdir -p /mnt/us/scripts/startup /mnt/us/scripts/suspend /mnt/us/scripts/resume /mnt/us/script/unmount
        
   execute() {
     echo $1
    for file in /mnt/us/scripts/$1/*; do
      if [[ -f "$file" ]]; then
        echo "... $file"
        $file &
      fi
    done
  }    
       
  execute startup
       
  lipc-wait-event -m com.lab126.powerd goingToScreenSaver,outOfScreenSaver,usbunmount | while read event; do
    case "$event" in
      goingToScreenSaver*)
        execute suspend;;
      outOfScreenSaver*)
        execute resume;
        usbUnmount*)
        execute unmount;
   esac
  done;
damaru is offline   Reply With Quote
Old 03-26-2014, 07:40 PM   #27
sowmya
Member
sowmya began at the beginning.
 
Posts: 11
Karma: 10
Join Date: Feb 2014
Device: Kindle Paperwhite
Not working on Paperwhite 2

When I try to install the Event handler on Paperwhite 2, 'update your kindle' greys out. Can you help me with this?

Firmware version - 5.4.2.1

Thanks,
sowmya is offline   Reply With Quote
Old 03-27-2014, 03:36 AM   #28
kaznelson
Old Kaz
kaznelson ought to be getting tired of karma fortunes by now.kaznelson ought to be getting tired of karma fortunes by now.kaznelson ought to be getting tired of karma fortunes by now.kaznelson ought to be getting tired of karma fortunes by now.kaznelson ought to be getting tired of karma fortunes by now.kaznelson ought to be getting tired of karma fortunes by now.kaznelson ought to be getting tired of karma fortunes by now.kaznelson ought to be getting tired of karma fortunes by now.kaznelson ought to be getting tired of karma fortunes by now.kaznelson ought to be getting tired of karma fortunes by now.kaznelson ought to be getting tired of karma fortunes by now.
 
kaznelson's Avatar
 
Posts: 201
Karma: 1013725
Join Date: May 2010
Device: PocketBook Era
sowmya

Rebuild with KindleTool 1.6.2.20:
Attached Files
File Type: zip update_eventHandler_0.2_k5.zip (18.2 KB, 348 views)

Last edited by kaznelson; 09-21-2014 at 12:15 PM.
kaznelson is offline   Reply With Quote
Old 03-28-2014, 12:44 AM   #29
sowmya
Member
sowmya began at the beginning.
 
Posts: 11
Karma: 10
Join Date: Feb 2014
Device: Kindle Paperwhite
Works just fine! Thank you very much.

Last edited by sowmya; 03-30-2014 at 07:20 PM.
sowmya is offline   Reply With Quote
Old 03-30-2014, 07:19 PM   #30
sowmya
Member
sowmya began at the beginning.
 
Posts: 11
Karma: 10
Join Date: Feb 2014
Device: Kindle Paperwhite
I tried to run a script on start up, so i added a file run.sh in startup folder, but it does not execute it when i reboot the kindle. The homepage shows up. Am I missing something?
sowmya is offline   Reply With Quote
Reply

Tags
events, k5 tools, kindle, kite, screensaver

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
is it possible to run k5 launchpad scripts on k5 techiemonkey Kindle Developer's Corner 3 07-30-2012 09:10 AM
Kite on K3G launches scripts randomly on boot or unplug jmseight Kindle Developer's Corner 0 03-23-2012 01:55 PM
Kindle tries to run C/++ applications like sh scripts? dnR Kindle Developer's Corner 1 01-09-2011 07:45 AM


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


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