Fix assertion failure

Adding 0 items to vector causes assertion failure in _grow -> itemLocation

Change-Id: Ief232a9c12e2e43ee6c87a7a137fe8a94aa741d4
Unicode: Fix mismatched type initialization

Fixes the following:
system/core/libutils/Unicode.cpp:579:27: error: cannot initialize a variable of type 'const uint16_t *const' (aka 'const
unsigned short *const') with an rvalue of type 'char16_t *'
    const uint16_t* const u16end = dst + dstLen;
                          ^        ~~~~~~~~~~~~

Change-Id: I6b1c64d69bb78faeb0e7ae7b08afe05f426c7532
ueventd: fix a busy loop while reading uevents

Under certain conditions, poll() may raise the POLLERR
flag along with POLLIN, in which case the check for
(ufd.revents == POLLIN) results in an endless busy loop.

The following fix was applied to
hardware/libhardware_legacy/uevent/uevent.c
to fix a similar bug:

  commit 3aabb260ceef10377c31c9e45fb239247f5cfeba
  Author: Mathias Agopian <mathias@google.com>
  Date:   Mon Oct 1 14:53:18 2012 -0700

    fix a typo in uevent_next_eventi

    Bug: 7114973
    Change-Id: I15a4c714b59aeb1d02db00517d70b5f0e5ab22c2

Applying the same fix for two more poll loops in init
and ueventd.

https://android.googlesource.com/platform/hardware/libhardware_legacy.git/+/3aabb260ceef10377c31c9e45fb239247f5cfeba
Signed-off-by: houst0nn <houstonn@gmail.com>
Change-Id: I50693f6d3c904992ac4b8a9a14a83c7106e6b9e0
libsparse: deal with build warning messages

- mostly unused parameters
- read_all prototype not included

Change-Id: Ib7ee00614acab53a6bd6a64f7e26a8c13dbe6297

Conflicts:
	libsparse/output_file.c
Missing command from Android tooolbox

Problem:
Depending on the build variant (eng/user/userdebug), *some* feature
of the Android toolbox are enabled or not.

Depending on the order of the subsequent builds, the end results may
or may not content the expected features.

That's because one of the header file in toolbox (tools.h) is not
regenerated when rebuilding with a different variant.

Solution:
Create an additional dependency as a PHONY target to compare the actual
content of the header and update the header only when the content is
modified (between variant builds).

Change-Id: Ie6a274cab9a77eb2376a9494e9c17aae8ba0ee0b
Signed-off-by: Olivier Fourdan <olivier.fourdan@intel.com>
Signed-off-by: Guilhem IMBERTON <guilhem.imberton@intel.com>
Added transfer progress reporting for push and pull commands.

Added a new '-p' switch to the 'push' and 'pull' commands that outputs
the file transfer progress (bytes transmitted, total bytes, and % done).
This provides useful feedback when transferring large files, and also
makes it possible for other tools to easily monitor the progress of a
forked push/pull command.

Change-Id: Iee6f42f5bd41292e5bc80fba779f526f0072e356
Merge branch 'kitkat' of https://github.com/TeamHorizon/android_system_core into kitkat