I want a way to input a pin code into sim card pin filed after booting, while Mobile is turned on after logo appears it should ask about the SIM card PIN code I want to type it automatically, how can I do that programmatically for Android devices.
Asked
Active
Viewed 130 times
0
-
I hope you can't. – lexicore Apr 22 '18 at 15:59
-
why ?!! be useful!! – Mohammed Darwish Apr 22 '18 at 16:43
-
I think it would be a secuity flaw if the Android system would allow this. It is possible to disable SIM card PIN request, so if the user did not do this, apps (or anything else) should not be able to do this. – lexicore Apr 22 '18 at 17:07
-
I need this point because I'll publish tablets and want to lock the sim card and I don't want the user know the pin code, I want to input it automatically by an application for security reason – Mohammed Darwish Apr 22 '18 at 18:25
-
So your are developing a custom ROM. You could therefore write a system app or a service that performs the PIN entry. However an advanced user could then just extract the PIN from the ROM image. – Robert Apr 22 '18 at 18:28
-
@robert I don't care by advanced user I need to prevent it from normal user only – Mohammed Darwish Apr 26 '18 at 01:49
-
See this [answer](https://stackoverflow.com/a/12748638/150978). The class [com.android.internal.telephony.IccCard](https://android.googlesource.com/platform/frameworks/opt/telephony/+/tools_r22/src/java/com/android/internal/telephony/IccCard.java) looks very promising, especially the `supplyPin()` method. – Robert Apr 26 '18 at 09:22