Commit Graph

21946 Commits

Author SHA1 Message Date
David Pursell 6e2adac0c7 Merge "fastboot: add TCP protocol."
am: 80dc9d8584

* commit '80dc9d85849b681280f963bc952f5f41c6dbfe59':
  fastboot: add TCP protocol.
2016-02-03 22:04:23 +00:00
David Pursell 80dc9d8584 Merge "fastboot: add TCP protocol." 2016-02-03 21:59:31 +00:00
David Pursell 2ec418a4c9 fastboot: add TCP protocol.
This CL implements a TCP protocol for use with fastboot. Protocol
description is given in fastboot_protocol.txt, some examples of
expected behavior can also be found in tcp_test.cpp.

Usage is:
  fastboot -s tcp:<hostname>[:port] <command>

Bug: http://b/26558551
Change-Id: If53a514a534489c617db32c4fea8819949121282
2016-02-03 13:57:45 -08:00
Colin Cross 60a472738b Merge "liblog: remove strdup from logging calls" am: a2dd73424f
am: b6ad690e17

* commit 'b6ad690e17f4b5e9f3ff624a360a6e226af8e113':
  liblog: remove strdup from logging calls
2016-02-03 21:55:47 +00:00
Colin Cross b6ad690e17 Merge "liblog: remove strdup from logging calls"
am: a2dd73424f

* commit 'a2dd73424f17c09e6a4482f085b40fddc6de83b3':
  liblog: remove strdup from logging calls
2016-02-03 21:53:40 +00:00
Colin Cross a2dd73424f Merge "liblog: remove strdup from logging calls" 2016-02-03 21:48:37 +00:00
Mattias Nissler e98d9a076d Merge "graphics: Include stddef.h for size_t." 2016-02-03 21:37:39 +00:00
Mattias Nissler 9cf80c6b40 graphics: Include stddef.h for size_t.
graphics.h uses size_t, but doesn't pull in a declaration. This results
in compile errors if code that includes graphics.h (such as
hardware/hardware.h) doesn't happen to have a size_t declaration from
elsewhere.

Change-Id: I0f3882c3dce20425697d25366d49930b2251ef7f
2016-02-03 22:24:53 +01:00
Mark Salyzyn 1186f3a5ad libcutils: ashmem check fd validity
- collect st_rdev on open, or when required, for /dev/ashmem.
- check in all cases if fd is a character device and matches rdev.
- requires that we have open, read and write access to /dev/ashmem
  to check, assumption being that if we can not, then we have no
  right playing with the associated misdirected file descriptor.

NB: ashmem libcutil library entry points can no longer be called in
    signal context.

Bug: 26871259
Change-Id: I9a17e33317a9be795131473a51c16f761b5f7407
2016-02-03 13:05:22 -08:00
Steve Fung d332779d9d Merge "crash_reporter: Fix paths for kernel panic collection" am: da1a9a277d
am: b4111adeea

* commit 'b4111adeeaa4ebbcdf5a440289d9a433f706847a':
  crash_reporter: Fix paths for kernel panic collection
2016-02-03 20:36:15 +00:00
Steve Fung b4111adeea Merge "crash_reporter: Fix paths for kernel panic collection"
am: da1a9a277d

* commit 'da1a9a277d6331d7663d7b0f68e1fd296950d499':
  crash_reporter: Fix paths for kernel panic collection
2016-02-03 20:34:18 +00:00
Steve Fung da1a9a277d Merge "crash_reporter: Fix paths for kernel panic collection" 2016-02-03 20:30:58 +00:00
David Pursell dfc0a5d840 Merge "fastboot: fix SocketMock send failures." am: e54ea1c12d
am: 91b4e68738

* commit '91b4e687388e9e90714412d09dd521593f03ef80':
  fastboot: fix SocketMock send failures.
2016-02-03 19:00:18 +00:00
David Pursell 91b4e68738 Merge "fastboot: fix SocketMock send failures."
am: e54ea1c12d

* commit 'e54ea1c12d7d793dceff2f8afdb9bf6461462d92':
  fastboot: fix SocketMock send failures.
2016-02-03 18:58:00 +00:00
David Pursell e54ea1c12d Merge "fastboot: fix SocketMock send failures." 2016-02-03 18:54:27 +00:00
David Pursell 2c094f7983 fastboot: fix SocketMock send failures.
Fixes SocketMock::ExpectSendFailure() to allow unit testing of errors
during send, and adds tests for ExpectSendFailure() and
AddReceiveFailure().

Also adds missing tests to make sure ReceiveAll() continues to read
until failure or all bytes have been read.

