Commit graph

903 commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
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
Paul Lawrence
d3669ff27f am a65e402b: Merge "Change init sequence to support file level encryption" into mnc-dev
* commit 'a65e402b613e927697d35e7936c6d80908d77e88':
  Change init sequence to support file level encryption
2015-07-06 19:52:40 +00:00
Andres Morales
4dd2982dd3 [init] start gatekeeperd after device decryption
gatekeeperd depends on having /data to determine whether
to call setup routines for qcom HALs.

Bug: 22298552
Change-Id: I6c552016dc863bbb04bd5a949a2317a720c8263f
2015-07-06 12:00:22 -07:00
Paul Lawrence
d815178b75 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
Change-Id: I8a6c40d44e17de386417a443c9dfc3b4e7fe59a5
2015-07-06 07:52:06 -07:00
Jeff Sharkey
96835733b3 am f38f29c8: Let\'s reinvent storage, yet again!
* commit 'f38f29c87d97cea45d04b783bddbd969234b1030':
  Let's reinvent storage, yet again!
2015-06-26 16:05:20 +00:00
Jeff Sharkey
f38f29c87d Let's reinvent storage, yet again!
Now that we're treating storage as a runtime permission, we need to
grant read/write access without killing the app.  This is really
tricky, since we had been using GIDs for access control, and they're
set in stone once Zygote drops privileges.

The only thing left that can change dynamically is the filesystem
itself, so let's do that.  This means changing the FUSE daemon to
present itself as three different views:

/mnt/runtime_default/foo - view for apps with no access
/mnt/runtime_read/foo - view for apps with read access
/mnt/runtime_write/foo - view for apps with write access

There is still a single location for all the backing files, and
filesystem permissions are derived the same way for each view, but
the file modes are masked off differently for each mountpoint.

During Zygote fork, it wires up the appropriate storage access into
an isolated mount namespace based on the current app permissions.  When
the app is granted permissions dynamically at runtime, the system
asks vold to jump into the existing mount namespace and bind mount
the newly granted access model into place.

Bug: 21858077
Change-Id: I5a016f0958a92fd390c02b5ae159f8008bd4f4b7
2015-06-25 22:27:04 -07:00
Evgenii Stepanov
c7b86c1661 am eaa97876: am 2e8d31f6: Merge "SANITIZE_TARGET: set global ASAN_OPTIONS"
* commit 'eaa978768beef315c5dca9db964d4e80c462cf74':
  SANITIZE_TARGET: set global ASAN_OPTIONS
2015-06-24 18:12:24 +00:00
Pavlin Radoslavov
233286f40b am 4caa9f39: Merge "Fix the file permissions of /data/misc/bluedroid/bt_config.conf" into mnc-dev
* commit '4caa9f39bb3415358dcb737d0eb9058c34192806':
  Fix the file permissions of /data/misc/bluedroid/bt_config.conf
2015-06-23 01:31:49 +00:00
Pavlin Radoslavov
8175bb2352 Fix the file permissions of /data/misc/bluedroid/bt_config.conf
Fix the file access permissions and group ownership of
"/data/misc/bluedroid/bt_config.conf" so the file can be reused when
switching users on the device.
For that purpose, we need to do the following:

1. Set the set-group-ID (bit 02000) flag for directory "/data/misc/bluedroid"
   so the files created in that directory will have group-id of
   "net_bt_stack" .

2. Change the file's permissions of file "/data/misc/bluedroid/bt_config.conf"
   to Read/Write by User and Group.

Bug: 21493919
Change-Id: Ie00ab4695198ef2aa299b484ef9d4f17bd41b98a
2015-06-22 10:19:30 -07:00
Evgenii Stepanov
1cbe3d944a SANITIZE_TARGET: set global ASAN_OPTIONS
allow_user_segv_handler=1 is required to run ART under ASan
detect_odr_violation=0 and alloc_dealloc_mismatch=0 suppress some of
the existing bug reports during boot.

