![]() replace reboot,recovery with reboot to reboot the device.replace su -c with adb shell to run the command using adb.If you're running Android KitKat or above * and have root access, you can try this command: adb shell su -c 'setprop sys.powerctl reboot,recovery' I do not know about Nougat but it doesn't work for Oreo though.Īdb shell su -c 'am start -a _REQUEST_SHUTDOWN -ez KEY_CONFIRM true -activity-clear-task' # I kept this here for historical purposes only. On Android Oreo, this works and does a graceful shutdown:Īdb shell su -c 'am start -a .action.REQUEST_SHUTDOWN'Īdb shell su -c 'am start -n android/.ShutdownActivity' #alternative the aforesaid intent is supposed to be passed to this component under normal circumstances, but calling the component alone works tooĪdb shell su -c 'svc power shutdown' # alternative tested on Android 5.0, 6.0.1 and 8.1.0įollowing is an alternative and is tested on Android 4.2, 5.0 and 6.0.1. Note: All the following commands below require root access.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |