Home | History | Annotate | only in /external/sepolicy
Up to higher level directory
NameDateSize
access_vectors08-Oct-20159.3K
adbd.te08-Oct-20152.9K
Android.mk08-Oct-201510.3K
app.te08-Oct-201513.8K
attributes08-Oct-20151.7K
binderservicedomain.te08-Oct-2015790
blkid.te08-Oct-2015694
blkid_untrusted.te08-Oct-20151.1K
bluetooth.te08-Oct-20152.7K
bootanim.te08-Oct-2015485
clatd.te08-Oct-20151.3K
debuggerd.te08-Oct-20151.7K
device.te08-Oct-20152.9K
dex2oat.te08-Oct-2015541
dhcp.te08-Oct-20151K
dnsmasq.te08-Oct-2015917
domain.te08-Oct-201516.9K
drmserver.te08-Oct-20151.8K
dumpstate.te08-Oct-20153.8K
file.te08-Oct-20158K
file_contexts08-Oct-201513.6K
fingerprintd.te08-Oct-2015739
fs_use08-Oct-2015865
fsck.te08-Oct-20151.2K
fsck_untrusted.te08-Oct-20151.1K
gatekeeperd.te08-Oct-2015879
genfs_contexts08-Oct-20152K
global_macros08-Oct-20152.5K
gpsd.te08-Oct-2015855
hci_attach.te08-Oct-2015313
healthd.te08-Oct-20151.3K
hostapd.te08-Oct-20151.1K
init.te08-Oct-201510.3K
initial_sid_contexts08-Oct-2015973
initial_sids08-Oct-2015416
inputflinger.te08-Oct-2015422
install_recovery.te08-Oct-2015944
installd.te08-Oct-20154.3K
ioctl_macros08-Oct-2015338
isolated_app.te08-Oct-20151.2K
kernel.te08-Oct-20153K
keys.conf08-Oct-2015851
keystore.te08-Oct-20151K
lmkd.te08-Oct-20151,022
logd.te08-Oct-20151.2K
mac_permissions.xml08-Oct-20151.3K
mdnsd.te08-Oct-2015137
mediaserver.te08-Oct-20153.7K
mls08-Oct-20154.3K
mls_macros08-Oct-20151.2K
mtp.te08-Oct-2015288
net.te08-Oct-2015852
netd.te08-Oct-20152.8K
neverallow_macros08-Oct-2015369
nfc.te08-Oct-2015965
NOTICE08-Oct-20151K
perfprofd.te08-Oct-20151.9K
platform_app.te08-Oct-20151.7K
policy_capabilities08-Oct-2015122
port_contexts08-Oct-201577
ppp.te08-Oct-2015493
procrank.te08-Oct-2015650
property.te08-Oct-20151.1K
property_contexts08-Oct-20153.1K
racoon.te08-Oct-2015874
radio.te08-Oct-20151.1K
README08-Oct-20154.2K
recovery.te08-Oct-20154.3K
rild.te08-Oct-20151.6K
roles08-Oct-201529
runas.te08-Oct-20151.1K
sdcardd.te08-Oct-20151.3K
seapp_contexts08-Oct-20152.2K
security_classes08-Oct-20152.7K
service.te08-Oct-20158.2K
service_contexts08-Oct-20159.5K
servicemanager.te08-Oct-2015661
sgdisk.te08-Oct-2015745
shared_relro.te08-Oct-2015569
shell.te08-Oct-20152.9K
slideshow.te08-Oct-2015549
su.te08-Oct-20151.8K
surfaceflinger.te08-Oct-20152.3K
system_app.te08-Oct-20152.3K
system_server.te08-Oct-201516.9K
te_macros08-Oct-201510.8K
tee.te08-Oct-2015434
toolbox.te08-Oct-20151K
tools/08-Oct-2015
tzdatacheck.te08-Oct-2015253
ueventd.te08-Oct-20151.8K
uncrypt.te08-Oct-2015975
untrusted_app.te08-Oct-20156.3K
users08-Oct-201555
vdc.te08-Oct-2015622
vold.te08-Oct-20156.4K
watchdogd.te08-Oct-2015185
wpa.te08-Oct-20151.2K
zygote.te08-Oct-20153.3K

