通过adb shell pm list packages | findstr xxx 判断是否存在下面的包名
"com.noshufou.android.su",
"com.noshufou.android.su.elite",
"eu.chainfire.supersu",
"com.koushikdutta.superuser",
"com.thirdparty.superuser",
"com.yellowes.su",
"com.topjohnwu.magisk"
通过adb shell pm list packages | findstr xxx 判断是否存在下面的包名
"com.koushikdutta.rommanager",
"com.koushikdutta.rommanager.license",
"com.dimonvideo.luckypatcher",
"com.chelpus.lackypatch",
"com.ramdroid.appquarantine",
"com.ramdroid.appquarantinepro",
"com.android.vending.billing.InAppBillingService.COIN",
"com.chelpus.luckypatcher"
"/data/local/",
"/data/local/bin/",
"/data/local/xbin/",
"/sbin/",
"/su/bin/",
"/system/bin/",
"/system/bin/.ext/",
"/system/bin/failsafe/",
"/system/sd/xbin/",
"/system/usr/we-need-root/",
"/system/xbin/",
"/cache/",
"/data/",
"/dev/"
除了这种方法还可以通过Linux 的which命令来查找su文件,这样会更全面的查找。但是不可避免的一个问题就是,如果曾经root过但是root权限已经失效的设备会被判断成已经root。这个可以根据需求添加
建设银行解析后的判断节点有:
不能包含下面这些apk文件:
public static final String[] a = new String[]{"com.noshufou.android.su", "com.noshufou.android.su.elite", "eu.chainfire.supersu", "com.koushikdutta.superuser", "com.thirdparty.superuser", "com.yellowes.su"};
public static final String[] b = new String[]{"com.koushikdutta.rommanager", "com.koushikdutta.rommanager.license", "com.dimonvideo.luckypatcher", "com.chelpus.lackypatch", "com.ramdroid.appquarantine", "com.ramdroid.appquarantinepro"};
public static final String[] c = new String[]{"com.devadvance.rootcloak", "com.devadvance.rootcloakplus", "de.robv.android.xposed.installer", "com.saurik.substrate", "com.zachspong.temprootremovejb", "com.amphoras.hidemyroot", "com.amphoras.hidemyrootadfree", "com.formyhm.hiderootPremium", "com.formyhm.hideroot"};
以下文件可以执行su操作:
public static final String[] d = new String[]{"/data/local/",
"/data/local/bin/",
"/data/local/xbin/",
"/sbin/",
"/su/bin/",
"/system/bin/",
"/system/bin/.ext/",
"/system/bin/failsafe/",
"/system/sd/xbin/",
"/system/usr/we-need-root/",
"/system/xbin/"};
以下目录是否有写入的权限: (成功)
public static final String[] e = new String[]{"/system",
"/system/bin",
"/system/sbin",
"/system/xbin",
"/vendor/bin",
"/sbin",
"/etc"};
}
本文地址:https://blog.csdn.net/wangjicong_215/article/details/107385590
如对本文有疑问, 点击进行留言回复!!
step2:使用LitePal操作数据库,基于AndroidStudio。练习
shell练习:使用脚本同步系统时间 + hello world
荐 Kubernetes+docker 浅述-针对云平台测试
项目繁多的情况下,如何通过组织机构的调整管理好重点战略项目?
网友评论