Chosen Solution

battery is full still mobile getting restart and when connected to power it is not getting restart. it’s not software problem because as I formatted it and changed software.. so what part is in problem?

Software could be corrupted or incompatible software flashed.

I think that the battery is dead you need to replace it. I had the same problem with a 3060 mAh battery bought on Aliexpress…

Just upgrade your phone lol they fixed it

how to reset redmi 2