Commit graph

1157 commits

Author SHA1 Message Date
Janis Danisevskis
0af61f0024 Merge "Leftovers of the SELinux policy update mechanism"
am: b9c0788806

* commit 'b9c078880644b51bc9e6c314eed157f230fce43c':
  Leftovers of the SELinux policy update mechanism
2016-03-13 14:53:00 +00:00
Janis Danisevskis
3d1dff2231 Leftovers of the SELinux policy update mechanism
Remove references to SELinux policy files in /data/security
from libselinux/android.c. In the process all code that is
apparently related to handling an alternate policy and/or
reloading the policy has been removed.

Bug: 26544104
Change-Id: I47bf76ac3c26c5d71f92a21ffac2b17ba14262ea
2016-03-11 17:47:30 +00:00
Alex Deymo
40345ef6b8 Merge "Add /postinstall partition when using the A/B updater." am: 700b15dacf
am: e2ad3cfae4

* commit 'e2ad3cfae4f9f9ddec2746c0c57cdb3dc1991a43':
  Add /postinstall partition when using the A/B updater.
2016-03-04 08:03:35 +00:00
Alex Deymo
e2ad3cfae4 Merge "Add /postinstall partition when using the A/B updater."
am: 700b15dacf

* commit '700b15dacfa42bcc5c4d768b92530e9f20f0211b':
  Add /postinstall partition when using the A/B updater.
2016-03-04 08:01:40 +00:00
Alex Deymo
bb968fb04d Add /postinstall partition when using the A/B updater.
The new top level directory /postinstall is used by the A/B updater to
mount the new partition and run a post-install program before rebooting
into that new system.

init.rc was extended to label this new directory since the initrd has
no extended attributes.

Bug: 27177071
TEST=`ls -laZ /` shows the /postinstall directory on edison-eng

Change-Id: I6cdee7eb1d61ac7d447528962a4fad1a7bbf138d
2016-03-02 14:17:42 -08:00
Keun Soo Yim
be54c543bd mkdir /data/misc/cameraserver for AVD's camera HALs
cameraserver from nyc uses cameraserver as its username.
thus this change is needed for AVD (android virtual device)'s
camera HAL which is attached to cameraserver to work as that
HAL writes some files to /data/misc/media. the backward compatibility
issue should be handled as separate changes. this approach is 
preferred for finer-grained security isolation.

Change-Id: If028667d62df8fcac634ff1001759c39703b00dd
2016-03-01 22:44:59 +00:00
Todd Kjos
d125f6e8a9 Merge "Mount schedTune cgroup as /dev/stune" into nyc-dev 2016-02-26 17:35:50 +00:00
Chien-Yu Chen
0836c9e386 Sync internal<->AOSP user list.
Bug: 27299198

Cherry-picked from:

Restart cameraserver

Bug: 24511454
Change-Id: Ia27f4ef0eb71f891c789f637a21b04afe0b1c4e9
2016-02-23 15:56:55 -08:00
Glenn Kasten
845a4ffef8 Restore audio tee sink
Bug: 27323882
Change-Id: I1131c0537942c8f7cbf9ff6cc6847ab7e93e6187
2016-02-23 15:23:46 -08:00
Todd Kjos
11cde567a8 Mount schedTune cgroup as /dev/stune
Make stune consistent with the other cgroups mounted under /dev

Change-Id: I0fe7120ad2afbe8e6a3c9f72cc3f465de618d344
2016-02-23 09:08:54 -08:00
Calin Juravle
aed972dead Merge "Create profiles folders" into nyc-dev 2016-02-22 11:42:02 +00:00
Jeff Sharkey
002aecf6e8 Temporary fix for bugreport symlink.
Bug: 27262109
Change-Id: I011da38f8ad1eeaf717dc03a0fb6f9fdc5654c4c
2016-02-19 15:51:42 -07:00
Calin Juravle
807f23aff2 Create profiles folders
Current profiles (the ones which have not been used for
compilation) are stored in /data/misc/profiles/cur/0/pkgname/.

