Commit Graph

1258 Commits

Author SHA1 Message Date
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
Tao Bao 8ca8664956 Merge "rootdir: Execute update_verifier for A/B update."
am: df13f60ce0

* commit 'df13f60ce0152bc9a38e18fcb9c7c839d8eba5e3':
  rootdir: Execute update_verifier for A/B update.
2015-12-09 19:55:09 +00:00
Tao Bao df13f60ce0 Merge "rootdir: Execute update_verifier for A/B update." 2015-12-09 19:50:31 +00:00
Nick Kralevich c94d92f5ad Merge "init.rc: restorecon_recursive /sys/kernel/debug" am: 6d85c06aa1 am: 070288241d
am: baaeddfa23

* commit 'baaeddfa239625a9d54091c628242d84a9191514':
  init.rc: restorecon_recursive /sys/kernel/debug
2015-12-08 04:54:15 +00:00
Nick Kralevich baaeddfa23 Merge "init.rc: restorecon_recursive /sys/kernel/debug" am: 6d85c06aa1
am: 070288241d

* commit '070288241d5c3d1a169e21ba4439a5943ce476d8':
  init.rc: restorecon_recursive /sys/kernel/debug
2015-12-08 04:50:55 +00:00
Nick Kralevich 070288241d Merge "init.rc: restorecon_recursive /sys/kernel/debug"
am: 6d85c06aa1

* commit '6d85c06aa1600e905cf3e0b093e939fa3866ee59':
  init.rc: restorecon_recursive /sys/kernel/debug
2015-12-08 04:48:06 +00:00
Nick Kralevich 715c4dc3f9 init.rc: restorecon_recursive /sys/kernel/debug
If /sys/kernel/debug is present, make sure it has all the appropriate
SELinux labels.

Labeling of /sys/kernel/debug depends on kernel support
added in commit https://android-review.googlesource.com/122130

This patch depends on an external/sepolicy change with the
same Change-Id as this patch.

Change-Id: Id1d6a9ad6d0759d6de839458890e8cb24685db6d
2015-12-07 17:00:40 -08:00
Tao Bao 97df395683 rootdir: Execute update_verifier for A/B update.
update_verifier verifies the updated partitions and marks the current
slot as having booted successfully. It needs to be triggered prior to
the start of the framework, otherwise it won't be able to fall back to
the old system without a data wipe.

Bug: 26039641
Change-Id: I6fd183cdd3dfcc72feff2a896368158875b28591
2015-12-07 16:23:13 -08:00
Todd Kennedy 088113f419 Merge "Create new ephemeral app directory" 2015-12-07 15:33:06 +00:00
Felipe Leme 171b5d8be3 Created service 'bugreportplus'
This service is an enhanced version of bugreport that provides a better
user interface (like displaying progress and allowing user to enter
details).

It will be  typically triggered by the 'Take Bug Report' UI, which will
now offer the option for the traditional or enhanced options (services
'bugreport' and 'bugreportplus' respectively).

BUG: 26034608
Change-Id: I39ea92c3e329a801b51f60a558c73faaf890c068
2015-12-04 14:51:38 -08:00
Jeff Sharkey a5954de3bb Create credential-encrypted system dir for owner.
Other user directories are created correctly, but owner is still
special cased.

Bug: 22358539
Change-Id: I2bbd3023cdbcbb5315ebc32ba54dc3ddb9a280d6
2015-11-30 16:56:01 -07:00
Todd Kennedy 0a2733582d Create new ephemeral app directory
Bug: 25119046
Change-Id: Ie005430700a73ef1ba492dae4101419a41da4071
2015-11-23 15:24:13 -08:00
Jeff Sharkey af1e35e07b Create user_de directory for user 0.
This mirrors what we do for "/data/data" for user 0.  Eventually we
should move to vold/installd doing the user 0 initialization.

Bug: 22358539
Change-Id: I48cd27b990e6bd6e37870c41aef0e7dc3106caa4
2015-11-19 11:14:40 -07:00
Daniel Rosenberg 5c331c5be8 Remove creation of root directory folders
am: c97e1cb39d

* commit 'c97e1cb39d9ba129d8326605d121a10c9ae491e7':
  Remove creation of root directory folders
2015-11-18 21:39:01 +00:00
Junichi Uekawa 13c8e8d8ac Merge "Fix non-vendor.img configuration." am: 1337349ea1 am: ef7197eefa
am: 1aa74e687e

* commit '1aa74e687ecdd2bef8fb786d8027512b6953b6ad':
  Fix non-vendor.img configuration.
2015-11-18 17:52:39 +00:00
Todd Kjos 88b5892d74 resolve merge conflicts of ed60788968 to mnc-dr2-dev-plus-aosp.
Change-Id: I9b07dd8dcb8fc74b658466b8dd47546cefffab1d
2015-11-18 08:31:03 -08:00
Calin Juravle 6426874cdd Merge "Don\'t create profiles directory under dalvik-cache." am: 942f8ea84f am: 2a095e186b
am: cdef6fb917

* commit 'cdef6fb91725f771ab23d0eea03a97aa3c161d75':
  Don't create profiles directory under dalvik-cache.
2015-11-18 00:20:51 +00:00
Junichi Uekawa ef7197eefa Merge "Fix non-vendor.img configuration."
am: 1337349ea1

* commit '1337349ea11a6bb5c44ba5c5bb064c750bd626c5':
  Fix non-vendor.img configuration.
2015-11-17 03:36:23 +00:00
Junichi Uekawa 07b69961f2 Fix non-vendor.img configuration.
If / is not write-able and system.img contains system/vendor, symlink
for `/vendor/ -> /system/vendor/` that is otherwise done in init.rc
should be done at build time.

BUG=b:25512724

Change-Id: Iaa63d6440373a4fd754a933c9f1960b3787a6d98
2015-11-17 11:20:21 +09:00
Daniel Rosenberg d792c98606 Remove creation of root directory folders
am: c97e1cb39d

* commit 'c97e1cb39d9ba129d8326605d121a10c9ae491e7':
  Remove creation of root directory folders
2015-11-17 00:52:55 +00:00
Todd Kjos ba8a47531c Actively mangage EAS schedtune nodes
Move foreground tasks to /sys/fs/cgroup/stune/boost/tasks (boosted
weight in EAS scheduler). Move background tasks to
/sys/fs/cgroup/stune/tasks (default weight). For services started
with init, set "foreground" services to boosted.

Change-Id: I0e489fad9510727c13e6754dabaf311c2391f395
2015-11-16 14:57:47 -08:00
Daniel Rosenberg c97e1cb39d Remove creation of root directory folders
Folders in the root directory are now created during the build,
as we may be building without a ramdisk, and when we do that,
the root directory will be read-only.  With those changes,
these mkdirs will never need to run.

Change-Id: I49c63e8bfc71d28e3f938ed41f81d108359fa57a
2015-11-16 08:53:04 -08:00
Todd Kjos ed60788968 Actively mangage EAS schedtune nodes
Move foreground tasks to /sys/fs/cgroup/stune/boost/tasks (boosted
weight in EAS scheduler). Move background tasks to
/sys/fs/cgroup/stune/tasks (default weight). For services started
with init, set "foreground" services to boosted.

Change-Id: I0e489fad9510727c13e6754dabaf311c2391f395
2015-11-16 08:53:04 -08:00
Daniel Rosenberg 4c9c516d20 rootdir: Create cache folder in Android.mk
system.img may contain the root directory as well. In that case, we
need to create some folders init.rc would during the build.

