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

Commit 97cc69ee authored by Jiyong Park's avatar Jiyong Park
Browse files

Remove stale files in /data/misc/virtualizationservice

[1] changed the UID of the virtualizationservice daemon and
/data/misc/virtualizationservice directory to `system`. However, this
can cause a permission denial issue when the directory has stale files
when the device was running a build before [1] and an OTA to [1] (or
above) is attempted. The daemon tries to delete the stale files - which
must have been still labeled as old UID and thus the daemon has no
privileged to delete them.

Fixing this issue by ensuring that the directory is always empty by
init.

[1] https://android-review.googlesource.com/c/platform/packages/modules/Virtualization/+/2059527

Bug: 230056726
Test: watch TH
Change-Id: I61c0297503347932b14b83859bec9ff82628336f
parent d438ea72
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -828,7 +828,10 @@ on post-fs-data
    # directory used for odsign metrics
    mkdir /data/misc/odsign/metrics 0770 root system

    # Directory for VirtualizationService temporary image files.
    # Directory for VirtualizationService temporary image files. Always create
    # a fresh new empty directory to remove any stale files from the previous
    # boot.
    rmdir /data/misc/virtualizationservice
    mkdir /data/misc/virtualizationservice 0700 system system

    mkdir /data/preloads 0775 system system encryption=None