Commit graph

12634 commits

Author SHA1 Message Date
Elliott Hughes
132440b087 Merge "Revert "Revert "Make init re-exec itself for its SELinux domain transition.""" 2015-04-24 19:33:21 +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
Elliott Hughes
34dd04dbb5 Merge "Improve bad error reporting seen in shamu SELinux boot failures." 2015-04-24 18:36:55 +00:00
Elliott Hughes
5e7dd4454f Improve bad error reporting seen in shamu SELinux boot failures.
Explain why mount failed, and explicitly say that the umount fixed it.

Change-Id: I13b0927a36517f2fc9f9580945ba6ebefc4882df
2015-04-24 11:05:48 -07:00
Tom Cherry
10936d1fdb Merge "init: consider all platform devices for find_platform_device" 2015-04-24 17:34:32 +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
Nick Kralevich
f0b4792017 Merge "Revert "Remove now-unusable 'setcon' command."" 2015-04-24 16:56:44 +00:00
Nick Kralevich
b862bd00a4 Revert "Remove now-unusable 'setcon' command."
Temporarily revert because device isn't booting.

This reverts commit 7b15ac99f3.

Change-Id: Ice986bac62e20c70f7bedf1744a617b97392ae8c
2015-04-24 16:55:16 +00:00
Elliott Hughes
659b7d633a Merge "Remove now-unusable 'setcon' command." 2015-04-24 04:01:59 +00:00
Elliott Hughes
fa66b4e136 Merge "Remove long-obsolete file." 2015-04-24 03:59:05 +00:00
Elliott Hughes
2a87d2b155 Remove long-obsolete file.
Change-Id: I728cc13b4a7ac93f9c923d2fc9bda2bb65ffe99d
2015-04-23 20:57:12 -07:00
Elliott Hughes
7b15ac99f3 Remove now-unusable 'setcon' command.
Bug: http://b/19702273
Change-Id: Icd340c80ba074476dcc63f1c1dd5c61a5c768893
2015-04-23 20:54:46 -07:00
Elliott Hughes
1a39a994d9 Merge "Correct magic number on umount2" 2015-04-24 03:21:43 +00:00
Elliott Hughes
d46567848b Merge "Make init re-exec itself for its SELinux domain transition." 2015-04-24 03:10:16 +00:00
William Roberts
4555b69f26 Correct magic number on umount2
The umount2 call was using the magic constant 2 which is
has a defined and proper macro in mount.h as MNT_DETATCH.

Change-Id: I4ca4a6d31cbf5495c545088e3d90a8894a9f912f
2015-04-24 01:13:35 +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
Tom Cherry
1225a61f0a init: consider all platform devices for find_platform_device
Certain platforms list their platform devices with a path other than
the current /devices or /devices/platform.  Additionally, sometimes
these paths are a platform device themselves.  An example are devices
with a path /devices/soc.0/... where /devices/soc.0 is also a platform
devices.

Instead of continuing to special case these path prefixes, we can
consider the entire path, given that no mmc or usb devices create
platform devices as subdevices, which they should not by their very
nature.

This keeps the symlinks for block devices named identically for
current platform devices and places them in /dev/block/<full path to
device> for devices in locations other than /devices or
/devices/platform, eg /dev/block/platform/soc.0/7824900.sdhci

This keeps the symlinks for character deviced named identically for
all cases.

Change-Id: Ifc8eedf1086db1826dbc8f7e96cdfcfa5da876b3
2015-04-23 15:04:06 -07:00
Mark Salyzyn
2ce1d81fd4 Merge "liblog: __android_log_is_loggable support Developer Options" 2015-04-23 21:06:31 +00:00
Mark Salyzyn
653f9581bf Merge "logd: per UID less aggressive 12.5% threshold" 2015-04-23 14:41:48 +00:00
Mark Salyzyn
40502e1a70 Merge "logd: ratelimit drop messages to 1/sec" 2015-04-23 14:30:44 +00:00
Elliott Hughes
876881b22a Merge "Add missing null checks after allocations." 2015-04-22 20:05:46 +00:00
Mark Salyzyn
e06a6e0f26 logd: ratelimit drop messages to 1/sec
Bug: 20334069
Bug: 20370119
Change-Id: I6f850aec46c4df1c99a5b1f28db75d071e134ad5
2015-04-22 11:58:37 -07:00
Mark Salyzyn
d717d805d4 logd: per UID less aggressive 12.5% threshold
Per-UID quota has a threshold of 12.5% of the total log size.
If less than that space is taken by the UID, then we
will not engage the pruning based on worst UID.

Change-Id: I9f15c9a26938f1115eb75e9c28ddb073e7680e06
2015-04-22 11:53:29 -07:00
Mark Salyzyn
1f028b2fdf liblog: __android_log_is_loggable support Developer Options
- If logd.tag.<tag> is not found, check if persist.logd.tag.<tag> is available
- Do not turn off the isLoggable functionality on "user" builds

