Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,804,462 Members 43,966 Now Online
XDA Developers Android and Mobile Development Forum

[APP][HD2][v1.2.1]Camera lock button

Tip us?
(Last edited by MilaCzeque; 13th September 2010 at 08:10 PM.)
Junior Member - OP
Thanks Meter 5
Posts: 20
Join Date: Sep 2007
Talking [APP][HD2][v1.2.1]Camera lock button

Camera lock button

Yesterday I saw video from Windows mobile 7 showing dedicated camera button working even if the phone was locked. Today I bring this feature for HD2 on WM6.5.

7.9.2010 - I've uploaded version 1.1 see FAQ.
9.9.2010 - Version 1.2 brings support for CHT.
13.9.2010 - Version 1.2.1 fixes loading issue.

What is it and what it does
This little application starts phone's camera when user press home button when the phone is locked.
It is aware of proximity sensor status, so it won't start camera in your pocket.
It won't do anything if pda is not locked.
If your pda is locked and display is switched off, you must click home button twice.

Current limitations
Only for HD2, because of proximity sensor hardware.
Only works with original non-customized lockscreen, because unlocking is performed by sending mouse move events.

v1.1 has unlock gesture learning ability.

Planned features
Camcorder on windows button.
Support for pin.

Download cab file and run it on your device.
If you want application application to start with your device use otherwise you'll have to start it manually.

You must turn off this application before uninstallation or reinstallation.

Q: Nothing happens when I start the application?
A: That's normal behaviour. Lock your device and try to click home button.

Q: How do I turn it off?
A: Run application again.

Q: How do I start it with device startup?
A: Download cab that ends with '_autostart' or add shortcut do your \Windows\StartUp folder.

Q: I'm getting "This application is not designed for your device!" message.
A: This application is only for HTC HD2. If you have HD2 then there's something wrong with your OEMINFO value. Check "\Windows\ModelName.txt" whether it contains 'HD2' or 'LEO' string.

Q: What is licence for icon?
A: I used free icon from .

Q: Why installer ignores location I picked for installation?
A: NEVER EVER install this application on Storage Card, always use device.

Q: Is there source code available?
A: Nope. Last time I published something under GPL everyone was ignoring it (GPL) completely.

Following FAQ applies only to v1.1

Q: How to learn it unlock gesture?
  1. Start it with shortcut named "Camera lock button toggle learning".
  2. Lock device.
  3. Make sure proximity sensor is not covered.
  4. Press "windows" hw button. "Learning mode!" text should appear on screen.
  5. Unlock device.
  6. Done. Message informing you about success should appear. Learning mode is now switched off automagically.
  7. You can delete "Camera lock button toggle learning" shortcut from start menu.

Q: Why isn't there autostart version of v1.1?
A: Because it needs beta testing and I don't want you to brick your device.

Q: Do I need to learn it gesture if I'm using unmodified lockscreen?
A: No. If there isn't learned gesture it uses default gesture from v1.0.

Q: Where is stored learned gesture?
A: In file \Windows\camera_lock_button_gesture.bin
(You will be asked if you want to remove it at the end of uninstallation.)

Q: What about unlocking the device with password?
A: If device is locked after camera application is closed, it won't be security hole. Maybe next time I'll implement it.


  1. Fixes forgetting of learned gesture after application was switched off.

  1. Support for CHT.

  1. Volume buttons are working again.
  2. Gesture learning (= maybe S2U2 compatible).
  3. Setup dll, so you don't need to make sure application is not running before uninstallation.

Initial release.

Compatible lockscreens
  • WM6.5 default (Confetti lock screen)
  • Co0kie's Home Tab lockscreen [worked for me, not worked for Guus_]
  • Maybe others but nobody informed me about it.
  • Not working with S2U2, I contacted author of S2U2 about it.
