This question already has an answer here:
Is there any way to convert existing Android device into virtual machine?
I'm going to do factory reset and pretty sure that some valuable passwords etc. will be lost after it. That's why it would be great to have old data saved in virtual machine on PC so that later these forgotten info can be accessed.