Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/afkT/DevUtils
/ requestRoot
Method
requestRoot
lib/DevApp/src/main/java/dev/utils/app/ADBUtils.java:61–63 ·
view source on GitHub ↗
请求 Root 权限 @return true success, false fail
()
Source
from the content-addressed store, hash-verified
59
* @
return
{@code true} success, {@code false} fail
60
*/
61
public
static
boolean requestRoot() {
62
return
ShellUtils.execCmd(
"exit"
, true).isSuccess();
63
}
64
65
/**
66
* 判断 APP 是否授权 Root 权限
Callers
nothing calls this directly
Calls
2
execCmd
Method · 0.95
isSuccess
Method · 0.45
Tested by
no test coverage detected