)]}'
{
  "commit": "466da64c36e54fd9244c430483452935b5587805",
  "tree": "39d246367483594b0da35fb4584b83c21ff6e85d",
  "parents": [
    "c4bfe95549b726d1a12e3d4c4cf1943cfa98f22e"
  ],
  "author": {
    "name": "Ang Li",
    "email": "angli@google.com",
    "time": "Sat Oct 24 13:35:31 2026 +0800"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Sat Oct 24 13:35:31 2026 +0800"
  },
  "message": "Keep boot-time logs when the logcat service restarts after a reboot (#1074)\n\n`AndroidDevice.handle_reboot()` stops all services before the reboot and\nstarts them again once `sys.boot_completed` is set. `Logcat.start()` did\nnot distinguish that restart from the first start of a run: it cleared the\ndevice buffer (`Config.clear_log` defaults to True) and started\n`adb logcat -T 1`, which only follows from the most recent line. Everything\nlogged between kernel boot and boot completion was therefore dropped from\n`adb_logcat_file_path`, and `get_lines()` / `wait_for()` / `listen()` could\nnot see boot-time events such as the MediaProvider `MEDIA_MOUNTED` scan,\neven though they were still available via a raw `adb logcat -d`.\n\n`start()` now reads `/proc/sys/kernel/random/boot_id` and, when it differs\nfrom the id seen by the previous start, treats the call as a restart after a\nreboot: the buffer (which only holds this boot\u0027s logs) is not cleared and\nthe new `adb logcat` process dumps the whole buffer before following. A\nstop/start on the same boot, or when the boot id cannot be read, keeps the\nexisting clear-and-follow behavior. `pause()`/`resume()` are unchanged.",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "ea88065c8826aceb4c6eddd09006d12391990097",
      "old_mode": 33188,
      "old_path": "mobly/controllers/android_device_lib/services/logcat.py",
      "new_id": "50e99314e822907e5d5de91b9e81ce8d07a59069",
      "new_mode": 33188,
      "new_path": "mobly/controllers/android_device_lib/services/logcat.py"
    },
    {
      "type": "modify",
      "old_id": "0a8c03c4a31cc7cd84d009b1da0b9fd36a666e1e",
      "old_mode": 33261,
      "old_path": "tests/mobly/controllers/android_device_lib/services/logcat_test.py",
      "new_id": "46def19f1cc404ec590c01b7e2b6e5f21bb2d162",
      "new_mode": 33261,
      "new_path": "tests/mobly/controllers/android_device_lib/services/logcat_test.py"
    }
  ]
}
