如果测试手机根植 [英] Testing if a phone is rooted

查看:152
本文介绍了如果测试手机根植的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可能重复:结果
  确定一个植根设备上运行

我想知道刚才的的手机扎根,不要求root权限。我该怎么做?

I would like to know just whether or not a phone is rooted, without requesting root privileges. How can I do that?


  1. 测试,如果 File.Exists(/系统/斌/苏)?不知道,我觉得我不能因权限

  2. 如果超级用户的应用程序安装检测?嗯,我想我需要一个特殊的许可使用软件包管理系统 超级用户是不onlu苏经理(我知道SuperSU为例)

  3. 试图运行是不是一种选择,因为它触发苏提示,这是我不希望在一个非root程序

  1. Testing if File.Exists("/system/bin/su")? Not sure, I think I cannot due to permissions
  2. Testing if Superuser app is installed? Hmm, I think I need a special permission to use PackageManager and Superuser is not the onlu su manager (I know SuperSU for example)
  3. Trying to run su is not an option because it triggers the su prompt which is something I don't want in a non-root app

你知道吗?我的目的是要获得多少设备是植根匿名统计,显然与用户同意:)

Any idea? My purpose is to obtain anonymous statistics on how many devices are rooted, obviously with user's consent :)

推荐答案

选项1。它是可能的,它不需要任何特殊的许可。

Option 1. It is possible, it doesn't need any special permission.

选项2根植手机可能不附带任何超级用户管理器应用程序。

Option 2. The rooted phone may not come with any Superuser manager application.

选项3正如你所说,这是不检测的好办法。

Option 3. As you said, it's not a good way to detect.

此外,还有另一种选择就是(通过检查ro.build.tag getprop | grep的ro.buil.tag android.os .Build.TAG )是否包含 testkeys 字符串。

Besides, there's another option that is to check ro.build.tag (using getprop | grep ro.buil.tag or android.os.Build.TAG) if it contains testkeys string.

编辑:对于选项1,我建议你用的setuid / setgid权限发现(即查找/ -perm -2000 -o -perm -4000 ,并检查是否苏是列表)

for option 1, I would suggest you find by setuid/setgid permission (i.e. find / -perm -2000 -o -perm -4000, and check if su is in the list)

这篇关于如果测试手机根植的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