Ha, found it!
Next to /usr/bin/powerd is a binary /usr/bin/powerd_test which gives the following usage hint when executed:
Code:
powerd_test: Utility to test powerd
Options:
s : Print status
i : Simulate input event
p : Simulate power button pressed event
h : Simulate power button held event
l : Simulate low batt low event
d <value> : Set defer sleep property to given value
r : Simulate a random series of events at random intervals.
Max interval is 10s by default.
b<optional>: Set fake battery level if a value is provided. Remember to
there is no space between b and value. If no value is
provided, it interactively accepts values from you and sets
fake battery level
t <value> : Max interval between events in seconds.
Valid only when used with -r
NOTE : Only one of i,p,d, b and r can be used at one time
Using strings on powerd_test reveals that the following command toggles the power state:
Code:
lipc-send-event com.lab126.powerd.debug dbg_power_button_pressed
And this command gives information about the current state:
Code:
[root@kindle /]# lipc-get-prop com.lab126.powerd status
Powerd state: Screen Saver
Remaining time in this state: Unknown
defer_suspend:0
suspend_grace:0
prevent_screen_saver:0
drive_mode:off
Battery Level: 92%
Last batt event at: 92%
Charging: Yes
batt_full=0
Battery logging: On
I still haven't found a way to trigger the whispersync without simulating key presses...
Ciao,
Steffen