Skip to content

Improve dex2oat wrapper mounting and add XmlUtils stub#761

Open
HSSkyBoy wants to merge 2 commits into
JingMatrix:masterfrom
HSSkyBoy:wrapper
Open

Improve dex2oat wrapper mounting and add XmlUtils stub#761
HSSkyBoy wants to merge 2 commits into
JingMatrix:masterfrom
HSSkyBoy:wrapper

Conversation

@HSSkyBoy

Copy link
Copy Markdown

Summary

This PR improves the dex2oat wrapper mount logic and adds the missing XmlUtils.readMapXml(InputStream) hidden API stub needed by XSharedPreferences.

Changes

  • Refactor dex2oat wrapper mount/unmount handling to avoid repeated 32-bit/64-bit mount code.
  • Add small RAII helpers for JNI string and file descriptor cleanup in native mount code.
  • Only resolve wrapper paths when the corresponding dex2oat target exists.
  • Add com.android.internal.util.XmlUtils.readMapXml(InputStream) to hiddenapi stubs so XSharedPreferences can resolve the internal API surface cleanly.

Motivation

XSharedPreferences depends on Android's internal XmlUtils.readMapXml method for parsing preference XML files. Providing the stub keeps the hidden API surface available at build time.

The dex2oat wrapper mount path also had duplicated logic for regular/debug and 32/64-bit binaries. The refactor keeps the existing behavior while making the mount targets easier to follow and maintain.

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