Open Source / ALEAPP #1818

Accounts, power, location and media from bug reports

Which accounts were on the phone, when did sync last run, which apps held wake locks, what was running, and what were the sensors, camera and screen doing? An Android bug report records all of it. This contribution adds 59 tables to ALEAPP so each question has a place to look.

  • Daniel Addai, SectraTEK Lab
  • Merged
  • CC BY 4.0

View the pull request on GitHub

Summary

  • ALEAPP now has 59 Bug Report artifacts in six groups: accounts, sync and backup (16), battery and power (12), processes and memory (5), location and sensors (10), camera and media (7), display and input (9). The pull request was merged on 27 October 2026.
  • It is the largest of the four in the stack. The pull request offers a split into accounts and power (33) and sensors and media (26) on request.
  • Most of these tables are snapshots or rings of recent events. The notes of each artifact state the window, and the reader caps long streams.
  • Every row count equals a count from the raw text on five reports, and the whole tool ran on all seven. Sections that no artifact reads are listed as not read.
  • 59artifacts added in six groups
  • 328test baselines in 2 case folders
  • 7,336battery history rows on the larger of two reports
  • 5,744process thread rows on the second report, equal to a raw-text count

Methodology note

Drafted with AI assistance and reviewed by the author before publication. Every figure uses synthetic example values or counts taken from the pull request.

The issue

An examiner asks which accounts were signed in, whether a work profile existed, when sync last ran, what used the battery over the last day, which app opened the camera, and which keyboard and accessibility services were active. In a bug report these are six families of service dumps with six layouts, and the layouts differ between Android versions. The media metrics dump has one record form on Android 15 and 16 and another on Android 10, where the time is a 19-digit count of nanoseconds. The window dump is printed twice on the Samsung and Motorola reports, a short copy and a full one, so lines of the full copy can repeat.

Time is the second difficulty. Location events and many logs print month, day and clock time with no year. A battery daily summary on one report prints a period end of 1970-01-01, the zero of the clock, which is not a date anyone should convert. Battery history prints only what changed since the previous record, so the first record after a reset is long and the rest are short.

Volume is the third. One report prints 7,336 battery history records, another 2,500 media metrics records, and a sensor service keeps a ring of recent events per sensor. A tool that stores everything without limits is easy to overwhelm, and a tool that cuts silently hides the cut. LAB-TR-0001 found that about 80 percent of the sections of two reports were read by no artifact, which is why this contribution also lists what remains unread. Figure 1 shows the smallest case, one account line.

One account line in the report text and the row it becomesLeft: three lines of an account service dump, with an invented user line and an invented account line. Right: the five fields of the Accounts row.In the report text (synthetic example)In the artifact (one row)DUMP OF SERVICE account:User UserInfo{0:Example User:4c13}:  Accounts: 1    Account {name=pat@example.org, type=com.example.mail}The user line sits above the list. It gives the user, thename and the flags, which are shown as stored, not decoded.User0User NameExample UserUser Flags (stored)4c13Account Namepat@example.orgAccount Typecom.example.mailA name can be an address, a user name, an app label or a number, and the dump does not say which.A row says that the account manager listed that account for that user when the dump ran. It does not say who used it.
Show this figure as a table
Fields of the row in Figure 1
FieldValue (synthetic example)
User0
User NameExample User
User Flags (stored)4c13
Account Namepat@example.org
Account Typecom.example.mail
Figure 1One account line becomes one row, with the user line above it supplying three columns. Nothing is decoded. Source: the notes of Accounts in scripts/artifacts/bugreportAccountsPower.py of the pull request. Values are invented (synthetic example).

The essence

The pull request adds 59 artifacts that read the accounts, power, process, location, sensor, camera, audio, display and input sections of the report text in one pass. Each row is what the dump printed for one entry. Flags, state bits and sensor values are kept as stored and are not decoded, because their meaning belongs to the platform component that wrote them. Where a dump prints a time, the row keeps it as printed and a UTC column is added by a stated rule.

