Commit graph

134 commits

Author SHA1 Message Date
Alex Klyubin
71d223b8c3 Merge "Remove unused /selinux_version" am: f32107fbb2 am: ac5ac23bb3
am: 561e101ec9

Change-Id: I25fed6576441cbd329bb0228ff47c625172c8444
2017-03-15 20:15:42 +00:00
Alex Klyubin
4fe461d2a0 Remove unused /selinux_version
This file is no longer needed because it was needed for supporting
reloadable/dynamic SELinux policy which is no longer supported.

Test: Clean build, flash, device boots without additional denials.
      Reboot to recovery works, no additional denials.
Bug: 33642277
Change-Id: Ie65e74b8c8437694bc1ea019ab844f60f9e89ade
2017-03-15 09:47:36 -07:00
Jaesoo Lee
2b61f19254 Merge "configstore: add default implementation of configstore@1.0 HAL" 2017-03-14 06:44:13 +00:00
Jeff Vander Stoep
4d9e183836 Merge "Include file_contexts conditionally elsewhere" am: e65af5ce72 am: 10539b3253
am: 96377665f2

Change-Id: Ib46554b2ebccd930a4b2a827c7fdd8a9ff0f15db
2017-03-11 00:06:42 +00:00
Jiyong Park
4ed780c454 configstore: add default implementation of configstore@1.0 HAL
This change adds default implementation of configstore@1.0 HAL to all
embedded devices.

Bug: 34314793
Test: build. make sure /system/bin/hw has file
android.hardware.configstore@1.0-service

cherry-picked
1d6ab958c configstore: add default implementation of configstore@1.0 HAL

Merged-in: I65f416560de9d65c57e6cfcb9a6fe26b0140d4a6
Change-Id: Ib68fa325a0f0ce60db0701e16a5a9056411fb398
2017-03-10 10:13:17 +09:00
Jeff Vander Stoep
f57a154f2e Include file_contexts conditionally elsewhere
Test: Marlin and Bullhead build and boot with no new denials.
Test: Marlin and Bullhead recovery boots with no new denials.
Test: Bullhead boots with file_contexts.bin in /
Test: Marlin boot with /system/etc/selinux/plat_file_contexts and
      /vendor/etc/selinux/nonplat_file_contexts.
Bug: 36002414

Change-Id: I25af653e060c0c72ea6ad08db8869132885adff8
2017-03-08 21:12:47 -08:00
Alex Klyubin
5a8d726ced Merge "Include secilc and sepolicy conditionally, elsewhere" am: 3e78704825 am: 8fe478de64
am: d485d2a10c

Change-Id: Ic2da20423482bb5d8aff2d61a29044a547c42753
2017-03-03 04:02:10 +00:00
Alex Klyubin
8e87853a04 Include secilc and sepolicy conditionally, elsewhere
This removes the unconditional inclusion of secilc and sepolicy.
These artefacts are now conditionally included by system/core/init.
The reason for declaring the conditional inclusion there is because
the desired conditional inclusion based on PRODUCT_FULL_TREBLE cannot
be declared here because PRODUCT_FULL_TREBLE is not yet available when
this file is interpreted.

Test: Device boots, no additional SELinux denials. This test is
      performed on a device with PRODUCT_FULL_TREBLE set to true, and
      on a device with PRODUCT_FULL_TREBLE set to false.
Test: Device with PRODUCT_FULL_TREBLE set to true contains secilc and
      the three *.cil files, but does not contain the sepolicy file.
      Device with PRODUCT_FULL_TREBLE set to false contains sepolicy
      file but does not contain the secilc file or any *.cil files.
Bug: 31363362

Change-Id: Ia3f38948b71a054918f5f63c594ba62a033e1066
2017-03-02 12:58:38 -08:00
Yifan Hong
8c86bc72b4 Merge "sintf.xml => manifest.xml" am: aeec3bfde7 am: 28070816fb
am: 1b510a9705

