21

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?

Chahk
  • 19,505
  • 3
  • 56
  • 80
Frustrated Coder
  • 327
  • 1
  • 2
  • 8
  • 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 '14 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 '14 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 '14 at 19:10
  • 1
    @Chahk Ayup. But you're already using Android, you've chosen the path of tinkering... – Adam Davis Mar 11 '14 at 19:13
  • @AdamDavis Fair enough. I'll edit my answer to mention hardware tweaks. – Chahk Mar 11 '14 at 19:14
  • 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 '14 at 22:17
  • Does hitting the device with a hammer count as switching it off? – Jason C Mar 12 '14 at 03:06
  • 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 '14 at 07:41
  • remove the physical button ? – Kiwy Mar 12 '14 at 09:29
  • 2
    My main concern was thieves! They steal your phone and turn it off so that it can no longer be traced!. Lost my Nexus 4 dont want to lose this! – Frustrated Coder Jun 19 '14 at 10:01

6 Answers6

39

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.

Chahk
  • 19,505
  • 3
  • 56
  • 80
4

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

2

So I would say the best way would be :

1 - custom rom to alter the turn off menu

2 - not to remove the power off option but replace by a fake one that would pretend that the phone switch off (playing a dumb animation as usual) but just putting the phone in sleep/locked mode, actually it should already start at that point to turn on gps, send position thru email, record voice and take picture... only a thief would use a button that a user dismissed.

Aside that a device should not have a lock screen, otherwise a thief would flash it straight away imho, he should be able to use it as he wants, or supposedly as he wants... probably a fake normal mode without lock activated by the fake turning off described in 2-

seb
  • 31
  • 1
1

You can try this app to achieve this - Smart Lockscreen Protector

This app blocks the power menu from showing up if your phone is locked. So it stops people from powering off or rebooting your phone when its locked.

Note: However if the person tries to hard reboot by holding the power button for more than 10 seconds (hard reset), then this app cannot support that. As it's hard-wired to do so.

It at least protects your phone to some extent, without rooting your phone.

beeshyams
  • 40,739
  • 30
  • 119
  • 269
Kishore Bandi
  • 326
  • 1
  • 3
  • 7
0

There is no way you can prevent the phone from getting turned off(without rooting, which will void your warranty if the device is in warranty).

If your phone is supposed to get stolen, it will be.

So Only thing you can do is keep your devices safe.

tushar
  • 111
  • 3
-1

Just root your phone and buy Cerberus. They got this option.

Matthew Read
  • 50,567
  • 30
  • 145
  • 273