If I buy a used and infected phone with a expensive spyware on it that the antivirus does not detect or is unable to remove than will flashing a new custom recovery and custom ROM make it safe to use?
What would be the proper way of doing it? Connect to computer and install new recovery first and then the rom or some other way?
Once I have done these two steps, can I be assured that my phone is clean?
And should I be worried about getting my computer infected?
Edit: If this is not enough then what other actions should I take to be sure that the phone is clean?