An Pixel XL phone shutdown by itself My Pixel XL phone rencently always turns off by itself. Most times it turned off just after starting up, a few times it worked longer and everything looks fine. when it happend, a "phone is shuting down"(maybe not exactly these words because my phone is not in english) dialog pop up and then shut down in a few seconds.

I tried restoring it to factory image, and tried replace a new battery, and had not fix this.

I got the log using "adb logcat", here is it : full log file

Now I think its because of a hardware part, but seems not battery. I want to find out which hardware part is it from the log file, but I don't know much about the log messages, can anyone help to find some clues about what cause the auto-shutdown? Thank you very much!

John.
Based on the provided logcat it seems like the shutdown is initiated by the healthd that manages for example the battery status:

healthd : battery l=63 v=3913 t=72.7 h=3 st=2 c=5 chg=u


This line contains two values of interest:


h=3 is the battery health value and the value 3 means BATTERY_HEALTH_OVERHEAT. 
t=72.7 is the battery temperature in Celsius. This value is quite high taking it as temperature in Celsius as Android does. Hence I would assume that the battery provides the temperature in Fahrenheit but the device expects a Celsius value and therefore thinks that the battery temperature is very high. The default shutdown temperature in Android is 68°C.


What I not really understand is that all healthd message contain the h=3 value even if the temperature is lower. May be this value also reflects past temperature states.

Note: Internally Android does not directly use the temperature in Celsius, instead it uses   Centigrade (Celsius * 10). 

At the moment I would recommend to do the following test: Pack your phone into a water proof box and place it for some minutes in he refrigerator (make sure you use the part that has more than 0°C, you just want to cool down the device not freeze it!).
Then get it out of the fridge and start it, and measure the run-time until it shuts down. The time should be larger than before.