Change-Id: I312104ff926fb08d98ac8256b76d01b0a90ea5e5
2015-11-16 08:53:04 -08:00
Daniel Rosenberg 9262546184 rootdir: Create folders in Android.mk
system.img may contain the root directory as well. In that case, we
need to create some folders init.rc would during the build.

Change-Id: I157ccbebf36bee9916f3f584551704ec481ae1d1
2015-11-16 08:53:04 -08:00
Calin Juravle 2a095e186b Merge "Don\'t create profiles directory under dalvik-cache."
am: 942f8ea84f

* commit '942f8ea84f3f96c2e2556fe90ebba0ec76730553':
  Don't create profiles directory under dalvik-cache.
2015-11-16 11:21:48 +00:00
Calin Juravle 942f8ea84f Merge "Don't create profiles directory under dalvik-cache." 2015-11-16 11:08:46 +00:00
Jeff Sharkey 439419b713 Merge "Create some new encryption paths." 2015-11-12 00:20:28 +00:00
Calin Juravle 8e9791357e Merge "Create a folder to store method traces activated with -Xmethod-trace" am: 7605a56fbc am: 5d1a9688b8
am: a8dcfc0622

* commit 'a8dcfc062260bdce7ca471baa5f081e512d5da7f':
  Create a folder to store method traces activated with -Xmethod-trace
2015-11-11 18:39:23 +00:00
Calin Juravle 5d1a9688b8 Merge "Create a folder to store method traces activated with -Xmethod-trace"
am: 7605a56fbc

* commit '7605a56fbcf5706b6e2892da9d9dc0fd20efb395':
  Create a folder to store method traces activated with -Xmethod-trace
2015-11-11 18:12:03 +00:00
Jeff Sharkey 11705863ff Create some new encryption paths.
Bug: 22358539
Change-Id: I2e7533cd3dbd18e9ae115f611c5714b0c7ba4917
2015-11-11 09:49:46 -08:00
Calin Juravle 9b3e5d59fe Create a folder to store method traces activated with -Xmethod-trace
Bug: 25612377
Change-Id: I370b858594ccc88c12099b23a0d1aac22acd4969
2015-11-10 21:26:40 +00:00
Nick Kralevich bdf20142b9 Merge "Enable hidepid=2 on /proc" am: 2d8f1d4c47 am: ea8452cc72
am: 7dafe5b818

* commit '7dafe5b818f7771cb00c4a0ea3ab1dbf74593185':
  Enable hidepid=2 on /proc
2015-11-09 20:41:19 +00:00
Nick Kralevich ea8452cc72 Merge "Enable hidepid=2 on /proc"
am: 2d8f1d4c47

* commit '2d8f1d4c478b9d921730d3fc9b290315e2ff9f04':
  Enable hidepid=2 on /proc
2015-11-09 20:29:44 +00:00
Nick Kralevich c39ba5ae32 Enable hidepid=2 on /proc
Add the following mount options to the /proc filesystem:

  hidepid=2,gid=3009

This change blocks /proc access unless you're in group 3009
(aka AID_READPROC).

Please see
  https://github.com/torvalds/linux/blob/master/Documentation/filesystems/proc.txt
for documentation on the hidepid option.

hidepid=2 is preferred over hidepid=1 since it leaks less information
and doesn't generate SELinux ptrace denials when trying to access
/proc without being in the proper group.

Add AID_READPROC to processes which need to access /proc entries for
other UIDs.

Bug: 23310674
Change-Id: I22bb55ff7b80ff722945e224845215196f09dafa
2015-11-09 09:08:46 -08:00
Calin Juravle 933bc0a3d1 Don't create profiles directory under dalvik-cache.
Bug: 24698874
Bug: 17173268
Change-Id: Ic81258a8df90818fa6b4ee64fd1507ac18fe3f04
2015-11-04 14:59:41 +00:00
Bill Yi 1ec36aaeb0 Merge commit 'f85d6cd8045ce933dfdc19bc888228cd9382e48c' into HEAD 2015-11-03 14:30:40 -08:00
Daniel Rosenberg eba626f56d Merge "rootdir: Allow board specific folders and symlinks in root directory" am: 6e699df21e am: 64ea814c31
am: 1c1a7906c5

* commit '1c1a7906c5f1131fb1295c54e0669ea76111ff90':
  rootdir: Allow board specific folders and symlinks in root directory
2015-11-03 00:14:20 +00:00
Daniel Rosenberg 1c1a7906c5 Merge "rootdir: Allow board specific folders and symlinks in root directory" am: 6e699df21e
am: 64ea814c31

* commit '64ea814c312ec43c59e9f132909be121cdf02ab3':
  rootdir: Allow board specific folders and symlinks in root directory
2015-11-02 22:01:38 +00:00
Daniel Rosenberg 64ea814c31 Merge "rootdir: Allow board specific folders and symlinks in root directory"
am: 6e699df21e

* commit '6e699df21e1b08aa2e9eb18ef1c44788549ae8ed':
  rootdir: Allow board specific folders and symlinks in root directory
2015-11-02 21:58:22 +00:00
Daniel Rosenberg 52b5915945 rootdir: Allow board specific folders and symlinks in root directory
Building without ramdisk requires a way to specify board specific
directoryies and symlinks in the root directory at build time.

Change-Id: I11301e98228bc4761f3aee177a546146651b9f25
(cherry picked from commit d7549c9a65cad886f672af41f5fca6f0bd0c12fa)
2015-11-02 12:47:46 -08:00
Andy Hung fec47527b4 Add audioserver uid and restart service when needed
Bug: 24511453
Change-Id: I6987a82149d23ad671478cf21488c62cb1ecfc93
2015-10-30 16:58:59 -07:00
Evgenii Stepanov f2630adeef Merge "Disable container overflow detect on target." am: 151e49726b am: 5562351b50
am: ec6ff936b0

* commit 'ec6ff936b0e994b3f6d2b812e4b67aa950fe35f2':
  Disable container overflow detect on target.
2015-10-23 22:23:56 +00:00
Evgenii Stepanov ec6ff936b0 Merge "Disable container overflow detect on target." am: 151e49726b
am: 5562351b50

* commit '5562351b50fbbcda030ddfffcb3b2dbef82bcdc9':
  Disable container overflow detect on target.
2015-10-23 22:14:52 +00:00
Evgenii Stepanov 5562351b50 Merge "Disable container overflow detect on target."
am: 151e49726b

* commit '151e49726bf743bfbd7e44695f9d673735e62119':
  Disable container overflow detect on target.
2015-10-23 22:10:27 +00:00
Evgenii Stepanov 151e49726b Merge "Disable container overflow detect on target." 2015-10-23 22:03:52 +00:00
Evgenii Stepanov f3009f21d5 Disable container overflow detect on target.
Container overflow annotations may cause false positives in partially
instrumented binaries.

Bug: 25228125, 25212198
Change-Id: Ic587d41698c02e306dece4ad7c6a2a8810c52dbd
2015-10-23 14:57:47 -07:00
Tim Murray e41937d9b3 Reorder init.rc to avoid a kernel warning. am: f429d37807 am: e56b566401
am: 538697b315

* commit '538697b3153a9a71bdfd197d0461a74d29fd2fae':
  Reorder init.rc to avoid a kernel warning.
