Commit graph

971 commits

Author SHA1 Message Date
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
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
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
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
Terry Heo
e4c6666ea9 am 55431d97: Merge "rootdir: add permission for /dev/dvb*" into mnc-dev
* commit '55431d97459210f0f4ac66538ca6cbf8cf3511e9':
  rootdir: add permission for /dev/dvb*
2015-05-13 06:06:37 +00:00
Terry Heo
bf81356e22 rootdir: add permission for /dev/dvb*
Bug: 20112245
Change-Id: I513c6ed5b65d5bd4edef6cb12d7fc20eb9cad4f1
2015-05-07 16:49:00 +09: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
Nick Kralevich
0847d1bf2f am 6ee69177: rootdir: make sure the /oem mountpoint is always available
* commit '6ee6917757bd4b00437cabe07fbaa48ce2621b38':
  rootdir: make sure the /oem mountpoint is always available
2015-05-07 05:25:21 +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
Nick Kralevich
577c1245aa Merge "Add /data/misc/perfprofd to store perf profile." 2015-05-06 21:49:51 +00:00
Nick Kralevich
6ee6917757 rootdir: make sure the /oem mountpoint is always available
The /oem mount point is used to mount semi-trusted data, and
many Android One devices depend on it. Make sure it's guaranteed
to always be available.

(cherrypicked from commit f3b554fc61)

Bug: 20816563
Change-Id: Ib5272f025d14d4da6125d753879054b3faeae696
2015-05-06 13:43:15 -07:00
Nick Kralevich
f3b554fc61 rootdir: make sure the /oem mountpoint is always available
The /oem mount point is used to mount semi-trusted data, and
many Android One devices depend on it. Make sure it's guaranteed
to always be available.

Bug: 20816563
Change-Id: Ib5272f025d14d4da6125d753879054b3faeae696
2015-05-05 17:19:14 -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
Elliott Hughes
d5fb597c8d am 5ea5aaa5: am a668478e: Merge "Invoke perfprofd daemon (only for userdebug/eng builds)."
* commit '5ea5aaa561fc011bf58332d48fb6bbf102cc40a4':
  Invoke perfprofd daemon (only for userdebug/eng builds).
2015-05-01 22:35:54 +00:00
Paul Lawrence
b8fca94e81 Merge commit '2fe6a631' into manualmerge
Change-Id: Ib8d61ee25711e86a2df3705e87904a50c0ef5187
2015-04-29 09:56:26 -07:00
Paul Lawrence
806d10be23 Securely encrypt the master key
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-04-28 15:34:10 -07:00
Paul Lawrence
658801ff9f resolved conflicts for merge of 6a5244bc to mnc-dev-plus-aosp
Change-Id: Ied1bbf09aeeed53daefb53c559498066abd9b767
2015-04-28 14:28:44 -07:00
Paul Lawrence
2b3a493946 Merge "Revert "Securely encrypt the master key"" 2015-04-28 19:15:40 +00:00
Paul Lawrence
7ac2807546 Revert "Securely encrypt the master key"
This reverts commit 4bf1887c78.

Change-Id: Ie6d1f39de530b99b50a27ddc45bcc900a24e04b5
2015-04-28 19:15:01 +00:00
Than McIntosh
d6544d2a40 Invoke perfprofd daemon (only for userdebug/eng builds).
Change-Id: Ifaabe32dda6db249efc62c5db3760e32295eb1a9
2015-04-28 14:32:35 -04:00
Paul Lawrence
7880f812f7 resolved conflicts for merge of 72fad66f to mnc-dev-plus-aosp
Change-Id: Ib6659a50ee3f1f1ac3719e5d3397c21f786b9afc
2015-04-27 14:44:15 -07:00
Paul Lawrence
9234b169e6 Merge "Securely encrypt the master key" 2015-04-27 20:08:53 +00:00
Mark Salyzyn
5cb4c8796c Revert "STOPSHIP: WifiStateMachine logging temporarily disabled"
This reverts commit 15ae6c2e7c.

Change-Id: I281a65209a5118a6c73ddec65ed40d149c23bf0b
2015-04-24 21:32:17 +00:00
Mark Salyzyn
b2beaf7b20 Merge "Revert "STOPSHIP: Additional Wifi logging temporarily disabled"" 2015-04-24 21:30:22 +00:00
Elliott Hughes
03c9267865 am a8088f38: am ec389902: am 132440b0: Merge "Revert "Revert "Make init re-exec itself for its SELinux domain transition."""
* commit 'a8088f380932d873a39fafdd816f96328f7caa9c':
  Revert "Revert "Make init re-exec itself for its SELinux domain transition.""
2015-04-24 21:09:34 +00:00
Mark Salyzyn
ea782d327a Revert "STOPSHIP: Additional Wifi logging temporarily disabled"
This reverts commit 18b1da2033.

Change-Id: I86cde061a36a9a9e43c8a5df2df1e853ed32b7a0
2015-04-24 20:28:27 +00:00
Elliott Hughes
f65730e620 Revert "Revert "Make init re-exec itself for its SELinux domain transition.""
This reverts commit 4217374611.

It turns out that the kernel passes any unrecognized arguments on to init,
and (at least) N6 and N9 have such arguments. My lazy check of argc was
thus insufficient to recognize what stage of init we were in, so we'd
skip to stage 2 and not set up SELinux. And apparently you can get a
very long way with SELinux off... We'll fix that in a later change.

Bug: 19702273
Change-Id: I43b3fb722fed35dd217cb529cbcac9a29aff4e4b
2015-04-24 12:26:05 -07:00
Nick Kralevich
d6069e21ee am b706a8ac: am 2db3cd3e: am 46fee19c: Merge "Revert "Make init re-exec itself for its SELinux domain transition.""
* commit 'b706a8acff9c62da7b4045374b93a8739671a8a0':
  Revert "Make init re-exec itself for its SELinux domain transition."
2015-04-24 17:37:42 +00:00
Nick Kralevich
46fee19cb2 Merge "Revert "Make init re-exec itself for its SELinux domain transition."" 2015-04-24 16:58:01 +00:00
Nick Kralevich
4217374611 Revert "Make init re-exec itself for its SELinux domain transition."
shamu isn't booting.

This reverts commit adf0d1bbfa.

Change-Id: I89d568838cebbe14cc4a8ae3843f0f1ac54987af
2015-04-24 16:57:21 +00:00
Elliott Hughes
8e9b756eab am 77260323: am 20dfbb0f: am fa66b4e1: Merge "Remove long-obsolete file."
* commit '77260323e2e99a996351a98a44ef56db5f1e2767':
  Remove long-obsolete file.
2015-04-24 04:42:23 +00:00
Elliott Hughes
2a87d2b155 Remove long-obsolete file.
Change-Id: I728cc13b4a7ac93f9c923d2fc9bda2bb65ffe99d
2015-04-23 20:57:12 -07:00
Elliott Hughes
45a2329b2d am 77434ab3: am ef68fd3f: am d4656784: Merge "Make init re-exec itself for its SELinux domain transition."
* commit '77434ab362b3234accf16499aaf2a5340d568553':
  Make init re-exec itself for its SELinux domain transition.
2015-04-24 03:51:12 +00:00
Elliott Hughes
d46567848b Merge "Make init re-exec itself for its SELinux domain transition." 2015-04-24 03:10:16 +00:00
Mark Salyzyn
7076796cab am 44f1356e: am 85a9566f: am 76520752: Merge "rootfs: init.rc start logd parse error"
* commit '44f1356e42a64fefb194b5c74b62402f4ec2881e':
  rootfs: init.rc start logd parse error
2015-04-23 23:16:39 +00:00
Mark Salyzyn
765207524f Merge "rootfs: init.rc start logd parse error" 2015-04-23 22:25:30 +00:00
Elliott Hughes
adf0d1bbfa Make init re-exec itself for its SELinux domain transition.
Change-Id: I38adabe5789d671e3f7d21936071a758ec8cea8a
2015-04-23 15:20:51 -07:00
Paul Lawrence
4bf1887c78 Securely encrypt the master key
Remove unencrypted link since it is easier to manage directly
Move creation of key to vold
Start vold early so this is possible in a timely fashion

This is one of four changes to enable this functionality:
  https://android-review.googlesource.com/#/c/144586/
  https://android-review.googlesource.com/#/c/144663/
  https://android-review.googlesource.com/#/c/144672/
  https://android-review.googlesource.com/#/c/144673/

Bug: 18151196
Change-Id: Idb17d1f1a724c6ec509d181ae4427113e9d3b5e6
2015-04-23 10:23:03 -07:00
Mark Salyzyn
18b1da2033 STOPSHIP: Additional Wifi logging temporarily disabled
Bug: 20416721
Change-Id: I1be1c742f47f0e673eef6a8d391246f47c35c336
2015-04-21 23:09:58 +00:00
Mark Salyzyn
15ae6c2e7c STOPSHIP: WifiStateMachine logging temporarily disabled
Bug: 20416721
Change-Id: Id60eb6ab77589ab50800532de0d2877adef1d5b7
2015-04-21 22:39:09 +00:00
Mark Salyzyn
5c39e0ada8 rootfs: init.rc start logd parse error
init: /init.rc: 490: invalid option 'start'

Change-Id: Ica985e45d4652dab0ebd434803344f14cc73d834
2015-04-20 15:56:14 +00:00
Nick Kralevich
1450586ffd create /data/misc/gatekeeper
Change-Id: I7631401ac21b60a22f6fd4052814186bf3bc2b05
2015-04-20 08:55:12 -07:00
Andres Morales
4e9da84be1 Merge "Implement SID API" 2015-04-16 22:16:58 +00:00
Andres Morales
6a49c2fa43 Implement SID API
Change-Id: Id11632a6b4b9cab6f08f97026dd65fdf49a46491
2015-04-16 13:17:54 -07:00
Vinit Deshpande
b63190fda8 am b4ef85c..b4ef85c from mirror-m-wireless-internal-release
b4ef85c Add Bluetooth SAP UIM socket
2015-04-14 15:06:55 -07:00
Neil Fuller
13859d1230 am 90014d61: am 532d0a11: am 9b83b623: Merge "Executable to run on boot that removes old tzdata if needed"
* commit '90014d61c83ef5105881c171481a50f21fd4dd57':
  Executable to run on boot that removes old tzdata if needed
2015-04-13 12:18:34 +00:00
Neil Fuller
08913228e1 Executable to run on boot that removes old tzdata if needed
tzdatacheck is exec'd from init.rc early in boot just after /data is
mounted. It checks to make sure that the tz rule data in /data
is newer than the version in /system. If the data is older it is
deleted. This is to address problems with earlier tz rule updates
that occurred: after an OTA upgrade previous updates in /data
would override newer versions in the system partition.

Includes change to init.rc neccessary to run it at boot time. Other
changes are in external/selinux.

Bug: 19941636
Bug: https://code.google.com/p/android/issues/detail?id=35730
Change-Id: I7cc61e058424c856da88f11ff9b259f34cb39dc7
2015-04-13 11:38:32 +01:00
Dheeraj Shetty
b4ef85c636 Add Bluetooth SAP UIM socket
Change-Id: I1445e51f613ac3e21cf818c0b1364c334579593e
2015-04-12 22:16:35 -07:00
Andres Morales
2d08dce0be GateKeeper proxy service
Until we have SELinux support for gating access
to individual TEE services, we will proxy TEE requests
to GateKeeper via this daemon.

Change-Id: Ifa316b75f75bff79bdae613a112c8c3c2e7189a8
2015-04-08 15:20:22 -07:00
Mark Salyzyn
6abe429588 am 4122304d: am 07e3ed46: am c19572fa: Merge "rootfs: init start logd in post-fs"
* commit '4122304de3990ca1fca2790468fb8e9ddcca11f2':
  rootfs: init start logd in post-fs
2015-04-08 16:56:04 +00:00
Mark Salyzyn
124ff15bca rootfs: init start logd in post-fs
The earliest point we can start logd is after /system is mounted.
Ideally on post-fs-system (does not exist), post-fs will do.
As insurance, we will also make sure logd is started if a
logd-reinit is requested. This results in logd starting at least
4 processes earlier than it does currently, with a tighter
grouping of threads which means we are taking advantage of a
lighter CPU load at the time, rather than taking cycles during
heavy activity during core startup.

Change-Id: If4f0bd3a53bb4c47500a54d741ca635d87c0c330
2015-04-08 09:18:50 -07:00
Nick Kralevich
bd3212fd92 am 5056cdcd: am 01190672: am de957955: Merge "Create /data/system/heapdump for system_server"
* commit '5056cdcdde4901fe667522cfebf3e1f9e1af3b3b':
  Create /data/system/heapdump for system_server
2015-04-08 01:06:59 +00:00
Nick Kralevich
9c0437fba7 Create /data/system/heapdump for system_server
Bug: 20073185
Change-Id: I6fd83d33da33d048fdd6b07fa1f675ecb4f4eb2c
2015-04-07 16:44:43 -07:00
Jeff Sharkey
ae0a5acc0e Mount point for expanded storage.
Managed by vold.

Bug: 19993667
Change-Id: I7957b44d37d6a1f572cbec515d03856a8ed54391
2015-04-06 17:42:14 -07:00
Paul Lawrence
b8bd76b7cb Merge "Revert "Revert "Adding e4crypt support""" 2015-04-02 14:49:25 +00:00
Paul Lawrence
c410b3bd63 Revert "Revert "Adding e4crypt support""
Fix build break caused by original change

This reverts commit 84b0bab58f.

(cherry picked from commit bbb4c85bdcc9a1bce315ed9d61a228bb1b992a1c)

Change-Id: If0ead0f2656b69f33f72c64b03a05784455a4143
2015-04-01 13:48:06 -07:00
Jeff Sharkey
25775e8e63 Different blkid and fsck execution domains.
Tell vold about which SELinux domains to use for different classes
of devices.  Also create a directory for vold to store private
files.

