1

Sometimes my phone (running LineageOS 14.1 / Nougat 7.1) will lose proper SIM card access, showing a "No SIM card" or "Invalid card" message and not allowing any cellular network accesses anymore. This is always resolved by a reboot.

However, I would prefer to only reset the SIM card access without rebooting the whole phone. Is this possible anyhow? Ideally programmatically?

I tried to switch flight mode off and on using /system/bin/settings put... and /system/bin/am broadcast..., but the issue persists when I do so.

5
  • Hello. Why are you trying to switch Airplane mode using command line when you could just do it using settings app or through quick settings toggle button for it? Identify whether Airplane mode actually solves the problem or not. If it does, only than proceed towards a command line approach, otherwise time and efforts would be spent in a wrong direction.
    – Firelord
    Aug 19, 2020 at 12:26
  • Since I read that it matters how long the airplane mode is switched on, it seemed appropriate to test it using a script containing the three steps (turn on, wait, turn off). I guess it's a matter of taste, but I'm a command-line type of person...
    – ternary
    Aug 19, 2020 at 20:43
  • consider physical reason (loose sim tray)
    – alecxs
    Aug 19, 2020 at 21:15
  • @alecxs: A physical reason seems indeed likely since the issues did not occur with another SIM card I tried. Still, I'm curious whether a full reboot can be avoided on android phones.
    – ternary
    Aug 20, 2020 at 5:23
  • svc data disable
    – alecxs
    Aug 20, 2020 at 10:08

0

You must log in to answer this question.

Browse other questions tagged .