2015-10-21 14:50:03 +00:00
Paul Lawrence 2b216aa89b Merge "Don't show UI on default encryption" into mnc-dr-dev 2015-10-21 14:27:38 +00:00
Tim Murray 538697b315 Reorder init.rc to avoid a kernel warning. am: f429d37807
am: e56b566401

* commit 'e56b566401aad8e7175306b2969f78baa0b8f9c6':
  Reorder init.rc to avoid a kernel warning.
2015-10-20 22:14:47 +00:00
Tim Murray f429d37807 Reorder init.rc to avoid a kernel warning.
3.18 has a warning in dmesg that appears when the parent cpuset's cpus
and mems are changed to something other than what the child has. Reorder
init.rc to prevent this warning from appearing.

bug 24941443

Change-Id: I49d8394063b23dce03222dcc9ddccdc32bb97ea2
2015-10-15 12:38:15 -07:00
Nick Kralevich 09cf06fc74 am 2f63adce: am 28107143: am 9e27cab6: Merge "init.rc: Disable sysrq from the keyboard"
* commit '2f63adcea8e4e4a64d85b59044224f198016e093':
  init.rc: Disable sysrq from the keyboard
2015-10-10 05:47:41 +00:00
Nick Kralevich 281071435a am 9e27cab6: Merge "init.rc: Disable sysrq from the keyboard"
* commit '9e27cab695b0e2a4910cf576d306a3379991f1f7':
  init.rc: Disable sysrq from the keyboard
2015-10-10 00:38:18 +00:00
Nick Kralevich d28a535d9a init.rc: Disable sysrq from the keyboard
Don't allow the accidental triggering of sysrq functionality
from the keyboard. The only expected use of sysrq functionality
is via /proc/sysrq-trigger

Please see https://www.kernel.org/doc/Documentation/sysrq.txt for
additional information on /proc/sys/kernel/sysrq

Bug: 13435961
Change-Id: I60dc92a4b2b4706e8fa34a6cead9abd449f7375f
2015-10-09 17:09:10 -07:00
David Zeuthen 8e15f8d096 am 8c06f8cc: am 10bb4e51: Merge "init.rc: mkdir /data/misc/update_engine 0700 root root"
* commit '8c06f8ccd41c5d1206d721b4f19dd6b5ede9ad9e':
  init.rc: mkdir /data/misc/update_engine 0700 root root
2015-10-07 20:34:18 +00:00
David Zeuthen 8c06f8ccd4 am 10bb4e51: Merge "init.rc: mkdir /data/misc/update_engine 0700 root root"
* commit '10bb4e5161ecca1a9660d1e5967b3fb5e7662839':
  init.rc: mkdir /data/misc/update_engine 0700 root root
2015-10-07 20:29:00 +00:00
David Zeuthen 10bb4e5161 Merge "init.rc: mkdir /data/misc/update_engine 0700 root root" 2015-10-07 20:18:36 +00:00
David Zeuthen 159147853e init.rc: mkdir /data/misc/update_engine 0700 root root
Ensure that /data/misc/update_engine exists since it will be referenced
by selinux policy.

Bug: 23186405
Change-Id: I96e4ff341086da6474ef7f7c934f1f35bffc1439
2015-10-07 14:00:55 -04:00
Mark Salyzyn d80ddaabe1 am 936d65f5: am cb2ab20d: am 87122ce1: Merge "logd: increase dgram_max_qlen to 600"
* commit '936d65f59bbab071898390c8bd6982055be5ab4b':
  logd: increase dgram_max_qlen to 600
2015-09-28 15:58:30 +00:00
Mark Salyzyn 936d65f59b am cb2ab20d: am 87122ce1: Merge "logd: increase dgram_max_qlen to 600"
* commit 'cb2ab20d480cdf488e5b5bf37dc55ca7f0ddee67':
  logd: increase dgram_max_qlen to 600
2015-09-28 15:54:05 +00:00
Mark Salyzyn cb2ab20d48 am 87122ce1: Merge "logd: increase dgram_max_qlen to 600"
* commit '87122ce1d60dd6fbc18e747d976db734d502f2bf':
  logd: increase dgram_max_qlen to 600
2015-09-28 15:50:02 +00:00
Mark Salyzyn 39944c89a9 logd: increase dgram_max_qlen to 600
Seeing liblog messages on system_server runtime restart
(too much system_server spam, 566 messages in 72ms)

Bug: 23788621
Change-Id: I5171f2c19a3538da190fc6c2b40e978d89bf0e20
2015-09-25 14:15:53 +00:00
Tom Cherry 3c6ffbc6fe am 984bd832: resolved conflicts for 5caca3dd to mnc-dr-dev-plus-aosp
* commit '984bd8323dcb5e494a04b2058ab7de40bf347ee5':
  add system-background cpuset
2015-09-21 21:41:46 +00:00
Tom Cherry 984bd8323d resolved conflicts for 5caca3dd to mnc-dr-dev-plus-aosp
Change-Id: I773e514a8232b77cdd566dc36c9efc4e15f206f0
2015-09-21 14:25:34 -07:00
Evgenii Stepanov f09111a9dd am fbaaddc5: am 19584247: am ee08fb53: Merge "asan: update condition to work with multiple SANITIZE_TARGET values."
* commit 'fbaaddc588f9d716cff71225a5c510f3b33b90cf':
  asan: update condition to work with multiple SANITIZE_TARGET values.
2015-09-20 01:25:13 +00:00
Evgenii Stepanov fbaaddc588 am 19584247: am ee08fb53: Merge "asan: update condition to work with multiple SANITIZE_TARGET values."
* commit '195842474a6722fdf2d967446b81d8accbd4648c':
  asan: update condition to work with multiple SANITIZE_TARGET values.
2015-09-18 20:41:46 +00:00
Evgenii Stepanov 195842474a am ee08fb53: Merge "asan: update condition to work with multiple SANITIZE_TARGET values."
* commit 'ee08fb53bb59cb5037755d68de09e6e5bc3f8bc6':
  asan: update condition to work with multiple SANITIZE_TARGET values.
2015-09-18 20:31:52 +00:00
Tim Murray cba6ad7449 add system-background cpuset
add a new cpuset for system services that should not run on
larger cores

bug 24144797

Change-Id: I21a54f0d6b46b3b8bd8c4564b8685c88cfc4a57d
2015-09-18 13:18:49 -07:00
Ivan Krasin 5039d8cd21 asan: update condition to work with multiple SANITIZE_TARGET values.
The goal is to enable SANITIZE_TARGET='address coverage', which
will be used by LLVMFuzzer.

Bug: 22850550
Change-Id: Iea756eaaedaa56aee4daf714510269efe3aaa553
2015-09-18 11:59:46 -07:00
Badhri Jagan Sridharan 1450d6a37a am 4c96af5e: am c939c61c: am a6c377b2: init: usb: Add configfs commands for USB gadget
* commit '4c96af5e5a67c123fb5d8b40fda87cc2398aec00':
  init: usb: Add configfs commands for USB gadget
2015-09-10 00:59:37 +00:00
Badhri Jagan Sridharan 4c96af5e5a am c939c61c: am a6c377b2: init: usb: Add configfs commands for USB gadget
* commit 'c939c61c71559271cbbd2c046e35e8a97b501b07':
  init: usb: Add configfs commands for USB gadget
