Wei Wang
d61a7e2da4
Split fstab mount into 2 phases
...
This will make it possible to start some key services before mounting
data partition
Bug: 30118894
Change-Id: Ia9f8cc035de6cc0df9a61605864915efa0266d7f
(cherry picked from commit abfbec342f )
2016-09-06 21:04:26 +00:00
Elliott Hughes
87e43e1627
Merge "Use android::base::Readlink in init." am: 31ea86327e am: 72887a3ff4
...
am: 0a2148e34d
Change-Id: Ifcd35961c8bf6e5a34f70dbf1717190a519f0b3b
2016-09-02 19:46:38 +00:00
Treehugger Robot
31ea86327e
Merge "Use android::base::Readlink in init."
2016-09-02 19:37:02 +00:00
Marco Nelissen
558217ed43
Merge "Allow setting oom_score_adj for services spawned from init" am: b7aef300c4 am: 5969a3f780
...
am: 25e26708f6
Change-Id: I55c46391eb357a84fb9f1afc66227ef90a82d30b
2016-09-02 14:59:25 +00:00
Josh Gao
fe64538014
Merge "Revert "init: create /dev/urandom, /dev/random in first stage."" am: 37686d446d am: 8196f4cdd9
...
am: 1181a4a54c
Change-Id: Ib1080f9749ebca0aa7eb73380b1903d170b918bd
2016-09-02 08:52:05 +00:00
Josh Gao
4c8a76e250
Revert "init: create /dev/urandom, /dev/random in first stage."
...
This reverts commit ab4fbe1b4f .
Bug: http://b/31251721
Change-Id: I43e68d1bd819d0f9f7d107865a33ec892975d956
2016-09-02 08:39:39 +00:00
Josh Gao
b093053868
Merge "init: create /dev/urandom, /dev/random in first stage." am: 9baf4e94fa am: 344e2b307b
...
am: b9cd3c2213
Change-Id: Ief1121d9e0c8161dd975b9a9f4ce33fb0313cecf
2016-09-01 23:08:30 +00:00
Marco Nelissen
310f6704d0
Allow setting oom_score_adj for services spawned from init
...
(cherry picked from commit f7adf8e4739812a2a4f194b17f84f4b9df42d04b)
Bug: 29831602
Change-Id: I4d24264bb6e879935a0b2adbb2e49ddf458980cf
2016-09-01 08:23:28 -07:00
Josh Gao
ab4fbe1b4f
init: create /dev/urandom, /dev/random in first stage.
...
Create /dev/random and /dev/urandom in the first stage, so that when we
reexec, arc4random is available for libc initialization.
Bug: http://b/29622562
Change-Id: I5b2071539a17eec609faac91dc28b08eba5ff89b
2016-08-31 15:36:37 -07:00
Elliott Hughes
f39f7f1428
Use android::base::Readlink in init.
...
Bug: http://b/30988271
Change-Id: Ia0000e9dd7883c31ccbd54fc01bf585c3f8b3fa7
2016-08-31 14:44:41 -07:00
Jorge Lucangeli Obes
6ccc8323b2
Merge "Add description of 'namespace' option." am: 4588ed7b5f am: 52807711fe
...
am: ce44aa8487
Change-Id: Ib2ef76efd778706992057d8ecbc868e1a1bf65c5
2016-08-31 21:11:18 +00:00
Jorge Lucangeli Obes
cd2518c19c
Add description of 'namespace' option.
...
Bug: None
Change-Id: Ib71005eb9823c7511b07d4060d08411ce3d0a8f0
2016-08-31 15:23:44 -04:00
Elliott Hughes
0426ecaf82
Merge "Most accept/accept4 calls in system/core don't actually want the remote address." am: 299d64144b am: 8615d79d85
...
am: 66e5e2432a
Change-Id: I5d7b98fa3e9c2d8c16a1aa73e3d5a197dc150c2b
2016-08-23 23:14:44 +00:00
Elliott Hughes
8615d79d85
Merge "Most accept/accept4 calls in system/core don't actually want the remote address."
...
am: 299d64144b
Change-Id: I3fb9678dfed08f0b1d6e90e547ecae6cdcabc9a1
2016-08-23 23:03:20 +00:00
Elliott Hughes
3dcfa3fb1c
Most accept/accept4 calls in system/core don't actually want the remote address.
...
So don't write the extra code for it or waste the kernel's time
copying it around.
Change-Id: I93de64064c2d4fe58ba5b5322cfa69bf31a76dad
2016-08-23 12:50:00 -07:00
Hung-ying Tyan
1263097328
Merge "Mount /vendor and /odm early" am: 35569e9d68 am: 46bfc918d0
...
am: d1f49a43fd
Change-Id: I6dc53f60771ad0e660e248efdc1b13734fba3061
2016-08-18 05:10:41 +00:00
Hung-ying Tyan
46bfc918d0
Merge "Mount /vendor and /odm early"
...
am: 35569e9d68
Change-Id: I9b5360bf3036fa88e770d686ab06b8f4cff80d7c
2016-08-18 05:04:43 +00:00
Hung-ying Tyan
99c4a8a6b3
Mount /vendor and /odm early
...
Right now these two partitions are mounted in the fs stage of the init
process. As a result, many vendor/ODM files needed earlier in the boot
process (e.g., init.<hardware>.rc, fstab.<hardware>.rc,
uevent.<hardware>.rc, SELinux policy files etc) can only live on the root
partition.
To prevent vendors/ODMs from polluting the root partition, this patch makes
it possible to mount the vendor and ODM partitions in the first stage of the
init process. The fstab info of both partitions to be mounted early is
composed from new kernel cmdline arguments android.early.prefix and
android.early.fstab.
For example, with:
android.early.prefix=/sys/devices/1010000.msdc0/mmc_host/mmc0/mmc0:0001/block/mmcblk0/
android.early.fstab=mmcblk0p10+/odm+ext4+ro+verify\nmmcblk0p09+/vendor+ext4+ro+verify
the final fstab string will be:
/sys/devices/1010000.msdc0/mmc_host/mmc0/mmc0:0001/block/mmcblk0/mmcblk0p10 /odm ext4 ro verify
/sys/devices/1010000.msdc0/mmc_host/mmc0/mmc0:0001/block/mmcblk0/mmcblk0p09 /vendor ext4 ro verify
The android.early.prefix is optional. When it is missing, the final fstab
string will be directly converted from android.early.fstab.
This patch also makes sure that the early mounted partitions are dm-verity
enabled so that they are trust worthy to store system files.
BUG=27805372
Change-Id: I3cf32482a5ec65445ba3aedab2164c7ba8f12694
2016-08-17 17:21:35 +08:00
Josh Gao
7480771909
Merge "libcrypto_utils: convert to Soong." am: c1a9a21ffe am: 87ef590bc1
...
am: a1da027a3c
Change-Id: Ie693d3de13b0df24ea83e70af3fa385a77ed8b33
2016-08-08 18:39:23 +00:00
Josh Gao
87ef590bc1
Merge "libcrypto_utils: convert to Soong."
...
am: c1a9a21ffe
Change-Id: I9cf76646d4537750c4d4080234d3384fb307e610
2016-08-08 18:33:49 +00:00
Josh Gao
c1a9a21ffe
Merge "libcrypto_utils: convert to Soong."
2016-08-08 18:29:10 +00:00
Josh Gao
47763c3a09
libcrypto_utils: convert to Soong.
...
Bug: http://b/30708454
Change-Id: Iaad64272ced766f87e67f2877e990afccc558065
2016-08-05 18:07:36 -07:00
Elliott Hughes
3ad2ffc474
Move init's kernel logging into libbase. am: 7bc87a5a78 am: e2a7eb17b5
...
am: b7252fc35a
Change-Id: Ibfba937cede98ceb8f4b76d3a636e5b8035689c0
2016-08-05 00:35:29 +00:00
Elliott Hughes
e2a7eb17b5
Move init's kernel logging into libbase.
...
am: 7bc87a5a78
Change-Id: Ie5e359e8bd7dee4c0549072c7e955eeefe57d785
2016-08-05 00:30:00 +00:00
Elliott Hughes
7bc87a5a78
Move init's kernel logging into libbase.
...
This will let other stuff (such as adbd and recovery) use it too.
Bug: http://b/28467098
Change-Id: Idab51f438ed3edd6fe65a56c4b396eaff5f3833e
2016-08-04 16:09:39 -07:00
Elliott Hughes
54c7d892a1
Merge "Have init kill the process group." am: 9a5300fcb8 am: 963de55342
...
am: cb647e9318
Change-Id: I4e100673a6104adee4a2414fd694fd350013b934
2016-08-02 23:15:03 +00:00
Elliott Hughes
963de55342
Merge "Have init kill the process group."
...
am: 9a5300fcb8
Change-Id: I692c5fabfaea39e7ed6c9de5f6ad245330e3442c
2016-08-02 23:10:29 +00:00
Elliott Hughes
1e73024653
Have init kill the process group.
...
killProcessGroup actually works on cgroups. Kill the POSIX process
group ourselves.
Bug: http://b/29751426
Change-Id: I1a2808488510f4262811b6407bcd0948ad23bc60
2016-08-02 14:20:40 -07:00
Chih-Hung Hsieh
b143c9708c
resolve merge conflicts of d072ed3 to nyc-mr1-dev-plus-aosp
...
Change-Id: Ifdd67548e252fcd73833a9d017aa8205bf749f70
2016-08-01 13:44:54 -07:00
Chih-Hung Hsieh
4c4fa90462
Merge \"Fix clang-tidy performance warnings in syste/core.\"
...
am: 4efbce14b5
Change-Id: I84f6b0134fae6e9f40710f243f4825e3f31fa15f
2016-08-01 20:23:10 +00:00
Treehugger Robot
4efbce14b5
Merge "Fix clang-tidy performance warnings in syste/core."
2016-08-01 20:13:54 +00:00
Chih-Hung Hsieh
8f7b9e3d39
Fix clang-tidy performance warnings in syste/core.
...
* Use const reference type for parameters to avoid unnecessary copy.
* Suppress warning of not using faster overloaded string find function.
Bug: 30407689
Bug: 30411878
Change-Id: I6cfdbbd50cf5e8f3db6e5263076d3a17a9a791ee
Test: build with WITH_TIDY=1
Merged-In: Ie79dbe21899867bc62031f8618bb1322b8071525
2016-08-01 11:55:42 -07:00
Chih-Hung Hsieh
cfa32e2d5d
Merge \\\"Fix google-explicit-constructor warnings in system/core.\\\" am: 6dc68cb5f9 am: 89cc78b77f
...
am: e59bc67fa4
Change-Id: I28613acd85ddcbd0b6f285cdfe046b283b49bd83
2016-07-29 17:06:44 +00:00
Chih-Hung Hsieh
89cc78b77f
Merge \"Fix google-explicit-constructor warnings in system/core.\"
...
am: 6dc68cb5f9
Change-Id: I5a010465364b6e14423b19e8c0f9cffa58ee3152
2016-07-29 17:01:17 +00:00
Chih-hung Hsieh
6dc68cb5f9
Merge "Fix google-explicit-constructor warnings in system/core."
2016-07-29 16:57:17 +00:00
Felipe Leme
704fe2d628
resolve merge conflicts of 4acdde9 to nyc-mr1-dev-plus-aosp
...
Change-Id: I2ed3041dd979368f149b6fccc84621e56c118db8
2016-07-29 16:12:40 +00:00
Dmitry Shmidt
16efc4d63e
Merge \\\"ueventd: Remove verbose restorecon_recursive: message\\\" am: 345754313e am: 2d5dfa89ae
...
am: 45d9f24cd4
Change-Id: I4f981f795101ab784dfa42aa7de698d66a39baac
2016-07-28 22:25:40 +00:00
Dmitry Shmidt
2d5dfa89ae
Merge \"ueventd: Remove verbose restorecon_recursive: message\"
...
am: 345754313e
Change-Id: I8a65176acc859b59e96f22d39e095ce2d154d9cd
2016-07-28 22:19:18 +00:00
Felipe Leme
c64c982e72
Improved keychord logging.
...
Often a bugreport is accidentally triggered by the combo keys, but there
is nothing in the bugreport to confirm that action because init's
klog level is KLOG_NOTICE_LEVEL.
This change change keychord's INFO messages to NOTICE, and also logs the
case where a service was not launched because ADB was disabled.
BUG: 30440213
BUG: 30345559
Change-Id: I6ccadef1621cb41dcd15e7c1660366f0e147dc7a
2016-07-28 14:11:32 -07:00
Dmitry Shmidt
7eed474db4
ueventd: Remove verbose restorecon_recursive: message
...
Bug: 30478300
Change-Id: Ife69bb5644c3f65f3a256dc042ae1c7fbfb77729
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2016-07-28 13:55:39 -07:00
Elliott Hughes
a9f814239b
Merge \\\"Fix early init logging.\\\" am: 6d232ab4de am: 1cbd1f5016
...
am: 7e336c8fe5
Change-Id: Id22974510c241cc8b62c3737de36c1e5941420e3
2016-07-27 15:36:13 +00:00
Elliott Hughes
1cbd1f5016
Merge \"Fix early init logging.\"
...
am: 6d232ab4de
Change-Id: I437dd3b5243ca7854439c438093e94733579279e
2016-07-27 15:30:45 +00:00
Treehugger Robot
6d232ab4de
Merge "Fix early init logging."
2016-07-27 15:28:18 +00:00
Chih-Hung Hsieh
034c475931
Fix google-explicit-constructor warnings in system/core.
...
* Declare explicit conversion constructors.
* Add NOLINT for implicit conversion constructors.
* Fix also some misaligned indendations.
Bug: 28341362
Change-Id: Idf911f35923b408d92285cc1a053f382ba08c63e
Test: build with clang-tidy
2016-07-26 11:26:01 -07:00
Elliott Hughes
35f5d04620
Fix early init logging.
...
Remove the /dev/__kmsg__ workarounds (which can then be removed
from sepolicy), and fix confusion in the translation between
android-base logging and kernel logging priorities (in particular,
where 'notice' comes in the hierarchy).
Bug: http://b/30317429
Change-Id: I6eaf9919904b6b55bc402c20bf1a4ae269014bc7
Test: adb shell dmesg | grep init
2016-07-26 09:32:33 -07:00
Elliott Hughes
ef6975b675
Merge \\\"Improve init Service logging.\\\" am: c1d9ac1f85 am: b49e54b1d7
...
am: 3fca6fba2b
Change-Id: I63433c19e5cdad2299f39118d063d2067c5cd6d6
2016-07-26 15:27:04 +00:00
Elliott Hughes
b49e54b1d7
Merge \"Improve init Service logging.\"
...
am: c1d9ac1f85
Change-Id: I5eca381c0883015f1d043946db71c20635cc1784
2016-07-26 15:21:38 +00:00
Elliott Hughes
e18e7e5c43
Improve init Service logging.
...
Say which service.
Don't ignore setpgid failures.
Change-Id: Ifa8eba583cc3cbf3d26763977bf8c3c9835271c6
2016-07-25 18:18:16 -07:00
Jeff Sharkey
91404d9481
Merge \"Only restorecon CE storage after unlocked.\" into nyc-mr1-dev
...
am: 96f387e8c0
Change-Id: I3a1c31334d32e7bdff8e05558356d2833fcfb831
2016-07-18 16:06:34 +00:00
Amit Pundir
114a00ea03
Merge \\\"init: select usb gadget controller at run time\\\" am: 916f5e873e am: 91272bd435
...
am: aff2347646
Change-Id: Idbb3ed146b147300d8f472958a5b888c07f5a684
2016-07-15 23:01:34 +00:00