1

To describe the issue better I need to define the word "total uptime". We all know what the uptime is: a number of hours since the last reboot i.e. the amount of time when the phone was on. I want to know the same number but throughout the entire device lifetime, I want to know how many hours (days, weeks) the phone was powered on since the production date.

Is there any programmatic way to obtain this info via ADB or any other toolset? Can a battery health be an estimator? Does it have any measurable metrics of wear?

I am interested in all ways, both for rooted phones and not. My device is Samsung S21, but I'm interested for generic way which will work for all vendors.

Suncatcher
  • 444
  • 6
  • 25
  • I don't think that there is a way to detect the whole life uptime of a phone: the common uptime is easy to get/calculate because you only need RAM to calculate it or even better use the CPU counter (not sure if RAM CPUs contain such a counter). However for the total uptime you need persistent storage to save the states, otherwise the state would be lost after a power off or reboot. Most chips don't contain flash storage which reduces the chance that the total uptime is somewhere recorded. The best chance would be the flash storage system itself. – Robert Jul 27 '23 at 06:52
  • But in difference to SSDs in PCs which collect a lot of usage data you can get via S.M.A.R.T API the flash storage of phones is a bit more simpler so I don't know what data is collected and if there is a possibility at all to retrieve them if they are collected. – Robert Jul 27 '23 at 06:53
  • I kind of remember this question has been asked before (or perhaps I mistook it with "first-time boot/power on"), but somehow I can't find it, and AFAIR there was no satisfying answers (if any). – Andrew T. Jul 27 '23 at 08:33
  • Ambiguous dupe of How to know how long my smartphone is running, though the accepted answer is about "uptime since boot". – Andrew T. Jul 27 '23 at 09:22
  • @AndrewT. yes, the abovementioned question is about regular since-last-boot uptime, not the total lifecycle one. – Suncatcher Jul 27 '23 at 18:18

0 Answers0