2015-09-10 00:50:43 +00:00
Paul Lawrence 751dfddc19 Don't show UI on default encryption
Bug: 22989588
Change-Id: I8e7023767f1da80c872adc45871be1f8851926ad
2015-09-09 12:10:58 -07:00
Badhri Jagan Sridharan a6c377b2f6 init: usb: Add configfs commands for USB gadget
Adds init support for:
accessory
audio_source
midi
adb
rndis

Bug=23633457

Change-Id: I12e68e25969adafcf3170769f91ae939d08b7dbc
2015-09-08 20:13:37 -07:00
Vincent Palatin d22aaaac09 am 2a048110: am 100de590: am 5e294902: Merge "init.usb.rc: fix USB typec property names" into mnc-dr-dev
* commit '2a0481109baaa8385bd9e43a95eac24cd6f89e43':
  init.usb.rc: fix USB typec property names
2015-09-06 23:07:26 +00:00
Vincent Palatin 2a0481109b am 100de590: am 5e294902: Merge "init.usb.rc: fix USB typec property names" into mnc-dr-dev
* commit '100de590e7f82e1039eebc10e60ea554deeb1c3f':
  init.usb.rc: fix USB typec property names
2015-09-04 20:06:28 +00:00
Tom Cherry 4c5d655e3d am 4bc10de9: am cd1a65b6: am 30c13c49: Merge "move uncrypt from init.rc to uncrypt.rc"
* commit '4bc10de99f3f84b89b40c46203cbc051224f931d':
  move uncrypt from init.rc to uncrypt.rc
2015-09-04 18:13:00 +00:00
Tom Cherry fd53a3bf82 am c74403b4: am b00a8a06: am e8b0fcec: Merge "combine adbd.rc with init.usb.rc"
* commit 'c74403b4c9c8acae326b39f06905a3a291a5471f':
  combine adbd.rc with init.usb.rc
2015-09-04 18:12:58 +00:00
Tom Cherry 4bc10de99f am cd1a65b6: am 30c13c49: Merge "move uncrypt from init.rc to uncrypt.rc"
* commit 'cd1a65b69ad2da81e654adab8edeead457a1b1f5':
  move uncrypt from init.rc to uncrypt.rc
2015-09-04 18:02:34 +00:00
Tom Cherry c74403b4c9 am b00a8a06: am e8b0fcec: Merge "combine adbd.rc with init.usb.rc"
* commit 'b00a8a066f5b6ae5b8d0c03ee7f680389b38a260':
  combine adbd.rc with init.usb.rc
2015-09-04 18:02:32 +00:00
Tom Cherry cd1a65b69a am 30c13c49: Merge "move uncrypt from init.rc to uncrypt.rc"
* commit '30c13c4954a959c2e6c5ba126f26d88b2e56be61':
  move uncrypt from init.rc to uncrypt.rc
2015-09-04 17:56:27 +00:00
Tom Cherry b00a8a066f am e8b0fcec: Merge "combine adbd.rc with init.usb.rc"
* commit 'e8b0fcecf4a17cf37b5fefbcceef0920788f776e':
  combine adbd.rc with init.usb.rc
2015-09-04 17:56:25 +00:00
Tom Cherry 30c13c4954 Merge "move uncrypt from init.rc to uncrypt.rc" 2015-09-04 16:51:30 +00:00
Tom Cherry 008eb9b80a move uncrypt from init.rc to uncrypt.rc
Move uncrypt from /init.rc to /system/etc/init/uncrypt.rc using the
LOCAL_INIT_RC mechanism

Bug 23186545

Change-Id: Ibd838dd1d250c0e6536e44b69f11fb5ed42ba10b
2015-09-03 16:33:08 -07:00
Tom Cherry 2270dbbc84 combine adbd.rc with init.usb.rc
init.usb.rc and adbd.rc contain similar contents and belong in the same
file.

This file also belongs on the ramdisk as adbd is on the ramdisk, not the
system partition, therefore resolving to keep init.usb.rc in its current
location and combining the contents of adbd.rc is the best approach

Change-Id: I430f8fea58694679e7b8b7be69ce87daadd616f4
2015-09-03 16:19:04 -07:00
Tom Cherry b111a07962 am fdc6fbd0: am b2acb6b2: am b4998341: Merge "move init.trace.rc to frameworks/native"
* commit 'fdc6fbd0c7f98fa44b86e834a88441cce3bdedaa':
  move init.trace.rc to frameworks/native
2015-09-03 22:36:10 +00:00
Tom Cherry fdc6fbd0c7 am b2acb6b2: am b4998341: Merge "move init.trace.rc to frameworks/native"
* commit 'b2acb6b2ce07bf9e1c944eadcdc2dafe3e41efaf':
  move init.trace.rc to frameworks/native
2015-09-03 22:28:35 +00:00
Tom Cherry b2acb6b2ce am b4998341: Merge "move init.trace.rc to frameworks/native"
* commit 'b499834121854fd98664d8d96734c733f96dbc1f':
  move init.trace.rc to frameworks/native
2015-09-03 22:02:40 +00:00
Tom Cherry b0d5184774 move init.trace.rc to frameworks/native
init.trace.rc will be renamed to atrace.rc and use the LOCAL_INIT_RC
mechanism to be included on /system appropriately.

Bug 23186545

Change-Id: I55c37d3ff98c9ac10e6c1a713fadc7eb37346195
2015-09-03 14:19:11 -07:00
Vincent Palatin 3b7995b72e init.usb.rc: fix USB typec property names
Fix typos in the usb typec properties (sys.usb.typec.*),
so the data_role and the power_role can be written properly in the sysfs.

Bug: 23790832
Change-Id: I90f591ab37825a07e0610ef1fec0e831eb19515d
2015-09-03 13:53:04 -07:00
Tim Murray 6d6acf4afe am c9b308d1: am bb641d5f: am bc8c731a: Add zygote to the foreground cpuset.
* commit 'c9b308d155c181ae78489454f64877759de98170':
  Add zygote to the foreground cpuset.
2015-09-03 17:36:28 +00:00
Tim Murray c9b308d155 am bb641d5f: am bc8c731a: Add zygote to the foreground cpuset.
* commit 'bb641d5f7714bdb8cd3ecc4f47cdd7c68e75d17a':
  Add zygote to the foreground cpuset.
2015-09-03 06:22:42 +00:00
Badhri Jagan Sridharan d8cf000d6c am b081b8cd: am ddc296e8: am e1801863: init: usb: Add init scripts for configfs commands
* commit 'b081b8cdd17ef678fd84dccb9b5645bd72f26c5b':
  init: usb: Add init scripts for configfs commands
2015-09-03 05:03:20 +00:00
Badhri Jagan Sridharan 5917b8a3bc am 1c791dfd: am 723b410f: am 48d59acc: init.usb.rc: Add new system property for configfs
* commit '1c791dfd3d8e5df380068dda0982ddb9149dcbd9':
  init.usb.rc: Add new system property for configfs
2015-09-03 05:03:19 +00:00
Tim Murray a89568c29e am adef754b: am 25a1b489: am 4a1f02ea: Merge "Add foreground/boost cpuset." into mnc-dr-dev
* commit 'adef754b4548b391c6c2cac3065c91ccaa783a1b':
  Add foreground/boost cpuset.
2015-09-03 05:03:17 +00:00
Badhri Jagan Sridharan b081b8cdd1 am ddc296e8: am e1801863: init: usb: Add init scripts for configfs commands
* commit 'ddc296e841fa98bc89c0459d1dd3e438c790f15d':
  init: usb: Add init scripts for configfs commands
