繁体   English   中英

Android植根手机根目录状态

[英]Android rooted mobile phone root status

我需要为我的Android APK设置逻辑,如果移动设备已扎根,那么它应该向用户显示一个使用已扎根设备的弹出窗口并退出apk。 有人帮助TIA。

首先在gradle中实现以下库,

implementation 'com.scottyab:rootbeer-lib:0.0.7'

并运行以下代码以检查设备是否为root。

RootBeer rootBeer = new RootBeer(context);
if (rootBeer.isRooted()) {
    //we found indication of root
} else {
    //we didn't find indication of root
}

来源: Git

暂无
暂无

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM