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

Commit 63de76b5 authored by Jooyung Han's avatar Jooyung Han
Browse files

PackageCacher: cache key for block-device APEX

PackageCacher manages its cache based on package filename. When an APEX
is mounted from a device-mapper block device, it creates a cache with a
block device filename (e.g. dm-17), which is not stable. The number can
change even if the APEX itsef is not changed.

Instead, PackageCacher can use the device mapper name for its cache key
if a given package is a device mapper block device because the device
name is stable across reboots. The device name can be read from sysfs
(e.g.  /sys/block/dm-17/dm/name).

In this change, PackageCacher uses a device-mapper name as a cache key
if a given package is a device-mapper device.

Bug: 427589794
Flag: com.android.apex.flags.mount_before_data
Test: adb install <APEX> && reboot
Test: adb shell ls /data/system/package_cache/{hash}
Change-Id: Iea9cdc5a4128d7c1f7440737b419ed9e2252d009
parent 845a67a2
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