Revert "adb: do not chown/chmod files pushed to sdcard"

This reverts commit cce64d4cb8c7ade0c8fc0ad654632a14a4229f2a.

Change-Id: I9c5d63a72501fc570e1a872807e4236de31f77a3
(cherry picked from commit 1a16228945eb5e69222dd4248943ab08a6be6458)
Fix "adb push /sdcard/filename"

Don't assume that calling chown(filename, getuid(), getgid())
will always succeed. In the case of /sdcard, a file you create
will be owned by root, so the chown call will fail.

Instead, use uid=gid=-1 so that the chown call is truly a no-op.

Ignore the results of calling chmod. Again, for /sdcard, the
chmod call will never succeed, because the file isn't owned by
the shell user.

Bug: 12441485
Change-Id: I11eaf1d6f6049c1158afc29754fbb7af2baf2c78
(cherry picked from commit e1473e4c15c3e719344b2b1be4a73d5c62549fd1)
restorecon /data/misc/media.

Otherwise it will be mislabeled on upgrades with existing userdata.

Change-Id: Ibde88d5d692ead45b480bb34cfe0831baeffbf94
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
(cherry picked from commit b73075da5272d2b08fa29c6a3bc798c716c04daf)
adb: Allow configuring the adb shell with a persistent property.

To set to bash: setprop persist.sys.adb.shell /system/xbin/bash

Change-Id: I24e65f4592aaf23356c13db02c9869076df3b841
(cherry picked from commit 220325a52533de959173d0ac4fb2d0b9e7a3099d)
Add DC-HSPA+ TCP buffer sizes

Change-Id: I5e7ca981ed79a3563215dd7fcef3504c39e973d5
(cherry picked from commit 8f56bc13561d249249db7c4d83c4fc00f8f23f4a)
fs_mgr.c: fix i++ error and optimize code

Change-Id: I4d7c9846143ec5b9f76af42c7ee4d5a7c2a3fd6d
(cherry picked from commit a82e3c740c6fd04b72c580c89ff2bfa247b9e107)
Fix overflow in adb_client

Credit: Joshua Drake
Bug: 12060953

(cherry picked from commit e89e09dd2b9b42184973e3ade291186a2737bced)

Change-Id: I8a9b2592a5e4f7527c607abfe4ea6df6eb550aa8
(cherry picked from commit 255856c7fd2967dbde1d31a409212dcb056a97f9)