The answer is simple you need to perform a hard reset or factory reset. If you perform a hard reset, you can get rid of most issues which cause black screen, boot loops, force close errors, bugs, heating situations, and battery drain. However, performing a factory reset would delete all the files and data on your device. So it is recommended to have a full backup of the data before doing the reset. Once you reset, your device will be as smooth as a new device. If you are interested in performing a factory reset/hard reset then there are two methods to do so. All you need to do is follow the step-by-step guides mentioned below.
How To Factory/Hard Reset Google Pixel 2/Pixel 2 XL
There are 2 ways to Factory/Hard Reset Google Pixel 2/Pixel 2 XL. 1) From Phone’s Settings 2) From Phone’s Recovery
#1 Factory Reset/Hard Reset using Phone’s settings
First of all, go to the Settings of your device and scroll down to “Backup & Reset” option. Now select the option “Factory data reset” and then enable Erase Internal Storage. Tap on the “Reset Phone” option at the bottom of your screen and select OK. Done!!
#2 Factory Reset/Hard Reset using Recovery
Switch off your device and boot it into recovery mode. Now, select “Wipe data factory reset” and wipe the cache partition and dalvik cache. Once done, return to the main menu and select “Reboot system now”. Done!!