Reference profiles (the merged of all user profiles, used for
compilation) are stored in /data/misc/profiles/ref/pkgname/.

Add a method to get the shared app gid from an uid or appid.

Bug: 26719109
Bug: 26563023
Change-Id: I89601d7dbeb3041df882c141a9127dac200a645e
2016-02-19 13:42:37 +00:00
Bill Yi
4409f1446c Merge commit '4352ee87fd74b931d4b58192fb8974e91aa899d0' into HEAD 2016-02-17 11:37:00 -08:00
Martijn Coenen
623b56af5d Fix libprocessgroup SELinux denials.
libprocessgroup checks whether it can use memory
cgroups for keeping track of forked processes by
seeing whether /dev/memcg/apps is writable. However,
on systems with memory cgroups disabled, SELinux
(correctly) no longer classifies this directory as a cgroup,
and starts denying zygote access. To fix this,
first check whether /dev/memcg/apps/tasks exists to
see if the cgroup is mounted; only then check whether
we can write to the directory.

Bug: 27046965
Change-Id: I6e44cd62d8c396e20ceb162c50606b3e86f2cb3e
2016-02-08 11:45:27 +01:00
Jeff Sharkey
c457610e78 Follow migration of Shell app to DE storage.
The Shell app that stores bugreports now lives under DE storage for
all devices, both FBE and non-FBE.

Bug: 26668510
Change-Id: Iead1dcb98181a5caccf4d0c1e86de62abc6dc990
2016-02-06 20:15:24 -07:00
Jeff Sharkey
c895f11cf1 Merge "User 0 directories are created by vold now." 2016-02-05 21:01:21 +00:00
Mark Salyzyn
a2eba56f98 Merge "init-debug.rc: add runtime mmc max speed property actors" am: 20a6f0ff3b
am: c883cdec82

* commit 'c883cdec825e021007672d3ce9b199589ed2cba6':
  init-debug.rc: add runtime mmc max speed property actors
2016-02-05 17:38:44 +00:00
Mark Salyzyn
c883cdec82 Merge "init-debug.rc: add runtime mmc max speed property actors"
am: 20a6f0ff3b

* commit '20a6f0ff3bf21e2bc82ebfe06357f6225c991ee9':
  init-debug.rc: add runtime mmc max speed property actors
2016-02-05 15:25:14 +00:00
Jeff Sharkey
3b9c83a0f6 User 0 directories are created by vold now.
This ensures that all users on device follow a consistent path for
setup and validation of encryption policy.

Also add remaining user-specific directories and fix linking order.

Bug: 25796509
Change-Id: I8c2e42a78569817f7f5ea03f54b743a6661fdb9c
2016-02-04 15:26:23 -07:00
Mark Salyzyn
7864e36751 init-debug.rc: add runtime mmc max speed property actors
persist.mmc.max_read_speed  - KB/s speed cap
persist.mmc.max_write_speed - KB/s speed cap
persist.mmc.cache_size      - MB of high-speed on-device write cache

device default directly to associated /sys/block/mmcblk0/ attributes,
not delivered on "user" builds.

Bug: 26976972
Change-Id: Ic82b9614489b6406ce830d127c85affc9095e256
2016-02-04 13:10:19 -08:00
Mark Salyzyn
95c220e6b7 Merge "init.rc: too many start logd" am: 989daeaf5b
am: d8e0e52099

* commit 'd8e0e520998e83ae16fcff317704bb6c00b7fb31':
  init.rc: too many start logd
2016-02-03 16:45:03 +00:00
Mark Salyzyn
d8e0e52099 Merge "init.rc: too many start logd"
am: 989daeaf5b

* commit '989daeaf5b2f50d96da69ad476adf434522e35e7':
  init.rc: too many start logd
