Skip to content

App usageUser activity

PowerLog (CurrentPowerlog.PLSQL) on iOS

iOS PowerLog in CurrentPowerlog.PLSQL: app runtime, screen state, battery, camera and torch events, the time offset table, and where copies hide.

Location
/private/var/containers/Shared/SystemGroup/<UUID>/Library/BatteryLife/CurrentPowerlog.PLSQL (+ Archives/*.PLSQL.gz); copies under logs/powerlogs/ in a sysdiagnose
Proves
Which apps ran in the foreground or background and for how long, screen and backlight state, battery level and charging, camera, torch, audio and location-client activity, per sampled interval
Timestamps
Unix time in seconds on PowerLog's internal clock; correct each value with PLStorageOperator_EventForward_TimeOffset before reporting, UTC
Acquisition
Full file system extraction; a sysdiagnose also carries recent PowerLog databases. Not in iTunes / Finder backups
Retention
The live database covers days; rotated archives extend that to a few weeks on many devices. Measure the oldest and newest rows per table
Collection
Full file system extraction, sysdiagnose

What it is

PowerLog is the battery accounting database iOS maintains so that Settings can show battery usage per app. To do that it samples almost everything that consumes energy: which app is frontmost, whether the display is on and how bright it is, the camera, the torch, audio routes, Wi-Fi and cellular state, location clients, push notifications and charging. For an investigator it is a second, independent pattern-of-life source next to knowledgeC.db and Biome, with a very different design: dozens of narrow tables, one per agent and event type.

The file is a plain SQLite database with a .PLSQL extension. Table names follow the pattern PL<Agent>_<EventType>_<Name>, for example PLBatteryAgent_EventBackward_Battery or PLAppTimeService_Aggregate_AppRunTime. The set of tables and columns changes with every major release, so treat any list as a starting point.

Where it lives

SourcePathNotes
Full file system/private/var/containers/Shared/SystemGroup/<UUID>/Library/BatteryLife/CurrentPowerlog.PLSQL (+ -wal, -shm)The system group container UUID differs per device
Rotated archives.../BatteryLife/Archives/powerlog_<date>_<id>.PLSQL.gzGzipped older databases, one per rotation
sysdiagnoselogs/powerlogs/*.PLSQL inside the archiveCopies taken when the sysdiagnose was generated
Packed sysdiagnoses on diskDiagnosticLogs/sysdiagnose/sysdiagnose_*.tar.gz in a full file systemOlder sysdiagnoses can hold older PowerLog copies

PowerLog is not part of an iTunes or Finder backup. A sysdiagnose is the lightest way to obtain recent PowerLog data without a full file system extraction.

What it proves

  • App runtime per bundle ID in the foreground and background, aggregated over sampling windows (PLAppTimeService_Aggregate_AppRunTime).
  • Screen and backlight state changes, with the frontmost app at the time (PLScreenStateAgent_EventForward_ScreenState and display tables).
  • Battery level, charging and external power connection.
  • Camera (front and back), torch, video playback and audio routing events.
  • Location client status, push messages received, and network usage per process on some versions.

It shows that the device and an app were active, not who used them. Aggregated tables report totals per window, so they bound activity in time rather than pinpoint individual actions.

Key fields

Table (verify on your build)Useful columns
PLAppTimeService_Aggregate_AppRunTimetimestamp, BundleID, ScreenOnTime, BackgroundTime
PLScreenStateAgent_EventForward_ScreenStatetimestamp, BundleID, Display, Level, Orientation
PLBatteryAgent_EventBackward_Batterytimestamp, Level, IsCharging, ExternalConnected
PLCameraAgent_EventForward_*, torch tablestimestamp, state and client bundle ID
PLStorageOperator_EventForward_TimeOffsettimestamp, system (offset in seconds)

Every table has an ID and a timestamp column. Column names differ in case and spelling between releases, and later iOS 18 schemas add columns such as in-call screen time. Run .tables and .schema <table> on your copy first.

Timestamps

PowerLog values are Unix time in seconds, but they run on PowerLog's internal clock, which can drift from wall-clock time after clock changes, and in some sysdiagnose copies is reported to start in the 1970s. The PLStorageOperator_EventForward_TimeOffset table records the correction: add the system value in effect at the time of the row.

SELECT datetime(r.timestamp + (SELECT o.system FROM PLStorageOperator_EventForward_TimeOffset o
                               WHERE o.timestamp <= r.timestamp
                               ORDER BY o.timestamp DESC LIMIT 1), 'unixepoch') AS adjusted_utc,
       r.BundleID, r.ScreenOnTime, r.BackgroundTime
FROM PLAppTimeService_Aggregate_AppRunTime r
ORDER BY r.timestamp;

If no offset row precedes a value, use the oldest offset and say so. Always validate the corrected times against a known event such as the acquisition itself.

Retention

The live CurrentPowerlog.PLSQL typically covers days, and rotated .PLSQL.gz archives add older periods. How far back you get depends on device activity and release. Old sysdiagnose archives stored on the device or on a computer can extend coverage by months, but they duplicate rows already present in newer copies: deduplicate before counting events.

Collection

  • From a full file system, collect the whole BatteryLife folder including Archives, plus any sysdiagnose_*.tar.gz under DiagnosticLogs.
  • From a live device without extraction, generate a sysdiagnose (see the sysdiagnose and shutdown.log guide) and extract logs/powerlogs.
  • Decompress archives to a working copy; never open the original database in place.

Parsing

  • iLEAPP parses app runtime, battery and power state tables, applies the time offset, and reads PowerLog databases inside packed sysdiagnoses.
  • APOLLO ships dozens of powerlog_* modules (app usage, camera, torch, audio, location client status). Its modules are tagged for older releases, so test each query on your schema.
  • sqlite3 with the offset query above for anything the tools do not cover.

Investigator tips

  • Report the time offset you applied, per row or per range. An uncorrected PowerLog timestamp can be wrong by seconds or by weeks.
  • Rows from several copies (live, archives, sysdiagnoses) of the same period can show the same event at slightly different times, because each copy applies its own offset.
  • Use PowerLog to fill gaps in Biome streams and Screen Time: a camera event next to a Photos.sqlite capture time, or a torch event at night, can corroborate an account.
  • Process-level network tables complement DataUsage.sqlite and netusage.sqlite in compromise cases.

See also