healthd: charger: only reboot under NORMAL mode

If charger is not launched from normal poweroff charging,
we don't want device to reboot. Just leave charger process
to exit by itself but not reboot when not under NORMAL mode.

Change-Id: I9f6535042d7016e21d172d167069a134c8851fa6
system: core: increase the polling time for remount_ro

eMMC4.5 introduces an addition of cache on the device.
We experienced long flush durations in some of the devices,
and therefore the adb reboot resets the target before the flush
completes.

CRs-Fixed: 562350
Change-Id: I3f54901e12ffd232a7696dadfde1edec99ef91c6
init: Do not call recursive_restorecon on soc.0

During coldboot calling restorecon_recursive on soc.0 causes boot
time delays and failing the framework to bootup.Increase the coldboot
timeout to accomodate recursive restorecon on "/sys/devices/"

Change-Id: Ie364a3ca30db3a1344ea95def04f09660947a13f
Revert "healthd: charger: Support alarm in power off charging mode"

This reverts commit 0041eb9ba5643c99724fa92e79886deb5758c8e1.

Change-Id: I6920564d072c13d9219a90816f4a21bc5f5b63fd
healthd: Support alarm in power off charging mode

To implement this feature need to let the phone reboot some time
earlier than the alarm time.

Change-Id: I6505a99b51932ffa23518769f8fd4d2590021543
adb/fastboot: Support SuperSpeed USB devices

When enumerating USB 3.0 devices, a 6-byte SuperSpeed companion
descriptor follows each standard descriptor. The ADB and Fastboot
Linux clients currently fail to interpret these additional
descriptors and simply bail. Fix this by skipping over them.

Change-Id: I254dad8ed81e8de74a4fac36e8ce54b5da9715fe
Make tombstones directory to not follow symlink.

Use file descriptor to change ownership.

Change-Id: I3e00ccb8496d8d91bae9b78ce5e38e4cabd4a3d6
system: core: increase the polling time for remount_ro to 3600

eMMC4.5 introduces an addition of cache on the device.
We experienced long flush durations in some of the devices,
and therefore the adb reboot resets the target before the flush
completes.
Latest tests show that increasing it to 2400 wasn't enough thus
it was increased to 3600.

Change-Id: Ifbe7af16aa1861d0d57c808b0240361c0317d5c5
CRs-fixed: 581363
system: core: fastboot: Increase USB protocol buffer size to 1024

With USB3.0 SS support the max packet size supported by USB protocol
is 1024 bytes. When connected to a USB device in SuperSpeed, if only
512 bytes are sent at a time the device would interpret each transfer
as a short packet and slows down overall throughput. To accommodate
for SuperSpeed USB bulk endpoints, increase the buffer size to 1024.

Change-Id: I4f447fe38045bc0008e2d6dd3f36c2d6819d6c15
healthd: Treat Wipower charging as a form of Wireless Charging

Wipower charging is a form of Wireless charging where the
power path is via induction and control path goes over BT.

Change-Id: Ib2767d512394a0b4aef11a961a83872070a46cd8
Add torch light access permission to torch app

Add torch light access permission to torch app

Change-Id: Icf3eb08d75481fb70229887b76a8cdb5d3516944
init: Check for symlinks with lstat() not open()

Using open() with an O_NOFOLLOW flag will result in a file falsely
being determined to be a symlink if the open fails for another
reason.

For example, a character device that isn't ready due to the
underlying hardware not being initialized yet will fail to open()

An example of this are any CG2900 device files prior to
execution of ste-cg29xx_ctrl

This uses lstat() instead of open() with O_NOFOLLOW to check
whether a file is a symlink or not.

Change-Id: Ie0d8d94b426c84c29b1b04d41a4cc15536cb307c
Allow a device to define the max number of service groups in init.h

Certain proprieatary binaries (such as tcmd for instance) require
more than 12 supplementary service groups.  By definiing:
TARGET_NR_SVC_SUPP_GIDS := in BoardConfig this can now be changed
per device.

Change-Id: Iab853836a028147c051be21e39575635cb463dd1
Signed-off-by: dhacker29 <davidhackerdvm@gmail.com>
toolbox: new applet restart

- stop + start
- for the lazy.

Change-Id: Ie0ef0e27f5b7819a5575ece6b82c5813f4e38420
init: define BOARD_CHARGING_CMDLINE parameters

Change-Id: I722e49e2a13418bf887c361c85e9d102168ca973
healthd: Use project pathmap for recovery

Change-Id: Ifa71a7adfb3a3d897a6e24e7aa18388c364efb95