Android 的复制保护如何检查设备是否已 root?
在 http://developer.android.com/guide/publishing/licensing.html,在“复制保护的替换”部分下,它说:
Android Market 上旧版复制保护机制的限制 使用它的应用程序只能安装在兼容的计算机上 提供安全内部存储环境的设备。为了 例如,无法从市场下载受版权保护的应用程序 到提供 root 访问权限的设备,并且应用程序无法 安装到设备的 SD 卡。
Android 的(同时已弃用)复制保护如何检查设备是否已 root?据 Dianne Hackborn 说,据我所知,这是不可能的(参见 如何检测设备是否已在应用程序中获得 root 权限?)。所以这只能意味着,检查是通过一些(公众未知的)混淆标准检查来完成的,我想显然不仅仅是简单检查“su”命令是否存在。 有人知道更多关于检查逻辑的信息吗?或者它的安全性如何?
On http://developer.android.com/guide/publishing/licensing.html, under section "Replacement for Copy Protection" it says:
A limitation of the legacy Copy Protection mechanism on Android Market
is that applications using it can be installed only on compatible
devices that provide a secure internal storage environment. For
example, a copy-protected application cannot be downloaded from Market
to a device that provides root access, and the application cannot be
installed to a device's SD card.
How can Android's - meanwhile deprecated - Copy Protection check whether the device is rooted? Afaik it's not possible, also according to Dianne Hackborn (see How can you detect if the device is rooted in the app?). So that can only mean, the check is done by some (unknown the the public) obfuscated criteria check, obviously not just a simple check whether the 'su' command exists, I suppose.
Does anybody know more about that check logic - or how secure that is?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
这就是我使用的:
理论上,它不会在所有情况下工作,因为用户可以将“su”放置到非标准位置,该位置不在路径中,但实际上如果他这样做,其他需要的应用程序知道“su”在哪里也找不到它,所以root的目的就落空了。
This is what I use:
Theoretically, it's not going to work in all cases, because a user can put 'su' to a non-standard location, which is not in a PATH, but practically if he does that, other applications that need to know where 'su' is won't find it either, so the purpose of rooting will be defeated.
虽然超级用户应用程序的存在并不是判断手机是否已root的完美方式,但它是一个很好的指示。为什么不直接检查
com.noshufou.android.su
包是否已安装?我从未尝试过,但我不明白为什么它不起作用。
While the presence of the Superuser app isn't a perfect way to tell if the phone is rooted its a pretty indicator that it might be. Why not just check to see if the package
com.noshufou.android.su
is installed?I've never tried it but I don't see why it wouldn't work.
这肯定会影响您的安装率。尽管您计划以 1000 美元的价格出售您的应用程序,但这将产生比您可以采取的任何其他措施更糟糕的效果。
This will definitely affect your install rate. Although you are planning to sell your app for $1000, that is going to have a much worse effect than anything else you could to it.