Fixup existing profile directories during upgrades

If the profile directory exists we need to fixup the owner and
permissions. The owner of the directory is set to AID_SYSTEM.
This allows the system to access the profiles while restricting the search
capabilities for others.

Test: installd_dexopt_test
Bug: 30934496
Bug: 69678790
Change-Id: I621c95e24cc85a2797724f6ac448c9f8a8d00a53
2 files changed