[Google Pixel XL Questions & Answers] flash713:
[MENTION=4416125]cassato[/MENTION] : This should be in Q&A section or possibly in a battery thread somewhere else on xda but definitely not in the development section. I do not mean that in a rude way at all. More of a heads up for you for the future.. XDA rules are we must do some serious searching first and if we find nothing on whatever it is somewhere here in XDA world then we can then put our detailed info into an appropriate section...

Your battery can wear out because of many different things!! There are MANY battery life threads all over xda. Your battery could be bad because our phones came out in 2016 or if you used an aftermarket charger they aren't rated like the ones our device came with that are made for our phones and generic chargers will mess up your battery because of this! If you have a 'not so good' signal it will cause the device to keep searching for a signal and that's a battery drainer. You could have some sort of virus on your device and that also can cause abnormal battery drain or you may have some apps that are running 24/7 in the background and that can and will also drain lots of battery. EX kernel is same as stock kernel pretty much as far as battery life goes unless you turn max power way down on cluster 1 and 2 and maybe use LKT magisk module and battery saving profile. Check out LKT! It can be found in downloads part of magisk manager or here on xda. Legendary kernel tweaks! Real kernel tweaks that work! I believe EX kernel is supported on LKT. You can read all about LKT more in magisk managers download section just toss in LKT on download and click it and it has links to the xda thread. There are LOTS of good reads on battery but I gaurantee you your issue is one of the things I speak of here. Process of elimination is what I'd do and I'd begin with the things that don't cost $$. ??

If you've used a charger other than your pixel charger I'd say grab a "new oem battery" online but make sure it's an original brand & a new real pixel oem battery before you purchase it if you get one. If you've never used another charger your battery can still be bad because it's old. There are battery test apps on Google play store, Accu Battery I believe is one. Maybe check that out.. Where you live what's your signal read? Lte discovery app will tell you your signal strength in your status bar. See if it stays weak alot of the time... Check your carrier online and see if maybe they're doing work in your area, maybe that can be a thing.. I've been there before. For apps that run often ElemetalX kernel manager app has a battery monitor in it that can be used to see what apps are draining what but regular ole Android will also tell you how much an app ran..etc ...Naptime and Servicely are some good battery saver apps that stop services that run that don't need to and make apps sleep faster and differently and they can and will save you some juice if that be the case. As far as virus's go there's no easy way around that. I always format data and wipe my internal storage and flash a factory image and keep nothing from before far as backed up apps go ...etc... And be sure and change your passwords on your accounts and do a good security checkup on everything. When an account gets hacked much of the time Google sign in records will have your device name as if you signed in with your phone but it's the hacker putting bogus info in to slip by and hopefully not be noticed so that they can keep gathering info.. I always delete devices off my account and start fresh if I believe I've been compromised. There is an app named 'Hacked' on Gplay it tells you if your accounts have been compromised. Pretty neat app! Lots of things can be the cause of abnormal battery drainage. Read up on everything you can on here. XDA has everything we'd ever want to know or need to know already typed out. I always do a Google search and add "XDA" at the end of whatever I'm searching for then bookmark the hell out of several sites and read read read. Search, read, learn,, and pass it on... Anyway good luck and I hope you get this figured out soon. Hope my short book about battery helps you out too. Haha! That's why I first came to XDA forums back when the og HTC Evo and the Galaxy S2 had just came out. Back then BBS , aka Better Battery Stats was where it was at! Android wasn't optimized like it is now. It's soooo much better than it used to be in that way. ✌️