init: Fix memory corruption when sanitizing platform paths

This commit fixes code that incorrectly increments s when it
hits the terminator character of the string being sanitized.
This means it will randomly start trashing memory beyond the
end of the string being sanitized until it happens to hit two
NULs (\0\0) which will break it out of the loop.

Change-Id: I76553d7f183236a78a0bc7b408e92559b98f732f
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
Add torch light access permission to torch app

Add torch light access permission to torch app

Change-Id: Icf3eb08d75481fb70229887b76a8cdb5d3516944
toolbox: new applet restart

- stop + start
- for the lazy.

Change-Id: Ie0ef0e27f5b7819a5575ece6b82c5813f4e38420
Revert "healthd: charger: Modify charger unplug shutdown time to 1s"

This fixes hammerhead off mode charging and shouldn't bother
other devices.

This reverts commit 2e8628e9685c62b2cf881ba9f5aef406713f0175.

Change-Id: Ibe6477884d22e37981a3c5549a3a72aae1963152