Commit graph

688 commits

Author SHA1 Message Date
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
Paul Lawrence
22d0ee6a25 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 20:34:05 +00: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
35e0cc552c am 96835733: am f38f29c8: Let\'s reinvent storage, yet again!
* commit '96835733b397da908c86e2a1190b8c8baf06a441':
  Let's reinvent storage, yet again!
2015-06-26 16:18:13 +00: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
Pavlin Radoslavov
a88a084e94 am 233286f4: am 4caa9f39: Merge "Fix the file permissions of /data/misc/bluedroid/bt_config.conf" into mnc-dev
* commit '233286f40bdd84ad26b5ebf615d9f62fc30e19bf':
  Fix the file permissions of /data/misc/bluedroid/bt_config.conf
2015-06-23 01:39:01 +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
Tim Kilbourn
c15560d496 Merge "Don't restart zygote when inputflinger dies." 2015-06-12 21:33:32 +00:00
Tim Kilbourn
766ca5cd6c Merge "Revert "Track removal of the inputflinger binary."" 2015-06-12 21:33:01 +00:00
Tim Murray
83da7c6a54 am 63e38313: am e5b0c837: Merge "add cpuset support to libcutils" into mnc-dev
* commit '63e383136b8a76fdf619aa878b58b815a094e6ee':
  add cpuset support to libcutils
2015-06-12 19:15:46 +00: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
Tim Kilbourn
7c6020ba53 Don't restart zygote when inputflinger dies.
During development it is useful to be able to kill inputflinger and have
init restart it without bringing down the entire system server.

Change-Id: I8b13b94331c5045086db2f5c73a8f49efc5992cb
2015-06-10 23:42:15 +00:00
Tim Kilbourn
f8fcd6a616 Revert "Track removal of the inputflinger binary."
This reverts commit 2422c17c5e.

Change-Id: I11d1624947dcc3cdcd0d648de6cc25901c91dac6
2015-06-10 13:22:05 -07:00
Paul Lawrence
b183361199 am a7dcec1d: am 3678a5fb: Merge "Move crypt commands to a different listener in vold" into mnc-dev
* commit 'a7dcec1da38c15d5e5ede7bfdec7ffd880cb6b82':
  Move crypt commands to a different listener in vold
2015-06-05 00:47:36 +00: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
Nick Kralevich
7dbe806939 am e2722e9b: am a20d6f4e: am 2ec88501: Merge "tzdatacheck: don\'t hard code SELinux domain name"
* commit 'e2722e9bfbeb2f2f349493fbe9b464c24e416ee0':
  tzdatacheck: don't hard code SELinux domain name
2015-06-03 22:25:14 +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
Paul Crowley
b94032b79c Set up user directory crypto in init.
Bug: 19704432
Change-Id: Ife4928ffbee39c8ae69e6ba66d9ce5ef5a0beb76
2015-06-03 13:45:15 +01:00
Paul Crowley
f8a6fa503f Restore creation of /data/misc/vold erroneously rolled back
Rollback commit: 9f403450bc

Bug: 19704432
Change-Id: I1a73a2e1d3f4d5441df4d686d420d3a79b3e95bc
2015-06-03 13:43:25 +01:00
Mark Salyzyn
d8a99287a4 am 56051554: am e0e56563: am 0bda352f: Merge changes from topic \'logcatd\'
* commit '560515540d3ef4da9dc58e3b7fcfeb6c067bb677':
  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:52:31 +00: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
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
7cc023a7d5 am 6b0938f7: am 6484f3d1: Merge "Change pre-recovery into two services" into mnc-dev
* commit '6b0938f7fb39ad4ad071c2b493545409a3d69f41':
  Change pre-recovery into two services
2015-05-28 23:06:26 +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
7c3f575c8a am a4fd555f: am 51f8aa27: am f166e38b: Merge "Move perfprofd to late_start class."
* commit 'a4fd555fc9654ba18d947deb13edae303172d575':
  Move perfprofd to late_start class.
2015-05-28 17:39:18 +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
Than McIntosh
e8efd0d6bf Move perfprofd to late_start class.
Bug: http://b/19483574
Change-Id: I88649b50b95cbddb7d0671a5499232cbef156c48
2015-05-27 14:02:11 -04:00
Paul Lawrence
9f403450bc am ffdac6dd: am f0b318d6: am 7c789575: Merge "Revert "Set up crypto for user directories in init.""
* commit 'ffdac6ddf2e13370674821159edd9663b5302707':
  Revert "Set up crypto for user directories in init."
2015-05-22 21:42:39 +00:00
Paul Lawrence
ffdac6ddf2 am f0b318d6: am 7c789575: Merge "Revert "Set up crypto for user directories in init.""
* commit 'f0b318d61cc129f4ddd25859500857b9f8e34e69':
  Revert "Set up crypto for user directories in init."
2015-05-22 19:41:48 +00:00
Paul Lawrence
2e24bcfdce Revert "Set up crypto for user directories in init."
Causes a boot loop in Shamu

This reverts commit ce6f716096.

Bug: 21396871
Change-Id: I9709053c589807d4530a3a99bd84e5b3177316cd
2015-05-22 18:32:45 +00:00
Paul Crowley
83e670e687 am e8cbb421: am 5f3c715e: am 7f623dec: Merge "Set up crypto for user directories in init."
* commit 'e8cbb421cd28ec754923a88a919557ee5b174411':
  Set up crypto for user directories in init.
2015-05-21 22:12:58 +00:00
Paul Crowley
e8cbb421cd am 5f3c715e: am 7f623dec: Merge "Set up crypto for user directories in init."
* commit '5f3c715e1a8331f13ea39264b24dfc03ac8db060':
  Set up crypto for user directories in init.
2015-05-21 21:59:40 +00:00
Paul Crowley
ce6f716096 Set up crypto for user directories in init.
Depends on https://android-review.googlesource.com/#/c/147911/

Bug: 19704432
Change-Id: Ie59c6b67f73c1cadd86e69d3c9673ddaddb49a7e
2015-05-20 08:28:21 +01:00
Tao Bao
e48aed0f0a 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
Change-Id: If67fe1e9ee6279593d2788452febcd3f0fe714c2
2015-05-19 10:04:56 -07:00
Dehao Chen
0853afe8aa am 3ce52a57: am ac725c12: Add /data/misc/perfprofd to store perf profile.
* commit '3ce52a57c5db5de2eff7cb14497279c7a6e157e8':
  Add /data/misc/perfprofd to store perf profile.
2015-05-07 08:18:19 +00:00
Dehao Chen
3ce52a57c5 am ac725c12: Add /data/misc/perfprofd to store perf profile.
* commit 'ac725c12da8a67ca33d10c7b6131f8f543ed4449':
  Add /data/misc/perfprofd to store perf profile.
2015-05-07 05:27:05 +00:00
Dehao Chen
ac725c12da Add /data/misc/perfprofd to store perf profile.
BUG: 19483574

(cherry picked from commit 30c401fa92)

Change-Id: Ibf96db9f7e5db625b395db20b73572acc240b1f9
2015-05-06 15:09:23 -07:00
Dehao Chen
30c401fa92 Add /data/misc/perfprofd to store perf profile.
BUG: 19483574

Change-Id: Ib5eb9e789c063bd76d24181c4c03652f9ef12cb7
2015-05-05 15:06:21 -07:00
Than McIntosh
7d678d8d78 Invoke perfprofd daemon (only for userdebug/eng builds).
Change-Id: Ifaabe32dda6db249efc62c5db3760e32295eb1a9
(cherry picked from commit d6544d2a40)
2015-05-04 11:50:27 -07:00