Bug: 21951850, 21785137
Change-Id: I4d36967c6d8d936dacbfdf1b94b87fa94766bd3e
2015-06-19 11:15:51 -07:00
Tim Murray
63e383136b am e5b0c837: Merge "add cpuset support to libcutils" into mnc-dev
* commit 'e5b0c837856007812ace8ec5849f6852015d5d2b':
  add cpuset support to libcutils
2015-06-12 19:03:30 +00:00
Tim Murray
b769c8d24f add cpuset support to libcutils
bug 21782794

Change-Id: I249531754fb29442dc3c7434d77dbb103f4220a7
2015-06-11 18:35:46 -07:00
Tao Bao
04b10b9aa3 Change pre-recovery into two services
/system/bin/uncrypt needs to be triggered to prepare the OTA package
before rebooting into the recovery. Separate pre-recovery (uncrypt)
into two services: uncrypt that does the uncryption work and
pre-recovery that actually reboots the device into recovery.

Also create /cache/recovery on post-fs in case it doesn't exist.

Bug: 20012567
Bug: 20949086
(cherry picked from commit e48aed0f0a)
Change-Id: I9877cd6ac9412ea6a566bb1ec0807940c7a38ce5
2015-06-09 14:52:43 -07:00
Paul Lawrence
a7dcec1da3 am 3678a5fb: Merge "Move crypt commands to a different listener in vold" into mnc-dev
* commit '3678a5fb8d1094c4796c1316f3b571cb63cf7246':
  Move crypt commands to a different listener in vold
2015-06-04 23:07:32 +00:00
Paul Lawrence
3678a5fb8d Merge "Move crypt commands to a different listener in vold" into mnc-dev 2015-06-04 21:32:44 +00:00
Paul Lawrence
37fcc5d73e Move crypt commands to a different listener in vold
In order to prevent this bug from happening, we must allow vold cryptfs
commands to complete while a long running mount is underway.

While waiting for vold to be changed to a binder interface, we will simply
create two listeners, one for cryptfs and one for everything else.

Bug: 19197175
Change-Id: Ie3d9567819ced7757b0a8f391547f27db944153c
2015-06-03 14:19:29 -07:00
Nick Kralevich
e2722e9bfb am a20d6f4e: am 2ec88501: Merge "tzdatacheck: don\'t hard code SELinux domain name"
* commit 'a20d6f4e154939722263207ddf5954b3f58f666d':
  tzdatacheck: don't hard code SELinux domain name
2015-06-03 20:53:31 +00:00
Nick Kralevich
32512e7167 tzdatacheck: don't hard code SELinux domain name
An automatic domain transition is already defined by SELinux
policy. Avoid having redundant information on the exec line.

This commit depends on commit 17fff893c0
which made the SELinux process label optional.

(cherrypicked from commit 221fca7ddd)

Change-Id: I89464f2bd218c7d6e8db08aa6bed2b62ec6dad2a
2015-06-03 13:36:24 -07:00
Nick Kralevich
221fca7ddd tzdatacheck: don't hard code SELinux domain name
An automatic domain transition is already defined by SELinux
policy. Avoid having redundant information on the exec line.

This commit depends on commit 17fff893c0
which made the SELinux process label optional.

Change-Id: I89464f2bd218c7d6e8db08aa6bed2b62ec6dad2a
2015-06-03 13:08:49 -07:00
Mark Salyzyn
560515540d am e0e56563: am 0bda352f: Merge changes from topic \'logcatd\'
* commit 'e0e565635a7c6c36a05282622c01203afbec5ca5':
  init.rc: logd: Add logpersistd (nee logcatd)
  init: change exec parsing to make SECLABEL optional
  logcat: -f run in background
  logcat: -f flag to continue
2015-06-02 22:41:29 +00:00
Mark Salyzyn
49ed105fd9 init.rc: logd: Add logpersistd (nee logcatd)
(cherry pick from commit 100658c303)

- logpersistd is defined as a thread or process in the context of the
  logd domain. Here we define logpersistd as logcat -f in logd domain
  and call it logcatd to represent its service mechanics.
