Commit graph

1146 commits

Author SHA1 Message Date
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
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
Elliott Hughes
e8b97fc0b0 Merge "init.rc: Reland "mkdir /data/misc/vold""
am: 19616ce100

* commit '19616ce100771d0f570bc9cf19d08fbbe8feec0f':
  init.rc: Reland "mkdir /data/misc/vold"
2016-01-08 17:16:34 +00:00
Yu Ning
c1149ff0c3 init.rc: Reland "mkdir /data/misc/vold"
Creation of /data/misc/vold was first introduced by commit 25775e8. It
then got reverted, probably inadvertently, by:

 commit 2e24bcfdce
 Author: Paul Lawrence <paullawrence@google.com>
 Date:   Fri May 22 18:31:55 2015 +0000

     Revert "Set up crypto for user directories in init."

This folder is required by vold. In its absence, if one tries to format
an SD card as internal storage, an error will occur, with the following
message printed to logcat:

 01-08 06:31:48.389  1002  1069 E vold    : Failed to persist key

Restoring /data/misc/vold fixes this bug.

This fix has been verified on the emulator, which currently does not
allow its virtual SD card to be adopted, but another CL will be uploaded
to enable that.

Change-Id: Ibb87ee821630a038a6f9b7b6a9da50fe03ca690d
Signed-off-by: Yu Ning <yu.ning@intel.com>
2016-01-08 14:51:32 +08:00
Pavlin Radoslavov
7705e0384e Merge "Use GID "wakelock" to control access to kernel wakelock"
am: 0f0498ad50

* commit '0f0498ad508e6747dc7b72a6e63de2f2befa2e1c':
  Use GID "wakelock" to control access to kernel wakelock
2015-12-29 01:28:48 +00:00
Pavlin Radoslavov
17d80c84e1 Use GID "wakelock" to control access to kernel wakelock
* Added new kernel GID named "wakelock" (AID_WAKELOCK = 3010)
* Changed the group access for /sys/power/wake_lock and
  /sys/power/wake_unlock from "system" to "wakelock"
* Added "wakelock" to the list of groups for the healthd process/service

Bug: 25864142
Change-Id: Ieabee9964cccec3107971a361a43aa9805164aa9
2015-12-28 14:57:28 -08:00
Pavlin Radoslavov
0eca107512 Use GID "wakelock" to control access to kernel wakelock
* Added new kernel GID named "wakelock" (AID_WAKELOCK = 3010)
* Changed the group access for /sys/power/wake_lock and
  /sys/power/wake_unlock from "system" to "wakelock"
* Added "wakelock" to the list of groups for the healthd process/service

Bug: 25864142
Change-Id: Ieabee9964cccec3107971a361a43aa9805164aa9
2015-12-28 19:33:30 +00:00
Felipe Leme
1a9c4531c7 Moved 'bugreportplus' from init.rc to dumpstate.rc
BUG: 26034608
Change-Id: Id6923cff0b2b3bd9d2ec9320ebcdb3fbead8df83
2015-12-14 13:43:00 -08:00
Andy Hung
c7ae5210a7 Merge "Add audioserver uid and restart service when needed" 2015-12-11 20:08:51 +00:00
Daichi Hirono
db85484423 Merge "Add /mnt/appfuse mount point to init.rc." 2015-12-11 06:16:29 +00:00
Daichi Hirono
7abc71ecd3 Add /mnt/appfuse mount point to init.rc.
BUG=25755834

Change-Id: I00b1185aec7a95baa6ef2f345a49761f3d006c4d
2015-12-11 13:29:04 +09:00
Paul Lawrence
c5733cfadb Add createuserkey
Needed so we can make the user0 key on first boot

Change-Id: I4699dbf2efdec44bb09bc4cfa7eeb59e56cb93ab
2015-12-09 15:34:18 -08:00
Tao Bao
27ca1eb294 Merge "rootdir: Execute update_verifier for A/B update." am: df13f60ce0
am: 8ca8664956

* commit '8ca8664956bf4bce783d9b84a9f0fd0ff8a9c11f':
  rootdir: Execute update_verifier for A/B update.
2015-12-09 19:57:52 +00:00