我需要一个逻辑为我的Android apk,如果一个手机是根的,那么它应该显示弹出到用户,你使用根设备,并退出apk。有人帮助TIA..。
发布于 2019-06-19 17:12:10
首先在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
https://stackoverflow.com/questions/56663940
复制相似问题