Skip to content

uraniborg/Hubble: Distinguish preinstalled vs updated system apps. - #22

Merged
billy-lau merged 1 commit into
android:mainfrom
billy-lau:uraniborg/Hubble/upgrade
Sep 18, 2026
Merged

billy-lau merged 1 commit into
android:mainfrom
billy-lau:uraniborg/Hubble/upgrade

Conversation

@billy-lau

Copy link
Copy Markdown
Member

Add isUpdatedSystemApp to PackageMetadata to differentiate between pristine factory preinstalled packages residing in the system image and updated system applications installed in /data/app that shadow the OEM image binary. Bump Hubble to version 2.1.0 (versionCode 11), update Gradle wrapper and AGP dependencies, pin the Gradle distribution checksum, and document classification semantics for both APKs and APEX/Mainline modules.

uraniborg/AndroidStudioProject/Hubble/app/src/main/java/com/uraniborg/hubble/:

  • PackageMetadata.java: added isUpdatedSystemApp boolean field and populated it from ApplicationInfo.FLAG_UPDATED_SYSTEM_APP.
  • MainActivity.java: updated VERSION constant to 2.1.0.

uraniborg/AndroidStudioProject/Hubble/app/build.gradle:

  • bumped versionCode to 11 and versionName to "2.1.0".

uraniborg/AndroidStudioProject/Hubble/build.gradle:

  • updated Android Gradle Plugin (AGP) from 9.3.2 to 9.4.0.

uraniborg/AndroidStudioProject/Hubble/gradle/wrapper/gradle-wrapper.properties:

  • updated Gradle wrapper distribution from 9.5.0 to 9.6.0.
  • pinned distributionSha256Sum for supply chain verification and tamper resistance, with inline wrapper upgrade instructions requiring the checksum.

uraniborg/VERSION:

  • bumped version to 2.1.0.

uraniborg/docs/hubble_results.md:

  • documented isUpdatedSystemApp property under Installed Packages.
  • updated isPreinstalled description.
  • added preinstalled_packages.txt component entry, clarifying that it includes both factory pre-installed and updated system applications.
  • added 5-state package classification matrix under Interpretation mapping isPreinstalled, isUpdatedSystemApp, isApex, and installLocation.
  • documented measurement caveats for updated system APKs in /data/app (shadowing OEM factory binaries).
  • documented APEX/Mainline update semantics: FLAG_UPDATED_SYSTEM_APP is APK-only; factory compressed APEX (.capex) decompresses at boot into /data/apex/decompressed/ and hard-links into /data/apex/active/ preserving the .decompressed.apex suffix; disambiguation between factory modules and post-setup OTA updates keys on the filename suffix (.decompressed.apex vs .apex) rather than directory alone.

uraniborg/docs/hubble_setup.md:

  • added command-line build instructions via ./gradlew assembleDebug.
  • added section on upgrading Gradle wrapper and verifying distribution checksums, noting the TOFU caveat when piping curl.

Test: Manual.
- Built successfully with ./gradlew assembleDebug and verified checksum pin.
- Inspected connected Pixel device (adb shell dumpsys package, pm list packages)
and verified factory .capex decompress paths, flags (FLAG_UPDATED_SYSTEM_APP == 0),
and .decompressed.apex suffix against real dumps.

Change-Id: I1497c6a7f1c8362e87321ba5d4879b267d9bf26d

Add `isUpdatedSystemApp` to PackageMetadata to differentiate between
pristine factory preinstalled packages residing in the system image and
updated system applications installed in /data/app that shadow the OEM image
binary. Bump Hubble to version 2.1.0 (versionCode 11), update Gradle wrapper
and AGP dependencies, pin the Gradle distribution checksum, and document
classification semantics for both APKs and APEX/Mainline modules.

uraniborg/AndroidStudioProject/Hubble/app/src/main/java/com/uraniborg/hubble/:
- PackageMetadata.java: added `isUpdatedSystemApp` boolean field and populated
  it from `ApplicationInfo.FLAG_UPDATED_SYSTEM_APP`.
- MainActivity.java: updated VERSION constant to 2.1.0.

uraniborg/AndroidStudioProject/Hubble/app/build.gradle:
- bumped `versionCode` to 11 and `versionName` to "2.1.0".

uraniborg/AndroidStudioProject/Hubble/build.gradle:
- updated Android Gradle Plugin (AGP) from 9.3.2 to 9.4.0.

uraniborg/AndroidStudioProject/Hubble/gradle/wrapper/gradle-wrapper.properties:
- updated Gradle wrapper distribution from 9.5.0 to 9.6.0.
- pinned `distributionSha256Sum` for supply chain verification and tamper
  resistance, with inline wrapper upgrade instructions requiring the checksum.

uraniborg/VERSION:
- bumped version to 2.1.0.

uraniborg/docs/hubble_results.md:
- documented `isUpdatedSystemApp` property under Installed Packages.
- updated `isPreinstalled` description.
- added `preinstalled_packages.txt` component entry, clarifying that it includes
  both factory pre-installed and updated system applications.
- added 5-state package classification matrix under Interpretation mapping
  `isPreinstalled`, `isUpdatedSystemApp`, `isApex`, and `installLocation`.
- documented measurement caveats for updated system APKs in /data/app (shadowing
  OEM factory binaries).
- documented APEX/Mainline update semantics: `FLAG_UPDATED_SYSTEM_APP` is APK-only;
  factory compressed APEX (`.capex`) decompresses at boot into `/data/apex/decompressed/`
  and hard-links into `/data/apex/active/` preserving the `.decompressed.apex` suffix;
  disambiguation between factory modules and post-setup OTA updates keys on the
  filename suffix (`.decompressed.apex` vs `.apex`) rather than directory alone.

uraniborg/docs/hubble_setup.md:
- added command-line build instructions via `./gradlew assembleDebug`.
- added section on upgrading Gradle wrapper and verifying distribution checksums,
  noting the TOFU caveat when piping `curl`.

Test: Manual.
      - Built successfully with `./gradlew assembleDebug` and verified checksum pin.
      - Inspected connected Pixel device (`adb shell dumpsys package`, `pm list packages`)
        and verified factory `.capex` decompress paths, flags (`FLAG_UPDATED_SYSTEM_APP == 0`),
        and `.decompressed.apex` suffix against real dumps.

Change-Id: I1497c6a7f1c8362e87321ba5d4879b267d9bf26d
@billy-lau
billy-lau merged commit 655ed51 into android:main Sep 18, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant