How to add a tinymix executable file to the Te file

Source: Internet
Author: User

When compiling the user version, you often encounter problems with SELinux permissions that require a feature to be turned on, and here's an example of how to add an application's permissions.

The following example takes the Intel platform Cherrytrail android6.0.1 as an example;

One, add the writing sepolicy under the Te file:

1. The file path is:/device/intel/sepolicy/;

2. Add Folder Tinymix

3. CD Tinymix

4. Add edit a file under this folder file_contexts;

		/system/bin/tinymix    U:object_r:tinymix_exec:s0

5. Add edits to another file under this folder Tinymix.te; The file name must be the same as the real command;

# Tinymix
type tinymix, domain;
Type tinymix_exec, Exec_type, File_type;
Init_daemon_domain (tinymix)

allow Tinymix system_file:file {Execute_no_trans};
Allow Tinymix proc:file {Execute_no_trans};

Second, add compilation settings in another place, and if you do not add this setting, you cannot be compiled into the system.

The code path is:/DEVICE/INTEL/CHERRYTRAIL/R2_CHT_FFD/BOARDCONFIG.MK, the code is as follows:

Board_sepolicy_dirs + + Device/intel/sepolicy/tinymix

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.