2016-02-03 15:51:31 +00:00
Andreas Gampe
fcad79fe10 Merge "Init: add OTA directory" 2016-02-03 01:28:32 +00:00
Mark Salyzyn
0604f6fbae init.rc: too many start logd
Bug: 26934873
Change-Id: Ia00da6253a50bedc8ba825df1cf641b86cdebeed
2016-02-02 16:01:17 -08:00
Elliott Hughes
1ee7abd066 Merge "Start debuggerd as soon as logd is up." am: 1b729b3e04
am: 1ef5b78a2f

* commit '1ef5b78a2ffc471e5ac2e30b424f00d15d581a8c':
  Start debuggerd as soon as logd is up.
2016-02-02 21:12:49 +00:00
Elliott Hughes
1ef5b78a2f Merge "Start debuggerd as soon as logd is up."
am: 1b729b3e04

* commit '1b729b3e04b210d096ee2d447945f6b2c53b6029':
  Start debuggerd as soon as logd is up.
2016-02-02 21:10:47 +00:00
Elliott Hughes
2f74a5dae5 Start debuggerd as soon as logd is up.
Makes debugging early boot crashes easier.

Bug: http://b/26918597
Change-Id: I5bb883f1350ea5f7a545cb0e9f1034ecfcf47cdb
2016-02-02 13:03:41 -08:00
Martijn Coenen
2f07673957 Merge "Reuse mem cgroups for tracking forked PIDs." 2016-02-02 10:23:57 +00:00
Tim Murray
88185f9ee8 Merge "Enable top-app cpuset support." 2016-02-02 02:13:31 +00:00
Tim Murray
6647bb5130 Enable top-app cpuset support.
Allows ActivityManager to use the top-app cpuset to grant the currently
focused app exclusive access to a CPU core.

Change-Id: I45bca5170477e413dec6e5889338399d0859706c
2016-02-01 15:03:16 -08:00
Greg Hackmann
7026d48d84 Merge "init.rc: add missing /dev/fd symlink" am: 54bf0718f4
am: ef605cb749

* commit 'ef605cb7495cec368f7be015f924479969dd8fc2':
  init.rc: add missing /dev/fd symlink
2016-02-01 22:07:42 +00:00
Greg Hackmann
ef605cb749 Merge "init.rc: add missing /dev/fd symlink"
am: 54bf0718f4

* commit '54bf0718f4eb1b170f55bbd07207cd6ad2e7e0f5':
  init.rc: add missing /dev/fd symlink
2016-02-01 22:04:06 +00:00
Martijn Coenen
b82bab66f3 Reuse mem cgroups for tracking forked PIDs.
It turns out we were using the CPU accounting
cgroups for keeping track of processes that were
forked by an app without the framework's knowledge,
so we could kill all of them reliably (see b/15313911
for context).

Since we want to use memory cgroups for other purposes,
we might as well use memory cgroups for tracking forked
PIDs if they're enabled. This also gets us automatic cleanup
of empty mem cgroups.

Also, removed old mem cgroup mount point that is no
longer used, as well as cgroup release agent code that
we're not using.

Change-Id: I69d5cc31c162ffa49ef6945755f41381e306cc8b
2016-02-01 21:04:24 +01:00
Greg Hackmann
40a96e4ba0 init.rc: add missing /dev/fd symlink
The Linux kernel implicitly expects /dev/fd to symlink to /proc/self/fd.

This change fixes the exec/execveat.c kernel selftest.

Change-Id: Ia08d50023336fdbfc098527299c326d9d59039a9
Signed-off-by: Greg Hackmann <ghackmann@google.com>
2016-02-01 10:02:19 -08:00
Paul Crowley
5949745534 On FDE devices, initialize user 0
Fix ugly special cases for user 0: initialize them explicitly.

Bug: 26704408
Change-Id: I1b8536b9e5e87ea98b4009a309f2e22c56006651
2016-02-01 16:44:46 +00:00
Christopher Tate
63c463fe28 Have init set up the backup stage dir on /cache
Bug 26834865

Change-Id: Idc63c1706f68d42b2a9cee05997c63a9bbcb0fb9
2016-01-29 12:47:46 -08:00
Andreas Gampe
7dfcc92bee Init: add OTA directory
Add /data/ota in init so that the right selinux labels are applied.

