Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6a36e75d authored by Victoria Lease's avatar Victoria Lease Committed by Android Git Automerger
Browse files

am f8c154f4: Merge "getsdcardpath, getscreenshotpath, getlastscreenshot" into jb-mr1-dev

* commit 'f8c154f4':
  getsdcardpath, getscreenshotpath, getlastscreenshot
parents 6ea5b287 f8c154f4
Loading
Loading
Loading
Loading
+22 −0
Original line number Diff line number Diff line
@@ -992,6 +992,28 @@ function getbugreports()
    done
}

function getsdcardpath()
{
    adb ${adbOptions} shell echo -n \$\{EXTERNAL_STORAGE\}
}

function getscreenshotpath()
{
    echo "$(getsdcardpath)/Pictures/Screenshots"
}

function getlastscreenshot()
{
    local screenshot_path=$(getscreenshotpath)
    local screenshot=`adb ${adbOptions} ls ${screenshot_path} | grep Screenshot_[0-9-]*.*\.png | sort -rk 3 | cut -d " " -f 4 | head -n 1`
    if [ "$screenshot" = "" ]; then
        echo "No screenshots found."
        return
    fi
    echo "${screenshot}"
    adb ${adbOptions} pull ${screenshot_path}/${screenshot}
}

function startviewserver()
{
    local port=4939