2015-09-03 04:23:16 +00:00
Badhri Jagan Sridharan 1c791dfd3d am 723b410f: am 48d59acc: init.usb.rc: Add new system property for configfs
* commit '723b410ff50920cea270b282c19edcfaf6f444e2':
  init.usb.rc: Add new system property for configfs
2015-09-03 04:23:15 +00:00
Tim Murray adef754b45 am 25a1b489: am 4a1f02ea: Merge "Add foreground/boost cpuset." into mnc-dr-dev
* commit '25a1b4894d9fc249535f0e0b3851643eb172202f':
  Add foreground/boost cpuset.
2015-09-03 04:22:24 +00:00
Tim Murray bc8c731aab Add zygote to the foreground cpuset.
This ensures that newly forked zygote processes will end up
in the corret cpuset.

bug 23751126

Change-Id: I987a2828cf2504963f1317d17f0b51d26cf22a70
2015-09-02 11:39:05 -07:00
Badhri Jagan Sridharan e18018639b init: usb: Add init scripts for configfs commands
This CL adds a new init script init.usb.configfs.rc
to add generic configfs commands. Setting
sys.usb.configfs in init.usb.{hardware}.rc
enables executing commands in this script

Bug=23633457

Change-Id: Iaae844a7957d6c9bf510648aaff86d56aa0c6243
2015-09-01 15:39:22 -07:00
Badhri Jagan Sridharan 48d59acc57 init.usb.rc: Add new system property for configfs
This CL helps to execute a different set of
commands for the usb configs specified in
init.usb.rc. Aimed at using configfs based
commands over android composition driver.

Bug=23633457

Change-Id: Ifa5f804e1cff93d15ad57d0ed553300bc5868936
2015-09-01 15:39:22 -07:00
Tim Murray 3985dda1c3 Add foreground/boost cpuset.
This is used for app launches (and maybe other high priority tasks
in the future). It's to be set to whatever cores should be used
for short term high-priority tasks.

bug 21915482

Change-Id: Id0ab0499146c09e860b97f4cb8095834cb12dd50
2015-08-25 00:31:54 -07:00
Tom Cherry 9f72700289 am 5ff07b26: am 9b2bc347: am 77d634f7: Merge "remove TARGET_PROVIDES_INIT_RC"
* commit '5ff07b26851f5f416844e767645876f9f6e11e23':
  remove TARGET_PROVIDES_INIT_RC
2015-08-25 00:46:43 +00:00
Tom Cherry 5ff07b2685 am 9b2bc347: am 77d634f7: Merge "remove TARGET_PROVIDES_INIT_RC"
* commit '9b2bc347659de454796acfc9402cbbc170efd133':
  remove TARGET_PROVIDES_INIT_RC
2015-08-24 23:35:28 +00:00
Tom Cherry fbe3fa84ff am 9b2bc347: am 77d634f7: Merge "remove TARGET_PROVIDES_INIT_RC"
* commit '9b2bc347659de454796acfc9402cbbc170efd133':
  remove TARGET_PROVIDES_INIT_RC
2015-08-24 23:35:20 +00:00
Tom Cherry 0ea4ffdc06 remove TARGET_PROVIDES_INIT_RC
Change-Id: I15105a8dc11e218d95d4f5a4cee5b2a166d3d639
2015-08-24 13:56:43 -07:00
Tom Cherry ef6556b8f9 resolved conflicts for merge of 22bc242a to master
Change-Id: I80546955611db9d003466c78588e8a7316ca9a6d
2015-08-21 15:22:57 -07:00
Tom Cherry 57a082f4de resolved conflicts for merge of b21de5f6 to mnc-dev-plus-aosp
Change-Id: Ia0c7f2e33e22b2419811f7e68da276e02e156d08
2015-08-21 15:12:28 -07:00
Tom Cherry 22bc242a5b resolved conflicts for merge of b21de5f6 to mnc-dr-dev-plus-aosp
Change-Id: I13fd71d5af0b0a66d0c3e2f026581c60e9b95e8b
2015-08-21 15:09:30 -07:00
Tom Cherry 837135a64f remove bundled services from rootdir/init.rc
Services definitions for core services are now bundled with the source
for the service itself in the form of <service name>.rc.  These
individual .rc files are now located in /system/init/... and are
parsed when the system partition is mounted.

Bug: 23186545
Change-Id: Ia1b73af8d005633aa4252d603892064d7804163d
2015-08-21 10:14:44 -07:00
Tim Kilbourn f1ed73fdf7 am bb41f7d6: am 94653364: Merge "Use init to write usb typec props" into mnc-dr-dev
* commit 'bb41f7d6ed03073ae9df41e3cc0edb80d89574b9':
  Use init to write usb typec props
2015-08-19 02:20:38 +00:00
Tim Kilbourn bb41f7d6ed am 94653364: Merge "Use init to write usb typec props" into mnc-dr-dev
* commit '946533648c49f2700b6e0f73383699597649ee60':
  Use init to write usb typec props
2015-08-19 01:41:40 +00:00
Tim Kilbourn 8c12fdf4ab Use init to write usb typec props
The sysfs nodes are owned by root, so use init to write role changes.

Bug: 21615151
Change-Id: I39ad03a23af0be9ac859d4fb79a46edc27e30f4e
2015-08-17 14:56:57 -07:00
Evgenii Stepanov 3aa4f5314e am 548f53d0: am 1ec3ba44: am 428f626d: Merge "Read global ASAN_OPTIONS from a file."
* commit '548f53d0666dc4fc850989c8af260888584e40d9':
  Read global ASAN_OPTIONS from a file.
2015-08-17 16:24:26 +00:00
Evgenii Stepanov 6c74e54544 am 1ec3ba44: am 428f626d: Merge "Read global ASAN_OPTIONS from a file."
* commit '1ec3ba4471d5883742b2500ba53ed2272539e756':
  Read global ASAN_OPTIONS from a file.
2015-08-17 01:15:19 +00:00
Evgenii Stepanov 548f53d066 am 1ec3ba44: am 428f626d: Merge "Read global ASAN_OPTIONS from a file."
* commit '1ec3ba4471d5883742b2500ba53ed2272539e756':
  Read global ASAN_OPTIONS from a file.
2015-08-17 01:15:06 +00:00
Evgenii Stepanov 428f626d1b Merge "Read global ASAN_OPTIONS from a file." 2015-08-16 18:42:38 +00:00
Riley Andrews 2decff086c am 94ee212a: am bc2cdfa8: am b81c410a: Merge "Added file permissions for binder tracing"
* commit '94ee212af135a1e602c9dac73f22dc6807409370':
  Added file permissions for binder tracing
2015-08-12 23:56:32 +00:00
Riley Andrews 19fe5c9442 am f63f3685: am 4a4dc5f3: am a3a193ff: Merge "Added shell permisisons for memreclaim tracing"
* commit 'f63f36859eecb3b5a2a43b6ae75fdbbb0f2bc039':
  Added shell permisisons for memreclaim tracing
2015-08-12 23:56:08 +00:00
Riley Andrews 94ee212af1 am bc2cdfa8: am b81c410a: Merge "Added file permissions for binder tracing"
* commit 'bc2cdfa8a00980f4c38ebcd67bac888b355e3787':
  Added file permissions for binder tracing