Change-Id: I6fb3f8c4f44d4f3fe68a915b1a6f85fc7db5c107
2017-03-02 03:55:56 +00:00
Yifan Hong
c3373a32e4 sintf.xml => manifest.xml
Bug: 35870239
Test: make -j64 and ensure manifest.xml is there.
Change-Id: I5eccc6dcdc04a3caadc3ccce1d8b58c12f5950ee
2017-03-01 18:09:28 -08:00
Yifan Hong
b5d70b3a77 Merge "Add system/manifest.xml on device" am: 569cb34dc0 am: 40517f3ea3
am: 65460a8fb9

Change-Id: I1943a06d7480363df5352d0fe88cdc6a69825153
2017-03-01 03:02:26 +00:00
Treehugger Robot
569cb34dc0 Merge "Add system/manifest.xml on device" 2017-03-01 02:54:52 +00:00
Yifan Hong
7ebc342b86 Add system/manifest.xml on device
Similar to vendor/manifest.xml on device, this file lists
all HALs defined in the framework (and hence go
to the system image). IServiceManager / IMemory /
etc. getService should consult this file (via VINTF
object under /system/libvintf) to return the HAL in the correct
transport mode.

Bug: 34772739 Create system/manifest.xml
Bug: 35219444 Need interface + instance entry

Test: compiles and manually confirm that system/manifest.xml exist.
Change-Id: I5b3c79b068841e47062cbab6f72d70555801a21d
2017-02-28 16:13:42 -08:00
Alex Klyubin
c3a1650f6c Merge "Make secilc available" am: bbdd0e8745 am: 22bcc5db9d
am: b5846d8453

Change-Id: Ib805383037565df6a403a1725da1b34d10d432ef
2017-02-27 23:27:48 +00:00
Alex Klyubin
46dd574918 Make secilc available
The SELinux policy compiler needs to be available on-device to compile
SELinux policy at boot on some devices. For now, we're including this
unconditionally, but, going forward, we will include this binary only
on devices which need it.

Test: Device boots -- secilc is not yet used anyway
Bug: 31363362
Change-Id: I7712b70d7c5b4c57bec2cdb44519b42d26758d09
2017-02-27 13:28:42 -08:00
Steven Moreland
f086747106 embedded.mk: allocator service
We are splitting android.hidl.memory into android.hidl.allocator and
android.hidl.memory to reflect the fact that we have two separate
interfaces which are served over different transports.

Bug: 35327976
Test: hidl_test, device boots with allocator

Merged-In: I36b1554d20f89ecd60a836c04f788ac83e0a1f5c
Change-Id: I36b1554d20f89ecd60a836c04f788ac83e0a1f5c
2017-02-17 20:47:16 +00:00
Steven Moreland
69249f1f53 embedded.mk: allocator service
We are splitting android.hidl.memory into android.hidl.allocator and
android.hidl.memory to reflect the fact that we have two separate
interfaces which are served over different transports.

Bug: 35327976
Test: hidl_test, device boots with allocator
Change-Id: I36b1554d20f89ecd60a836c04f788ac83e0a1f5c
2017-02-17 12:36:54 -08:00
Jiyong Park
6a220471eb Merge "configstore: add default implementation of configstore@1.0 HAL" 2017-02-01 04:23:12 +00:00
Sandeep Patil
d79c65f085 SELinux: split property_contexts into platform and non-platform components. am: b0481560e4 am: e0ccdc0e42 am: ba742d7dde
am: fac4996610

Change-Id: I14d2d100c3b6e3970fd3852b5d9fd0a88895e151
2017-01-30 19:32:41 +00:00
Sandeep Patil
b0481560e4 SELinux: split property_contexts into platform and non-platform components.
Bug: 33746484
Test: Successfully boot with original service and property contexts.
      Successfully boot with split serivce and property contexts.

