FORUMS

OnePlus 2 Teardown, Major Android Vulnerability – XDA TV

The OnePlus 2 has been officially released. That and much more news is … more

What Do You Think About Fingerprint Scanners?

More and more phones are featuring fingerprint scanners, and with many promising … more

What’s Next for Samsung and Its Flagships?

If we were to say that the Galaxy S6 was a leap of faith made by Samsung, we … more

The Ultimate Showcase of dBrand Skins

In the search for ways to protect, accessorize, and personalize; a user has many options. One … more

Device wakeup by shaking

80 posts
Thanks Meter: 1
 
By zzattack, Member on 6th January 2010, 03:39 AM
Post Reply Subscribe to Thread Email Thread
Kholk mentioned his HD2's hardware buttons didn't work, and we looked into the possibility of waking the device by shaking it. This utility creates a message queue and monitors power notifications. When the device is suspended, this application is put in unattended mode allowing it to continue running. Also the GSensor is requested to stay awake so it can remain to be polled. A few hours of coding resulted in the attached application. Credits go to mligor for this port and OpenNETCF for a good example of creating a message queue in managed code.
The application has no user interface, just start it, suspend ur device by hitting the power button, and shake it to see if it turns on. I don't know the exact impact of this on the battery drain, so I would suggest killing the process or performing a softreset after you've seen the show ;D


Update (06-01-2010): I've added a native version, I think this will perform a little better. It could also be a bit easier on battery drain. Source code also attached.
Update (07-01-2010): added my own installer (with start menu shortcut, source code left out, and updated program). Soft-reset before installing this. This version also prevents multiple instances of the program to be running, causing only extra battery drain.
Update (09-01-2010): fixed two bugs, should now be stable!
Attached Files
File Type: cab Shake'n'wake.CAB - [Click for QR Code] (14.4 KB, 6104 views)
File Type: zip Shake'n'wake_src.zip - [Click for QR Code] (17.4 KB, 1914 views)
Last edited by zzattack; 9th January 2010 at 01:34 AM.
The Following User Says Thank You to zzattack For This Useful Post: [ View ]
 
 
6th January 2010, 03:51 AM |#2  
arturobandini's Avatar
Senior Member
Flag Paris
Thanks Meter: 37
 
More
Great work and nice idea
6th January 2010, 03:52 AM |#3  
band27's Avatar
Senior Member
Flag Toronto
Thanks Meter: 1
 
More
Interesting...will give this a go! thx...

Any hints as far as installation?
6th January 2010, 08:35 AM |#4  
Member
Thanks Meter: 0
 
More
Great job... I hope the sensibility is low cause i don't want to wake my hd2 in my pocket when i'm running
6th January 2010, 09:13 AM |#5  
jaguaralani's Avatar
Senior Member
Flag Perth
Thanks Meter: 607
 
Donate to Me
More
Quote:
Originally Posted by vodnok

Great job... I hope the sensibility is low cause i don't want to wake my hd2 in my pocket when i'm running


Very Very Nice !

Thanx


A CAB version is attached
Attached Files
File Type: cab Shake n Wake.cab - [Click for QR Code] (10.4 KB, 1231 views)
Last edited by jaguaralani; 6th January 2010 at 09:21 AM.
6th January 2010, 10:36 AM |#6  
Retired Recognized Developer
Flag Torino
Thanks Meter: 3,806
 
Donate to Me
More
Thank you mate!
Now I can use my HTC HD2 without problems (and without buying another HD2!)
Lovin' you <3
6th January 2010, 10:43 AM |#7  
Member
Thanks Meter: 0
 
More
It would be very useful program if you could add proximity sensor instead of gsensor.
But its first step to something :)
6th January 2010, 11:12 AM |#8  
Retired Recognized Developer
Flag Torino
Thanks Meter: 3,806
 
Donate to Me
More
Unfortunately for me, it works for the first two wakes, then it stops working.
Anyone experienced the same issue?

EDIT: Strange. Now it works ^^
Last edited by kholk; 6th January 2010 at 11:24 AM.
6th January 2010, 11:57 AM |#9  
Senior Member
Flag Nancy
Thanks Meter: 0
 
More
It's would be better to add proximity sensor. Keep the shake to wake up, but add proximity sensor. This way, if the phone is shaked, but in the pocket, he will not wake up Take the both for more efficacity isn't?
6th January 2010, 12:21 PM |#10  
Senior Member
Flag Esch-sur-Alzette
Thanks Meter: 1
 
More
Quote:
Originally Posted by lancelot54

It's would be better to add proximity sensor. Keep the shake to wake up, but add proximity sensor. This way, if the phone is shaked, but in the pocket, he will not wake up Take the both for more efficacity isn't?

agree, otherwise it wakes up when you are walking or running
6th January 2010, 01:18 PM |#11  
Senior Member
Thanks Meter: 8
 
More
Question Can it work on topaz?
can some one adjust this to work on topaz

Read More
Post Reply Subscribe to Thread

Tags
gsensor, power management, shake, unattended
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes