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.
如何AndroID – 同时弃用 – 复制保护检查设备是否已植根?根据Dianne Hackborn(见How can you detect if the device is rooted in the app?)的说法,这是不可能的.所以这只能意味着,检查是由一些(未知的公共)混淆标准检查完成的,显然不仅仅是简单检查’su’命令是否存在,我想.
有没有人更了解那种检查逻辑 – 或者它有多安全?
public static boolean isDeviceRooted () { boolean ret = false; String path = null; Map<String,String> env = System.getenv(); if (env != null && (path = env.get("PATH")) != null) { setDevicePath(path); String [] dirs = path.split(":"); for (String dir : dirs){ String suPath = dir + "/" + "su"; file sufile = new file(suPath); if (sufile != null && sufile.exists()) { setSulocation(suPath); ret = true; } } } return ret;}
从理论上讲,它并不适用于所有情况,因为用户可以将’su’放在非标准位置,这不在PATH中,但实际上如果他这样做,其他应用程序需要知道’su’的位置也不会找到它,因此生根的目的将被打败.
总结以上是内存溢出为你收集整理的Android的复制保护如何检查设备是否已植根?全部内容,希望文章能够帮你解决Android的复制保护如何检查设备是否已植根?所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)