-
Notifications
You must be signed in to change notification settings - Fork 659
Open
Description
Thanks for the awesome project.
I test run.sh on a google glass running SDK 19. But 'autosize' do not work. I find the following codes always return empty strings.
args=
if [ "$1" = "autosize" ]; then
set +o pipefail
size=$(adb shell dumpsys window | grep -Eo 'init=\d+x\d+' | head -1 | cut -d= -f 2)
if [ "$size" = "" ]; then
w=$(adb shell dumpsys window | grep -Eo 'DisplayWidth=\d+' | head -1 | cut -d= -f 2)
h=$(adb shell dumpsys window | grep -Eo 'DisplayHeight=\d+' | head -1 | cut -d= -f 2)
size="${w}x${h}"
fi
args="-P $size@$size/0"
set -o pipefail
shift
fi
I try to fix it by changing the code to
args=
if [ "$1" = "autosize" ]; then
set +o pipefail
size=$(adb shell dumpsys window | grep -Eo 'init=\d+x\d+' | head -1 | cut -d= -f 2)
if [ "$size" = "" ]; then
size=$(adb shell wm size| cut -d: -f2 |tr -d " \n\t\r")
fi
args="-P $size@$size/0"
set -o pipefail
shift
fi
I'm not sure if wm size can return the exact same thing with dumsys window, if not, please correct me.
Thank you.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels