While working on the emulator, if I want a new device, all I have to do is delete the old device and create a new one
How would I go about doing the same if I am working on a real android phone? Is just resetting everything to factory settings and formatting the sd card and internal memory enough for this? Will this remove all traces of everything that I might have done on the phone before? (I don't intend to the go to the level of rooting the phone or reflashing the firmware; I will just be working on basic user level applications)
Context:
While working on the emulator, I have seen that the first time I test my program, it crashes (lets say at point A). If I uninstall that app, and reexecute it again on the same emulator, it crashes but at point B, and everytime I repeat it, it crashes at point B afterwards. I see the same effect when working on an entirely different computer or an entirely different virtual device, that is, Install -> Crash at point A -> Uninstall -> reinstall -> crash at point B -> uninstall -> reinstall -> crash at point B... and so on. I am assuming that simply uninstalling the application does not remove all traces of it from the device. I have to delete the old virtual machine and create a new one. So if working on a real phone, if I want to convert it to a "new device", what parameters do I have to reset?