Create apex reserved dir for update_engine
When installing an OTA, update_engine needs to reserve some space on
filesystem by writing to a specific directory(/data/apex/ota_reserved/),
therefore we need to create this dir on system start up.
We are also pro-actively enabling encryption on this directory so that
we can create hard links to /data/apex/decompressed. This will be needed
when we start decompresssing capex from post-install script before
reboot and on boot we can then simply hard link to these files.
Test: th
Bug: 172911822
Change-Id: Ia6a63efcedcfdad9817ba88b54f96683d34df6ce
diff --git a/rootdir/init.rc b/rootdir/init.rc
index 863cf6c..7f4aa3c 100644
--- a/rootdir/init.rc
+++ b/rootdir/init.rc
@@ -659,6 +659,7 @@
mkdir /data/apex/hashtree 0700 root system
mkdir /data/apex/sessions 0700 root system
mkdir /data/app-staging 0751 system system encryption=DeleteIfNecessary
+ mkdir /data/apex/ota_reserved 0700 root system encryption=Require
start apexd
# Avoid predictable entropy pool. Carry over entropy from previous boot.