How, if there's anyway, can I factory reset my iphone 4 without losing jailbreak?

Only thing is, I'm not sure if its jail broken. I just know that it was a certain carrier, but now it will work with any company's SIM card. I don't want to lose my pictures & I don't have music or apps because there's a restriction code on that I do not know. Any help?

There's no way to do it