- Use logcatd to manage content in /data/misc/logd/ directory.
- Only turn on for persist.logd.logpersistd = logcatd.
- Add logpersist.start, logpersist.stop and logpersist.cat debug
  class executables, thus only in the eng and userdebug builds.

ToDo: Wish to add Developer Options menu to turn this feature on or
off, complicated by the fact that user builds have no tools with
access rights to /data/misc/logd.

Bug: 19608716
Change-Id: I57ad757f121c473d04f9fabe9d4820a0eca06f31
2015-06-02 15:28:36 -07:00
Mark Salyzyn
100658c303 init.rc: logd: Add logpersistd (nee logcatd)
- logpersistd is defined as a thread or process in the context of the
  logd domain. Here we define logpersistd as logcat -f in logd domain
  and call it logcatd to represent its service mechanics.
- Use logcatd to manage content in /data/misc/logd/ directory.
- Only turn on for persist.logd.logpersistd = logcatd.
- Add logpersist.start, logpersist.stop and logpersist.cat debug
  class executables, thus only in the eng and userdebug builds.

ToDo: Wish to add Developer Options menu to turn this feature on or
off, complicated by the fact that user builds have no tools with
access rights to /data/misc/logd.

Bug: 19608716
Change-Id: I57ad757f121c473d04f9fabe9d4820a0eca06f31
2015-06-02 15:17:59 -07:00
Mark Salyzyn
473a50f168 rootdir: init.trace.rc too early
(cherry pick from commit 89357d23a1)

debugfs is mounted on boot

Bug: 21566233
Change-Id: I2ba106fbb1e8164ff3d8b2d5b16a16d7926c2732
2015-06-02 14:40:10 -07:00
Mark Salyzyn
c79daf5225 am 1300b16e: am 66e39275: Merge "rootdir: init.trace.rc too early"
* commit '1300b16e51045b0d1235cfaaa031228ded60924b':
  rootdir: init.trace.rc too early
2015-06-02 21:22:37 +00:00
Mark Salyzyn
89357d23a1 rootdir: init.trace.rc too early
debugfs is mounted on boot

Bug: 21566233
Change-Id: I2ba106fbb1e8164ff3d8b2d5b16a16d7926c2732
2015-06-02 12:51:42 -07:00
Paul Lawrence
0a423d994a DO NOT MERGE Securely encrypt the master key
(chery-picked from commit 806d10be23)

Move all key management into vold
Reuse vold's existing key management through the crypto footer
to manage the device wide keys.

Use ro.crypto.type flag to determine crypto type, which prevents
any issues when running in block encrypted mode, as well as speeding
up boot in block or no encryption.

This is one of four changes to enable this functionality:
  https://android-review.googlesource.com/#/c/148586/
  https://android-review.googlesource.com/#/c/148604/
  https://android-review.googlesource.com/#/c/148606/
  https://android-review.googlesource.com/#/c/148607/

Bug: 18151196

Change-Id: I6a8a18f43ae837e330e2785bd26c2c306ae1816b
2015-05-29 17:39:16 +00:00
Tao Bao
6b0938f7fb am 6484f3d1: Merge "Change pre-recovery into two services" into mnc-dev
* commit '6484f3d1cb4078c7525e23d16c7e7bcd90afa653':
  Change pre-recovery into two services
2015-05-28 22:51:29 +00:00
Tao Bao
6484f3d1cb Merge "Change pre-recovery into two services" into mnc-dev 2015-05-28 21:48:16 +00:00
Than McIntosh
a4fd555fc9 am 51f8aa27: am f166e38b: Merge "Move perfprofd to late_start class."
* commit '51f8aa27fdc5675cf0e621af6e14625a24720ff0':
  Move perfprofd to late_start class.
2015-05-28 17:19:32 +00:00
Than McIntosh
b37c45e90a Move perfprofd to late_start class.
Bug: http://b/19483574
Change-Id: I88649b50b95cbddb7d0671a5499232cbef156c48
(cherry picked from commit e8efd0d6bf)
2015-05-28 11:58:31 -04:00