Touch: slot and tracking updates

Discard type A MT slots if type B MT tracking ID sent: Some devices send
an initial ABS_MT_SLOT event before switching to type B events, so
discard any type A state related to slot.

Track whether ABS_MT_TRACKING_ID was seen in the current sequence to
differentiate between vkeys and hardware keys.

Change-Id: I7ca3bfa4bd82d05ef7f7a208e954898b88bf3865
fix unnecessarily slow writing of EMMC partitions

These were attempts to write partitions "conservatively" in hopes of
fixing the problems with writing the radio partition on Nexus 4.  They
didn't work (a kernel patch was needed), but got left in.  They make
writing of partitions unnecessarily slow (ie, we really shouldn't need
to sync() after every 4kb).  Roll back most of them, but leave the
verification read-back in.

Change-Id: I94badc0979e88816c5aa0485f6316c02be69173c
Tell vold to use the fstype defined in fstab when formatting

If, for whatever reason, a voldmanaged volume had a different filesystem
than the one defined in the fstab, then this filesystem was kept when
formatting. Change the logic to use the filesystem defined in the fstab when
available.

Change-Id: Iffbb5dc42838c1585c21f3ffa66b16921a16abd5
Fix BOARD_RECOVERY_BLDRMSG_OFFSET CFLAG

Including BOARD_RECOVERY_BLDRMSG_OFFSET in BOARD_RECOVERY_DEFINES turns
the define into a string. We need BOARD_RECOVERY_BLDRMSG_OFFSET to be an
int.

Change-Id: Ib75dec0123e6fb318c4c8192645485683c6a5075
ADB sideload command not work

In kernel(3.10) USB ADB gadget driver is removed.
Using Functionfs for USB adb gadget.

Android recovery uses a stripped down version
of adb command for sideload only. It's missing
the ffs function support, so add the ffs
support to allow sideload command to work

b/12608946

Change-Id: I4ad024723dfc5bdb544548391f99637c390b171e
Signed-off-by: Pierre Couillaud <pierre@broadcom.com>
recovery: Fix adb with linux 3.10

In kernel 3.10, f_adb has been removed and adbd can use functionfs
instead. Mount functionfs on boot for adbd. On older kernels, mount
will fail silently and adbd will revert to f_adb.

Change-Id: I5db57aaf35b35859ea88c7d0e0661d8c553e5811
Version 6.0.5.1

Notable changes since 6.0.5.0:
* Fix /misc partition erase on recovery start
* Set SELinux contexts for init and services
* Minor touch updates
* Better vold formatting logic
* Compatibility updates for adb and 3.10 kernels

Change-Id: Ie6035fb706b50be1b78ed09c237644fdd091cce8
version 2.7