It won't be attached to the sim, it would be installed on the phone. With android, some of the good software can survive a reformat though if the phone was rooted. without root, it would be wiped. IOS I don't think would allow much without it being jailbroken.