Bug: 19993667
Change-Id: Ib7bc80234f2b13a89b143bf90f147140109570cd
2015-04-01 11:55:50 -07:00
Paul Lawrence
b8c9d273a0 Revert "Revert "Adding e4crypt support""
Fix build break caused by original change

This reverts commit 84b0bab58f.

Change-Id: I99fbd7c3d1ed92db1f546033c8493bb71a327924
2015-03-31 13:02:13 -07:00
Jeff Sharkey
fc0004894a Progress towards dynamic storage support.
To support external storage devices that are dynamically added and
removed at runtime, we're changing /mnt and /storage to be tmpfs that
are managed by vold.

To support primary storage being inserted/ejected at runtime in a
multi-user environment, we can no longer bind-mount each user into
place.  Instead, we have a new /storage/self/primary symlink which
is resolved through /mnt/user/n/primary, and which vold updates at
runtime.

Fix small mode bugs in FUSE daemon so it can be safely mounted
visible to all users on device.

Bug: 19993667
Change-Id: I0ebf4d10aba03d73d9a6fa37d4d43766be8a173b
2015-03-30 19:48:38 -07:00
Elliott Hughes
1ef8498d02 am 4ce3c828: am 0cd316a4: am 5db3936d: Merge "Log more timing information from init."
* commit '4ce3c8288ba030c2d2a80cf94ceb5d2f84a66d26':
  Log more timing information from init.
2015-03-28 17:10:38 +00:00
Elliott Hughes
da40c00137 Log more timing information from init.
Also make important events in init's life NOTICE rather than INFO,
and ensure that NOTICE events actually make it to the kernel log.

Also fix the logging so that if you have a printf format string
error, the compiler now catches it.

