Skip to Content
Platform.Ontology

Boot time and uptime

Reads time since boot; the boot timestamp itself is a classic stable ID until restart.

Gets silentlyDevice detailsSoftware stateAndroid and iPhoneWhen the app opensWhile you use it

In one line

Can see how long your phone has been on, and on Android its restart count

Reads time since boot; the boot timestamp itself is a classic stable ID until restart.

now minus uptime gives a boot timestamp that stays constant until reboot and is near-unique across devices. That is why Apple made it a Required Reason API.

What it can and can't do

What the user does: Nothing. The app checks when it starts

It can

  • See time since the last restart on Android, to the millisecond
  • See the boot count on Android 7 and newer
  • Use the restart time as a rough ID until the next restart

It cannot

  • Use boot time on iPhone without a stated reason; Apple has enforced a reason rule since 1 May 2024
  • Keep a stable ID after you restart the phone
  • Learn what you did before the restart

How it differs between platforms: Android shares uptime with no prompt. iPhone only allows it for approved reasons that developers must declare.

On Android and iPhone

AndroidiPhone
StatusSupportedBehind a flag
First versionAndroid 1.0 (API 1)iOS 17.0
Permission or entitlementNot listedentitlement
Protection levelnoneentitlement
How access is grantednonenone
What the user seesNot listedNot listed
How long it lastsNot listedNot listed
How to take it backNot listedFingerprinting banned regardless of ATT
Store policyNone listedNone listed
APISystemClock.elapsedRealtime() (ms, with sleep), uptimeMillis(); Settings.Global.BOOT_COUNT (API 24)Reason codes 35F9.1, 8FFB.1, 3D61.1; enforced 2024-05-01
NotesMillisecond resolution; boot count is an integerNone

Data you get

What comes back: Seconds since boot
Shape: float
How often: Continuous

FieldTypeUnitRangePrecision
uptime_msintegerms0 to 1e101 ms
boot_countintegerboots0 to thousands1

Technical limits

  • Fingerprinting banned by Apple even with reasons

The story

What it is

An app can work out the exact moment your phone last restarted.

For you

You never see it. Subtract uptime from the clock and you get the time you rebooted. That time stays the same for days, so it can act as a tag until you restart.

For makers

Makers use it to measure startup speed and spot reboots after crashes. Trackers used it as a near unique ID, which is why Apple made it a Required Reason API.

Where you see it

TypeExampleApps
gamesA game checks uptime to see if a crash happened after a restart, and uses it to fix freezes.None named
analyticsA crash tool shows that most failures happen soon after a reboot.None named
securityA fraud tool notes that two logins share the same boot time and flags a copied device.None named
adsAn ad partner joins sessions with the same boot time into one device.None named
bankingA bank detects a time jump that suggests the clock was changed to cheat a code.None named
developerA developer measures cold start time of the app after the phone restarts.None named

Risks

  • Works like a short term ID
  • Hard to notice

Android and iPhone in short

  • Android: Available with no prompt through system uptime.
  • iPhone: Apps must give an approved reason or Apple may reject them.

What the platform says

  • Apple: Required Reason APIs. Developer rules: apps that read system boot time must declare an approved reason in their privacy manifest.

Good uses and abuse

Legitimate uses

  • Measure intervals
  • Absolute timestamps for in-app events

Known abuse

  • Cross-app device ID until reboot

Scores

ScoreValueMeaning
Sensitivity1 of 5How revealing the data is
Utility2 of 5How useful it is to honest apps
Friction1 of 5How much the user has to do
Fingerprint bits18Rough identifying entropy, when known

History

  • 2016-08, Android 7.0 (API 24): BOOT_COUNT setting exposed
  • 2024-05, iPhone iOS 17.x: System boot time is a Required Reason API

Sources

How well checked: Inferred from related behavior.

On this page