Skip to content

Guard profile clearing against IPackageManager runtime drift#781

Draft
XiaoTong6666 wants to merge 1 commit into
JingMatrix:masterfrom
XiaoTong6666:pr
Draft

Guard profile clearing against IPackageManager runtime drift#781
XiaoTong6666 wants to merge 1 commit into
JingMatrix:masterfrom
XiaoTong6666:pr

Conversation

@XiaoTong6666

Copy link
Copy Markdown

On some Android 17 builds, the manager compile flow crashes VectorDaemon with a NoSuchMethodError in ManagerService.clearApplicationProfileData(). The daemon was compiled against a hidden IPackageManager stub that declares clearApplicationProfileData(String), but some runtime framework.jar variants do not expose that method at all.

We fix the issue by moving profile clearing behind a compatibility wrapper that reflectively probes IPackageManager for clearApplicationProfileData(String). When the method is missing, we now log and skip profile clearing instead of crashing the daemon Binder thread.

On some Android 17 builds, the manager compile flow crashes `VectorDaemon` with a
`NoSuchMethodError` in `ManagerService.clearApplicationProfileData()`. The daemon was
compiled against a hidden `IPackageManager` stub that declares
`clearApplicationProfileData(String)`, but some runtime `framework.jar` variants do not
expose that method at all.

We fix the issue by moving profile clearing behind a compatibility wrapper that reflectively
probes `IPackageManager` for `clearApplicationProfileData(String)`. When the method is
missing, we now log and skip profile clearing instead of crashing the daemon Binder thread.
@XiaoTong6666 XiaoTong6666 marked this pull request as draft July 6, 2026 22:55
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