Also give messages from init, ueventd, and watchdogd distinct tags.
(Previously they'd all call themselves "init", and dmesg doesn't
include pids, so you couldn't untangle them.)

Also include the tag in SELinux messages.

Bug: 19544788
Change-Id: Ica6daea065bfdb80155c52c0b06f346a7df208fe
2015-03-28 00:25:22 -07:00
Paul Lawrence
84b0bab58f Revert "Adding e4crypt support"
This reverts commit 6095afc115.

Change-Id: Icedfe0036223d7f42eaaefc4a35ad0f2efb14e4e
2015-03-26 14:53:19 +00:00
Paul Lawrence
6095afc115 Adding e4crypt support
Add file encryption flag to fstab.

If file encryption flag set in fstab, handle identically to block
encrypted volumes.

Requires matching change:
  https://googleplex-android-review.git.corp.google.com/#/c/642778/

Change-Id: I28c236959f2d7d5f0dccc8ea45c325ea0cf871fc
2015-03-23 14:16:43 -07:00
Daniel Cardenas
e3b164d024 Merge "Revert "lowmemorykiller: make perms 0220"" 2015-03-20 00:14:36 +00:00
Daniel Cardenas
429e7424f2 Revert "lowmemorykiller: make perms 0220"
This reverts commit b3739735b8.
Values are helpful to inspect during memory performance tuning.

b/19847626

Change-Id: I004ed37d5cc67e466c1fd1a84e47348524056e87
2015-03-20 00:10:15 +00:00
Elliott Hughes
07d457c06c am 169d029c: am 789c99a4: Merge "Switch init over to _PATH_DEFPATH."
* commit '169d029c763a7e652e6d22ae42bb23707675541b':
  Switch init over to _PATH_DEFPATH.
2015-03-18 17:15:06 +00:00
Elliott Hughes
cc86fb2b29 Switch init over to _PATH_DEFPATH.
Bug: 19564110
Change-Id: I343b4a360b10319dca13ab01f2d411ff940e9052
2015-03-17 20:01:13 -07:00
Mark Salyzyn
7ad506839a am 6025a2bc: am bd518bce: Merge changes I3187aa34,Iadac58e6
* commit '6025a2bc493534b3003ebd2ad7130366cf4f6723':
  init.rc: logd --reinit on changes to persistent properties
  logd: add reinit command
2015-03-13 07:09:39 +00:00
Mark Salyzyn
48d06069a8 init.rc: logd --reinit on changes to persistent properties
Bug: 19681572
Change-Id: I3187aa348dae79fa5822ffb7ee9566919a7a04e6
2015-03-12 12:24:53 -07:00
Mark Salyzyn
87946e714b am 20dc9c01: am 1dd71ae1: am f33c3bc9: Merge "init: drop dontpanic & apanic initialization"
* commit '20dc9c01fabb33ed5a0e17b8efbdcdbe576c0941':
  init: drop dontpanic & apanic initialization
2015-02-27 19:44:46 +00:00
Mark Salyzyn
1dd71ae12e am f33c3bc9: Merge "init: drop dontpanic & apanic initialization"
* commit 'f33c3bc9602e4a369c4cc5d28357b8f73a3eed6c':
  init: drop dontpanic & apanic initialization
2015-02-27 19:34:33 +00:00
Mark Salyzyn
1eaba37aae init: drop dontpanic & apanic initialization
Bug: 19050686
Bug: 19525200
Change-Id: Id81abe3b44283b439390b42db7a9da23748dee0a
2015-02-27 07:03:01 -08:00
Nick Kralevich
be95a75e6f am 0a316829: am 398ade81: am 7bb72b73: Merge "seclabel use on services out of system partition"
* commit '0a316829fb856f98d8db3ba78667feb19fb12e22':
  seclabel use on services out of system partition
2015-02-26 02:27:11 +00:00
Nick Kralevich
398ade817b am 7bb72b73: Merge "seclabel use on services out of system partition"
* commit '7bb72b73b0291636721d83a45adad175163361ec':
  seclabel use on services out of system partition
2015-02-26 01:07:12 +00:00
Narayan Kamath
2422c17c5e Track removal of the inputflinger binary.
Change-Id: Ie3c3e5a67e7dfac5bd1672da6979fb053e8483b9
2015-02-24 11:02:27 +00:00
William Roberts
6889007627 seclabel use on services out of system partition
These services can make use of type transitions already
present in the base policy.

Change-Id: Id785c39c4ea44598c64dc499bd943c73bc55ca85
2015-02-23 13:50:37 -08:00
Elliott Hughes
7630916fb8 am 9c1bc6bb: am 29576ae8: Merge "/vendor is sometimes on a separate partition now."
* commit '9c1bc6bbc82e3e4f005e9fcacfca94b2dd82ca31':
  /vendor is sometimes on a separate partition now.
2015-02-14 05:14:22 +00:00
Elliott Hughes
9c1bc6bbc8 am 29576ae8: Merge "/vendor is sometimes on a separate partition now."
* commit '29576ae8901eb95d4c8a34f242a282b2fb73d35f':
  /vendor is sometimes on a separate partition now.
2015-02-14 05:08:42 +00:00
Elliott Hughes
3a5d71ac60 /vendor is sometimes on a separate partition now.
Change-Id: I3217c272ea38ab8212056e0432d0ededacd362f6
2015-02-13 16:59:00 -08:00
Elliott Hughes
e6cc8012f5 am 0903c13a: am 265df6f5: Merge "bootchart: fix bootchart can not be triggered problem"
* commit '0903c13ade29e6eedecd198ac54131248a1818f3':
  bootchart: fix bootchart can not be triggered problem
2015-02-12 21:36:21 +00:00
Elliott Hughes
0903c13ade am 265df6f5: Merge "bootchart: fix bootchart can not be triggered problem"
* commit '265df6f50c508710f0b717d67650732baa906976':
  bootchart: fix bootchart can not be triggered problem
2015-02-12 20:32:33 +00:00
Yongqin Liu
a197ff12dd bootchart: fix bootchart can not be triggered problem
bootchart uses a file on the data partition to decide if it should collect
data for bootchart, but the data partition will be mounted by the mount_all
command in the "on fs" section, and it will be only added into the action
queue when command "trigger fs" is executed, but that's after the
bootchart_init action (late_init).

This change makes bootchart_init a builtin command of init,
and make it executed as the first command of "on post-fs" section
which will be triggered after the "on fs" section.

This change also refactors the bootchart code to all be in bootchart.cpp.

Change-Id: Ia74aa34ca5b785f51fcffdd383075a549b2a99d9
Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>
2015-02-12 12:13:24 -08:00
Paul Lawrence
d933fc0c05 am a1738915: am 317b4024: Revert "Make encryption configurable"
* commit 'a1738915329e704ea52fc09c222bb4893e6e51df':
  Revert "Make encryption configurable"
2015-02-09 04:14:22 +00:00
Paul Lawrence
a173891532 am 317b4024: Revert "Make encryption configurable"
* commit '317b4024a2a46b8c57abfa08f2a649df13572bd3':
  Revert "Make encryption configurable"
2015-02-07 00:11:12 +00:00
Paul Lawrence
317b4024a2 Revert "Make encryption configurable"
This reverts commit bda6272446.

The original fix seems to have led to boot failures in QA. Rather than
risk shipping, revert the change. Bug 18764230 reopened.

Requires change
    https://googleplex-android-review.git.corp.google.com/#/c/629764/

Bug: 19278390
Bug: 19199624

Change-Id: I8b6ab585666f2b0f585ffb2a5f61ac2e3462e06e
2015-02-06 17:32:09 +00:00
Greg Hackmann
0c713b5243 am 86cdce1a: am f52338fe: Merge "rootdir: enable armv8_deprecated swp hook"
* commit '86cdce1aab39ddbb346e6f7be1ca86531970419f':
  rootdir: enable armv8_deprecated swp hook
2015-02-05 23:31:32 +00:00
Greg Hackmann
86cdce1aab am f52338fe: Merge "rootdir: enable armv8_deprecated swp hook"
* commit 'f52338fe1e8f74123a895db591d6a2a53061a2b1':
  rootdir: enable armv8_deprecated swp hook
2015-02-05 23:21:19 +00:00
Greg Hackmann
cee8757f92 rootdir: enable armv8_deprecated swp hook
The upstream kernel now includes support for emulating legacy AArch32
instructions on ARMv8 devices.  By default this framework emulates
deprecated instructions but not obsolete instructions.

Android requires support for the obsolete SWP and SWPB instructions on
all ARM devices, so override this default for the swp emulation hook.

Change-Id: I82b9bdb564413ec7c1a101da75a9928aebe1606b
Signed-off-by: Greg Hackmann <ghackmann@google.com>
2015-02-05 13:38:58 -08:00
Nick Kralevich
07932da911 am e1f62802: am d07555db: Merge "ensure /data/tombstones exists on all Android devices"
* commit 'e1f62802f6bec8ecc89100a1bbbdc36b7d18985b':
  ensure /data/tombstones exists on all Android devices
2015-01-31 08:34:08 +00:00
Nick Kralevich
e1f62802f6 am d07555db: Merge "ensure /data/tombstones exists on all Android devices"
* commit 'd07555dba01d64011b0d611dd6d3b197b216c163':
  ensure /data/tombstones exists on all Android devices
2015-01-31 07:49:28 +00:00
Nick Kralevich
0359d778a5 ensure /data/tombstones exists on all Android devices
/data/tombstones is referenced by core platform code, but is not
guaranteed to exist on all Android devices. Move the directory
creation out of device specific files and into the core
init.rc file.

Bug: https://code.google.com/p/android/issues/detail?id=93207
Change-Id: I94ae5199a6a32c4fe555ca994fc4a8345e0c9690
2015-01-30 17:38:06 -08:00
Paul Lawrence
36d0eaecd7 Make encryption configurable
Delay mounting encryptable but unencrypted volumes until we can
check the ro.vold.forceencrypt flag, then optionally encrypt.

Requires matching vold change from
    https://googleplex-android-review.git.corp.google.com/#/c/615309/

Bug: 18764230
Change-Id: If22008be8de6a4f3216b349f81ace49be1730314
2015-01-28 11:41:53 -08:00
Paul Lawrence
e5a84ce55e am 7e890a4d: am bda62724: Make encryption configurable
* commit '7e890a4d32816d34b30fb5d1f651d966d64bbf36':
  Make encryption configurable
2015-01-26 16:28:33 +00:00
Paul Lawrence
7e890a4d32 am bda62724: Make encryption configurable
* commit 'bda6272446454886339841a62daaa1b66c07ad60':
  Make encryption configurable
2015-01-26 16:22:49 +00:00
Paul Lawrence
bda6272446 Make encryption configurable
Delay mounting encryptable but unencrypted volumes until we can
check the ro.vold.forceencrypt flag, then optionally encrypt.

Requires matching vold change from
    https://googleplex-android-review.git.corp.google.com/#/c/615309/

Bug: 18764230
Change-Id: If22008be8de6a4f3216b349f81ace49be1730314
2015-01-21 10:03:29 -08:00
Mark Salyzyn
f756cf1439 am 8c7380b4: am 3802b5d4: Merge "rootdir: add pstore"
* commit '8c7380b4761d5ca02d839ccd337014116134a5b8':
  rootdir: add pstore
2015-01-15 02:27:51 +00:00
Yabin Cui
01a805d2c2 am 2cd0563c: am d3119b19: Merge "Add ip6-localhost to /system/etc/hosts."
* commit '2cd0563c53c8aa566c924d389ff34d7c46ea43b7':
  Add ip6-localhost to /system/etc/hosts.
2015-01-14 22:18:38 +00:00
Mark Salyzyn
8c7380b476 am 3802b5d4: Merge "rootdir: add pstore"
* commit '3802b5d4c5cb14864dcdd8820e9140b81a2d7d78':
  rootdir: add pstore
2015-01-14 17:46:46 +00:00
Mark Salyzyn
4b0313e4d3 rootdir: add pstore
/dev/pmsg0 used to record the Android log messages, then
on reboot /sys/fs/pstore/pmsg-ramoops-0 provides a means
to pull and triage user-space activities leading
up to a panic. A companion to the pstore console logs.

Change-Id: Id92cacb8a30339ae10b8bf9e5d46bb0bd4a284c4
2015-01-14 17:15:39 +00:00
Yabin Cui
2cd0563c53 am d3119b19: Merge "Add ip6-localhost to /system/etc/hosts."
* commit 'd3119b1962ef5c0d15b9cc22beb9ded040b44dcb':
  Add ip6-localhost to /system/etc/hosts.
2015-01-13 23:39:26 +00:00
Yabin Cui
25147416bb Add ip6-localhost to /system/etc/hosts.
Bug: 18791191
Change-Id: Id7cad8cfccadeb319f0dc7dcba8148a457f9f87d
2015-01-13 14:38:21 -08:00
Greg Hackmann
f3fd1226e0 init.rc: disable ICMP redirects
Bug: 18604139

Change-Id: I4bf22d0029f8b03b0ef4329b7b8632d8e116c8e1
Signed-off-by: Greg Hackmann <ghackmann@google.com>
2014-12-10 09:38:14 -08:00
Elliott Hughes
053ae64820 am a0959e90: am 8eb770d3: Merge "Remove long-dead readtty."
* commit 'a0959e90f550f06969c2e21a0858b8d4cb8d4228':
  Remove long-dead readtty.
2014-11-25 19:57:00 +00:00
Elliott Hughes
a0959e90f5 am 8eb770d3: Merge "Remove long-dead readtty."
* commit '8eb770d37cd9470630fdbe496f22b7a04549fef7':
  Remove long-dead readtty.
2014-11-25 19:03:12 +00:00
Elliott Hughes
b120134bd1 Remove long-dead readtty.
Change-Id: I15ae14542214a3802d43892da0d03cfb33e63c96
2014-11-24 12:01:21 -08:00
Nick Kralevich
ac12f25004 Ensure /data/adb exists
automerge: 6672300

* commit '667230074b6e4e306a50d84a88a57bf4f1ec0291':
  Ensure /data/adb exists
2014-11-05 19:18:32 +00:00
Nick Kralevich
667230074b Ensure /data/adb exists
Ensure that /data/adb always exists. This directory is used
for writing adb debugging information when persist.adb.trace_mask
is set.

Bug: https://code.google.com/p/android/issues/detail?id=72895

(cherry picked from commit 89252ce31a)

Change-Id: I44e01bee50125f4e6e5fff6e74c53bb2022ce355
2014-11-05 10:17:39 -08:00
Bill Yi
aad358fbc1 Merge commit 'b2042f7263c7bbacc5115de4a42c5a96b64a06f2' into HEAD 2014-10-22 08:49:05 -07:00
Nick Kralevich
268c887f0c am 147de7e1: am 37d70f53: am c0b4b8b0: Merge "Ensure /data/adb exists"
* commit '147de7e147c9a85158f79b6aeffd87af6b921690':
  Ensure /data/adb exists
2014-10-21 17:16:31 +00:00
Nick Kralevich
147de7e147 am 37d70f53: am c0b4b8b0: Merge "Ensure /data/adb exists"
* commit '37d70f53672c8878a5ce5506d6d89b851400f8e6':
  Ensure /data/adb exists
2014-10-21 17:10:47 +00:00
Nick Kralevich
89252ce31a Ensure /data/adb exists
Ensure that /data/adb always exists. This directory is used
for writing adb debugging information when persist.adb.trace_mask
is set.

Bug: https://code.google.com/p/android/issues/detail?id=72895
Change-Id: I9cee2a0202417ff72a5ede7742e25877f51732dd
2014-10-21 16:16:39 +00:00
Arve Hjønnevåg
e272a538dc am 06850f9c: am b50d0cd5: Merge "rootdir: Make trusty version readable by dumpstate" into lmp-mr1-dev
* commit '06850f9ccd9c7668a8ab80bdfea00c1b275b5af9':
  rootdir: Make trusty version readable by dumpstate
2014-10-20 22:09:27 +00:00
Arve Hjønnevåg
b50d0cd53f Merge "rootdir: Make trusty version readable by dumpstate" into lmp-mr1-dev 2014-10-20 21:53:59 +00:00
Arve Hjønnevåg
7770252a84 rootdir: Make trusty version readable by dumpstate
Change-Id: I761650d286b454f1fe01a585e7cd6ec769bfc527
2014-10-16 16:11:37 -07:00
Dmitriy Ivanov
976e1b6431 Remove libsigchain from LD_PRELOADs
Bug: 15345057
Bug: 15426766

(cherry picked from commit c9f9f35efa)

Change-Id: If54e1aeaa1e2abe061ac19666af4f4e058b81df2
2014-10-16 11:45:16 -07:00
Dmitriy Ivanov
484c55a534 am b307dcd8: resolved conflicts for merge of 3f95c89d to lmp-mr1-dev-plus-aosp
* commit 'b307dcd8715ea4ffa456d819e8e8812719d5e760':
  Remove libsigchain from LD_PRELOADs
2014-10-14 19:05:21 +00:00
Dmitriy Ivanov
b307dcd871 resolved conflicts for merge of 3f95c89d to lmp-mr1-dev-plus-aosp
Change-Id: Iac27dc93675c3111129fc594eaaff7f1d6f5c26f
2014-10-14 11:05:28 -07:00
Dmitriy Ivanov
1e2bec489c resolved conflicts for merge of 3f95c89d to lmp-dev-plus-aosp
Change-Id: I5184dcfa91a11a210c60e60a4fffc26d2c9f116f
2014-10-14 10:50:59 -07:00
Riley Andrews
49d1ba1743 am d1380d64: am 33b33549: Merge "Make the default cgroup, the foreground cgroup." into lmp-mr1-dev
* commit 'd1380d645de163d34a6e590f82eb0ee40d51f408':
  Make the default cgroup, the foreground cgroup.
2014-10-08 20:55:04 +00:00
Dmitriy Ivanov
c9f9f35efa Remove libsigchain from LD_PRELOADs
Bug: 15345057
Bug: 15426766
Change-Id: If0b7f59a59824e30aa0c33dad76c7a44932180de
2014-10-07 13:39:02 -07:00
Riley Andrews
522d72b702 Make the default cgroup, the foreground cgroup.
All kernel services will now be in the same cgroup as
foreground applications. This will now make kernel threads
not implicitly higher priority than android foreground
services.

Bug 17681097

Change-Id: I28e81c7aade50428d5395df86f00ce01c1e7af02
2014-10-07 19:24:54 +00:00
Mike Lockwood
157e3a4b22 am 6ee5d62a: am 67479c97: am 24e3e831: am 7569b7b3: Merge "Add bootanimation to audio group so it can play boot sound" into lmp-dev
* commit '6ee5d62ac00fa00d7b86072a7f19d58582a05d18':
  Add bootanimation to audio group so it can play boot sound
2014-10-06 19:48:28 +00:00
Mike Lockwood
7569b7b39f Merge "Add bootanimation to audio group so it can play boot sound" into lmp-dev 2014-10-06 18:40:46 +00:00
Mike Lockwood
7e58899bcf Add bootanimation to audio group so it can play boot sound
Bug: 17674304

Change-Id: I5d31bc024fa36fedac2c0ba5c4a8b100937183ad
2014-10-02 16:22:43 -07:00
Jesse Hall
ca8079fd05 am 9ef98912: am 5a9d721b: am 10b13131: am c263e671: Merge "init.trace.rc: fix race condition with class_start core" into lmp-dev
* commit '9ef989128059ce840178b8f19cde1183d32d9cee':
  init.trace.rc: fix race condition with class_start core
2014-10-02 21:35:37 +00:00
Fred Fettinger
331a939bf8 init.trace.rc: fix race condition with class_start core
The systrace permissions from init.trace.rc and the "class_start core"
which launches surfaceflinger are both in an "on boot" section. However,
the init.trace.rc commands are parsed after all commands in init.rc.
This means that "class_start core" is executed before the chmod command
which allows processes to write to trace_marker. If any services
execute their first trace command before the chmod occurs, then that
service won't be able to write traces until the service is restarted.

To fix this, run all of the init.trace.rc commands in the "early-boot"
section to ensure they are completed first.

Bug: 17612265
Change-Id: Ibf544762173d5ba98272c66ef485d8eab7d70bf3
2014-10-01 12:29:29 -07:00
Badhri Jagan Sridharan
da0500426f am 37441496: am 97b536f1: init.usb.rc: Change product id to for add only config
* commit '374414967a294db75c2706e691ba8b9af9aa1acb':
  init.usb.rc: Change product id to for add only config
2014-09-05 23:04:27 +00:00
Badhri Jagan Sridharan
97b536f1fb init.usb.rc: Change product id to for add only config
Change product id from D002 to 4EE7 when adb is the
only supported function

Change-Id: I8f6bcb9a1dc5ea6da0493a2dd730f9ac1f0bed24
2014-09-05 12:33:46 -07:00
Brian Carlstrom
074fc3ddfb am 68e0d185: am 24d2adba: am 188d4396: Merge "Change /dalvik-cache to be owned by root."
* commit '68e0d185f4640a8e1dc7b6d1aad17b51a802de37':
  Change /dalvik-cache to be owned by root.
2014-08-29 11:56:57 +00:00