Change-Id: I1932684f600dd34d5136e72ac053fae13f0c3eba
Signed-off-by: Sandeep Patil <sspatil@google.com>
2017-01-26 15:30:31 -08:00
Yifan Hong
74fb50800c Merge "Add lshal to embedded.mk." am: cbc8f16656 am: 1a375ded9a am: 1030be9543
am: 21a7e626f2

Change-Id: I930f8a5cccc341178e0d25c1c8599753bb7a4e47
2017-01-26 18:32:15 +00:00
Yifan Hong
7dbae043ff Add lshal to embedded.mk.
Test: make -j64 and flash the device and
ensure that lshal is available on the device.

Bug: 34712252
Change-Id: If61047afb27f9da9f8825ce18e2dfc0b3dec10e2
2017-01-26 18:17:36 +00:00
Jiyong Park
1d6ab958ca configstore: add default implementation of configstore@1.0 HAL
This change adds default implementation of configstore@1.0 HAL to all
embedded devices.

Bug: 34314793
Test: build. make sure /system/bin/hw has file
android.hardware.configstore@1.0-service

Change-Id: I65f416560de9d65c57e6cfcb9a6fe26b0140d4a6
2017-01-24 12:50:53 +09:00
Josh Gao
748cc8640a Merge "Add crash_dump and tombstoned products." am: 6651199eeb am: 7cf55a4581 am: 1df77bc0c7
am: 85d13bcb8e

Change-Id: Ifffa02acab8d00a6d400c78ef27e0583f36b80ea
2017-01-19 00:41:16 +00:00
Josh Gao
6651199eeb Merge "Add crash_dump and tombstoned products." 2017-01-18 23:04:09 +00:00
Jorim Jaggi
8cbd925748 Revert "SELinux: split property_contexts into platform and non-platform components."
This reverts commit c5ffdd4bb4.

Change-Id: I4c5fa6c68cbf0124117153660a2fd363f72388b6
2017-01-18 15:37:30 +00:00
Jorim Jaggi
84fcd62cb4 Revert "SELinux: split property_contexts into platform and non-platform components."
This reverts commit c5ffdd4bb4.
2017-01-18 16:28:54 +01:00
Sandeep Patil
3d425305ee SELinux: split property_contexts into platform and non-platform components. am: c5ffdd4bb4 am: a94ae916ce am: eec071a34a
am: 8a3f41af27

Change-Id: I7d859256d4e0b3fed0a58932d5ddc9498a69c1eb
2017-01-18 06:27:05 +00:00
Sandeep Patil
1b8d3bc0e2 SELinux: split service_contexts into platform and non-platform components. am: e4ade08f63 am: 0068df10f6 am: 29c9cb811d
am: d091ce20b1

Change-Id: I3331c1b48a75374f675d8527255d3d28ed3251bd
2017-01-18 00:55:09 +00:00
Sandeep Patil
c5ffdd4bb4 SELinux: split property_contexts into platform and non-platform components.
Bug: 33746484
Test: Successfully boot with original service and property contexts.
      Successfully boot with split serivce and property contexts.

Change-Id: I1f218ca842407d30650b8987ded6679672171091
Signed-off-by: Sandeep Patil <sspatil@google.com>
2017-01-18 00:41:15 +00:00
Josh Gao
e6b2ddaf69 Add crash_dump and tombstoned products.
Bug: http://b/30705528
Change-Id: I3f6c98f6f907f93e082db085a122557fc8488c83
2017-01-17 13:55:18 -08:00
Sandeep Patil
e4ade08f63 SELinux: split service_contexts into platform and non-platform components.
Bug: 33746484
Test: Successfully boot with original service and property contexts.
      Successfully boot with split serivce and property contexts.

Change-Id: I6fec8d9b3023de09d69198c9e72311a1f03fe844
Signed-off-by: Sandeep Patil <sspatil@google.com>
2017-01-17 04:39:00 +00:00
TreeHugger Robot
e6b8475baf Merge "Storaged build file" 2017-01-09 21:55:49 +00:00
Steven Moreland
3ac4a22f77 Merge "embedded.mk: add android.hidl.memory@1.0-impl" am: 2ec742a956 am: ff2c0a1433 am: d1f4fc175e
am: 9db3e06696

