From 502a036436af58edccb209868dcd79b1a10408e4 Mon Sep 17 00:00:00 2001 From: Martin Stjernholm Date: Mon, 24 Jul 2023 23:57:03 +0100 Subject: [PATCH] Allow dex2oat access to symlinks in APEXes to find DCLA libs. With the introduction of DCLA (/apex/sharedlibs APEX), .so files can be symlinked into that APEX, so we need to allow reading symlinks to be able to link the dex2oat binary successfully. This fixes "CANNOT LINK EXECUTABLE" errors for dex2oat during OTA preopting. Test: Apply an OTA manually and check logs for errors Bug: 291974157 Change-Id: I9eca91c94e8d33fe618783cea262ea3881957620 --- private/dex2oat.te | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/private/dex2oat.te b/private/dex2oat.te index 379e32c56..18600d8b9 100644 --- a/private/dex2oat.te +++ b/private/dex2oat.te @@ -84,7 +84,7 @@ allow dex2oat postinstall_file:file { execute getattr open }; # Allow dex2oat access to /postinstall/apex. allow dex2oat postinstall_apex_mnt_dir:dir { getattr search }; -allow dex2oat postinstall_apex_mnt_dir:file r_file_perms; +allow dex2oat postinstall_apex_mnt_dir:{ file lnk_file } r_file_perms; # Allow dex2oat access to files in /data/ota. allow dex2oat ota_data_file:dir ra_dir_perms;