Bug: 19544788
Bug: 17760225
Change-Id: I3fec67b547aa431438965519507033798398e1e1
2015-04-22 10:39:39 -07:00
Richard Uhler
f75f16a1dd Merge "Fix typos in comments" 2015-04-22 16:07:22 +00:00
Elliott Hughes
d4196ef887 Merge "Add a command to call libnetutils' do_dhcp." 2015-04-22 02:50:13 +00:00
Elliott Hughes
dc3b459ff9 Add missing null checks after allocations.
Bug: http://b/20317729
Change-Id: I62bb761d48ee59a1f4ddd0cdd0632432305ca2ca
2015-04-21 19:43:22 -07:00
Elliott Hughes
9ab372eb22 Add a command to call libnetutils' do_dhcp.
Useful for wifi bringup.

Change-Id: Ib1d1b1d15cb9ce57119457a780e169b8f98987c2
2015-04-21 19:31:43 -07:00
Elliott Hughes
0fb33b3c05 Merge "Plumb more of the error reporting through." 2015-04-22 01:20:36 +00:00
Elliott Hughes
1555147bc4 Plumb more of the error reporting through.
This doesn't fix the bug, but it does flatten the bug to the well-known
and long-standing "adb shell" doesn't return exit statuses, so when we
fix that, this one will fix itself.

Bug: http://b/20423886
Change-Id: I48351e46f05dd3f2f6e57f0df1d851333458d0ef
2015-04-21 17:58:55 -07:00
Elliott Hughes
9a0cea92c8 Merge "Add a couple more adb shell regression tests." 2015-04-21 23:35:06 +00:00
Elliott Hughes
8e6edc0d89 Add a couple more adb shell regression tests.
Bug: http://b/15479704
Change-Id: Id3e7f0df101ad61db509df313c13210a8bd8b124
2015-04-21 16:25:54 -07:00
Michael Wright
a75b3de2c2 Merge "Mark time conversion functions as constexpr" 2015-04-21 21:50:28 +00:00
Mark Salyzyn
088c4f3b8a Merge "logd: Statistics headers" 2015-04-21 20:13:15 +00:00
Badhri Jagan Sridharan
82b0f7ba92 Merge "adb: set sys.usb.ffs.ready to signal usb pullup" 2015-04-21 19:58:46 +00:00
Elliott Hughes
da60a30b86 Merge "Add a test for shell escaping." 2015-04-21 19:48:06 +00:00
Badhri Jagan Sridharan
5f97370bab adb: set sys.usb.ffs.ready to signal usb pullup
This change sets sys.usb.ffs.ready to 1 to
trigger configfs based enumeration.

Change-Id: I222495fc667cce59675579069d164b0b484f3653
2015-04-21 12:44:31 -07:00
Elliott Hughes
9f2944aab0 Merge "Remove dead code." 2015-04-21 19:34:34 +00:00
Elliott Hughes
d5ff3e9449 Remove dead code.
We weren't even building this.

Change-Id: I8b2afbc76d784a7b24bbe0be6502b9fbcf0b5c09
2015-04-21 12:24:50 -07:00
Elliott Hughes
0053bb3f1a Add a test for shell escaping.
Until I fixed this, we would fail this example:

  $ adb shell sh -c 'echo hello; echo world'
  hello
  /system/bin/sh:  echo world: not found

Bug: http://b/19734868
Change-Id: I11a437cd0c0362303028f23fbaa103611b75707e
2015-04-21 12:15:31 -07:00
Mark Salyzyn
5720d2c168 logd: Statistics headers
Answer to the question "Bytes or Lines?"

Change-Id: I352737265aeac63ea8d89e778d4222a9123bdf07
2015-04-21 10:54:34 -07:00
Elliott Hughes
6a2d5a34e8 Merge "Fix "adb sync" for devices without vendor and oem." 2015-04-21 17:53:08 +00:00
Elliott Hughes
d236d071b9 Fix "adb sync" for devices without vendor and oem.
Bug: http://b/20440110
Change-Id: I2481992198890f5ca50412c2b7ca361101961413
2015-04-21 10:17:07 -07:00
Elliott Hughes
e434ad1dd7 Merge "Always explain why bind(2) failed." 2015-04-21 16:52:21 +00:00
Elliott Hughes
14b65736c5 Merge "Use ' quoting to escape arguments." 2015-04-21 16:47:43 +00:00
Elliott Hughes
eb7d308a37 Merge "Remove a declaration for an unimplemented function." 2015-04-21 04:43:06 +00:00
Elliott Hughes
e886ba9c4e Remove a declaration for an unimplemented function.
Change-Id: I890cef52e9a8c26d98f227f269a7dcfcb6eaa795
2015-04-20 20:55:43 -07:00
Mark Salyzyn
76ed92c3c6 Merge "logd: better drop message merging" 2015-04-20 21:09:10 +00:00