A row says that the service listed or logged the entry. For accounts, it does not say who used the account. For the sensor and location rings, it does not say that anyone was present.

Artifacts added by the pull request
GroupArtifactsWhat the dumps hold
Accounts, Sync and Backup (16)Accounts, Account History, Authenticators, Visibility; Sync Adapter Status, Recent History, Last Syncs, Jobs, State; Backup State, Transports, Package State, Participants, Queues; Users, User Manager FactsAccounts per user, sync adapters and their last runs, backup state, the Android users
Battery and Power (12)Battery History, Daily Summary, Package Changes, Power Use, Wake Locks, Service State; Thermal Service State; Power Manager State, Wake Locks, Events; Device Idle State, HistoryBattery history and per-app power, wake locks, power and idle events
Processes and Memory (5)Process Stats, Process Threads, Memory By Process, Memory Process Detail, Memory SummaryProcess statistics, a thread list from the PROCESSES AND THREADS section, memory use
Location and Sensors (10)Location Providers, Last Known, Requests, Events, Usage, Time Zone Detection State; Sensors, Sensor Connections, Registrations, EventsLocation manager state and its recent event ring, sensor list and recent events
Camera and Media (7)Camera Service Events, Camera Devices, Audio Events, Audio Clients, Media Sessions, Audio Playback Order, Media MetricsEvents of apps that use the camera, audio and media state
Display and Input (9)Accessibility Services, Input Methods, Input Start History, Soft Input History, Display States, Brightness Events, Window Focus, Windows, SurfaceFlinger LayersEnabled services, keyboards, display and window state

Our methodology

As for the earlier artifacts, we write the layout of each service down from the reports we hold, by Android version and vendor, and then write the reader. The readers plug into the single-pass reader of LAB-TR-0001, which streams the report once and hands each open section to the readers registered for it (Figure 2).

Streams get explicit bounds. The location event ring held 13 to 1,000 lines on the reports tested, and 1,000 lines on one report suggests a full ring, which was not confirmed. Sensor Events reads at most 100 lines per sensor. Process Threads leaves out a line with fewer columns than its header and counts it in the log, so a damaged line is visible and not silent. Where a time has no year, the year is the latest one, the report's or the one before, that does not put the line more than a day after the report time, and the zone the report records is then applied. In the battery daily summary, a time before 2009 gets no UTC value.

