Installation
Install the latest version of the app for your device from here.
Basic usage
The actions are triggered by sending an intent to the service. From there, the commands are executed with system level permissions.
Depending on the commands you want to run you’ll have to add permissions to your app’s manifest file.
See below for possible command you can use
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 |
// Power down the device. Requires com.handheldgroup.shutdown.SHUTDOWN permission public void shutdown() { Intent intent = new Intent(); intent.setAction("com.handheldgroup.shutdown.SHUTDOWN"); intent.setPackage("com.handheldgroup.shutdown"); startService(intent); } // Reboot the device. Requires com.handheldgroup.shutdown.SHUTDOWN permission public void reboot() { Intent intent = new Intent(); intent.setAction("com.handheldgroup.shutdown.SHUTDOWN"); intent.setPackage("com.handheldgroup.shutdown"); intent.putExtra("reboot", true); startService(intent); } // Turn off screen / lock the device. Requires com.handheldgroup.shutdown.SHUTDOWN permission public void lockScreen() { Intent intent = new Intent(); intent.setAction("com.handheldgroup.shutdown.SLEEP"); intent.setPackage("com.handheldgroup.shutdown"); startService(intent); } // Install apk file. Requires com.handheldgroup.shutdown.INSTALL permission public void installApp() { Intent intent = new Intent(); intent.setAction("com.handheldgroup.shutdown.INSTALL"); intent.setPackage("com.handheldgroup.shutdown"); intent.putExtra("path", (new File(Environment.getExternalStorageDirectory(), "your-app.apk")).getAbsolutePath()); startService(intent); } // Enables or disables a app by its package. Requires com.handheldgroup.shutdown.ACTIVATE permission public void deactivateApp() { Intent intent = new Intent(); intent.setAction("com.handheldgroup.shutdown.ACTIVATE"); intent.setPackage("com.handheldgroup.shutdown"); intent.putExtra("package", "com.android.calculator2"); intent.putExtra("enable", false); startService(intent); } // Enables or disables usb debugging. Requires com.handheldgroup.shutdown.USB permission public void disableUsbdebug() { Intent intent = new Intent(); intent.setAction("com.handheldgroup.shutdown.USB"); intent.setPackage("com.handheldgroup.shutdown"); intent.putExtra("activate", false); startService(intent); } // Sets the screen rotation // value can be -1 for automatic rotation, 0 for 0┬░, 1 for 90┬░, 2 for 180┬░ or 3 for 270┬░ public void setScreenRotation() { Intent intent = new Intent(); intent.setAction("com.handheldgroup.shutdown.SCREEN_ROTATION"); intent.setPackage("com.handheldgroup.shutdown"); intent.putExtra("rotation", value); startService(intent); } // Sets the screen timeout // value can be -1 for never, 0 for 15 sec, 1 for 30 sec, 2 for 1 min, 3 for 2 min, 4 for 10 min or 5 for 30 min public void setScreenTimeout() { Intent intent = new Intent(); intent.setAction("com.handheldgroup.shutdown.SCREEN_TIMEOUT"); intent.setPackage("com.handheldgroup.shutdown"); intent.putExtra("timeout", value); startService(intent); } // Sets the screen brightness // value can be any percentage between 0-100 or -1 for automatic brightness public void setScreenBrightness() { Intent intent = new Intent(); intent.setAction("com.handheldgroup.shutdown.SCREEN_BRIGHTNESS"); intent.setPackage("com.handheldgroup.shutdown"); intent.putExtra("brightness", value); startService(intent); } // Enabled or disables NFC // value can true or false public void setNfcEnabled() { Intent intent = new Intent(); intent.setAction("com.handheldgroup.shutdown.NFC"); intent.setPackage("com.handheldgroup.shutdown"); intent.putExtra("enable", value); startService(intent); } // Enabled or disables Airplane mode // value can true or false public void setAirplaneEnabled() { Intent intent = new Intent(); intent.setAction("com.handheldgroup.shutdown.AIRPLANE_MODE"); intent.setPackage("com.handheldgroup.shutdown"); intent.putExtra("enable", value); startService(intent); } |