Change-Id: Ie29c0bf8b763ea954653b7d33d78d82bc7bbfc3e
2017-01-09 21:16:44 +00:00
Dan Cashman
40aabca6f2 Split seapp_contexts into plat and nonplat components. am: 6f1ea7101f am: c6321e54b6 am: 1960e5f085
am: a4d44e3d4c

Change-Id: I4f078f5767c23a9459cb03f9ac12cb4631fe8ec0
2017-01-09 20:52:48 +00:00
Treehugger Robot
2ec742a956 Merge "embedded.mk: add android.hidl.memory@1.0-impl" 2017-01-09 20:51:16 +00:00
ynwang
226d674624 Storaged build file
Add storaged to embedded.mk to be built.

Bug: 30983988

Change-Id: I157bc09bfe188423681e1b70b4d39ae212b7567e
2017-01-09 11:36:17 -08:00
Steven Moreland
94946d0eb8 embedded.mk: add android.hidl.memory@1.0-impl
Bug: 34134179
Test: both 32 and 64 bit versions of this file are on the device after a
clean build.

Change-Id: I75ab12246c2c44e39b5e863dfec98dc72a36fbbe
2017-01-08 10:00:20 -08:00
dcashman
443f5e9e2f Merge "Build split file_contexts." am: 80e70ae04a am: dc9771e24c am: 9937a72425
am: a22bbc4bfb

Change-Id: I674242185e929ab3f381c1681414730cef4250f1
2017-01-06 17:41:12 +00:00
Dan Cashman
6f1ea7101f Split seapp_contexts into plat and nonplat components.
Bug: 33746381
Test: Device boots with no extra denials.
Change-Id: Ib403be429562f5e22ed4dd042fb04b0795b558db
2017-01-05 12:56:24 -08:00
dcashman
b52f040bec Build split file_contexts.
Bug: 31363362
Test: Device uses new file_contexts files for labeling decisions.
Change-Id: I33c3297a2ec806f4b9f5dd25f3dd20c4b1001641
Signed-off-by: Sandeep Patil <sspatil@google.com>
2017-01-05 11:25:13 -08:00
Elliott Hughes
21c197238d Revert "Revert "Merge changes from topic 'fsconfig-2'"" am: 2d7c86dfea am: feb4f2e54a am: 8a2ed5159c
am: 3315b71ca8

Change-Id: I385eb63030834d9d684baee6157d1a5777d117b1
2016-12-27 21:23:25 +00:00
Elliott Hughes
feb4f2e54a Revert "Revert "Merge changes from topic 'fsconfig-2'""
am: 2d7c86dfea

Change-Id: I825336a18f7d7525bb49dd65d24ddccbfef84ba5
2016-12-27 21:01:23 +00:00
Elliott Hughes
5f60b74297 Merge "Revert "Revert "Merge changes from topic 'fsconfig-2'""" 2016-12-27 20:51:07 +00:00
Steven Moreland
8bcc1ea56b Merge "embedded.mk: +android.hidl.memory@1.0-service" am: c1a11ec83f am: fbeb6b5f8f am: cfeaa71933
am: 553aa3d931

Change-Id: Ia39f4efa9ee10f218bed315e6939fed916368062
2016-12-22 21:46:14 +00:00
Steven Moreland
7676451252 embedded.mk: +android.hidl.memory@1.0-service
This is the service that provides shared memory for hidl/treble
processes.

Bug: 32185232
Test: builds
Change-Id: I79162a781daad7aa704f4ee071fef0bbdea59a18
2016-12-22 11:39:11 -08:00
Elliott Hughes
2d7c86dfea Revert "Revert "Merge changes from topic 'fsconfig-2'""
This reverts commit fad4b4b715.

Incorporating the following fixes:

1.