README

      1 This directory contains the core Android SELinux policy configuration.
      2 It defines the domains and types for the AOSP services and apps common to
      3 all devices.  Device-specific policy should be placed under a
      4 separate device/<vendor>/<board>/sepolicy subdirectory and linked
      5 into the policy build as described below.
      6 
      7 Policy Generation:
      8 
      9 Additional, per device, policy files can be added into the
     10 policy build.
     11 
     12 They can be configured through the use of the BOARD_SEPOLICY_DIRS
     13 variable. This variable should be set in the BoardConfig.mk file in
     14 the device or vendor directories.
     15 
     16 BOARD_SEPOLICY_DIRS contains a list of directories to search
     17 for additional policy files. Order matters in this list.
     18 For example, if you have 2 instances of widget.te files in the
     19 BOARD_SEPOLICY_DIRS search path, then the first one found (at the
     20 first search dir containing the file) will be concatenated first.
     21 Reviewing out/target/product/<device>/etc/sepolicy_intermediates/policy.conf
     22 will help sort out ordering issues.
     23 
     24 Example BoardConfig.mk Usage:
     25 From the Tuna device BoardConfig.mk, device/samsung/tuna/BoardConfig.mk
     26 
     27 BOARD_SEPOLICY_DIRS += device/samsung/tuna/sepolicy
     28 
     29 SPECIFIC POLICY FILE INFORMATION
     30 
     31 mac_permissions.xml:
     32   ABOUT:
     33     The mac_permissions.xml file is used for controlling the mmac solutions
     34     as well as mapping a public base16 signing key with an arbitrary seinfo
     35     string. Details of the files contents can be found in a comment at the
     36     top of that file. The seinfo string, previously mentioned, is the same string
     37     that is referenced in seapp_contexts.
     38 
     39     It is important to note the final processed version of this file
     40     is stripped of comments and whitespace. This is to preserve space on the
     41     system.img. If one wishes to view it in a more human friendly format,
     42     the "tidy" or "xmllint" command will assist you.
     43 
     44   TOOLING:
     45     insertkeys.py
     46       Is a helper script for mapping arbitrary tags in the signature stanzas of
     47       mac_permissions.xml to public keys found in pem files. This script takes
     48       a mac_permissions.xml file(s) and configuration file in order to operate.
     49       Details of the configuration file (keys.conf) can be found in the subsection
     50       keys.conf. This tool is also responsible for stripping the comments and
     51       whitespace during processing.
     52 
     53       keys.conf
     54         The keys.conf file is used for controlling the mapping of "tags" found in
     55         the mac_permissions.xml signature stanzas with actual public keys found in
     56         pem files. The configuration file is processed via m4.
     57 
     58         The script allows for mapping any string contained in TARGET_BUILD_VARIANT
     59         with specific path to a pem file. Typically TARGET_BUILD_VARIANT is either
     60         user, eng or userdebug. Additionally, one can specify "ALL" to map a path to
     61         any string specified in TARGET_BUILD_VARIANT. All tags are matched verbatim
     62         and all options are matched lowercase. The options are "tolowered" automatically
     63         for the user, it is convention to specify tags and options in all uppercase
     64         and tags start with @. The option arguments can also use environment variables
     65         via the familiar $VARIABLE syntax. This is often useful for setting a location
     66         to ones release keys.
     67 
     68         Often times, one will need to integrate an application that was signed by a separate
     69         organization and may need to extract the pem file for the insertkeys/keys.conf tools.
     70         Extraction of the public key in the pem format is possible via openssl. First you need
     71         to unzip the apk, once it is unzipped, cd into the META_INF directory and then execute
     72         openssl pkcs7 -inform DER -in CERT.RSA -out CERT.pem -outform PEM  -print_certs
     73         On some occasions CERT.RSA has a different name, and you will need to adjust for that.
     74         After extracting the pem, you can rename it, and configure keys.conf and
     75         mac_permissions.xml to pick up the change. You MUST open the generated pem file in a text
     76         editor and strip out anything outside the opening and closing scissor lines. Failure to do
     77         so WILL cause a compile time issue thrown by insertkeys.py
     78 
     79         NOTE: The pem files are base64 encoded and PackageManagerService, mac_permissions.xml
     80               and setool all use base16 encodings.
     81