2015-08-12 23:43:38 +00:00
Riley Andrews 87ea6cfb62 am bc2cdfa8: am b81c410a: Merge "Added file permissions for binder tracing"
* commit 'bc2cdfa8a00980f4c38ebcd67bac888b355e3787':
  Added file permissions for binder tracing
2015-08-12 23:43:02 +00:00
Riley Andrews f63f36859e am 4a4dc5f3: am a3a193ff: Merge "Added shell permisisons for memreclaim tracing"
* commit '4a4dc5f313953764079a4020a3791e36ec43ba0c':
  Added shell permisisons for memreclaim tracing
2015-08-12 23:28:40 +00:00
Riley Andrews c1490ad9a0 am 4a4dc5f3: am a3a193ff: Merge "Added shell permisisons for memreclaim tracing"
* commit '4a4dc5f313953764079a4020a3791e36ec43ba0c':
  Added shell permisisons for memreclaim tracing
2015-08-12 23:26:34 +00:00
Scott Bauer cd1d99e268 Added file permissions for binder tracing 2015-08-12 16:20:51 -07:00
Riley Andrews a3a193ffd9 Merge "Added shell permisisons for memreclaim tracing" 2015-08-12 23:13:38 +00:00
Evgenii Stepanov 0d2dde57fe Read global ASAN_OPTIONS from a file.
Instead of setting global ASAN_OPTIONS in immutable init.environ.rc,
load them from a file that can be changed later. The file has to be
on the /system partition to both be editable and available at the
early stages of boot.

Also add allocator_may_return_null=1 as that is closer to the
non-ASan allocator behavior.

Bug: 22846541
Change-Id: Ib0f41393c528f2e7cb398470e41f50abf5f4f455
2015-08-10 11:30:54 -07:00
Jeff Sharkey 063d4b07ab am 94629bde: resolved conflicts for merge of 779a38a5 to mnc-dr-dev-plus-aosp
* commit '94629bdec34b253fa2e9cd9ec800715b3c3a4f7f':
  Protect runtime storage mount points.
2015-08-06 21:31:13 +00:00
Jeff Sharkey 94629bdec3 resolved conflicts for merge of 779a38a5 to mnc-dr-dev-plus-aosp
Change-Id: Ieaa0dcd8e93fba3060e9a85f17b1f5eabc6b8c9e
2015-08-06 14:22:46 -07:00
Jeff Sharkey fdf1487493 resolved conflicts for merge of b9f438ff to mnc-dev-plus-aosp
Change-Id: I7103bacb1b2d7dc29b4f8d9dddb2fec1feb869d3
2015-08-06 12:52:25 -07:00
Jeff Sharkey 779a38a5cd am b9f438ff: Protect runtime storage mount points.
* commit 'b9f438ff841f87c8ffbca85b13a533718a18e15f':
  Protect runtime storage mount points.
2015-08-06 19:35:56 +00:00
Jeff Sharkey b9f438ff84 Protect runtime storage mount points.
We have a bunch of magic that mounts the correct view of storage
access based on the runtime permissions of an app, but we forgot to
protect the real underlying data sources; oops.

This series of changes just bumps the directory heirarchy one level
to give us /mnt/runtime which we can mask off as 0700 to prevent
people from jumping to the exposed internals.

Also add CTS tests to verify that we're protecting access to
internal mount points like this.

Bug: 22964288
Change-Id: I32068e63a3362b37e8ebca1418f900bb8537b498
2015-08-06 11:45:31 -07:00
Daniel Rosenberg 5fa4fbc53e am 0dbbb935: am e20a4194: am 516d30d5: Merge "rootdir: Create symlinks in Android.mk"
* commit '0dbbb935f9e358d31e8f37b9928520ee926886b4':
  rootdir: Create symlinks in Android.mk
2015-08-04 01:19:27 +00:00
Daniel Rosenberg 764b7f561b am e20a4194: am 516d30d5: Merge "rootdir: Create symlinks in Android.mk"
* commit 'e20a4194b8faacc542aee519a62a01954376be60':
  rootdir: Create symlinks in Android.mk
2015-08-04 01:13:15 +00:00
Daniel Rosenberg 0dbbb935f9 am e20a4194: am 516d30d5: Merge "rootdir: Create symlinks in Android.mk"
* commit 'e20a4194b8faacc542aee519a62a01954376be60':
  rootdir: Create symlinks in Android.mk
2015-08-04 01:12:57 +00:00
Daniel Rosenberg 595003a3d0 rootdir: Create symlinks in Android.mk
system.img may contain the root directory as well. In that case, we
need to create some symlinks init.rc would during the build.

Change-Id: I4e7726f38c0f9cd9846c761fad1446738edb52c0
2015-08-04 00:51:19 +00:00
Yasuhiro Matsuda 91e1b0135d resolved conflicts for merge of 70ab38a5 to master
Change-Id: I7092ecb87f4020add5fe8843f188955a5579c284
2015-07-30 19:07:23 +09:00
Yasuhiro Matsuda 70ab38a570 am 102ead3a: am b10e562b: Merge "Introduce a mechanism to trace boot sequence."
* commit '102ead3ae187a007b8a90b61ea243197927b6ae2':
  Introduce a mechanism to trace boot sequence.
2015-07-30 08:05:46 +00:00
Yasuhiro Matsuda 6b802c4b95 am 102ead3a: am b10e562b: Merge "Introduce a mechanism to trace boot sequence."
* commit '102ead3ae187a007b8a90b61ea243197927b6ae2':
  Introduce a mechanism to trace boot sequence.
2015-07-30 08:05:13 +00:00
Yasuhiro Matsuda f93db4b827 Introduce a mechanism to trace boot sequence.
This CL adds a trigger and a service so that Systrace can be used
for tracing events during boot.
persist.debug.atrace.boottrace property is used for switching on
and off tracing during boot. /data/misc/boottrace/categories
file is used for specifying the categories to be traced.
These property and file are rewritten by Systrace when the newly
added option --boot is specified.

Here is an example of tracing events of am and wm catetories
during boot.

$ external/chromium-trace/systrace am wm --boot

This command will cause the device to reboot. Once the device has
booted up, the trace report is created by hitting Ctrl+C.

As written in readme.txt, this mechanism relies on persistent
property, so tracing events that are emitted before that are not
recorded. This is enough for tracing events after zygote is
launched though.
This only works on userdebug or eng build for security reason.

BUG: 21739901
Change-Id: I03f2963d77a678f47eab5e3e29fc7e91bc9ca3a4
2015-07-29 12:53:05 +09:00
Jeffrey Vander Stoep 3fe84e009e am f05256b3: am 4b70dd4c: am 26f0f657: Merge "init.rc: add healthd to system group to allow write to /dev/cpuset" into mnc-dev
* commit 'f05256b32b815fc5d8be65e2fbc2e4a9f4da5ccd':
  init.rc: add healthd to system group to allow write to /dev/cpuset
2015-07-28 21:38:13 +00:00
Jeffrey Vander Stoep f05256b32b am 4b70dd4c: am 26f0f657: Merge "init.rc: add healthd to system group to allow write to /dev/cpuset" into mnc-dev
* commit '4b70dd4c8f5c5c2baed8cb1f8436bf74971e20c6':
  init.rc: add healthd to system group to allow write to /dev/cpuset
2015-07-28 21:12:51 +00:00
Jeffrey Vander Stoep 6beb774d5e am 26f0f657: Merge "init.rc: add healthd to system group to allow write to /dev/cpuset" into mnc-dev
* commit '26f0f657ec027430bde7d2237890ba59b3fd174a':
  init.rc: add healthd to system group to allow write to /dev/cpuset
