From c3f6f1efbc2bdb33530aade69824474f2f61573d Mon Sep 17 00:00:00 2001 From: Aminda Suomalainen Date: Mon, 25 Nov 2024 10:48:35 +0200 Subject: [PATCH] n/androidbattery.md: initial commit --- n/androidbattery.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 n/androidbattery.md diff --git a/n/androidbattery.md b/n/androidbattery.md new file mode 100644 index 0000000..0acb761 --- /dev/null +++ b/n/androidbattery.md @@ -0,0 +1,27 @@ +--- +layout: mini +comments: true +title: "Android battery use or CPU leak detection the proper way" +permalink: /n/androidbattery.html +sitemap: true +excerpt: + If your Android device is constantly out of battery, you will probably check + the settings or some app. No, both of those lie, Android is a Linux so just + use top. +--- + +# Checking for Android battery drainer + +```bash +top -b -n 1 -o %CPU,%MEM,CMDLINE -s1 -m 20 +``` + +That is all there is to do upon having access to `adb shell` whatever way you +prefer. Look for high CPU and MEM use an observe the app ID for the truth. + +For some reason the system and the battery monitor in settings won't bring that +to your attention. + +Bonus points for you if the cause is some app performing CPU locking and heating +up your phone due to being unable to access a tracking domain that wishes to spy +upon you.