Rebooting device automatically MY android samsung j5(j500h) is automatically rebooting. kindly let me know any suitable answer that will keep safe my Data
If you are stock, rooted. Then most likely it is your battery. Take your battery out, plug into charging port with battery. Boot phone and see if it processes. The battery has to be removed even if plugged in to test.

The rule of thumb on Lithium ion batteries is 500 charges then done. 

When the battery loses its ability to hold the charge, in a lack of better words, it tells the charging to start and stop. Since the device does not maintain any secondary charge backup it tricks the device telling it that the battery has been pulled. Kinda like a short in a wire. The battery "should" never fully discharge on its own. Lithium batteries do not store memory, the memory of being full or whatever level it has is programmed into your device. This can be recalibrated, but in my experience, it has never made that big of a difference. But there are apps for that for free to try. The reading of your battery % is not fact/true it's an estimated. so if the battery is bad the devices does not know that.