My m31 keeps on rebooting sometimes it automatically restarts and turn

my m31 keeps on rebooting sometimes it automatically restarts and turns

on but sometime it gets stuck on boot logo when its stuck on boot logo

and u try to force restart while on charge it gets stuck on charge logo

after like 2 hrs it returns bacvk to normal ive tried performing factory

reset and wiping cache data partition it didnt work and sometimes very rarely it goes all black when i try to power it on it just vibrates the screen stays black no matter wht key combination i try it stays blank and after like 1 day of kep on trying and trying it gpes back to normal i heats when charging during this stage pls tell the problem

crwdns2934089:0crwdne2934089:0 crwdns2934093:0crwdne2934093:0

crwdns2934109:0crwdne2934109:0

crwdns2889612:0crwdne2889612:0 0
crwdns2934285:0crwdne2934285:0