Hi I have also facing this problem, but I had rooted phone with twrp wich I did backup before putting sim... I also had factory reset but I restored my data with twrp then I found SamKey program and with this tool I changed CSC code to XEO wich gives me no factory reset after I put sim to phone...