在android上检测磁盘加密

在android上检测磁盘加密

本文介绍了在android上检测磁盘加密的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于Android SDK 3.0,用户可以选择对其整个磁盘进行加密,基本上相当于给定设备上的加密/数据。该选项在手机首选项中显示,因此我认为该选项可供应用程序读取。有这个DevicePolicyManager看起来像它有信息,但我明白一个应用程序必须实现一个接收器,如?这对我来说并不是很有用,因为我不想明确地管理用户的设备,当然也不希望他们同意这样的事情来安装我的应用程序。真的不只是一些标志,我可以在某处看到它是否被加密?

Since Android SDK 3.0, users can choose to encrypt their entire disk which basically amounts to encrypting /data on a given device. The option is presented in the phone preferences so I assumed it would be available for read by applications. There's this DevicePolicyManager that looks like it has the information but am I to understand that an app must implement a receiver like here? This doesn't really work for me since I don't want to explicitly manage the user's device and certainly don't want them to have to agree to such a thing for them to install my application. Is there really not just some flag I can read somewhere to see if it's encrypted?

推荐答案

你可以尝试使用 getSystemService()获取一个 DevicePolicyManager ,然后调用 getStorageEncryptionStatus(),看看它是否有效。

You could try using getSystemService() to get a DevicePolicyManager, then call getStorageEncryptionStatus(), and see if it works.

这篇关于在android上检测磁盘加密的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-02 13:51