Peter van Hoof Member Licensed User Longtime User May 11, 2016 #1 I am trying to check if the phone is encrypted in my app that will wipe a phone. I would like to know if the phone (and SD card) is encrypted so I can tell the user to do so so his data will be securely deleted. I have not been able to find this in the forums. Peter
I am trying to check if the phone is encrypted in my app that will wipe a phone. I would like to know if the phone (and SD card) is encrypted so I can tell the user to do so so his data will be securely deleted. I have not been able to find this in the forums. Peter
udg Expert Licensed User Longtime User May 11, 2016 #2 Did you read this post? I don't know if it's what you're looking for; if not please disregard it. Upvote 0
Peter van Hoof Member Licensed User Longtime User May 13, 2016 #3 udg said: Did you read this post? I don't know if it's what you're looking for; if not please disregard it. Click to expand... Hi, Thank you for that, it seems to be what i'm trying to do but I have no experience with inline Java or the Reflection library. I have experimented with it but have no success so far. I was hoping some library would have this in it. I will give it some more effort and report back if I figure it out. Peter Upvote 0
udg said: Did you read this post? I don't know if it's what you're looking for; if not please disregard it. Click to expand... Hi, Thank you for that, it seems to be what i'm trying to do but I have no experience with inline Java or the Reflection library. I have experimented with it but have no success so far. I was hoping some library would have this in it. I will give it some more effort and report back if I figure it out. Peter
Erel B4X founder Staff member Licensed User Longtime User May 13, 2016 #4 This will only work if you set your app as a device administration app: https://www.b4x.com/android/forum/threads/device-administrator-library.19208/#content The code to get the storage encryption status: Code: Copy Dim r As Reflector r.Target = admin r.Target = r.GetField("dm") Dim s As Int = r.RunMethod("getStorageEncryptionStatus") Possible values: http://developer.android.com/refere...PolicyManager.html#ENCRYPTION_STATUS_INACTIVE It is available in Android 4+ Upvote 0
This will only work if you set your app as a device administration app: https://www.b4x.com/android/forum/threads/device-administrator-library.19208/#content The code to get the storage encryption status: Code: Copy Dim r As Reflector r.Target = admin r.Target = r.GetField("dm") Dim s As Int = r.RunMethod("getStorageEncryptionStatus") Possible values: http://developer.android.com/refere...PolicyManager.html#ENCRYPTION_STATUS_INACTIVE It is available in Android 4+
Peter van Hoof Member Licensed User Longtime User May 13, 2016 #5 Thank you Erel an UDG you are the best. Erel, the link pointing to the values shows API level 11 which should be Android 3.0 or is there another reason for the 4+ limit? Upvote 0
Thank you Erel an UDG you are the best. Erel, the link pointing to the values shows API level 11 which should be Android 3.0 or is there another reason for the 4+ limit?
Erel B4X founder Staff member Licensed User Longtime User May 13, 2016 #6 Android 3 practically doesn't exist: http://developer.android.com/about/dashboards/index.html Upvote 0