简体   繁体   English

如何检查是否可以以编程方式重新启动 Android 设备?

[英]How to check if an Android device can be rebooted programmatically?

I am using a Android device having custom ROM and need to reboot that device.我正在使用具有自定义 ROM 的 Android 设备,需要重新启动该设备。 I am able to reboot the device from hardware side, but I want to programmatically check if the device can be rebooted.我可以从硬件端重启设备,但我想以编程方式检查设备是否可以重启。

Is there any way to do that?有没有办法做到这一点?

Check the device is rooted or not.检查设备是否植根。
If the device is rooted, then request root permission and you can reboot the device.如果设备已root,则请求root 权限,您可以重新启动设备。

Here is how to check root access is available or not.以下是如何检查 root 访问权限是否可用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Android:重新启动设备后如何在服务中运行线程 - Android: how to run a thread in service after the device has been rebooted 安卓设备重启后如何启动我的申请流程? - How to start my application process when a android device is rebooted? 无法在Android设备的省电模式下以编程方式检查网络信息 - Can not check network info programmatically in battery save mode in android device 如何以编程方式检查android设备是否支持DLNA - How to check whether an android device supports DLNA or not programmatically 如何检查Samsung Gear 2是否以编程方式与Android设备配对? - How to check if Samsung Gear 2 is paired with Android device programmatically? 如何以编程方式检查Android中蓝牙设备的连接状态? - How to programmatically check connection state of a Bluetooth device in Android? 如何以编程方式检查Android设备上的USB主机支持? - How to check usb host support on android device programmatically? 鉴于不再支持HONEYCOMB BOOT COMPLETED,我如何发现我的设备已重启? - How can I discover that my device has rebooted, given that HONEYCOMB BOOT COMPLETED is no longer supported? 以编程方式检查 android 设备是否有 Google Play? - Programmatically check if android device has Google Play? 我们可以通过编程接近Android设备的硬件吗? - How close can we programmatically get to the hardware of an Android device?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM