Take the 2-minute tour ×
Android Enthusiasts Stack Exchange is a question and answer site for enthusiasts and power users of the Android operating system. It's 100% free, no registration required.

I have a Nexus 5. Even if I enable security passcode or pattern, someone can still switch off my mobile using the power button. How can I prevent it?

share|improve this question
7  
What's your actual goal? Are you just worried about a "friend" turning your phone off to annoy you, or is there something else? –  Dan Hulme Mar 11 at 15:49
4  
You can also remove the power button and alter it so pressing it no longer presses the actual electronic button inside the phone. If you drill a small hole in the power button where the electronic button is, you may then use a paperclip to press the button. There are also apps that turn the device off if you want to turn it off without a paperclip. –  Adam Davis Mar 11 at 17:25
1  
@AdamDavis went full-DIY on us :) That would most definitely void any warranty you may have on the phone. –  Chahk Mar 11 at 19:10
2  
@DanHulme First use case that comes to my mind is thwarting a thief trying to turn off the device to prevent locating it remotely. –  brichins Mar 11 at 22:17
2  
@brchins I can think of lots of reasons one might want to stop the phone being turned off, but that's irrelevant. The question is why Frustrated Coder wants to stop someone turning his phone off. –  Dan Hulme Mar 12 at 7:41

2 Answers 2

up vote 31 down vote accepted

You cannot (barring any hardware tweaks.)

If you root your phone and install a custom ROM, you may be able to remove the "Turn off" and "Reboot" options from the Power menu. However, Nexus 5 (as do most modern phones) has a hard-wired feature, where holding the power button for 10 seconds shuts the phone off. This is done so that you can restart the phone if it freezes up. Since Nexus 5 doesn't have a removable battery, this hard reset would be the only way to shut it off without having to wait for the battery to drain.

If you are technically inclined, you can always make hardware modifications to the phone which would prevent the Power button from functioning normally. However, such mods are not for the novices, and will certainly void your warranty.

share|improve this answer
    
Almost every device today has that feature - press long to power off. –  Om Shankar Mar 12 at 13:20

You could make/modify a phone case so that the power button is covered. This would avoid having to void the warranty.

share|improve this answer
4  
...then you have the problem of making the case non-removable. –  Navin Mar 12 at 4:25
    
I would think you'd run into the "now how do I turn the screen on?!" problem first... –  derobert Mar 12 at 17:41
    
Good idea butt i think u can turn the phone off via software –  enthdegree Mar 12 at 19:42

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.