)]}'
{
  "commit": "cc9d3867082ac1518b7264c3752442f5ca112aa1",
  "tree": "44f37933d7d9624300b2c50358968e342ec68a3d",
  "parents": [
    "49c192ba29ca761d1fd862285cae6b414de6e2e1"
  ],
  "author": {
    "name": "Songchun Fan",
    "email": "schfan@google.com",
    "time": "Thu Jan 26 17:43:24 2023 -0800"
  },
  "committer": {
    "name": "Song Chun Fan",
    "email": "schfan@google.com",
    "time": "Wed Feb 01 21:31:17 2023 +0000"
  },
  "message": "[RESTRICT AUTOMERGE][pm] prevent system app downgrades of versions lower than preload\n\nAlso remove misleading commandline output.\n\nBUG: 256202273\n\nTest: manual\n1. Install preload system app v90, reboot\n2. (W/O data, W/ Flag, 90-\u003e80 NOK) adb install -d ~/Downloads/PrivApplication_80.apk\nPerforming Streamed Install\nadb: failed to install /usr/local/google/home/schfan/Downloads/PrivApplication_80.apk: Failure [INSTALL_FAILED_VERSION_DOWNGRADE: System app: com.example.privapplication cannot be downgraded to older than its preloaded version on the system image. Update version code 80 is older than current 90]\n3. (90-\u003e100) Install data app v100\n4. (W/ data, W/O Flag, 100-\u003e90 NOK) adb install ~/Downloads/PrivApplication_90.apk\nPerforming Streamed Install\nadb: failed to install /usr/local/google/home/schfan/Downloads/PrivApplication_90.apk: Failure [INSTALL_FAILED_VERSION_DOWNGRADE: Downgrade detected: Update version code 90 is older than current 100]\n5. (W/ data, W/ Flag, 100-\u003e90 downgrade OK) adb install -d ~/Downloads/PrivApplication_90.apk\nPerforming Streamed Install\nSuccess\n6. (90-\u003e100) Install v100\n6. (W/data, W/ Flag, 100-\u003e80 NOK) adb install -d ~/Downloads/PrivApplication_80.apk\nPerforming Streamed Install\nadb: failed to install /usr/local/google/home/schfan/Downloads/PrivApplication_80.apk: Failure [INSTALL_FAILED_VERSION_DOWNGRADE: System app: com.example.privapplication cannot be downgraded to older than its preloaded version on the system image. Update version code 80 is older than current 90]\n\nChange-Id: I5a8ee9e29a3a58f6e3fd188e0122355744b8b0ce\n(cherry picked from commit a4484d7f1be1fa413258fe18644d61f85611f586)\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "139d44928d91b17bd7ec9f4b3d0165e1b6192621",
      "old_mode": 33188,
      "old_path": "services/core/java/com/android/server/pm/PackageManagerService.java",
      "new_id": "76792afd61eb423d32f3bca953def66df59c2166",
      "new_mode": 33188,
      "new_path": "services/core/java/com/android/server/pm/PackageManagerService.java"
    }
  ]
}
