Repository navigation
[build] Refresh stable Android emulator and platform 37.2 packages - #13388
jonathanpeppers with Copilot wants to merge 2 commits into
Conversation
Co-authored-by: jonathanpeppers <[email protected]>
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are recorded for the Android SDK package pin updates.
No open issues 🎉
What changed in this PR
Refreshes stable Android SDK package pins used by .NET for Android’s build provisioning, completing the package updates described in #13370.
Changes:
- Updates the emulator from 37.2.12 to 37.2.13, using archive build 16740729 and refreshed SHA-256 hashes for all four host variants.
- Updates platform 37.2 from revision r01 to r02 with its refreshed SHA-256 hash.
- Leaves NDK pins, command-line tools, and the platform API set unchanged.
| File | Description |
|---|---|
| src/androidsdk/androidsdk.targets | Updates the platform 37.2 archive revision and hash. |
| Configuration.props | Updates the emulator version, archive build, and host-specific hashes. |
Review effort: Balanced
|
The platform 37.2 r02 update needs clarification from Google before we merge it. The SDK JAR removes APIs that are still present in the latest 37.2 emulator image. SDK archive comparisonI compared r02 removes 88 classes:
No classes were added. This comparison covers class presence, not member-level changes. Google's SDK manifest lists This explains the four failing CI jobs in build 1664186: our checked-in Latest 37.2 emulator imageI installed and booted the latest Google APIs x86_64 image listed in the system-image manifest:
A Java test APK compiled against r01 produced these results. It did not package copies of the Android framework classes, and hidden-API checks were not disabled.
These results show that the SDK removal does not match class availability in the image. They do not establish that the full Personal Context feature works, or that Google removed the SDK declarations by mistake. Recommendation: keep the emulator 37.2.12 -> 37.2.13 update, drop the platform r01 -> r02 change from this PR, and retain the existing 37.2 bindings until Google clarifies the intended API surface. We should report the archive/image mismatch to Google rather than remove bindings or suppress the Java compiler errors. |
jonathanpeppers
left a comment
There was a problem hiding this comment.
We should figure out what in the world Google is doing:
The Discord link redirects to login, so I can’t read the discussion. Could you paste the relevant messages here, especially any explanation from Google or public issue link? The archive/image comparison documents a mismatch, but doesn’t establish why Google removed the SDK declarations. I’ve left the package pins and bindings unchanged pending that context. |
Context: https://issuetracker.google.com/issues/584834598 Context: #13388 Google republished the Android 37.2 platform as `platform-37.2_r02`. It removes APIs that were in `platform-37.2_r01`, which our API-37.2 binding is built from: * The `android.app.personalcontext.*` and `android.service.personalcontext.*` packages * The `android.agenticon` package * `Notification.FLAG_AGENT_TASK_INTERACTION_*`, `Notification.getAgentInteractionFlags()`, `Notification.Builder.setAgentInteractionFlags()`, and `NotificationListenerService.Ranking.getAgentInteractionFlags()` * `StatusBarManager.ACTION_AGENT_TASK_MAIN`, `canSetAgentTask()`, `getAgentStateScreenLocation()`, `isAgentTaskFeatureSupported()`, `isAgentTaskLaunchSupported()`, and `setAgentTask()` These bindings call Java members that no longer exist on r02 devices, so remove them. Update `platform-37.2_r01` to `platform-37.2_r02` in `androidsdk.targets`, the same bump as in #13388, and remove the related `map.csv`, `methodmap.csv`, and `metadata` entries. This change must also go to servicing, so it binds only changes that do not break C# code. r02 also has these changes, which are intentionally not bound: * New: `Manifest.permission.READ_UPDATE_ENGINE_LOGS` and `ViewGroup.requestChildRectangleOnScreen(View, Rect, boolean, int)`. * `PolicyIdentifier` is no longer `final`. Unsealing it in C# makes its `(IntPtr, JniHandleOwnership)` constructor `protected`, which adds public API. * The `HandlerThread(String, int)` parameter is renamed from `priority` to `linuxPriority`. This breaks C# callers that use named arguments. The only binding change kept is `[Obsolete]` on `PolicyIdentifier.CreateForTesting()`, because r02 deprecates it. `api-37.2.xml` and `api-37.2.params.txt` were regenerated with `class-parse`, `api-xml-adjuster`, `api-merge`, and `java-source-utils` against r01 and r02. The r01 output was compared with the committed files to confirm the tools reproduce them; then only the r01 → r02 removals and the deprecation were applied. Validation: * `build.cmd Prepare`: passed; downloaded `platform-37.2_r02.zip`, SHA-1 matches `repository2-3.xml`. * `dotnet-local.cmd build Microsoft.Android.slnx`: passed. * `dotnet-local.cmd build src/Mono.Android/Mono.Android.csproj -p:AndroidApiLevel=37.2 -p:AndroidPlatformId=37.2 -p:AndroidFrameworkVersion=v17.2`: passed, 0 errors; `CheckApiCompatibility` for v17.2 (against v17.1) passed. Co-authored-by: Copilot App <[email protected]>
Context: #13388 Context: #13661 Context: https://issuetracker.google.com/issues/584834598 #13388 bumped `platform-37.2_r01` to `platform-37.2_r02` and changed only the hash. r02 removed public API that `src/Mono.Android/Profiles/api-37.2.xml` still bound, and nobody saw it until #13661. The removed APIs had no `@SystemApi`, `@FlaggedApi`, or `@hide` in r01, so an annotation filter would not catch this. A diff of the two `android.jar` files does. Add `scripts/diff_platform_api.cs` to the `update-androidsdk-packages` skill: dotnet run .github/skills/update-androidsdk-packages/scripts/diff_platform_api.cs -- \ <old-zip-url> <old-sha256> <new-zip-url> <new-sha1> <new-size> It checks the old zip against the SHA-256 pinned in `androidsdk.targets` and the new zip against the manifest SHA-1 and size. It hashes every `.class` in both `android.jar` files, runs `javap -protected` on the removed, added, and changed classes, and prints a Markdown report with the new SHA-256. Package-private types are ignored. `javap` does not show parameter names, so a parameter rename is not reported. New hard rule 8: every revision bump of an existing `_PlatformPackage` entry puts the report in the PR description. If public API was removed or changed, the PR still opens, but its description starts with a "Do not merge" warning to update `api-<level>.xml` first. skill-runner can only change `Configuration.props` and `androidsdk.targets`, so it cannot fix the binding itself; stopping would hide the change in the tracking issue. `skill-runner.md` (lock recompiled), `package-catalog.md`, and a new eval follow the same rule. Co-authored-by: Copilot App <[email protected]>
…13711) Context: https://issuetracker.google.com/issues/584834598 Context: #13388 Google republished the Android 37.2 platform as `platform-37.2_r02`. It removes APIs that were in `platform-37.2_r01`, which our API-37.2 binding is built from: * The `android.app.personalcontext.*` and `android.service.personalcontext.*` packages * The `android.agenticon` package * `Notification.FLAG_AGENT_TASK_INTERACTION_*`, `Notification.getAgentInteractionFlags()`, `Notification.Builder.setAgentInteractionFlags()`, and `NotificationListenerService.Ranking.getAgentInteractionFlags()` * `StatusBarManager.ACTION_AGENT_TASK_MAIN`, `canSetAgentTask()`, `getAgentStateScreenLocation()`, `isAgentTaskFeatureSupported()`, `isAgentTaskLaunchSupported()`, and `setAgentTask()` These bindings call Java members that no longer exist on r02 devices, so remove them. Update `platform-37.2_r01` to `platform-37.2_r02` in `androidsdk.targets`, the same bump as in #13388, and remove the related `map.csv`, `methodmap.csv`, and `metadata` entries. This change must also go to servicing, so it binds only changes that do not break C# code. r02 also has these changes, which are intentionally not bound: * New: `Manifest.permission.READ_UPDATE_ENGINE_LOGS` and `ViewGroup.requestChildRectangleOnScreen(View, Rect, boolean, int)`. * `PolicyIdentifier` is no longer `final`. Unsealing it in C# makes its `(IntPtr, JniHandleOwnership)` constructor `protected`, which adds public API. * The `HandlerThread(String, int)` parameter is renamed from `priority` to `linuxPriority`. This breaks C# callers that use named arguments. The only binding change kept is `[Obsolete]` on `PolicyIdentifier.CreateForTesting()`, because r02 deprecates it. `api-37.2.xml` and `api-37.2.params.txt` were regenerated with `class-parse`, `api-xml-adjuster`, `api-merge`, and `java-source-utils` against r01 and r02. The r01 output was compared with the committed files to confirm the tools reproduce them; then only the r01 → r02 removals and the deprecation were applied. Validation: * `build.cmd Prepare`: passed; downloaded `platform-37.2_r02.zip`, SHA-1 matches `repository2-3.xml`. * `dotnet-local.cmd build Microsoft.Android.slnx`: passed. * `dotnet-local.cmd build src/Mono.Android/Mono.Android.csproj -p:AndroidApiLevel=37.2 -p:AndroidPlatformId=37.2 -p:AndroidFrameworkVersion=v17.2`: passed, 0 errors; `CheckApiCompatibility` for v17.2 (against v17.1) passed. Co-authored-by: Jonathan Peppers <[email protected]> Co-authored-by: Copilot App <[email protected]>
The SDK refresh stopped before committing because conflicting SDK environment variables blocked Gradle compatibility validation. This updates the pending stable packages; validation passed with
ANDROID_SDK_ROOTunset.Package updates
Scope