Allow the shell user to run dex2oat.

This is required for ART's Checker tests, which are part of
(host-driven) ART run-tests, and will also be required to run ART
run-tests via TradeFed in AOT-compilation modes in the future.

Test: Run `atest art-run-test-004-checker-UnsafeTest18` with
      https://android-review.googlesource.com/c/platform/tools/tradefederation/+/1484277
      merged in, on a device where `adb` commands are not run as root
Bug: 162408889
Bug: 147812905
Change-Id: I3e4824bf15bdbad1ddf26601f871feec11313ecc
This commit is contained in:
Roland Levillain 2020-11-02 13:52:54 +00:00
parent 8e307e0847
commit 06bee189ad

View file

@ -73,6 +73,10 @@ allow shell system_linker_exec:file rx_file_perms;
# /system/bin/bcc (b/126388046) # /system/bin/bcc (b/126388046)
allow shell rs_exec:file rx_file_perms; allow shell rs_exec:file rx_file_perms;
# Allow (host-driven) ART run-tests to execute dex2oat, in order to
# check ART's compiler.
allow shell dex2oat_exec:file rx_file_perms;
# Allow shell to start and comminicate with lpdumpd. # Allow shell to start and comminicate with lpdumpd.
set_prop(shell, lpdumpd_prop); set_prop(shell, lpdumpd_prop);
binder_call(shell, lpdumpd) binder_call(shell, lpdumpd)