1

Is there any way to shutdown or reboot HP Pro Slate 12 tablet without using the power button?

I'm afraid the button will wear out quickly, so I'm looking for a workaround solution.

Yes, I know that for rooted devices there are a lot of shutdown and reboot apps, but it is impossible to root this device. It has Android 5.1.1.

1

3 Answers 3

1

Provided that HP has not messed up with AOSP much in your device, you can use Tasker with AutoInput (both are paid apps with 7 day free trial) to reboot/shutdown without using power button and without requiring root access.

In essence, what we're going to do is show the power dialog (the one you see when you long-press the Power button).

(Solution tested on AICP ROM (Android 5.1.1))

Instructions

  1. Install both the apps and enable accessibility service for both from Settings → Accessibility
  2. In Tasker, create a task with the action: Plugin → AutoInput → Global Action → Configuration → Action → Power Dialog
  3. Go to Home screen → find the option to add Widgets → select Task Shortcut → choose the newly created task → select an icon

An icon would now be placed on your home screen with name as the task name and icon that you selected for the task. Tap it and the power dialog would show up.

(Click image to enlarge)

IMG:

In case you want to have a functionality of launching that dialog from anywhere in the system, you can consider LMT Launcher.

My answer for Page up and page down in web pages and elsewhere will help you in its basic know-how.

IMG:

0
0

Thanks to @Fabin Paul:

The only way to do this without root and without is via by executing these commands:

  • adb reboot -- no root required; for reboot, or

  • adb shell reboot -p -- no root required.

  • adb shell shutdown -- needs root.

    adb shell su must be run before it, preferably like this: adb shellsushutdown -- for shutdown / power off -- on a computer while the tablet is connected to the computer with USB debugging enabled.

These commands work via adb as adb is more privileged than a normal user, although not as much as root on-device.

The reason why you simply can't run the commands reboot or shutdown through a terminal emulator on-device or through an app without root is because of the following reasons in order:

  1. Android apps use Java as their programming language.

  2. Java has a function System.exec(String) which allows the program to execute a shell command (specified by the String argument to the function).

  3. If an app did not need root to run the reboot or shutdown commands, it could easily perpetrate Denial Of Service (DoS) attacks on a device (basically like a Trojan (in computer parlance)).

As you can understand, the reboot/shutdown functionality needs to be protected from userspace software, hence, for your other question, we will help you to try to root your device so that you can get this functionality. Otherwise, there is no other way I can help you.

4
  • How do you plan to use ADB without PC? I mean, we're talking about power button replacement, and we can't assume that OP will always be sitting beside a PC.
    – Firelord
    Oct 30, 2015 at 15:43
  • @Firelord, since the OP has not precluded adb in the question, this is still a valid answer. Also, you have already presented the non-adb solution in your answer. So there is no need to repeat something which has already been said. Finally, the OP is a noob and to me, sometimes adb usage is easier than tasker. Oct 30, 2015 at 15:46
  • You got me wrong perhaps. I did not say your answer is invalid (it actually tells a good thing, that why reboot/shutdown functionality shouldn't be available to normal apps) but my point is simple: the answer is impractical for practical purposes as of now. That's why I've asked: how do you plan to use ADB without PC? There is definitely a solution irrespective and different from my answer. I'm asking that only.
    – Firelord
    Oct 30, 2015 at 15:49
  • @Firelord, I got that. I researched the matter but since I am not very tasker-literate your solution did not occur to me. To me it appears that it would be easier to get the OP root access, here: android.stackexchange.com/questions/127473/… Oct 30, 2015 at 15:52
-1

Like @Tamoghna said , only way to reboot and shutdown for non rooted device is using adb. You can download adb from this link and unzip it.

Open cmd from same folder and type

 adb reboot 

to reboot the device and type

 adb shell reboot -p

to shutdown the device. I hope it helps you..

10
  • 1
    what does this add over my answer? by the way adb shutdown works to shutdown the device. Oct 30, 2015 at 9:01
  • adb shutdown didn't work for me..
    – Fabin Paul
    Oct 30, 2015 at 9:03
  • what about adb shell shutdown? Oct 30, 2015 at 9:04
  • and what was the error? because shutdown worked on-device Oct 30, 2015 at 9:04
  • 1
    I never knew such a solution existed. Then again I am not perfect. Thanks firelord
    – Fabin Paul
    Oct 30, 2015 at 15:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .