recovery: fix sideload cancel

Change-Id: I76fcea55cc38edc713211742890b00acf8de4117
Reverse kang Wil Wheaton Recovery enhancements.

Change-Id: Ia9eace0ff0826801515b335ac6543c1271948612
6032

Change-Id: Ieb03cb1b06e3a9a2eaab61ac3d6c2e02922cea4c
Merge "recovery: fix sideload cancel" into cm-10.1
Delete sideloaded file once installed

If not deleted, it will be unexpectedly re-installed in case
the user starts and then cancels adb sideload.

Change-Id: Idfea3b5d5c95ab29fd946cd404d1255105105ce3
Rename prebuilt recovery su to su.recovery, so it does not interfere with devices that have a shared recovery/boot.

Change-Id: Id542215a31c4617e230474b65ecf54bbc8117d4e
revert mmcutils. cleanups and fixes.

Change-Id: I2b0c3918528e5f7e6f4d2f8df1592c55f98317d3
add getprop

Change-Id: Id7a87626d2351d49750e9982d6f81d2646d9d36d
recovery: Fix adb backup

Using http://goo.gl/6AQ3u might fail. The resulting backup
consists of a tarball of the filesystem being backed up,
but it might end up truncated, for reasons yet unknown.

Issuing adb backup data, for instance, causes recovery to
call tar, streaming it's stdout <a> through a socket <b>.
The adb client reads from <b> and copies what it to the
final backup file.

Somehow, sometimes, not all the content generated at <a> is
read at the adb client, which causes a truncated tar file
to result. I'm unsure why this happens: Doesn't <a> get
flushed before <b> is closed? Or is it that <b> is closed
with outstanding data in its buffers, which never make it
to the other side?

Either calling sync() or sleep() seems to remedy the issue,
but I'm not sure if sync() has any effect on sockets or
pipes. I also understand that sleeping for some time is not
the best solution to a race condition.

Therefore, I'm adding calls to sync() and sleep() and
waiting for reviews from someone who knows better how
these calls work.

Patch set 2: Remove sync() call

Change-Id: If4733066fdad809eb73e87c670f37acc4debe82d
Remove (un)mount option for datamedia partitions

When /sdcard is /data/media, it can be formatted but it cannot be
mounted/unmounted independently of /data (aside from creating or
destrying the symlink). This removes /sdcard from the mountable
volumes list, but leaves it as a formattable partition.

Change-Id: If59e4516a12da4589ffb0dbd19702f219260370e
Fix recovery filesystem table output to log

Use fprintf when printing to a specified stream.

Change-Id: I863e3b570e3cf560deec9e8bb39cb339f40ae94c
Fix compiler warning: redefinition in extendedcommands.c

ITEM_APPLY_SDCARD is already defined in recovery_ui.h, fortunately
also as 1.

This suggestion comes from Phil3759.

Change-Id: I9ac370ca9640d61b6b96f60954d35f7aa458d75b
support version 2 (2048-bit e=65537) keys in recovery

Signed-off-by: Chirayu Desai <cdesai@cyanogenmod.org>
Change-Id: I9849c69777d513bb12926c8c622d1c12d2da568a
Merge "recovery: Fix adb backup" into cm-10.1
Merge "Remove (un)mount option for datamedia partitions" into cm-10.1
Merge "Fix compiler warning: redefinition in extendedcommands.c" into cm-10.1
move "install zip from sideload" to installation submenu

* Also includes the below commit:

fix installation from internal sdcard

bug introduced in previous commit

Change-Id: If41d409801e9a58df9515ac783bf503f80909d3e

* I've done some minor changes to the original commit,
  which includes but is not limited to moving the
  "install zip from sideload" above "/sdcard/update.zip".

Signed-off-by: Chirayu Desai <cdesai@cyanogenmod.org>
Change-Id: I27a763a0d41085719a6c7d9c3b8a20fbcae4b072
Fix the potential segmentation fault

Extral newline can trigger recovery segmentation fault
Test case:
host$ adb shell 'echo -en "--update_package=ota_update.zip\n--show_text\n\n" > /cache/recovery/command'
host$ adb reboot recovery

Change-Id: If1781c1f5ad94a273f1cb122b67cedd9fb562433
Signed-off-by: Jin Feng <jin88.feng@gmail.com>
recovery: use just the mount point instead of the full path

When resorting to using mount because a block device uses 'auto'
filesystem, we should use the mount point and not the full path.
This fixes an issue with nandroid to external sd on yuga.

Change-Id: Idbff944ea6d5af9112644c2ed46e23ea0a33e5ee
Merge "recovery: use just the mount point instead of the full path" into cm-10.1