GetSimInfoTool
Returns SIM card details from android.telephony.TelephonyManager. simSerialNumber (ICCID) needs READ_PHONE_STATE/privileged access and is null on API 29+ for non-privileged apps; SecurityException is caught and yields null. Carrier name and country ISO need no permission. Output: sim_serial (nullable), carrier_name, country_iso, subscription_id (the default subscription's id — TelephonyManager.subscriptionId on API 30+, SubscriptionManager.getDefaultSubscriptionId() below; -1 if none), and slot_index — the physical SIM slot of that subscription (SubscriptionInfo.simSlotIndex, which needs READ_PHONE_STATE, falling back to the permission-free SubscriptionManager.getSlotIndex on API 29+; -1 if unknown).