Commit graph

20090 commits

Author SHA1 Message Date
William Roberts
43cbd0585b Merge "init: switch from android_ids to getpwnam"
am: 171504f

* commit '171504f8318b8d48c830bef3b9ff1451d76037b2':
  init: switch from android_ids to getpwnam

Change-Id: Idf79bfd2cf6436819447f12bce934329692012cd
2016-04-08 01:51:37 +00:00
Elliott Hughes
171504f831 Merge "init: switch from android_ids to getpwnam" 2016-04-08 01:42:09 +00:00
William Roberts
3792e6cf21 init: switch from android_ids to getpwnam
Start to move users of android_filesystem_config.h to use the
standard grp and pwd interface functions.

Advantages:
  * one copy of android_ids in libc, removing it from init objects.
  * immediately starts oem_xxx users and groups in rc.
  * future will support _named_ oem ids via backend improvements.

Change-Id: Ib1ae1e0cbdcaaf60deb3759681a6030b615c069c
Bug: 27999086
Signed-off-by: William Roberts <william.c.roberts@intel.com>
2016-04-07 13:38:36 -07:00
Mark Salyzyn
23702b538b Merge "init: turn off backlight when performing shutdown cleanup"
am: adf1cde

* commit 'adf1cdeda07acfa6fc96627f8d4fca5b98bb7428':
  init: turn off backlight when performing shutdown cleanup

Change-Id: I8267dbbca11d41042e51d3fb89355e46b5cf4a81
2016-04-05 23:11:11 +00:00
Mark Salyzyn
adf1cdeda0 Merge "init: turn off backlight when performing shutdown cleanup" 2016-04-05 23:03:22 +00:00
Mark Salyzyn
a98cc9c202 init: turn off backlight when performing shutdown cleanup
Try writing a "0" into:

