0b2ca6c22c
ART is becoming a module and we need to be able to add new properties without modifying the non updatable part of the platform: - convert ART properties to use prefix in the namespace of [ro].dalvik.vm. - enable appdomain and coredomain to read device_config properties that configure ART Test: boot Bug: 181748174 Change-Id: Id23ff78474dba947301e1b6243a112b0f5b4a832
53 lines
2.1 KiB
Text
53 lines
2.1 KiB
Text
# dexoptanalyzer
|
|
type dexoptanalyzer, domain, coredomain, mlstrustedsubject;
|
|
type dexoptanalyzer_exec, system_file_type, exec_type, file_type;
|
|
type dexoptanalyzer_tmpfs, file_type;
|
|
|
|
r_dir_file(dexoptanalyzer, apk_data_file)
|
|
# Access to /vendor/app
|
|
r_dir_file(dexoptanalyzer, vendor_app_file)
|
|
|
|
# Reading an APK opens a ZipArchive, which unpack to tmpfs.
|
|
# Use tmpfs_domain() which will give tmpfs files created by dexoptanalyzer their
|
|
# own label, which differs from other labels created by other processes.
|
|
# This allows to distinguish in policy files created by dexoptanalyzer vs other
|
|
# processes.
|
|
tmpfs_domain(dexoptanalyzer)
|
|
|
|
userfaultfd_use(dexoptanalyzer)
|
|
|
|
# Allow dexoptanalyzer to read files in the dalvik cache.
|
|
allow dexoptanalyzer dalvikcache_data_file:dir { getattr search };
|
|
allow dexoptanalyzer dalvikcache_data_file:file r_file_perms;
|
|
|
|
# Read symlinks in /data/dalvik-cache. This is required for PIC mode boot
|
|
# app_data_file the oat file is symlinked to the original file in /system.
|
|
allow dexoptanalyzer dalvikcache_data_file:lnk_file read;
|
|
|
|
# Allow dexoptanalyzer to read files in the ART APEX data directory.
|
|
allow dexoptanalyzer { apex_art_data_file apex_module_data_file }:dir { getattr search };
|
|
allow dexoptanalyzer apex_art_data_file:file r_file_perms;
|
|
|
|
# Allow dexoptanalyzer to use file descriptors from odrefresh.
|
|
allow dexoptanalyzer odrefresh:fd use;
|
|
|
|
# Use devpts and fd from odsign (which exec()'s odrefresh)
|
|
allow dexoptanalyzer odsign:fd use;
|
|
allow dexoptanalyzer odsign_devpts:chr_file { read write };
|
|
|
|
allow dexoptanalyzer installd:fd use;
|
|
allow dexoptanalyzer installd:fifo_file { getattr write };
|
|
|
|
# Acquire advisory lock on /system/framework/arm/*
|
|
allow dexoptanalyzer system_file:file lock;
|
|
|
|
# Allow reading secondary dex files that were reported by the app to the
|
|
# package manager.
|
|
allow dexoptanalyzer { privapp_data_file app_data_file }:file { getattr read map };
|
|
|
|
# Allow testing /data/user/0 which symlinks to /data/data
|
|
allow dexoptanalyzer system_data_file:lnk_file { getattr };
|
|
|
|
# Allow query ART device config properties
|
|
get_prop(dexoptanalyzer, device_config_runtime_native_prop)
|
|
get_prop(dexoptanalyzer, device_config_runtime_native_boot_prop)
|