After shutting down the modem and before replacing the SIM, we generate
a temporary random IMEI to prevent accidental disclosure of the new IMSI
under the old IMEI. It should not happen but we do not control the modem
as much as we'd like, e.g. fully power it down. So it may not be
necessary but we consider it defense in depth.
We restore from fa11fc45ca.
We know that this worked well enough the last time as we run out of time
to test new things.
Ideally, though, we manage to consolidate the SSH use and the switch use
(and the Web use) to not have different implementations of the same
functionality so that testing gets much simpler.
This can currently only provide a random IMEI only. But we could easily
recover the deleted script. But it'd be nicer to have a central
configuration for the mode.
When toggling the switch, a lock is held for a relatively long time,
preventing another toggling of the switch to be noticed. With this
change, I hope we can first shutdown the modem, wait for a toggle, and
then continue.
We're losing the abort function but I currently don't know how we would
be able to keep that functionality given that the toggle is queued and
we don't get the notification.
This is a snapshot only. It does not work and serves as a prototype
only. Now, we can see how to add a menu item and how to call our
executable on the flash.