Bug: 25612095
Change-Id: I8fd093147f8e0a5c3bd1a4007a61b0b759911cf2
2016-01-28 11:42:57 -08:00
Chien-Yu Chen
113f88e365 Merge "Restart cameraserver" 2016-01-28 02:04:44 +00:00
Kevin Cernekee
89a31c4499 Merge "ueventd.rc: Document the different rule formats for /dev and /sys nodes" am: fa432b0e2f
am: 54b47105ae

* commit '54b47105aea0e93ee287f76d4a4dc6bfe6ddf698':
  ueventd.rc: Document the different rule formats for /dev and /sys nodes
2016-01-26 23:51:38 +00:00
Kevin Cernekee
54b47105ae Merge "ueventd.rc: Document the different rule formats for /dev and /sys nodes"
am: fa432b0e2f

* commit 'fa432b0e2f87e9a029ac0094e5bceaaff258368a':
  ueventd.rc: Document the different rule formats for /dev and /sys nodes
2016-01-26 23:48:43 +00:00
Kevin Cernekee
fa432b0e2f Merge "ueventd.rc: Document the different rule formats for /dev and /sys nodes" 2016-01-26 23:44:56 +00:00
Chien-Yu Chen
cd2ef4ef1c Restart cameraserver
Bug: 24511454
Change-Id: Ia27f4ef0eb71f891c789f637a21b04afe0b1c4e9
2016-01-25 11:52:40 -08:00
Tim Murray
1293fed9a3 Merge "Improve cpuset support for surfaceflinger." 2016-01-25 18:45:01 +00:00
Nick Kralevich
b797e78f8b Merge "init.rc: mix device-specific data into the Linux RNG" am: e04b60d2b9
am: 9deaf7c8a6

* commit '9deaf7c8a6eca900e1e50cccc1aeef17d04d70e2':
  init.rc: mix device-specific data into the Linux RNG
2016-01-23 04:04:38 +00:00
Nick Kralevich
9deaf7c8a6 Merge "init.rc: mix device-specific data into the Linux RNG"
am: e04b60d2b9

* commit 'e04b60d2b9bf0e6560e3cde6f671f294b796fcdb':
  init.rc: mix device-specific data into the Linux RNG
2016-01-23 04:02:51 +00:00
Nick Kralevich
27cb410352 init.rc: mix device-specific data into the Linux RNG
Mix the contents of /proc/cmdline and /default.prop
into /dev/urandom. /proc/cmdline often contains
androidboot.serialno, a device-specific unique
identifier. Similarly, /default.prop contains the
build fingerprint and timestamp, which vary between
device families.

Change-Id: I8803b38c7089b2a1217b99a7c1808b29a3b138cf
2016-01-22 19:58:21 -08:00
Tim Murray
4284f9f3a3 Improve cpuset support for surfaceflinger.
SurfaceFlinger needs some of its threads in the system-background cpuset
and some of its threads (the binder pool) outside of the
system-background cpuset in order to improve UI perf/power
consumption. Remove surfaceflinger from the system-background cpuset in
init.rc and allow a thread to place itself in the system-background
cpuset given enough permissions.

bug 25745866

Change-Id: I85f7e41c5439e6ad7cc2d355e51f5dfb3a0c7088
2016-01-22 14:06:50 -08:00
Paul Crowley
558d8f4364 Remove no-longer-needed crypto init builtins
Changes to the way FBE works to support lifecycles mean that these
commands aren't needed any more.

Bug: 22358539
Change-Id: Id73339e0aa8070dd688f35b5d59de75236961395
2016-01-20 11:20:23 +00:00
Jeff Sharkey
d78b55fba2 Move some directory creation out of installd.
Core system directories should be created here in init.rc instead
of making installd do the creation.

Bug: 26466827
Change-Id: I313a332e74699641872c41fce5a7ca35bfce8f82
2016-01-14 23:23:53 -07:00