I'm looking for a way to find out if an android device is SIM locked or not. I know that in /efs/ should be a file where this setting is stored at. The problem is that without root there's no access to /efs/.
USSD codes like ##7465625# does no more work for Android 4.1.2 on Samsung devices.
So does anybody know how I can figure out if there's a SIM lock enabled?
Thanks, tom
Assuming we're talking about the same kind of Sim Lock, you can check SIM Lock and a variety of other things using the Telephony Manager
.
TelephonyManager telephonyManager = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);
int simState = telephonyManager.getSimState();
if (simState == TelephonyManager.SIM_STATE_NETWORK_LOCKED) {
//do something
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With