fsconfig: fix fs_config_* build for discovered headers

When android_file system_config.h is picked up from the device
directory, neither TARGET_FS_CONFIG_GEN or TARGET_ANDROID_FILESYSTEM_CONFIG_H
are specified. Thus, the build is not generating the required fs_config_files
and fs_config_dirs.

Test: Ensure that make fs_config_files works, and produces the same output as before
      Build the system image and mount it as a loop back and dump the file system
      capabilities with getcap. Verify that output to the supplied
      android_file system_config.h

From the loopback of the system.img mount, from CWD system/bin:
$ getcap *
cnss-daemon = cap_net_bind_service+ep
hostapd = cap_net_admin,cap_net_raw+ep
imsdatadaemon = cap_net_bind_service+ep
ims_rtp_daemon = cap_net_bind_service+ep
logd = cap_setgid,cap_audit_control,cap_syslog+ep
mm-qcamera-daemon = cap_sys_nice+ep
pm-service = cap_net_bind_service+ep
run-as = cap_setgid,cap_setuid+ep
surfaceflinger = cap_sys_nice+ep
webview_zygote32 = cap_setgid,cap_setuid,cap_setpcap+ep
webview_zygote64 = cap_setgid,cap_setuid,cap_setpcap+ep

Compared to the android_filesystem_config.h:
    { 00700, AID_CAMERA,    AID_SHELL,     (1ULL << CAP_SYS_NICE), "system/bin/mm-qcamera-daemon" },
    { 00755, AID_SYSTEM,    AID_SYSTEM,    (1ULL << CAP_NET_BIND_SERVICE), "system/bin/pm-service" },
    { 00755, AID_SYSTEM,    AID_SYSTEM,    (1ULL << CAP_NET_BIND_SERVICE), "system/bin/imsdatadaemon" },
    { 00755, AID_SYSTEM,    AID_RADIO,     (1ULL << CAP_NET_BIND_SERVICE), "system/bin/ims_rtp_daemon" },
    { 00755, AID_SYSTEM,    AID_SYSTEM,    (1ULL << CAP_NET_BIND_SERVICE), "system/bin/cnss-daemon"},

2.

fsconfig: fix error message for duplicate AID

Fixes:
    raise ValueError('Duplicate aid value "%u" for %s' % value,
TypeError: %u format: a number is required, not str

and

    raise ValueError('Duplicate aid value "%s" for %s' % value,
TypeError: not enough arguments for format string

3.

fsconfig: add test for duplicate ranges

Add a test for duplicate range detection.

4.

fsconfig: skip AID_APP, AID_USER and all ranges

Do not output AID_APP, AID_USER and ranges. A range
is defined as ending with AID_ and ending in _START or
_END.

5.

fsconfig: test for skip AID_APP, AID_USER and all ranges

Test against AIDs that caused the bionic tests to fail.

Change-Id: I95569a9ccc83bd3231f8a6f395532cc2de316bd2
Signed-off-by: William Roberts <william.c.roberts@intel.com>
2016-12-18 10:55:35 -08:00
Daniel Cashman
b4ed15b04e Merge "Revert "Add build dependencies for split sepolicy files."" am: cbdc0bd096 am: 5e8be7b822 am: 6549a83888
am: 9bff49c703

Change-Id: I47182fb8bb5f1947b02ec4c70d3f23a810eba5f5
2016-12-17 01:28:18 +00:00
Daniel Cashman
df1e2102c6 Revert "Add build dependencies for split sepolicy files."
This reverts commit 086189145c.

Change-Id: Idfd210d1f16eefcedda6154b0361611f53c5158f
2016-12-17 00:53:52 +00:00
dcashman
5fce540af2 Merge "Add build dependencies for split sepolicy files." am: 298f9b5925 am: bc1832f381 am: ced437a479
am: 40a04b4709

Change-Id: I35fda032da32a3bbb593154a9ed0287bf54304ad
2016-12-17 00:43:33 +00:00