Bug: http://b/26157893
Change-Id: I67e7d6de8e8ec4a3b62a6b7d7217f7530862edf7
2016-02-03 10:43:01 -08:00
David Pursell f722c253e6 Merge "libcutils/fastboot: improve multi-buffer write." am: f6f800ef3c
am: ef0e01c346

* commit 'ef0e01c346b2f60b1941bf3335906de5996785d8':
  libcutils/fastboot: improve multi-buffer write.
2016-02-03 18:13:02 +00:00
David Pursell ef0e01c346 Merge "libcutils/fastboot: improve multi-buffer write."
am: f6f800ef3c

* commit 'f6f800ef3c4f7caef65f75bd6365a2045be488ea':
  libcutils/fastboot: improve multi-buffer write.
2016-02-03 18:09:24 +00:00
David Pursell f6f800ef3c Merge "libcutils/fastboot: improve multi-buffer write." 2016-02-03 18:03:00 +00:00
David Pursell b34e4a06ee libcutils/fastboot: improve multi-buffer write.
Fixes libcutils multi-buffer write interface to be more friendly and
hooks into it from the fastboot Socket class.

Bug: http://b/26558551
Change-Id: Ibb3a8428fc379755602de52722c1260f9e345bc0
2016-02-03 10:01:38 -08:00
Mark Salyzyn 95c220e6b7 Merge "init.rc: too many start logd" am: 989daeaf5b
am: d8e0e52099

* commit 'd8e0e520998e83ae16fcff317704bb6c00b7fb31':
  init.rc: too many start logd
2016-02-03 16:45:03 +00:00
Mark Salyzyn d8e0e52099 Merge "init.rc: too many start logd"
am: 989daeaf5b

* commit '989daeaf5b2f50d96da69ad476adf434522e35e7':
  init.rc: too many start logd
2016-02-03 15:51:31 +00:00
Mark Salyzyn 989daeaf5b Merge "init.rc: too many start logd" 2016-02-03 15:24:32 +00:00
Johan Redestig 3282861b68 Add support for USB_HVDCP chargers
and print a warning message containing the type
when the battery monitor fails to recognize a power supply.

Change-Id: I02ebd89736f7444f8bf7f28550afeec82d57e107
2016-02-03 13:45:54 +01:00
Andreas Gampe fcad79fe10 Merge "Init: add OTA directory" 2016-02-03 01:28:32 +00:00
Steve Fung 2bedc74553 crash_reporter: Fix paths for kernel panic collection
Fix the paths to the pstore mount and run data within
the kernel collector.

BUG=26774830

Change-Id: I68be0a28201cb73c3420166b2f4da77a1e586ca2
2016-02-02 16:14:52 -08:00
Mark Salyzyn 0604f6fbae init.rc: too many start logd
Bug: 26934873
Change-Id: Ia00da6253a50bedc8ba825df1cf641b86cdebeed
2016-02-02 16:01:17 -08:00
Paul Lawrence 1446f0f318 Merge "Remove code to handle non-default file encryption" 2016-02-02 23:16:02 +00:00
Elliott Hughes edbc3af294 Merge "init: Fix load_firmware error" am: f330e5462d
am: de0af89c82

* commit 'de0af89c8253ecda179c35cb8c62c592b91e46ae':
  init: Fix load_firmware error
2016-02-02 22:54:32 +00:00
Elliott Hughes de0af89c82 Merge "init: Fix load_firmware error"
am: f330e5462d

* commit 'f330e5462d200080d1694834282afadc018060e1':
  init: Fix load_firmware error
2016-02-02 22:47:36 +00:00
Elliott Hughes f330e5462d Merge "init: Fix load_firmware error" 2016-02-02 22:44:01 +00:00
Colin Cross 7a106f7c12 liblog: remove strdup from logging calls
strdup to a static pointer is unnecessary, strlcpy into a static buffer
instead.  Avoids allocations in the ALOG* path, allowing liblog to be
used by libmemleak.

Change-Id: Ie0986da27c1fc5eb8ce4ebb076b513be8e1ee676
2016-02-02 13:55:42 -08:00
Mark Salyzyn af86f6e093 Merge "libcutils: ashmem fortify and comply with Android coding standard" am: 0e0a4628f6
am: a9bb866861

* commit 'a9bb866861766305482757d90b9263dcd648b90e':
  libcutils: ashmem fortify and comply with Android coding standard
2016-02-02 21:40:59 +00:00
Mark Salyzyn a9bb866861 Merge "libcutils: ashmem fortify and comply with Android coding standard"
am: 0e0a4628f6

* commit '0e0a4628f6af7dc5f39d745098143699257dfbe6':
  libcutils: ashmem fortify and comply with Android coding standard
