|
2011-11-05
, 00:09
|
|
Posts: 1,637 |
Thanked: 4,424 times |
Joined on Apr 2009
@ Germany
|
#2
|
#!/bin/sh EVENT_POWER_KEY="\x74\x00" POWERBUTTON_EVENT_FILE=/dev/input/pwrbutton EVENT_TIMESTAMP="\x48\x67\x98\x45\x5f\x16\x0b\x00" EVENT_KEY_TYPE="\x01\x00" EVENT_PRESS_VALUE="\x01\x00\x00\x00" EVENT_RELEASE_VALUE="\x00\x00\x00\x00" printf "$EVENT_TIMESTAMP$EVENT_KEY_TYPE$EVENT_POWER_KEY$EVENT_PRESS_VALUE$EVENT_TIMESTAMP$EVENT_KEY_TYPE$EVENT_POWER_KEY$EVENT_RELEASE_VALUE" > $POWERBUTTON_EVENT_FILE
|
2011-11-05
, 01:49
|
Posts: 2 |
Thanked: 3 times |
Joined on Nov 2011
|
#3
|
The Following 3 Users Say Thank You to hfilho For This Useful Post: | ||
|
2012-01-23
, 07:57
|
|
Posts: 165 |
Thanked: 18 times |
Joined on Jun 2010
|
#4
|
shell script (taken from
http://meego.gitorious.org/meego-mid...sts/mcetorture)
For what is that good for?Code:#!/bin/sh EVENT_POWER_KEY="\x74\x00" POWERBUTTON_EVENT_FILE=/dev/input/pwrbutton EVENT_TIMESTAMP="\x48\x67\x98\x45\x5f\x16\x0b\x00" EVENT_KEY_TYPE="\x01\x00" EVENT_PRESS_VALUE="\x01\x00\x00\x00" EVENT_RELEASE_VALUE="\x00\x00\x00\x00" printf "$EVENT_TIMESTAMP$EVENT_KEY_TYPE$EVENT_POWER_KEY$EVENT_PRESS_VALUE$EVENT_TIMESTAMP$EVENT_KEY_TYPE$EVENT_POWER_KEY$EVENT_RELEASE_VALUE" > $POWERBUTTON_EVENT_FILE
|
2012-01-26
, 10:00
|
|
Posts: 165 |
Thanked: 18 times |
Joined on Jun 2010
|
#5
|
shell script (taken from
http://meego.gitorious.org/meego-mid...sts/mcetorture)
For what is that good for?Code:#!/bin/sh EVENT_POWER_KEY="\x74\x00" POWERBUTTON_EVENT_FILE=/dev/input/pwrbutton EVENT_TIMESTAMP="\x48\x67\x98\x45\x5f\x16\x0b\x00" EVENT_KEY_TYPE="\x01\x00" EVENT_PRESS_VALUE="\x01\x00\x00\x00" EVENT_RELEASE_VALUE="\x00\x00\x00\x00" printf "$EVENT_TIMESTAMP$EVENT_KEY_TYPE$EVENT_POWER_KEY$EVENT_PRESS_VALUE$EVENT_TIMESTAMP$EVENT_KEY_TYPE$EVENT_POWER_KEY$EVENT_RELEASE_VALUE" > $POWERBUTTON_EVENT_FILE
|
2012-01-26
, 11:00
|
|
Posts: 1,637 |
Thanked: 4,424 times |
Joined on Apr 2009
@ Germany
|
#6
|
|
2012-01-28
, 07:14
|
|
Posts: 165 |
Thanked: 18 times |
Joined on Jun 2010
|
#7
|
|
2012-01-28
, 07:56
|
|
Posts: 623 |
Thanked: 289 times |
Joined on Jan 2010
@ UK
|
#8
|
you mean save the script .sh then sudo that .sh file?? because i did that and nothing happens.
echo "/full/path/to/script"|root
|
2012-01-28
, 08:58
|
|
Posts: 165 |
Thanked: 18 times |
Joined on Jun 2010
|
#9
|
Correct, save script to file, but use this code to run it:
Code:echo "/full/path/to/script"|root
echo "/home/user/MyDocs/Power.sh"|root
|
2012-01-29
, 21:26
|
|
Posts: 623 |
Thanked: 289 times |
Joined on Jan 2010
@ UK
|
#10
|
i did copy the scipt to a txt file then save it to .sh
on a qbw i did put
but nothing happensCode:echo "/home/user/MyDocs/Power.sh"|root
echo "sh /home/user/MyDocs/Power.sh"|root
The Following User Says Thank You to JonWW For This Useful Post: | ||
I'm trying to write a script (using dbus, but if other options are better, please let me know) to programmatically show the lock screen, simulating a power button press when the n900 is locked. Is there any way to do this?
I've tried monitoring dbus for the power button press, and came up with this dbus command:
Any help is much appreciated.