apexd: fix the way to restore database on start
Check bind-mount'ed flattened APEXes first.
Some platforms use loop device to mount '/' and may have flattended
APEXes. In this case, a loop device is associated to activated APEX,
and trying to resolve the loop device as non-flattended APEX activation
is simply wrong.
Having pre-scanned list of flattened APEXes' (dev,inode) pairs,
we can first check if mounted APEX is bind-mount'ed to a flattened APEX.
Bug: 131924899
Test: atest apexservice_test
Test: set up some flattened APEXes and see logcat
if database is correctly restored.
Change-Id: Id9e527e367e6593514625fe0c8deb66630a7a672
Merged-In: Id9e527e367e6593514625fe0c8deb66630a7a672
(cherry picked from commit 37751319ee24278bda70e0031cf55f5b733a5b6f)
1 file changed