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

Commit 95614963 authored by Jooyung Han's avatar Jooyung Han
Browse files

Prepare /data/property before load_persist_props

Without the directory (this happens on the very first boot),
load_persist_props can't create an initial version of
/data/property/persistent_properties (probably empty). This leads to
persisting all in-memory "persist.*" properties later when a persistent
property is set. This is regression from Android S because persistent
props from, for example, build.prop will be persisted even when there's
no process to explicitly setprop.

Bug: 242264580
Test: launch cuttlefish and verify that there's no props from build.prop
Change-Id: I5819a97750e4d5d1ee5a7c308bf944c7aeab2f90
parent b3ff0cf8
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -723,9 +723,13 @@ on post-fs-data
    # Multi-installed APEXes are selected using persist props.
    # Load persist properties and override properties (if enabled) from /data,
    # before starting apexd.
    # /data/property should be created before `load_persist_props`
    mkdir /data/property 0700 root root encryption=Require
    load_persist_props

    start logd
    start logd-reinit

    # Some existing vendor rc files use 'on load_persist_props_action' to know
    # when persist props are ready. These are difficult to change due to GRF,
    # so continue triggering this action here even though props are already loaded
@@ -852,7 +856,6 @@ on post-fs-data
    mkdir /data/app-asec 0700 root root encryption=Require
    mkdir /data/app-lib 0771 system system encryption=Require
    mkdir /data/app 0771 system system encryption=Require
    mkdir /data/property 0700 root root encryption=Require

    # create directory for updated font files.
    mkdir /data/fonts/ 0771 root root encryption=Require