Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit e1dadb5a authored by Martin Stjernholm's avatar Martin Stjernholm
Browse files

Don't allow opening reference profiles for writing when ART Service is

enabled.

The dexopt code in installd is only used for OTA in that case, and this
should happen then. This is an extra safety check to ensure that.

There are more cases when existing files are potentially opened for
writing, which aren't addressed:

- open_snapshot_profile is used for app and boot image profile
  snapshots. This shouldn't be called at all when ART Service is in
  use, but there's no risk of reading truncated data from them since
  they're only written to.

- open_output_file is only used for a dex2oat swap file, but ART
  Service creates them at different guaranteed unique paths through
  art::artd::NewFile.

- RestorableFile::CreateWritableFile uses a .tmp file suffix that ART
  Service doesn't use.

Test: m dist
      system/update_engine/scripts/update_device.py \
        out/dist/*-ota-eng.*.zip
Bug: 251921228
Change-Id: I1d6f64beaf2bd8c9a05aa5c17a33492b89c903fd
parent 65081025
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment