"Android O" Service AAA does not has a SELinux domain defined

Source: Internet
Author: User

In Init. A script-initiated service was added to the aaa.rc:

Service AAA /vendor/bin/sh /vendor/etc/aaa_spec.sh
User root
Group Root
Disabled
OneShot

On Post-fs-data
Start AAA

Via DMESG at system startup | grep init view found: Service AAA does not having a SELinux domain defined

Workaround:

1. Add the Aaa.te file under the devices/vendorxxx/sepolicy/common/directory, as follows:

Type AAA, domain;

Type aaa_exec, Exec_type, Vendor_file_type,file_type;

Init_daemon_domain (AAA)

Allow AAA vendor_shell_exec:file {entrypoint};

2. In the Devices/vendorxxx/sepolicy/android.mk file, add:

Board_sepolicy_dirs + = devices/vendorxxx/sepolicy/common/

3. Add in devices/vendorxxx/sepolicy/common/file_contexts:

# #add for AAA file permission##
/(Vendor|system/vendor)/etc/aaa_spec\.sh U:object_r:aaa_exec:s0

4. In Init. Aaa.rc inside the corresponding service inside add:

Service AAA /vendor/bin/sh /vendor/etc/aaa_spec.sh
User root
Group Root
Disabled
OneShot
Seclabel U:r:carrier_switcher:s0

5. Compile and burn bootimage, if compile error attention to resolve Neverallow conflict

6. When the system is found, if AVC is added to the Allow policy statement

"Android O" Service AAA does not has a SELinux domain defined

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.