[ROOT] Natively Wake Your Droid with the CAMERA KEY

Discussion in 'Android General Discussions' started by roys, Jun 14, 2010.

  1. roys
    Offline

    roys New Member

    Joined:
    Jan 14, 2010
    Messages:
    15
    Likes Received:
    0
    Trophy Points:
    1
    Ratings:
    +0
    Hello, I just managed to wake my milestone with the camera key:), without installing any applications but root required. The method is to modify the "keylayout" according to the Android Development Guide Keymaps and Keyboard Input | Android Open Source, by setting the "FOCUS" key with "WAKE" flag.

    Before that, we can install some apps like "lockbot" to manages the camera key that can wake the phone. Not sure, but probably it will keep a "wake lock" that prevents your device to go into sleep mode, and so keep draining your battery.

    By modifying the "keylayout", the camera key (focus key) can wake your device with the Android OS nativelly, therefore no extra battery drain (just press and raise an interrupt to wake the CPU like your power key !!).

    ******
    Tutorial on this thread is provided "as is". Use at your own risk.

    THIS TUTORIAL IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    ******

    1.) Root your droid.

    2.) Connect your droid with the computer in USB debugging mode.

    3.) Pull the corresponding keylayout file from your device. Since I am using Motorola Milestone, as I don't know if the Droid keylayout setting is same as Milestone, so here advised to check and pull the corresponding keylayout file.
    4.) Modify the pulled file "c:\keypad.kl".
    5.) Push the modified keylayout file to your sdcard.
    6.) Remount the "/system" partition with "rw" mode.
    7.) Copy the modified keylayout file to "/system/usr/keylayout".
    8.) Remount the "/system" partition with "ro" mode.
    9.) Exit the "adb shell" by typing "exit" few times until returning to the windows command prompt.

    10.) Reboot your droid.

    11.) Try to wake your droid with the camera key.:icon_ banana:
     
  2. ibebyi
    Offline

    ibebyi Member

    Joined:
    Jul 26, 2010
    Messages:
    46
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    San Diego
    Ratings:
    +0
    Hi, I was just wondering if anyone could confirm this works? I'm afraid my power button has gone kaput. :(
     
  3. TheOldFart
    Offline

    TheOldFart Active Member

    Joined:
    Nov 26, 2009
    Messages:
    963
    Likes Received:
    27
    Trophy Points:
    28
    Location:
    New York State
    Ratings:
    +27
    I would personally not want that feature. The camera key takes very little pressure to activate and it is natural to hit it with the palm of your hand when putting the Droid into your pants pocket. At least it is the way that I hold it. I have accidentally put the awake phone into my pocket twice and once it moved all the icons around and deleted one, the other time it opened Solitaire, which is in a games folder.
     
  4. cherrybombaz
    Offline

    cherrybombaz New Member

    Joined:
    May 17, 2010
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Ratings:
    +0
    Thanks. This works great.
    Is there a way for the camera key to also put the droid back to sleep?
     
  5. nka
    Offline

    nka Member

    Joined:
    Nov 11, 2009
    Messages:
    143
    Likes Received:
    0
    Trophy Points:
    16
    Ratings:
    +0
    I don't understand how to perform this step:

    How do I check which file the device is using?

    Thanks.
     
  6. SweetVibes118
    Offline

    SweetVibes118 New Member

    Joined:
    Aug 22, 2011
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Ratings:
    +0
    I just used it and happy to say IT WORKS!

    Not sure if anyone else is running into this same problem, but changing this code was the only way i could see in fixing this problem. But its not, there is an app for $00.99 called "Button Re-mapper" This is the way changing button should be done. Quick easy and only requiring a reboot.
     
  7. nka
    Offline

    nka Member

    Joined:
    Nov 11, 2009
    Messages:
    143
    Likes Received:
    0
    Trophy Points:
    16
    Ratings:
    +0
    Wow, total time-saver!

    That would have saved me so much time. Too bad I didn't know about this app before I manually went through the trouble to alter the keypad file.
     
Search tags for this page
adb shell wake up command
,
adb wake up device
,

android wake camera button

,
android wake up command adb
,
android wake with camera button root
,
press any key to wake up an android
,

shell command wake android

,
using camera button to wake android
,
wake android with the camera or volume keys
,
wake up with camera button android