android - 要求在安装应用程序之前对设备进行加密

标签 android encryption android-install-apk

我看过各种SO posts关于如何在应用程序运行时检查 android 文件系统是否加密。

我要做的是阻止应用程序安装,除非设备已加密。 这可能吗?如果不可能,我认为我唯一能做的就是检查我的主要 Activity (和引导服务)中的加密状态,如果未加密则退出 Activity/关闭服务。

我探索了 App Manifest documentation并且还没有找到这样的东西。

最佳答案

Is this possible?

没有。

If not, I think the only thing I could do is check the encryption status in my main activity (and boot services), and exit the activity / close the service if it's not encrypted.

这是可能的,使用 DevicePolicyManagergetStorageEncryptionStatus() .尽管您可能至少想在您的 Activity 中向用户解释为什么用户不能使用您的应用。

关于android - 要求在安装应用程序之前对设备进行加密,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24757450/

相关文章:

encryption - 比特币和加密

python - 如何在Python上使用RSA私钥和SHA256解密

java - 在具有更新的 Android 版本的设备中重新构建和运行 Android 程序时出错(androidapi 15 rev1 到 api 15 rev2)

android - 是什么让 Android 应用程序可以重新安装?

android - 当按下后退按钮时,android显示空白页

android - geocoder.getFromLocation 函数抛出 "Timed out waiting for server response"异常

android - Android、iPhone、BlackBerry常用加解密算法

android - 在 Robolectric 中模拟单击菜单项

java - Android:OnClick 事件不起作用

android - 与不同的开发人员一起更新现有的调试应用程序