I've seem some suggestions on the internet that we can do a factory reset on the Motorola Moto G (2nd gen) by using the following commands:
fastboot erase modemst1 fastboot erase modemst2 fastboot erase cache fastboot erase userdata
Or another variant with just
fastboot erase cache fastboot erase userdata
Now, the fastboot CLI provides the following description for "erase":
Erase a flash partition.
In that case, I'm worried that these commands just erase the partition, instead of reseting to factory state.
What I mean is: what this erase command actually do? It erases the partition leaving nothing there, or it restores it to the factory state?
These commands really do a factory reset through fastboot?