2015-07-28 20:08:40 +00:00
Jeffrey Vander Stoep 4b70dd4c8f am 26f0f657: Merge "init.rc: add healthd to system group to allow write to /dev/cpuset" into mnc-dev
* commit '26f0f657ec027430bde7d2237890ba59b3fd174a':
  init.rc: add healthd to system group to allow write to /dev/cpuset
2015-07-28 20:07:55 +00:00
Jeffrey Vander Stoep 26f0f657ec Merge "init.rc: add healthd to system group to allow write to /dev/cpuset" into mnc-dev 2015-07-28 19:54:40 +00:00
Jeff Vander Stoep a30a8e02dd init.rc: add healthd to system group to allow write to /dev/cpuset
Also add to root group to avoid introducting new bugs.

Bug: 22699101
Change-Id: I9da31e0cc955efd711df3f4c6b17e39d74c01549
2015-07-28 12:27:36 -07:00
Nick Kralevich b4a5b3bac5 am b57ba047: am ba03cc95: am 5f3b05ad: Merge "init.rc: mkdir /data/anr 0775 system system"
* commit 'b57ba047805fd7a779927075be4581f03f3ad938':
  init.rc: mkdir /data/anr 0775 system system
2015-07-27 19:00:59 +00:00
Nick Kralevich b57ba04780 am ba03cc95: am 5f3b05ad: Merge "init.rc: mkdir /data/anr 0775 system system"
* commit 'ba03cc953ff9076d5b01748912b102db43911f7f':
  init.rc: mkdir /data/anr 0775 system system
2015-07-27 18:50:31 +00:00
Nick Kralevich 0f42f39371 am ba03cc95: am 5f3b05ad: Merge "init.rc: mkdir /data/anr 0775 system system"
* commit 'ba03cc953ff9076d5b01748912b102db43911f7f':
  init.rc: mkdir /data/anr 0775 system system
2015-07-26 06:16:06 +00:00
Nick Kralevich c2ea70ae6e init.rc: mkdir /data/anr 0775 system system
Ensure that /data/anr always exists. This allows us to eliminate
some code in system_server and dumpstate. In addition, this change
solves a common problem where people would create the directory
manually but fail to set the SELinux label, which would cause
subsequent failures when they used the directory for ANRs.

Bug: 22385254
Change-Id: I29eb3deb21a0504aed07570fee3c2f87e41f53a0
2015-07-25 21:06:20 -07:00
Jeff Vander Stoep 9752a4696e am 552f23de: am 1d0fe13a: am 3f62a020: logd: allow logd to write to /dev/cpuset files
* commit '552f23deef9491f4e60b78f1ca6f89b7b60c5de2':
  logd: allow logd to write to /dev/cpuset files
2015-07-25 17:00:47 +00:00
Jeff Vander Stoep 552f23deef am 1d0fe13a: am 3f62a020: logd: allow logd to write to /dev/cpuset files
* commit '1d0fe13a9e720a88766b38070195670183274e30':
  logd: allow logd to write to /dev/cpuset files
2015-07-25 16:38:32 +00:00
Jeff Vander Stoep 1d0fe13a9e am 3f62a020: logd: allow logd to write to /dev/cpuset files
* commit '3f62a020c48d5d812fb2898759b93a59dc24d310':
  logd: allow logd to write to /dev/cpuset files
2015-07-25 00:59:33 +00:00
Jeff Vander Stoep c200e9564b am 3f62a020: logd: allow logd to write to /dev/cpuset files
* commit '3f62a020c48d5d812fb2898759b93a59dc24d310':
  logd: allow logd to write to /dev/cpuset files
2015-07-24 23:31:53 +00:00
Jeff Vander Stoep 3f62a020c4 logd: allow logd to write to /dev/cpuset files
Required by logd on devices with USE_CPUSETS defined.

Make /dev/cpuset/background, /dev/cpuset/foreground and
/dev/cpuset/task writeable by system gid. Add logd to system
group for writing to cpuset files and to root group to avoid
regressions. When dropping privs, also drop supplementary groups.

Bug: 22699101
Change-Id: Icc01769b18b5e1f1649623da8325a8bfabc3a3f0
2015-07-24 16:22:06 +00:00
Riley Andrews 42525a1b24 am 7c1ae005: am e850f578: Disable scaling of the cfs tunables.
* commit '7c1ae0051d8492b12862f0983521883a1325bdd3':
  Disable scaling of the cfs tunables.
2015-07-21 21:44:03 +00:00
Riley Andrews 7c1ae0051d am e850f578: Disable scaling of the cfs tunables.
* commit 'e850f5786cdd4d3e4f1157db8785de3e6ff77eab':
  Disable scaling of the cfs tunables.
2015-07-21 21:15:37 +00:00
Riley Andrews e850f5786c Disable scaling of the cfs tunables.
The cfs tunables auto-scale with the number of active cpus by default. Given
that the tunable settings are in device-independent code and it's not
known how many cores are currently active when the init.rc file runs,
the cfs tunables can vary pretty significantly across devices depending
on the state at boot. Disable scaling of the the tunables so that we
can get more consistent behavior of cfs across devices. If we want to
do per-device tuning of these values, we can override what's written
here in device specific files.

Bug: 22634118
Change-Id: Id19b24ef819fef762521e75af55e6d4378cfc949
2015-07-21 19:49:45 +00:00
Daniel Rosenberg 2a9e682c11 am b381f0a5: am 71ca82bf: am 8da23664: Merge "rootdir: Create cache folder in Android.mk"
* commit 'b381f0a5e11bf7a75ee0c06ddb4771a1312a1bea':
  rootdir: Create cache folder in Android.mk
2015-07-20 20:12:09 +00:00
Daniel Rosenberg b381f0a5e1 am 71ca82bf: am 8da23664: Merge "rootdir: Create cache folder in Android.mk"
* commit '71ca82bf954c4bd5b8817eeabb78418fafde90ce':
  rootdir: Create cache folder in Android.mk
2015-07-20 19:58:51 +00:00
Daniel Rosenberg d2bb8134d3 am 71ca82bf: am 8da23664: Merge "rootdir: Create cache folder in Android.mk"
* commit '71ca82bf954c4bd5b8817eeabb78418fafde90ce':
  rootdir: Create cache folder in Android.mk
2015-07-20 19:56:52 +00:00
Daniel Rosenberg 8da23664e7 Merge "rootdir: Create cache folder in Android.mk" 2015-07-20 19:21:49 +00:00
Elliott Hughes fc1a8c1d35 am 69b2c2a1: am 6657d224: am 069f62de: Merge "Fix N9 boot."
* commit '69b2c2a125f655a43f54a181d5ddbe714f4848ca':
  Fix N9 boot.
2015-07-18 18:15:57 +00:00
Elliott Hughes 69b2c2a125 am 6657d224: am 069f62de: Merge "Fix N9 boot."
* commit '6657d2248e902289476c4b937f5d6a1585c95ec2':
  Fix N9 boot.
2015-07-18 18:02:01 +00:00
Elliott Hughes 546738a4e7 am 6657d224: am 069f62de: Merge "Fix N9 boot."
* commit '6657d2248e902289476c4b937f5d6a1585c95ec2':
  Fix N9 boot.
