Merge branch 'cm-14.0' of git://github.com/CyanogenMod/android_vendor_cm into HEAD

This commit is contained in:
Steve Kondik 2016-10-26 17:08:11 -07:00
commit 2fd50c4369
2 changed files with 12 additions and 6 deletions

View file

@ -761,7 +761,7 @@ function repodiff() {
function _adb_connected {
{
if [[ "$(adb get-state)" == device &&
"$(adb shell test -e /sbin/recovery; echo $?)" == 0 ]]
"$(adb shell test -e /sbin/recovery; echo $?)" != 0 ]]
then
return 0
fi
@ -789,7 +789,8 @@ function dopush()
if (adb shell getprop ro.cm.device | grep -q "$CM_BUILD") || [ "$FORCE_PUSH" = "true" ];
then
# retrieve IP and PORT info if we're using a TCP connection
TCPIPPORT=$(adb devices | egrep '^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+:[0-9]+[^0-9]+' \
TCPIPPORT=$(adb devices \
| egrep '^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\-]*[A-Za-z0-9]):[0-9]+[^0-9]+' \
| head -1 | awk '{print $1}')
adb root &> /dev/null
sleep 0.3
@ -812,16 +813,20 @@ function dopush()
# Install: <file>
if [ `uname` = "Linux" ]; then
LOC="$(cat $OUT/.log | sed -r 's/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]//g' | grep '^Install: ' | cut -d ':' -f 2)"
LOC="$(cat $OUT/.log | sed -r -e 's/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]//g' -e 's/^\[ {0,2}[0-9]{1,3}% [0-9]{1,6}\/[0-9]{1,6}\] +//' \
| grep '^Install: ' | cut -d ':' -f 2)"
else
LOC="$(cat $OUT/.log | sed -E "s/"$'\E'"\[([0-9]{1,3}((;[0-9]{1,3})*)?)?[m|K]//g" | grep '^Install: ' | cut -d ':' -f 2)"
LOC="$(cat $OUT/.log | sed -E "s/"$'\E'"\[([0-9]{1,3}((;[0-9]{1,3})*)?)?[m|K]//g" -E "s/^\[ {0,2}[0-9]{1,3}% [0-9]{1,6}\/[0-9]{1,6}\] +//" \
| grep '^Install: ' | cut -d ':' -f 2)"
fi
# Copy: <file>
if [ `uname` = "Linux" ]; then
LOC="$LOC $(cat $OUT/.log | sed -r 's/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]//g' | grep '^Copy: ' | cut -d ':' -f 2)"
LOC="$LOC $(cat $OUT/.log | sed -r -e 's/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]//g' -e 's/^\[ {0,2}[0-9]{1,3}% [0-9]{1,6}\/[0-9]{1,6}\] +//' \
| grep '^Copy: ' | cut -d ':' -f 2)"
else
LOC="$LOC $(cat $OUT/.log | sed -E "s/"$'\E'"\[([0-9]{1,3}((;[0-9]{1,3})*)?)?[m|K]//g" | grep '^Copy: ' | cut -d ':' -f 2)"
LOC="$LOC $(cat $OUT/.log | sed -E "s/"$'\E'"\[([0-9]{1,3}((;[0-9]{1,3})*)?)?[m|K]//g" -E 's/^\[ {0,2}[0-9]{1,3}% [0-9]{1,6}\/[0-9]{1,6}\] +//' \
| grep '^Copy: ' | cut -d ':' -f 2)"
fi
# If any files are going to /data, push an octal file permissions reader to device

View file

@ -22,6 +22,7 @@ preserve_addon_d() {
# Restore /system/addon.d from /tmp/addon.d
restore_addon_d() {
if [ -d /tmp/addon.d/ ]; then
mkdir -p /system/addon.d/
cp -a /tmp/addon.d/* /system/addon.d/
rm -rf /tmp/addon.d/
fi