Skip to content
Snippets Groups Projects
Select Git revision
  • 3c47d5a44ce55d2eaf753fceb6c26fdc8d464bad
  • master default protected
  • android-7.1.2_r28_klist
  • pie-cts-release
  • pie-vts-release
  • pie-cts-dev
  • oreo-mr1-iot-release
  • sdk-release
  • oreo-m6-s4-release
  • oreo-m4-s12-release
  • pie-release
  • pie-r2-release
  • pie-r2-s1-release
  • oreo-vts-release
  • oreo-cts-release
  • oreo-dev
  • oreo-mr1-dev
  • pie-gsi
  • pie-platform-release
  • pie-dev
  • oreo-cts-dev
  • android-o-mr1-iot-release-1.0.4
  • android-9.0.0_r8
  • android-9.0.0_r7
  • android-9.0.0_r6
  • android-9.0.0_r5
  • android-8.1.0_r46
  • android-8.1.0_r45
  • android-n-iot-release-smart-display-r2
  • android-vts-8.1_r5
  • android-cts-8.1_r8
  • android-cts-8.0_r12
  • android-cts-7.1_r20
  • android-cts-7.0_r24
  • android-o-mr1-iot-release-1.0.3
  • android-cts-9.0_r1
  • android-8.1.0_r43
  • android-8.1.0_r42
  • android-n-iot-release-smart-display
  • android-p-preview-5
  • android-9.0.0_r3
41 results

update_engine.te

Blame
  • update_engine.te 2.45 KiB
    # Domain for update_engine daemon.
    type update_engine, domain, domain_deprecated;
    type update_engine_exec, exec_type, file_type;
    type update_engine_data_file, file_type, data_file_type;
    
    init_daemon_domain(update_engine);
    net_domain(update_engine);
    
    # Following permissions are needed for update_engine.
    allow update_engine self:process { setsched };
    allow update_engine self:capability { fowner sys_admin };
    allow update_engine kmsg_device:chr_file w_file_perms;
    allow update_engine update_engine_exec:file rx_file_perms;
    wakelock_use(update_engine);
    
    # Ignore these denials.
    dontaudit update_engine kernel:process setsched;
    
    # Allow using persistent storage in /data/misc/update_engine.
    allow update_engine update_engine_data_file:dir { create_dir_perms };
    allow update_engine update_engine_data_file:file { create_file_perms };
    
    # Allow update_engine to reach block devices in /dev/block.
    allow update_engine block_device:dir search;
    
    # Allow read/write on system and boot partitions.
    allow update_engine boot_block_device:blk_file rw_file_perms;
    allow update_engine system_block_device:blk_file rw_file_perms;
    
    # Don't allow kernel module loading, just silence the logs.
    dontaudit update_engine kernel:system module_request;
    
    # Allow update_engine to mount on the /postinstall directory and reset the
    # labels on the mounted filesystem to postinstall_file.
    allow update_engine postinstall_mnt_dir:dir mounton;
    allow update_engine postinstall_file:filesystem { mount unmount relabelfrom relabelto };
    allow update_engine labeledfs:filesystem relabelfrom;
    
    # Allow update_engine to read and execute postinstall_file.
    allow update_engine postinstall_file:file rx_file_perms;
    allow update_engine postinstall_file:lnk_file r_file_perms;
    allow update_engine postinstall_file:dir r_dir_perms;
    
    # The postinstall program is run by update_engine and will always be tagged as a
    # postinstall_file regardless of its attributes in the new system.
    domain_auto_trans(update_engine, postinstall_file, postinstall)
    
    # A postinstall program is typically a shell script (with a #!), so we allow
    # to execute those.
    allow update_engine shell_exec:file rx_file_perms;
    
    # Register the service to perform Binder IPC.
    binder_use(update_engine)
    allow update_engine update_engine_service:service_manager { add };
    
    # Allow update_engine to call the callback function provided by priv_app.
    binder_call(update_engine, priv_app)
    
    # Allow read/write bootctrl block device.
    allow update_engine bootctrl_block_device:blk_file rw_file_perms;