2016-02-02 21:38:19 +00:00
Mark Salyzyn 0e0a4628f6 Merge "libcutils: ashmem fortify and comply with Android coding standard" 2016-02-02 21:31:01 +00:00
Elliott Hughes 1ee7abd066 Merge "Start debuggerd as soon as logd is up." am: 1b729b3e04
am: 1ef5b78a2f

* commit '1ef5b78a2ffc471e5ac2e30b424f00d15d581a8c':
  Start debuggerd as soon as logd is up.
2016-02-02 21:12:49 +00:00
Elliott Hughes 1ef5b78a2f Merge "Start debuggerd as soon as logd is up."
am: 1b729b3e04

* commit '1b729b3e04b210d096ee2d447945f6b2c53b6029':
  Start debuggerd as soon as logd is up.
2016-02-02 21:10:47 +00:00
Elliott Hughes 1b729b3e04 Merge "Start debuggerd as soon as logd is up." 2016-02-02 21:05:56 +00:00
Elliott Hughes 2f74a5dae5 Start debuggerd as soon as logd is up.
Makes debugging early boot crashes easier.

Bug: http://b/26918597
Change-Id: I5bb883f1350ea5f7a545cb0e9f1034ecfcf47cdb
2016-02-02 13:03:41 -08:00
Mark Salyzyn c2d8aad8d7 libcutils: ashmem fortify and comply with Android coding standard
- sort header order and in groups
- remove all tabs, use only spaces
- use TEMP_FAILURE_RETRY in system calls
- preserve errno for -1 return

Bug: 26871259
Change-Id: I94fffbcaeba01fcc18a3ed07c02389c06c54d3b7
2016-02-02 12:38:06 -08:00
Dimitry Ivanov 4e9bda3873 Merge "Include icu4c libraries to the list of public libs" am: 17e33647f0
am: 819da66bec

* commit '819da66bec28c31d564ba695d4d32f1a4727cad1':
  Include icu4c libraries to the list of public libs
2016-02-02 20:10:12 +00:00
Dimitry Ivanov 819da66bec Merge "Include icu4c libraries to the list of public libs"
am: 17e33647f0

* commit '17e33647f0df458cd02e81751bd2e9eaac922009':
  Include icu4c libraries to the list of public libs
2016-02-02 20:08:08 +00:00
Dimitry Ivanov 17e33647f0 Merge "Include icu4c libraries to the list of public libs" 2016-02-02 20:03:28 +00:00
David Pursell 4659c63114 Merge "fastboot: socket testing improvements." am: f971b6a24b
am: fe12d889e4

* commit 'fe12d889e41b688a84b4727126fde66011ca0ae6':
  fastboot: socket testing improvements.
2016-02-02 19:44:03 +00:00
David Pursell fe12d889e4 Merge "fastboot: socket testing improvements."
am: f971b6a24b

* commit 'f971b6a24b2d785187cf98cb002b9aee9ab6b2a7':
  fastboot: socket testing improvements.
2016-02-02 19:41:21 +00:00
David Pursell f971b6a24b Merge "fastboot: socket testing improvements." 2016-02-02 19:36:44 +00:00
David Pursell c3a466960f fastboot: socket testing improvements.
(This code was originally part of a huge fastboot CL but has been split
out to try to make the CLs a little more manageable).

More prep for fastboot TCP and UDP implementations. This CL adds a
SocketMock class that makes it easy to mock out network behavior so we
can unit test the TCP and UDP protocols.

Also uses the new libcutils socket_get_local_port() to avoid hardcoding
a server port in unit tests.

Bug: http://b/26157893.
Change-Id: I1ba10f31e98d7349313fc15f240383d63378a8db
2016-02-02 11:29:10 -08:00
David Pursell 2fe3a0b7a4 Merge "libcutils: add multi-buffer socket send." am: d95ecfc432
am: d56499b21d

* commit 'd56499b21d1411a7c799cdad316fb2138db26a7c':
  libcutils: add multi-buffer socket send.
2016-02-02 19:25:52 +00:00
David Pursell d56499b21d Merge "libcutils: add multi-buffer socket send."
am: d95ecfc432

* commit 'd95ecfc432206d5408738bb7cbc6eb15e5827d91':
  libcutils: add multi-buffer socket send.
2016-02-02 19:23:51 +00:00
David Pursell e03df480b1 Merge "libcutils: add socket_get_local_port()." am: d90adbc45b
am: 9875e6c7e3

* commit '9875e6c7e318fe11a888b6b53c0472f5586410e4':
  libcutils: add socket_get_local_port().
2016-02-02 19:21:39 +00:00