1## dexopt_chroot_setup 2 3dexopt_chroot_setup is a component of ART Service. It sets up the chroot 4environment for Pre-reboot Dexopt, to dexopt apps on a best-effort basis before 5the reboot after a Mainline update or an OTA update is downloaded, to support 6seamless updates. 7 8It requires elevated permissions that are not available to system_server, such 9as mounting filesystems. It publishes a binder interface that is internal to ART 10Service's Java code. 11 12### Pre-reboot Dexopt file structure 13 14#### Overview 15 16``` 17/mnt/pre_reboot_dexopt 18|-- chroot 19| |-- system_ext 20| |-- vendor 21| |-- product 22| |-- data 23| |-- mnt 24| | |-- expand 25| | `-- artd_tmp 26| |-- dev 27| |-- proc 28| |-- sys 29| |-- metadata 30| |-- apex 31| `-- linkerconfig 32`-- mount_tmp 33``` 34 35#### `/mnt/pre_reboot_dexopt` 36 37The root directory for Pre-reboot Dexopt, prepared by `init`. 38 39#### `/mnt/pre_reboot_dexopt/chroot` 40 41The root directory of the chroot environment for Pre-reboot Dexopt. It is the 42mount point of the `system` image. Created by `dexopt_chroot_setup`, and only 43exists for the duration of the Pre-reboot Dexopt. 44 45#### `/mnt/pre_reboot_dexopt/chroot/{system_ext,vendor,product}` 46 47Mount points of other readonly images. 48 49#### `/mnt/pre_reboot_dexopt/chroot/{data,mnt/expand,dev,proc,sys,metadata}` 50 51Same as the corresponding directories outside of chroot. These are read-write 52mounts. 53 54#### `/mnt/pre_reboot_dexopt/chroot/mnt/artd_tmp` 55 56An empty directory for storing temporary files during Pre-reboot Dexopt, managed 57by `artd`. 58 59#### `/mnt/pre_reboot_dexopt/chroot/apex` 60 61For holding the apex mount points used in the chroot environment, managed by 62`apexd`. Note that this is not the same as `/apex` outside of chroot. 63 64#### `/mnt/pre_reboot_dexopt/chroot/linkerconfig` 65 66For holding the linker config used in the chroot environment, managed by 67`linkerconfig`. Note that this is not the same as `/linkerconfig` outside of 68chroot. 69 70#### `/mnt/pre_reboot_dexopt/mount_tmp` 71 72An ephemeral directory used as a temporary mount point for bind-mounting 73directories "slave+shared". 74