Question [Q] Is there any security app available which will work after master reset


Some days ago my friend phone was stolen but he has already installed anti theft app on his mobile this should send automatic sms if sim card changed he previously tested this feature by switching sim cards but after stolen he didn't get any sms or anything. I think before using phone thief might be master reset this phone, so my question is that is there any app available that will work after master reset or preventing anyone to give a master reset.