sr: Use pathmap for recovery

Change-Id: I6350618e1e04819d52f1049f9f2fb61c833a1b45
recovery: turn on the backlight in recovery mode

The backlight is not turned on by default in some devices. This leads to
nothing displayed in recovery mode.

Change-Id: Iae5b0440f79fdcb79e103744a242e12c96b02c00
sr: Add busybox, some extra tools, and setup adb

Change-Id: I80b0e2aa5eb7142eaa9f157709f4e029077d8dfa
Old-school Holo UX

Change-Id: Id10ec097c1a60beed5a3dce1e3ae8a3ac356ee76
recovery: Expose libminui as a shared library

Change-Id: Ia40adc82f9c00bfe6af8c813edd2683cfacd2ad7
sr: Add support for --sideload

Change-Id: I98e51efee82ceb5878613c16cd9fdb441f8cad02
sr: Puke out an /etc/fstab so stuff like Busybox is happy

 * And disregard special mount flags on purpose because of certain
   dubious packages which "exec busybox mount".

Change-Id: I163702c9bd7fca3d40676fd6d8476e8deb13acc0
sr: Fix the colors

Change-Id: I4986fee496610d90d56a9b97c77d7dc9d1008c72
Implement menu wrapping and scrolling.

Change-Id: Ie7a3fdfcd52ad12ea7e32bfc88d1b95efc31eae6
Add back and home key handling.

Change-Id: I5abac0f1b59d480b859f77ce16126f13fccd440b
recovery: Revenge of MiniVold

 * Vold has been refactored to be friendly to an environment such as
   recovery. Using Vold will eliminate many hacks and add previously
   unavailable features.
 * Link with libminivold and create a pseudo-binary to launch as a
   service in recovery.
 * Libvoldclient is an event-driven client for controlling the daemon.
 * Handles device hotplug and automatic mounting, if desired.
 * Manages USB storage
 * Can check and format volumes using any supported filesystem
 * Dynamically generate all storage paths
 * Dynamically refresh menus affected by storage changes
 * Fixed wall-of-compile-warnings and const-correctness in extendedcommands.c
 * Misc cleanups
 * Say goodbye to "apply /sdcard/update.zip". You have served us well.

Change-Id: I13a3d72493f8fce7c19f192f9e94ad22cb60a2d2

recovery: Don't enable UMS function unless needed

 * This causes problems with some hosts. Only enable the composition if
   the user actually turns UMS on.

Change-Id: I18b109a3416d55ef711d346685d46a93851da332

recovery: Don't automount external storage at startup

 * Do it for hotplug and on-demand only.

Change-Id: I9c0ca96203a8ff1f16fa42e31f426cd25bdaba1d

recovery: Add sdcard daemon

 * Our custom ext4 support for sdcards needs it.

Change-Id: Ie1c22c1d6a3255cbe3a7ff3c072243f4a5461a17

recovery: all vold loglines deserve newlines

Self-nominating for the most impactful commit CM has seen
since 2009.

Change-Id: I450167573b7cf6db1a92227aef7ff3ed95856dd5

recovery: only use vold format for exact path match

Otherwise when formatting /sdcard/.android_secure, it will be
matched to /sdcard and vold will format the entire /sdcard.

Change-Id: Ifc26121f982b391b4ccf582b6162ab76feb72cae

recovery: fix --update_package using legacy path

When using legacy path, recovery will not be able to mount the
correct device. Fix by resolving the symlink before installing.

Change-Id: Ibb268908458c49de09204a1a0ba3143e83ccc0c4

Don't link with minivold

Change-Id: I2c7b88c0f744e529240903803a3880b3c71ea5fb

sr: Minivold reincarnated

Change-Id: If8b301bbcd00f979805a56f6b960428f56f93074
sr: Add some additional tools

Change-Id: I7eec17b81447008d423f2f56f16aa540c8a10011
sr: Allow cancellation of sideload

Change-Id: I52de1e86f04d9312cbfeed74737d9422a610f93a
sr: voldclient: Add retry loop around initial connection

 * SR starts up faster than CW and vold might not be there. Add
   a few retries before exploding.

Change-Id: I9f20de780e0719604fa0ab59e98f53f6d850cebb
Enable optional swipe based touch controls

Enabled via BOARD_RECOVERY_SWIPE := true in BoardConfig.mk.
Does not interfere with hardware keys, they continue to work.

Patchset 1) Initial set
Patchset 2) change Board Config variable
            don't add if BOARD_TOUCH_RECOVERY set
Patchset 3) more ifdef's for all!
Patchset 4) moved instructions
            even more stuff ifdef'ed
            no more abs name issues
Patchset 5) clean up commit message
Patchset 6) Move things to swipe.c to clean up ui.c
Patchset 7) white space

Change-Id: Id9844c38c31bd1985dd78a6d1dd81e71aa1f87f3

Prevent scroll drifting in swipe recovery

Change-Id: I8179607517f55b2941924b5726e0e57b012f8e18

Swipe: make swipe thresholds uniform across devices

Devices with high screen densities require very small swipes to activate
a key. Make the swipe distance uniform across devices by using the screen
density from ro.sf.lcd_density and activating a key based on the following
thresholds:
  Left/Right swipe: 0.5in
  Up/Down swipe: 0.3in

Change-Id: I39fe4b1007a4e4784d3d7d26a392d78b1adf9462

sr: Port swipe controls to C++ and refactor a bit

Change-Id: I8869ac9babae90453036ad54ccc3fc1bb9e40f83

sr: Improve touch compatibility

 * Refcount BTN_TOUCH events for systems that send them
 * Also do some code cleanup

Change-Id: Ib45e31f66056690cf2258a443846751e44d0064b

sr: Change item headers since we always have swipe

Change-Id: I9c20d9dfa1015dfacdb827f4c4da0ca59faafbe9
sr: Add performance control

 * Crank it up when installing

Change-Id: I997d937901ff446834e6c479aaf629bee51de388
sr: datamedia support

 * Do not wipe /data/media when wiping /data.
 * Unless /data cannot be mounted, in which case format it.
 * Add "wipe media" command to wipe /data/media and the first primary
   external storage volume found, if any.

Change-Id: I8e63a002f37921f7a5897bb4a77af0c48b0c7d7d
update-binary: Add collect_backup_data function

Add a function to identify files being backed up during an update so
they can be managed when applying patches.

Change-Id: Ied18d569a396a7324148d6a93809683673a19403
sr: Add bu support

Change-Id: Ifd6f638553d2eff8bb43138067ef8b98af0c2520
sr: Initial dialog implementation

Implement two types of dialogs: info and error.  Info dialogs are intended
to show that an operation is in progress and cannot be interrupted.  Error
dialogs are intended to show that an error occurred.  The user must respond
by dismissing the dialog with any input (a swipe or keypress).

Dialogs may be initiated internally within the UI code or externally via a
named local socket.  Dialogs created via socket are presumed to be info
and may not be dismissed.  When the client socket is closed, the dialog
automatically dismisses.

Initial implementation shows dialogs for adb backup and restore.  Future
work will show dialogs for all errors and lengthy operations.

Change-Id: Icefea12ec0fd70fb487d54aa2eb1cae9dd451355