- /sys/class/leds/lcd-backlight/brightness
- /sys/class/backlight/*/brightness

to turn off the backlight during shutdown cleanup.

Bug: 27506425
Change-Id: Ic8a44dc8909b303f24e14f71cfb43292df60efde
2016-04-05 15:56:27 -07:00
Mark Salyzyn
34dcdd8075 Merge "init: watchdog restarted during shutdown fsck"
am: 3443caa

* commit '3443caa2fe8bfd7ef0d1f2cac8fea4dc6530a9cf':
  init: watchdog restarted during shutdown fsck

Change-Id: I7b16347948ffb1b39cd787dc10056e56bfc3ed0c
2016-04-05 18:41:50 +00:00
Mark Salyzyn
3443caa2fe Merge "init: watchdog restarted during shutdown fsck" 2016-04-05 18:32:52 +00:00
Mark Salyzyn
ad575e04a1 init: watchdog restarted during shutdown fsck
Bug: 27506425
Change-Id: I40967068d18ce1a8cbaf0b750e7a7af6eab3e4e8
2016-04-05 11:31:14 -07:00
Elliott Hughes
9bf8f9efd4 Merge "Fix Condition::waitRelative."
am: 0d6bb55

* commit '0d6bb55a39c453785db67039fca5e72e75286d5e':
  Fix Condition::waitRelative.

Change-Id: I4536446eef6e2c9a0367e591aa4c811a15504410
2016-04-05 16:51:48 +00:00
Elliott Hughes
0d6bb55a39 Merge "Fix Condition::waitRelative." 2016-04-05 16:43:25 +00:00
Elliott Hughes
fd376b97f7 Fix Condition::waitRelative.
HAVE_PTHREAD_COND_TIMEDWAIT_RELATIVE has never been defined for LP64,
so let's have everyone use the same code path.

Also fix the possible overflow.

Bug: http://b/26944282
Bug: http://b/27918161
Change-Id: I51fc0ebb1f6b860dc62d721f8ebfbcf724ce66e7
2016-04-04 14:51:21 -07:00
Mark Salyzyn
29ae8de99c Merge "logcat: -f <non-existent-directory>/<filename> segfaults"
am: ba6de23

* commit 'ba6de23e97cbb8351fe5cc2cc4d698b11ad04797':
  logcat: -f <non-existent-directory>/<filename> segfaults

Change-Id: I8de9b9d8cabade33b1af9fc0918d1c881c93994d
2016-04-01 20:08:08 +00:00
Mark Salyzyn
ba6de23e97 Merge "logcat: -f <non-existent-directory>/<filename> segfaults" 2016-04-01 19:51:43 +00:00
Mark Salyzyn
c18c2130d0 logcat: -f <non-existent-directory>/<filename> segfaults
- Check if the result of opendir is NULL in lastLogTime
- Cleanup: alphabetically sorted long options, reserved
  an alias for --regex
- Add a unit test, non existent directory should return
  gracefully with an exit(1) and not SIGSEGV.

NB: This failure was with eng/debug feature logpersist
    turned on, /data/misc/logd/ directory was missing,
    deleted, or temporarily inaccessible.

Bug: 27954627
Change-Id: I60246a53b02fdd7e5490fe458b02ad7b14843584
2016-04-01 09:42:32 -07:00
Mark Salyzyn
24967e5f5e Merge "liblog: suppress pmsg on user builds"
am: 0858071

* commit '0858071cc4bf2314955936e0efb85cb528ab2d6f':
  liblog: suppress pmsg on user builds

Change-Id: I2f36bd72cd53c787b8ada6addec08e27cde87962
2016-03-31 21:04:24 +00:00
Mark Salyzyn
0858071cc4 Merge "liblog: suppress pmsg on user builds" 2016-03-31 20:57:36 +00:00
Erik Kline
012d35b7f0 Merge "Set IFA_BROADCAST during IPv4 RTM_NEWADDRs"
am: d709914

* commit 'd70991477392eb94c77c1680483cabd26befb50a':
  Set IFA_BROADCAST during IPv4 RTM_NEWADDRs

Change-Id: Id3b47656b716b2adfa531f857c4fa0cb325a971d
2016-03-31 07:08:08 +00:00
Erik Kline
d709914773 Merge "Set IFA_BROADCAST during IPv4 RTM_NEWADDRs" 2016-03-31 06:58:27 +00:00
Mark Salyzyn
79b5cd7a52 Merge "logcat: add --print flag"
am: a8ee1a3

* commit 'a8ee1a3c61f777d9313edd96a6efe263834921e8':
  logcat: add --print flag

Change-Id: I8ed67c33cf81854e0d8c895a52a5af23ac2bcd89
2016-03-30 23:38:18 +00:00
Mark Salyzyn
e24888c9f8 Merge "logcat: posixize and extend long arguments"
am: 6dcecd9

* commit '6dcecd9d1cd78fc03012c52b2474cf3ddcb79fd0':
  logcat: posixize and extend long arguments

Change-Id: I8382b2544ba1d489dd3645bc723adb284a7f00a7
2016-03-30 23:32:35 +00:00
Mark Salyzyn
8dc8e5d104 Merge "logcat: support --regex on binary buffers as-is"
am: c812057

* commit 'c81205788c38a8b2987d92d257e3495796380ff0':
  logcat: support --regex on binary buffers as-is

Change-Id: I4f6db00eb9edf02c92d5496de52d6d17531b2eca
2016-03-30 23:32:35 +00:00
Mark Salyzyn
a8ee1a3c61 Merge "logcat: add --print flag" 2016-03-30 23:30:59 +00:00
Mark Salyzyn
6dcecd9d1c Merge "logcat: posixize and extend long arguments" 2016-03-30 23:29:18 +00:00
Mark Salyzyn
c81205788c Merge "logcat: support --regex on binary buffers as-is" 2016-03-30 23:27:56 +00:00
Mark Salyzyn
d0ab681128 Merge "logcat: do not assign 0 or NULL to global variables"
am: df1d03e

* commit 'df1d03e5dc5754b283b9e0caa60ba301048d073f':
  logcat: do not assign 0 or NULL to global variables

Change-Id: I5301b9089849d43351b0c61f8bdcaba3d1c0867d
2016-03-30 23:25:14 +00:00
Mark Salyzyn
df1d03e5dc Merge "logcat: do not assign 0 or NULL to global variables" 2016-03-30 23:18:30 +00:00
Mark Salyzyn
c9202777cf logcat: add --print flag
To be used in combination with --regex and --max-count flags
to allow all prints to pass through, but still stop when
max-count is hit.

Bug: 27706081
Change-Id: Idaa9f0b44586a885b9d9f367824b0072c0853227
2016-03-30 16:11:37 -07:00
Mark Salyzyn
d85f6461b6 logcat: posixize and extend long arguments
- change _ to - for long arguments
- added --tail as hidden undocumented alias for -t
- added --head as hidden undocumented alias for --max-count

Bug: 27706081
Change-Id: I614cc83ae56b305b267f64ed05dc3ed3027dabd4
2016-03-30 16:11:37 -07:00
Mark Salyzyn
aa730c1145 logcat: support --regex on binary buffers as-is
- Do not restrict regex on LOG_ID_EVENTS or LOG_ID_SECURITY.
- some logcat_panic messages need to incorporate a newline.
- deal with some coding standards issues.

Bug: 27706081
Change-Id: Ie647fd62d027b01004177559d68b8e5a346705e6
2016-03-30 16:11:37 -07:00
Mark Salyzyn
c6d6652df5 logcat: do not assign 0 or NULL to global variables
Bug: 27706081
Change-Id: If29d8d688ca7cce9b22227eeff1e9b500e728a50
2016-03-30 16:11:37 -07:00
Josh Gao
437911ec87 Merge "debuggerd: set the name of the signal sender."
am: 3d0a87b

* commit '3d0a87bd5bfe8b1c66d5cbaec5685a9e5ec80938':
  debuggerd: set the name of the signal sender.

Change-Id: I8b4134dfaaeeab8f7b83f28d9dde758d8b372d9e
2016-03-30 18:01:33 +00:00
Josh Gao
3d0a87bd5b Merge "debuggerd: set the name of the signal sender." 2016-03-30 17:52:05 +00:00
Dan Austin
4e3976417b Merge "Address const issues in preparation for libcxx rebase."
am: b2cb35e

* commit 'b2cb35ef96b6d1cc03c6c39a57a4eb9b6484e100':
  Address const issues in preparation for libcxx rebase.

Change-Id: I1c2236db56c9fee2d1c9e9dcff8a61dca2cac303
2016-03-30 17:48:22 +00:00
Dan Austin
61e5a6625d Merge "Address const issue in preparation for libcxx rebase."
am: a2a13e3

* commit 'a2a13e3267850b4eaf2689b0e02cc499228b7bf5':
  Address const issue in preparation for libcxx rebase.

Change-Id: Ia54835c35695ae76b3c093adfb256bab2446ff65
2016-03-30 17:48:20 +00:00
James Hawkins
6da6ad9ffa Merge "bootstat: Two changes to aid in debugging TimeSinceFactoryReset."
am: a348dfc

* commit 'a348dfcd651d8410bba41cde63c45e3c4d760d5a':
  bootstat: Two changes to aid in debugging TimeSinceFactoryReset.

Change-Id: I4f91e3ac286ce02885089ac63cd0201f996b53c9
2016-03-30 17:48:19 +00:00
Dan Austin
b2cb35ef96 Merge "Address const issues in preparation for libcxx rebase." 2016-03-30 17:40:15 +00:00
Dan Austin
a2a13e3267 Merge "Address const issue in preparation for libcxx rebase." 2016-03-30 17:40:01 +00:00
James Hawkins
a348dfcd65 Merge "bootstat: Two changes to aid in debugging TimeSinceFactoryReset." 2016-03-30 17:13:42 +00:00
Erik Kline
06cb8e9203 Set IFA_BROADCAST during IPv4 RTM_NEWADDRs
Bug: 27194345
Bug: 27732412
Bug: 27786864
Change-Id: I5a5b41422bbaab4582c268c213b788f61cb0e169
2016-03-30 20:06:36 +09:00
Nick Kralevich
699b115be3 Merge "init/builtins.cpp: Switch to finit_module"
am: b3cf2e0

* commit 'b3cf2e0f3d3b9ba328921cd1c9c3839ea70a1ab1':
  init/builtins.cpp: Switch to finit_module

Change-Id: I23d53bb70856016968c58a417b9299be572392a7
2016-03-30 02:14:09 +00:00
Nick Kralevich
b3cf2e0f3d Merge "init/builtins.cpp: Switch to finit_module" 2016-03-30 02:07:09 +00:00
Sami Tolvanen
e4052d2ca5 Merge "mkbootimg: use int for os_version and os_patch_level"
am: adbe06d

* commit 'adbe06db4870e9829ddc8c702f8789df6f2401b1':
  mkbootimg: use int for os_version and os_patch_level

Change-Id: I23125c4f1842491effa903b2e30aee07664a6b98
2016-03-30 01:36:59 +00:00
Sami Tolvanen
adbe06db48 Merge "mkbootimg: use int for os_version and os_patch_level" 2016-03-30 01:25:28 +00:00
Josh Gao
f3dde2f869 debuggerd: set the name of the signal sender.
Change-Id: I6bff938e229d2368250d4b5c268fa24bd4badea0
2016-03-29 17:56:47 -07:00
Nick Kralevich
124a9c97e9 init/builtins.cpp: Switch to finit_module
Switch insmod from using init_module to finit_module. From
"man finit_module":

  The finit_module() system call is like init_module(), but reads the
  module to be loaded from the file descriptor fd. It is useful when the
  authenticity of a kernel module can be determined from its location in
  the file system; in cases where that is possible, the overhead of
  using cryptographically signed modules to determine the authenticity
  of a module can be avoided.

finit_module is preferred over init_module because it allows LSMs, such
as SELinux, to perform a permission check on kernel module loads based on
the file from which the module is loaded. This functionality is not yet
implemented in the Linux kernel, but is on the SEAndroid TODO list.
See https://bitbucket.org/seandroid/wiki/wiki/ToDo

Bug: 27824855
Change-Id: Id0ea88cd1930393c8c73ce38e63d5b2eeadf946a
2016-03-29 16:53:08 -07:00
James Hawkins
fff95ba5dd bootstat: Two changes to aid in debugging TimeSinceFactoryReset.
* Also log to the BootEventRecordStore to check lossiness.
* Log factory_reset_current_time_failure separately.

Bug: 27550578
Change-Id: Id3d579a74a59ac28290cb7d6048765519f9ba59b
2016-03-29 16:13:49 -07:00
Sami Tolvanen
294eb9dac3 mkbootimg: use int for os_version and os_patch_level
The parse_int function attempts to interpret the string to detect
base, which leads to it assuming strings starting with 0 are base
8. This obviously fails for certain dates, so use int instead.

Bug: 27498078
Bug: 22914603
Change-Id: I50b1fb3d7876f2ec17d00649cc9a2d23af2aec2b
2016-03-29 16:06:37 -07:00
Mark Salyzyn
7ef5249afa liblog: suppress pmsg on user builds
- add optimized & cached LIBLOG_HIDDEN __android_log_is_debuggable()
- check when writing, either LOG_ID_SECURITY, SafetyNet or
  debuggable when pushing content to the pmsg buffer.

Bug: 27566046
Change-Id: I85f1b55ec329b38e00f4183836b6ed53046c323d
2016-03-29 13:52:21 -07:00
Mark Salyzyn
f44cb4c6cb Merge "liblog: gate write on log id available"
am: fbdbf10

* commit 'fbdbf100cb48f18d308c96f1959945cf7d1909ec':
  liblog: gate write on log id available

Change-Id: Ia715fa8f520a9f7893c07a06eca4cacd2962e9cb
2016-03-29 19:57:53 +00:00