If you do a factory reset on your android phones such as Samsung Galaxy S6, S6 Edge, S6 Edge+, LG G4, G3, HTC One M9, M8, Sony Xperia Z3+, Motorola Moto G/E/X, Huawei, Lenovo, Xiaomi, your files such as contacts, text messages, photos, videos, music files, android app data, notes, sms, game data will be deleted from your android phone.
The good news is that it is possible to recover lost data after android phone/tablet factory reset. See this step by step android data recovery guide.
You'd better stop using android phone before you get back your lost files. The android data recovery can undelete contacts, messages, photos jpg png gif bmp jpeg tif tiff raw image data, videos mp4 3gp mov wmv avi asf rmvb, songs mp3 ac3 wav from android phones internal storage and memory card, such as sd card, microsd, sdhc, sdxc, sd mini, cf card. No rooted required.
Here's some other data recovery solution
How to recover data from android phone sd card
Android photo recovery
Android phone recycle bin