提交 dfb02b03 创建 作者: 宋海霞's avatar 宋海霞

增加新文件

上级 352ca8aa
流水线 #118723 已取消 于阶段
#!/bin/bash
function wait_emulator_to_be_ready() {
cpu_support_hardware_acceleration=$(grep -cw ".*\(vmx\|svm\).*" /proc/cpuinfo)
kvm_support=$(kvm-ok)
emulator_name=${EMULATOR_NAME_ARM}
if [ "$cpu_support_hardware_acceleration" != 0 ] && [ "$kvm_support" != *"NOT"* ]; then
emulator_name=${EMULATOR_NAME_x86}
fi
adb devices | grep emulator | cut -f1 | while read line; do adb -s $line emu kill; done
emulator -avd "${emulator_name}" -verbose -no-boot-anim -no-window -gpu off &
boot_completed=false
while [ "$boot_completed" == false ]; do
status=$(adb wait-for-device shell getprop sys.boot_completed | tr -d '\r')
echo "Boot Status: $status"
if [ "$status" == "1" ]; then
boot_completed=true
else
sleep 1
fi
done
}
function disable_animation() {
adb shell "settings put global window_animation_scale 0.0"
adb shell "settings put global transition_animation_scale 0.0"
adb shell "settings put global animator_duration_scale 0.0"
}
wait_emulator_to_be_ready
sleep 1
disable_animation
\ No newline at end of file
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论