2015-07-18 18:01:41 +00:00
Elliott Hughes 04b2022f7e Fix N9 boot.
Without this, sdcard fails to start because its mount point doesn't
exist.

Bug: http://b/22568628
Change-Id: Ic6a2f51fc74c5bd1f23d97592049495ac3822bb3
2015-07-18 10:34:53 -07:00
Scott Bauer cf0ca50479 Added shell permisisons for memreclaim tracing 2015-07-16 12:26:06 -07:00
Daniel Rosenberg 86b151cbe8 rootdir: Create cache folder in Android.mk
system.img may contain the root directory as well. In that case, we
need to create some folders init.rc would during the build.

Change-Id: I312104ff926fb08d98ac8256b76d01b0a90ea5e5
2015-07-14 17:18:52 -07:00
Daniel Rosenberg 15db3551d0 resolved conflicts for merge of 074ee014 to mnc-dev-plus-aosp
Change-Id: Iead524946a84503a6e89c17861d3f54e4cf276a0
2015-07-14 15:40:25 -07:00
Daniel Rosenberg cdf768fe7c am f3cd170c: am 3470855e: Merge "rootdir: Create folders in Android.mk"
* commit 'f3cd170cdbc1950a9c5efffb5c41c346c4cba298':
  rootdir: Create folders in Android.mk
2015-07-14 22:28:10 +00:00
Daniel Rosenberg 6e1fd8dde7 am 1c45c0ff: Merge "resolved conflicts for merge of 074ee014 to mnc-dr-dev-plus-aosp" into mnc-dr-dev-plus-aosp
* commit '1c45c0ff5d1cbd49d2d77fa837e1be0724fa77b3':
  Remove creation of root directory folders
2015-07-14 20:41:38 +00:00
Daniel Rosenberg cfda5bb47a resolved conflicts for merge of 074ee014 to mnc-dr-dev-plus-aosp
Change-Id: I346583851035950350433136599f73ab2bedba4b
2015-07-14 13:12:48 -07:00
Daniel Rosenberg 6158942f27 am 26a81c1d: am f3cd170c: am 3470855e: Merge "rootdir: Create folders in Android.mk"
* commit '26a81c1d1a8f7c40cd79648edff0585bfc94e281':
  rootdir: Create folders in Android.mk
2015-07-14 15:50:15 +00:00
Daniel Rosenberg 26a81c1d1a am f3cd170c: am 3470855e: Merge "rootdir: Create folders in Android.mk"
* commit 'f3cd170cdbc1950a9c5efffb5c41c346c4cba298':
  rootdir: Create folders in Android.mk
2015-07-14 15:21:13 +00:00
Paul Crowley b7f1f61fbc am ee923139: Merge "Set up user directory crypto in init." into mnc-dr-dev
* commit 'ee923139c346e6751203fc7d2a341388e01c7b19':
  Set up user directory crypto in init.
  logd: switch to unordered_map from BasicHashtable
  rootdir: make sure the /oem mountpoint is always available
2015-07-14 00:27:56 +00:00
Paul Lawrence f3fbfaef22 am c1fa34b9: am d5ef9841: Merge "Change init sequence to support file level encryption" into mnc-dr-dev
* commit 'c1fa34b9f600c827769b4401d8b12e7c587b68f4':
  Change init sequence to support file level encryption
2015-07-13 22:39:08 +00:00
Paul Crowley ee923139c3 Merge "Set up user directory crypto in init." into mnc-dr-dev 2015-07-13 20:52:45 +00:00
Paul Lawrence c1fa34b9f6 am d5ef9841: Merge "Change init sequence to support file level encryption" into mnc-dr-dev
* commit 'd5ef984195779aa9e27d7baabdd751d641eea1a0':
  Change init sequence to support file level encryption
2015-07-13 17:53:08 +00:00
Daniel Rosenberg 64dffd3975 Remove creation of root directory folders
Folders in the root directory are now created during the build,
as we may be building without a ramdisk, and when we do that,
the root directory will be read-only.  With those changes,
these mkdirs will never need to run.

Change-Id: I49c63e8bfc71d28e3f938ed41f81d108359fa57a
2015-07-08 16:37:13 -07:00
Daniel Rosenberg 58458b66d4 rootdir: Create folders in Android.mk
system.img may contain the root directory as well. In that case, we
need to create some folders init.rc would during the build.

Change-Id: I157ccbebf36bee9916f3f584551704ec481ae1d1
2015-07-08 16:37:13 -07:00
Paul Lawrence 2ed2e30120 am e8308f85: am 81046166: Merge "Revert "Change init sequence to support file level encryption"" into mnc-dev
* commit 'e8308f852c867bc676e71875ea57de022464ea09':
  Revert "Change init sequence to support file level encryption"
2015-07-07 20:36:19 +00:00
Paul Lawrence 948410a493 Change init sequence to support file level encryption
File level encryption must get the key between mounting userdata and
calling post_fs_data when the directories are created. This requires
access to keymaster, which in turn is found from a system property.

Split property loaded into system and data, and load in right order.

Bug: 22233063
2015-07-07 13:23:19 -07:00
Paul Lawrence e8308f852c am 81046166: Merge "Revert "Change init sequence to support file level encryption"" into mnc-dev
* commit '8104616696ac5e806b16a393ea02c4f5d8efc328':
  Revert "Change init sequence to support file level encryption"
2015-07-07 18:20:27 +00:00
Paul Lawrence c011b031c9 am 81046166: Merge "Revert "Change init sequence to support file level encryption"" into mnc-dev
* commit '8104616696ac5e806b16a393ea02c4f5d8efc328':
  Revert "Change init sequence to support file level encryption"
2015-07-07 17:39:03 +00:00
Paul Lawrence 8104616696 Merge "Revert "Change init sequence to support file level encryption"" into mnc-dev 2015-07-07 17:29:00 +00:00
Paul Lawrence 437bc5dcec Revert "Change init sequence to support file level encryption"
This reverts commit d815178b75.

Change-Id: I7e3f55d3092fcd04ea9f62f1971c9d42570f096c
2015-07-07 17:05:58 +00:00
Andres Morales d80e243411 am 722d4a54: am 833f142d: Merge "[init] start gatekeeperd after device decryption" into mnc-dev
* commit '722d4a54d9fa49581931e7c88fee5aa0c1f3c5f8':
  [init] start gatekeeperd after device decryption
2015-07-07 01:09:04 +00:00
Paul Lawrence 1c875cc40f am 22d0ee6a: am a65e402b: Merge "Change init sequence to support file level encryption" into mnc-dev
* commit '22d0ee6a25b3bedd6c3cd52473df1404fce8615f':
  Change init sequence to support file level encryption
2015-07-07 00:32:17 +00:00
Andres Morales 722d4a54d9 am 833f142d: Merge "[init] start gatekeeperd after device decryption" into mnc-dev
* commit '833f142d201a4b682885ff9d95c6b3ab32fd0618':
  [init] start gatekeeperd after device decryption
2015-07-06 23:57:49 +00:00
Andres Morales 775b58d08f am 833f142d: Merge "[init] start gatekeeperd after device decryption" into mnc-dev
* commit '833f142d201a4b682885ff9d95c6b3ab32fd0618':
  [init] start gatekeeperd after device decryption
2015-07-06 23:10:31 +00:00
Andres Morales 833f142d20 Merge "[init] start gatekeeperd after device decryption" into mnc-dev 2015-07-06 23:00:09 +00:00