This question is a simple one: how much can you trust the "factory restore/reset" option on an android device?
If the device has possibly been compromised, is it possible the "factory reset" will be compromised as well, leaving artifacts of the infection after it is run?
If the device has been rooted, or were to be rooted, would this change anything?
(Also, I recently posted this question about whether or not it is possible to backup and android so it can bu run on a virtual machine, if you would like some background on why this might be an issue.)