Pipeline from the bug report text to the artifact columnsFive steps: the report file, the section index, readers for accounts, power, processes, sensors, media and display, bounded tables and 59 artifacts. Below, columns of two artifacts.From the report text to the report columnsBug report textdumpstate.txt,bugreport-*.txt orbugreport-*.zip(path set of #1809)Section indexevery section entered:name, lines, durationDUMP TIMEOUT keptSection readersaccount, sync, backup,user, batterystats,power, device idle,process and memory,location, sensor,camera, audio, media,accessibility, input,display, windowBounded tablesrows kept as printedtext cut at set sizessensor events: at most100 lines per sensorrow caps are logged59 artifacts6 groupsHTML, TSV and LAVAoutputUTC where possibleColumns of two of the 59 artifactsAccounts: User | User Name | User Flags (as stored) | Account Name | Account TypeSensor Events: Event Number | Timestamp (as printed) | Wall Clock (as printed) | Values (as printed) | Time (UTC)
Show this figure as a table
Steps of Figure 2
StepWhat happens
1. Find the fileThe same path set as the earlier bug report artifacts.
2. Index the sectionsEvery section is entered with kind, name, lines and duration; a time-limit marker is stored on a cut service.
3. Hand over the linesReaders registered for the account, sync, backup, user, battery, power, device idle, process, memory, location, sensor, camera, audio, media, accessibility, input, display and window sections.
4. Keep bounded rowsRows as printed, text cut at set sizes, at most 100 sensor event lines per sensor, row caps logged.
5. Present59 artifacts in six groups; UTC added where the printed time allows it.
Figure 2The same single pass as the earlier bug report artifacts; the new readers add 59 tables. Section and column names are from the pull request. Source: dumpstate_accountspower.py, dumpstate_sensorsmedia.py, bugreportAccountsPower.py and bugreportSensorsMedia.py in the pull request; LAB-TR-0001, section 3 (diagram).

Checking has four layers. Synthetic fixtures with invented values come first: cases per Android layout (a10, a16), a cut dump, an empty report, a file that is not a report and two reports in one run, among others. The two modules have 328 baselines in two case folders, and all pass under TZ=UTC.

Second, an independent recount. On the five older research reports, every row count equals a count made from the raw text with plain regular expressions, except where a note says otherwise. On the two newer Android 16 reports the whole tool ran with no failed artifact, and Process Threads (5,027 and 5,744 rows) equals a raw-text count made with our own line rules (Figure 3). The pull request reports count agreement for these tables. It does not report a field-by-field comparison with a second parser, which is why the confidence on this page is moderate.

Third, the 386 bug report unit tests of the stack so far pass, and the changed files score 10.00 of 10 on pylint. Fourth, absent sections are recorded and not guessed. The thermal service state is empty on one report because the report has no such section, and the time zone detection state logs a line when the dump is missing. Sections with content that no artifact reads are listed in the Sections artifact with Read By set to not read. The cases that no research report printed, such as time zones with offsets, a second Android user and some location and sensor shapes, exist only as synthetic fixtures.

Rows per artifact on the two newest Samsung bug reportsGrouped horizontal bars on a logarithmic scale for twelve of the 59 artifacts, from 7 rows (Accounts) to 7,336 rows (Battery History).Rows per artifact on two bug reports (logarithmic scale)Report 1Report 21101001,00010,000Rows (each gridline is ten times the one before)Accounts719Sync Adapter Last Syncs192540Battery History7,3361,634Battery Wake Locks277155Process Stats2,0182,995Process Threads5,0275,744Memory By Process374404Location Events6001,000Sensor Events3681,265Camera Service Events200138Audio Events605913Media Metrics2,5002,500
Show every artifact of this pull request as a table
Rows per artifact on two bug reports
ArtifactReport 1 rowsReport 2 rows
Accounts (Accounts, Sync and Backup)719
Account History (Accounts, Sync and Backup)5147
Account Authenticators (Accounts, Sync and Backup)931
Account Visibility (Accounts, Sync and Backup)1461
Sync Adapter Status (Accounts, Sync and Backup)3173
Sync Recent History (Accounts, Sync and Backup)90100
Sync Adapter Last Syncs (Accounts, Sync and Backup)192540
Sync Jobs (Accounts, Sync and Backup)3363
Sync State (Accounts, Sync and Backup)2523
Backup State (Accounts, Sync and Backup)1818
Backup Transports (Accounts, Sync and Backup)1010
Backup Package State (Accounts, Sync and Backup)3031
Backup Participants (Accounts, Sync and Backup)2528
Backup Queues (Accounts, Sync and Backup)135151
Users (Accounts, Sync and Backup)10
User Manager Facts (Accounts, Sync and Backup)310
Battery History (Battery and Power)7,3361,634
Battery Daily Summary (Battery and Power)1111
Battery Package Changes (Battery and Power)4319
Battery Power Use (Battery and Power)145153
Battery Wake Locks (Battery and Power)277155
Battery Service State (Battery and Power)7978
Thermal Service State (Battery and Power)390
Power Manager State (Battery and Power)115109
Power Wake Locks (Battery and Power)105
Power Events (Battery and Power)138150
Device Idle State (Battery and Power)5859
Device Idle History (Battery and Power)100100
Process Stats (Processes and Memory)2,0182,995
Process Threads (Processes and Memory)5,0275,744
Memory By Process (Processes and Memory)374404
Memory Process Detail (Processes and Memory)7385
Memory Summary (Processes and Memory)1514
Location Providers (Location and Sensors)44
Location Last Known (Location and Sensors)44
Location Requests (Location and Sensors)49
Location Events (Location and Sensors)6001,000
Location Usage (Location and Sensors)622
Time Zone Detection State (Location and Sensors)1414
Sensors (Location and Sensors)1534
Sensor Connections (Location and Sensors)79
Sensor Registrations (Location and Sensors)500500
Sensor Events (Location and Sensors)3681,265
Camera Service Events (Camera and Media)200138
Camera Devices (Camera and Media)710
Audio Events (Camera and Media)605913
Audio Clients (Camera and Media)1721
Media Sessions (Camera and Media)11
Audio Playback Order (Camera and Media)72
Media Metrics (Camera and Media)2,5002,500
Accessibility Services (Display and Input)35
Input Methods (Display and Input)610
Input Start History (Display and Input)6464
Soft Input History (Display and Input)3232
Display States (Display and Input)22
Brightness Events (Display and Input)100189
Window Focus (Display and Input)44
Windows (Display and Input)1822
SurfaceFlinger Layers (Display and Input)46
Figure 3Rows per artifact on two Android 16 bug reports; twelve of the 59 artifacts are drawn, all are in the table. The scale is logarithmic. Source: pull request description, table of rows per artifact for the two newest Samsung reports (counts only, not synthetic values).

The value

For an examiner the gain is a table behind each question. Which accounts and account types each user has, and which sync adapters ran last. Whether backup is configured and which transports exist. Which apps held wake locks and how battery was used per package. What processes and threads existed when the dump ran, and how much memory each held. Which location providers were enabled, which apps requested location, and what the location event ring recorded. Which sensors exist and which connections to the sensor service were open. Which app opened the camera recently, and which processes the audio server and media session service held registrations for. Which keyboard and accessibility services were enabled, and what had window focus.

The windows are short, and the notes say so. Battery history reaches back about a day, and its size does not mean a long window. The location tables are the state of the location manager and a short ring, not a location history. Camera tables hold recent events only; pictures and recordings are never in a bug report. An enabled accessibility service shows configuration, not use. Window focus is the focus when the dump ran. Account names are personal data and are shown in the tool as printed, because the tool runs on the examiner's own evidence; this page shows none.

Because the pull request is large, a reviewer can ask for the two halves separately. The pull request says so, and it was merged as one change.

What the evidence for this pull request coversThree columns: what was checked on research bug reports, what exists only as a synthetic fixture, and what was not examined.What the evidence coversChecked on research reports-Every row count equals a plainregular-expression count of the raw texton five reports, except where a notesays otherwise-Process Threads equals a raw-text counton two more reports-Whole tool ran with exit 0 on all sevenreportsSynthetic fixtures only-Time zones with offsets or daylightsaving-A second Android user-Sensor and location cases that noresearch report printedNot examined-Android 11 to 14-Vendors other than the four seen-Field values against a second parser:the pull request reports count agreementfor these tables-Sections no artifact reads (listed asnot read)
Show this figure as a table
Evidence coverage
ColumnItems
Checked on research reportsEvery row count equals a plain regular-expression count of the raw text on five reports, except where a note says otherwise; Process Threads equals a raw-text count on two more reports; Whole tool ran with exit 0 on all seven reports
Synthetic fixtures onlyTime zones with offsets or daylight saving; A second Android user; Sensor and location cases that no research report printed
Not examinedAndroid 11 to 14; Vendors other than the four seen; Field values against a second parser: the pull request reports count agreement for these tables; Sections no artifact reads (listed as not read)
Figure 4Evidence ladder. All seven research reports record UTC+0, so every other zone is synthetic. Source: the 'Proven on real reports', 'Constructed only' and 'Not examined' paragraphs of the pull request description (counts only, not synthetic values).

Where this sits in the Lab's research

The reader these artifacts plug into is described in LAB-TR-0001, Making Silent Failures Visible: A Single-Pass Section Reader for Android Bug Reports (Zenodo, version 1.1, 10.5281/zenodo.23719508). Its section index is what lets this contribution say which sections remain unread, and its record of cut dumps is why a missing table can be told from a quiet device.

LAB-TR-0016, Seven Kilobytes per Event: Storage Amplification and Memory Peaks When Persisting Parsed Log Events from Android Bug Reports, is available on this site as a preprint; the Zenodo deposit is pending. It measured a reference implementation, not ALEAPP, in which 1,532,676 parsed events from seven bug reports took 11.02 GB. It is cited here because tables such as battery history, sensor events and media metrics are the event-like streams where that cost arises, and the readers on this page bound them. The grouping follows Android bug reports, category by category.

Sources

Every number and claim on this page, with where it came from. Figure values are either synthetic examples (marked) or counts from the pull request.

Sources of the numbers and claims
Number or claimWhere it came from
59 artifacts in 6 groups (16, 12, 5, 10, 7, 9)Pull request description, 'What this changes'; artifact list in bugreportAccountsPower.py (33) and bugreportSensorsMedia.py (26)
The pull request offers a split into accounts and power (33) and sensors and media (26) on requestPull request description, 'What this changes'
Merged on 27 October 2026Pull request state and merge time (mergedAt); the review and comment lists are empty
328 baselines in 2 case folders, all pass; 386 cumulative unit tests; pylint 10.00/10Pull request description, 'Test record' table
Every row count equals a plain regular-expression count on five reports; Process Threads 5,027 and 5,744 equal on two morePull request description, 'Proven on real reports'
All other row counts in Figure 3 (for example Battery History 7,336 and 1,634; Media Metrics 2,500 and 2,500)Pull request description, table of rows per artifact (two newest Samsung reports)
Constructed only and not examined lists (Figure 4)Pull request description, 'Constructed only' and 'Not examined'
Seven reports in four vendor families, Android 10, 15 and 16; whole tool exit 0 in 20 to 55 s per reportPull request description; device classes only
Location Events: no year; year rule; ring of 13 to 1,000 lines; 1,000 may mean a full ring (not confirmed)Notes of Location Events in bugreportSensorsMedia.py
Sensor Events: at most 100 lines per sensor; values not decodedNotes of Sensor Events in bugreportSensorsMedia.py
Window dump printed twice on Samsung and Motorola reports, so lines can repeatNotes of Window Focus in bugreportSensorsMedia.py
Media Metrics has two record forms (Android 15 and 16; Android 10 with a 19-digit nanosecond time)Notes of Media Metrics in bugreportSensorsMedia.py
Battery History records what changed since the previous record; the first record after a reset is longNotes of Battery History in bugreportAccountsPower.py
Battery Daily Summary: UTC empty for a time before 2009; one period end printed as 1970-01-01Notes of Battery Daily Summary in bugreportAccountsPower.py
Process Threads: lines with fewer columns than the header are not listed and are counted in the logNotes of Process Threads in bugreportAccountsPower.py
Thermal Service State is empty on one report (no section); Time Zone Detection State logs when the dump is missingPull request description, 'Anything reviewers should know'
About 80 percent of sections (546 of 681 and 544 of 672) are read by no artifact; sections not read are listed as suchLAB-TR-0001, abstract, Table 9; pull request description
1,532,676 parsed events took 11.02 GB in a reference implementation (not ALEAPP)LAB-TR-0016, abstract and section 1
Battery history reaches back about a day; location is not a history; pictures and recordings are never in a bug reportLab article LAB-0002, categories 'Battery and power', 'Location and sensors' and 'Camera, microphone and media'