The Following User Says Thank You to MilaCzeque For This Useful Post: [ Click to Expand ]
Junior Member - OP
Thanks Meter 5
Posts: 20
Join Date: Sep 2007
Reserved for future use.
(Last edited by Stevik; 4th September 2010 at 08:51 PM.)
Junior Member
Thanks Meter 2
Posts: 14
Join Date: Aug 2007
Location: Brno
Smile Excelent work.....!!!


Senior Member
Thanks Meter 2
Posts: 226
Join Date: Nov 2008
GREAT idea, but I/we need to get this to work with Co0kie Home Tab. Can we expect CHT support in the future?

Thanks for sharing!
Junior Member - OP
Thanks Meter 5
Posts: 20
Join Date: Sep 2007
Why isn't it working with CHT? Different unlock screen? Different camera application?

Also I noticed it conflicts with htc volume control, right now by I'm betatesting fix.
kenshin2013's Avatar
Junior Member
Thanks Meter 0
Posts: 16
Join Date: Dec 2008
Would it be possible to make compatible with Chris's Lockscreen [middle]? It puts the slider halfway down the screen. I HATE having the lock slider at the top!
Thanx for all your hard work MilaCzeque
orb3000's Avatar
XDA Portal Team / Senior Moderator
Thanks Meter 3,035
Posts: 22,280
Join Date: Feb 2007
Location: T r a v e l i n g Likes: HTC & XDA Dislikes: apples...

Thanks for sharing!

HTC Butterfly 2 coming! - HTC One M8 - HTC Universal

XDA is about developing and is for developers. Any user that recognizes that will gain the most benefit from this site

This is and always will be a site for developers, pure and simple. Without them we are nothing, without them there would be no reason for XDA Developers to exist; we should never ever forget that. Without them this place would not be called XDA-Developers but something else, e.g Mobile Phone User Support Services For Ungrateful Nerds.

Previous devices: HTC: Treo 650 - Excalibur - Diamond - Diamond 2 - Maple - HD2 - Rhodium - Desire Z - Desire HD - Vivid - Sensation - One V - One X - Titan II - One X+ - DNA - Butterfly
s2007's Avatar
Senior Member
Thanks Meter 0
Posts: 194
Join Date: May 2008
Originally Posted by Guus_ View Post
GREAT idea, but I/we need to get this to work with Co0kie Home Tab. Can we expect CHT support in the future?

Thanks for sharing!
Yes, yes, yes ++. A lot people use Co0kie HT.
evolutionqy7's Avatar
Senior Member
Thanks Meter 31
Posts: 861
Join Date: May 2010
Location: Dublin
will you add future support for su2u?
Nokia N97 < HTC HD2 > HTC HD7 < Samsung Omnia 7 < HTC Titan < Galaxy S III < Galaxy Note II

Search before you post!
Post questions in the questions and answers section
(Last edited by Jaxbot; 6th September 2010 at 01:35 PM.)
Recognized Developer
Thanks Meter 547
Posts: 1,220
Join Date: Mar 2009

Very cool idea, I'll have to switch back to the default lockscreen to try it.
Though, it would be cool if the X/Y values for the mouse event could be set in a file, for those of us with customized lock screens.
Edit: got around that by editting my LS_LockScene_480x800.cpr file.
Though, it would be nice if we could program in a "macro" to type in our passwords.

That guy from Windows Phone Hacker, 2009-2013. Retired June 2013.
Personal Blog | Twitter | Youtube

camera, hd2, leo, lockscreen, wm7 features in wm6.5
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Use Facebook Pictures as a LWP with Facebook View

One of the best things that Android has always offeredits users is the ability to tailor … more

Share Your Thoughts Anonymously with A Minimalist Social Network

Nowadays, almost everyone has a second life onthe Internet. Among the best … more

Enable Heads Up Notifications For The Sprint Galaxy S3

Heads up notifications, in case you didn’t already know, are an experimental … more

Android One Goes Live in India!

Android One is a Google initiative set to bring an AOSP-like experience tosome emergingmarkets like India, … more