The problem: phone doesn't want to register in network.
- Android device shows No SIM card.
- After playing with menu
*#*#4636#*#*it starts showing Emergency calls only.
- Phone displays available networks, but don't want register in it - says Your SIM card doesn't allow a connection to this network (this means gsm module works well, but complains on sim card).
- This SIM card works well in another phone (this means there is no issue with SIM).
- Any other SIM doesn't work in this phone (in both slots: micro and nano).
- On inserting SIM-card phone asks sim's pin code and accepts it. (this means that phone is communicating with sim well)
- In radio logs the following (collected lines from long output, don't know how relevant is this):
> E/SubscriptionController( 7326): getSubState: invalid subId = 2147483644 D/SubscriptionManager( 6723): [getPhoneId]- fail > D/RilRequest( 7326):  SET_NETWORK_SELECTION_MANUAL error: com.android.internal.telephony.CommandException: ILLEGAL_SIM_OR_ME ret= > D/RilRequest( 7326):  E/GSM ( 7326): Unrecognized RIL errno 7 > D/TelephonyManager( 495): No /proc/cmdline exception=java.io.FileNotFoundException: /proc/cmdline: open failed: EACCES (Permission denied) > E/TelephonyManager( 1078): hasMatchedTetherApnSetting NPE > E/TelephonyManager( 1078): java.lang.NullPointerException: Attempt to invoke interface method 'int com.android.internal.telephony.ITelephony.getTetherApnRequired()' on a null object reference
Full radio log (after ejecting/inserting SIM) http://paste.evervolv.com/view/d00213a4
- More details I've posted on http://en.miui.com/thread-264222-1-1.html (in two words: phone Xiaomi Mi Note Pro, never locked, worked before 6 month).
I think this is wide spreaded Android bug - exists many complains on this issue.
UPD1: The SIM is factory micro-sim, not hand cutted one.
UPD2: I am not sure that logs are represents root cause of the bug.
UPD3: The root cause of failure was found in logs:
E/RILQ ( 964): (1/964): RIL[main] qcril_qmi_init_core_client_handles: qcril_qmi_presence_init returned failure(-3) E/RILQ ( 964): (1/964): RIL[main] qcril_qmi_client_send_msg_sync: Failed to send sync qmi msg 0x03 w/(-2) QMI_SERVICE_ERR
This is error of QMI protocol communicating with GSM module. So this is chipset (Snapdragon 810 in this case) hardware error...
It was very loud to say 'android bug'... Android mistake was in hiding so much kind of errors behind common message 'No SIM card'.