On the other hand, if the phone can be unlocked by just changing the SIM why did you put the lock code in the first place?
My idea is this: * set a lock code in the settings, but disable autolock (which includes boot-time check) * at boot time, have smscon check for SIM change * if known SIM found, enable autolock (if wanted), possibly checking lock code before continuing boot process * if unknown SIM found, keep locking disabled (if wanted) * at shutdown, have smscon disable autolock so the lock code is not checked by the system at next boot A thief, after changing the SIM, would not be asked for the lock code and (hopefully) would not flash the device. We could try to recover it using smscon. Our data is hopefully encrypted and safe. Does that make any sense?