do not include dead code

This code has not been used for over 3yrs. Developers interested in its
origins, reference commit 4196e0fa5e0c6b2a27ee5626f4cfa22375ac6ea1 .

Change-Id: I588fa2fe4b92fa1508699a904d2be18b83b471c6
cleanup unused code

reset_ext4fs_info() is always called by make_ext4fs()

Change-Id: I48e75a7c55d21e4386bffa15d81aaeb702477df7
fix null struct exception

Change-Id: I9bf32849598c0725e2ce9a8a441bc41c6119c2bf
cleanup preserve data/media workaround

Change-Id: I634c9229368c6c8ea20cafb47c8c0403cae2be6c
Fix 'media' exception:

In CWM, a bug was preventing any path/file named media from being backed up
This patch will exclude only /data/media path and not other media files/folders

Change-Id: I8d998eca35d36e9877339182e8152d6cee0fde23
Support selinux context inside tar archive

New busybox update supports -p option to store selinux context inside tar

Change-Id: I38e2a194235e6b10d6ae040b6c93497136528186
f2fs: fix nandroid restore to f2fs partitions

Change-Id: I7bf243045748949766e0128662e66dfc04378d06
Match AOSP get/set_bootloader_message() layouts

No change in behavior, just matching AOSP's code layout. LOGE has been
changed to LOGI for "Cannot load volume /misc!" since many devices do
not define a /misc partition in fstab.

Change-Id: I53c440f820fd4614b0af79e9283baa8c48453373
Remove obsolete check on device_flash_type() before trying to read args from BCB

get_bootloader_args() has handled the case where the misc partition
doesn't exist or is an unknown type since 7501798f... ("Fix nullpointer
when recovery.fstab does not define a "misc" partition") all the way
back in 2010, and we use set_bootloader_args() below unconditionally
anyway.  Remove this obsolete check.

Change-Id: Ie25083a6d24cf918f72cc1cc13b181292c61d160
Version 6.0.4.9

This version marks the introduction of backup/restore support of
selinux contexts in dedupe and tar.

Change-Id: I76c2735343e5648a0d7b06e20f48bf3ac82026f9
fix compiler warnings

Change-Id: Ic3e5bbaf9824ef35a7a71209a5cd6bf868f96adb
fix segfault during shell nandroid backup/restore commands

Previously, to achieve a successful "adb shell nandroid backup" and
"adb shell nandroid restore [backup_path]", we have to disable
progress bar by manually removing '/sdcard/clockworkmod/.hidenandroidprogress'

Else, the recovery would crash with segfault

This patch disables progress bar update whenever ui is not initialized
adb shell nandroid backup/restore commands now work without any background hack

Change-Id: I525ceffffb1bad4ee8e62c3985e123dcda77c79e
Fixup nandroid-md5.sh with legitimate return code

The reason md5sum would return an error status code is because it was
being executed on . and .. paths. Only run md5sum on files and allow the
script to exit with an error status if md5sum fails.

Change-Id: Ieeaa5e65ab3cf6b6470815c3ec13cd3a8c8b6b5e
Only chmod backup/blobs directory if it exists

Change-Id: Ib1e250e8f77d84048a176f6ea896439a0454c512
enhance the progress thread update

- limit refresh interval to 200 msec for nandroid operations
- keep the progress background icon overlay updating for normal and
  indeterminate progress
- no more need to increment background icon overlay frames by caller

Change-Id: I643e30505f962ebbf67aae57baa06a296006e542
Refresh nandroid progress without on-screen text

* Remove display of files to ui - this was severely slowing backups
* Remove ui_nice functions since they are no longer used

Change-Id: Iaa8b6bc3989752016b296e6f087c64fc216e5f00
Enable cmdline nandroid backup of vold volumes

Issuing 'adb shell nandroid backup' just after recovery has started on a
device with vold managed primary storage will fail because vold has not
initd for nandroid. Let nandroid call vold_init. Subsequent calls to
vold_init should be of no concern since sock will be set and
vold_client_start() will return immediately.

Change-Id: I88b16ff0a8c5b058b58f81095f63374bfbf70b34
Progress thread: less aggressive redraw

In commit I643e30505f962ebbf67aae57baa06a296006e542 , 'enhance the
progress thread update', I incorrectly amended philz-cwm6's commit to
work around a theoretical issue of keeping the installer's spinning
cube rotating when no progress bar is shown. While my amendment works,
it keeps the progress_thread updating text and overlays even when
sitting at the menu. This is overly aggressive. Change the update
mechanism to only apply when the background installer image is visible.

Also, make ui_increment_frame() static since is is local-only now.

Change-Id: I2fa2f8a0704f562fb027ba4bee9b1b7d278da404
stop showing the background icon progress outside it's scope

Also, extend print_and_error() to act as a pass-through, returning the
original error code.

Conflicts:
	extendedcommands.c
	nandroid.c
	nandroid.h

Change-Id: I3d7ee71f627f871f64defe7902b91b762ca97d59
Code clean-up

* Alphebetize header includes
  - Files that exist at AOSP retain their ordering
* Add missing licensing headers
* Remove some obvious comments
* Whitespace cleanup
* Make local-only functions static
* Prototype static functions if used before defined
* Move non-functions just below header definitions
* Move edifyscripting functions to a new edify header

Change-Id: Ibb11baafa58c81a3673c6a03c5f631a241e1be3e