How to disable system level animation for Android device and emulator using adb with API 23?

Based on read values window_animation_scale

, transition_animation_scale

and animator_duration_scale

should be set to 0

The following steps are for API 22, but not for API 23:

adb shell settings put global window_animation_scale 0.0

      

Even the command below didn't work for API 23

adb shell content update --uri content://settings/system --bind value:s:0.0 --where 'name="window_animation_scale"'

      

We want to disable animations to prevent only fail-safe visual checks. We do not want to inject this logic into the application and therefore want to apply it at the system level, not through the application.

+3


source to share


4 answers


You can run the following adb commands to disable animation:

adb shell settings put global window_animation_scale 0
adb shell settings put global transition_animation_scale 0
adb shell settings put global animator_duration_scale 0

      

Alternatively, you can take a look at this repo



Build a project and download the generated .apk file and follow the instructions given in that project to disable animation and you should have a smooth sail after that. You can also download the same .apk file from many other sources (go google!).

Once you have the .apk file, run the following commands:

 adb install -r android_emulator_hacks.apk
 adb shell pm grant no.finn.android_emulator_hacks android.permission.SET_ANIMATION_SCALE
 adb shell am start -n no.finn.android_emulator_hacks/no.finn.android_emulator_hacks.HackActivity

      

+2


source


Mark W's answer should be accepted You can also save it as a wrapper script for convenience, i.e .:

#!/bin/sh
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

      

then in the terminal just call



sh path/to/file.sh

      

Or take it one step further and keep the alias shortcut in your bash profile :)

+1


source


The adb shell customization commands are good enough. You just have to do a clean reboot for these options to take effect.

The key to the solution is a clean reboot after you've changed the settings. sudo reboot

is what you need to avoid and hug $ANDROID_HOME/platform-tools/adb shell "su 0 am start -a android.intent.action.REBOOT"

I also wrote a blog on the same issue.

0


source


Check out Bash Script

 adb shell update global set value='0.0' where name='window_animation_scale'
 adb shell update global set value='0.0' where name='transition_animation_scale'
 adb shell update global set value='0.0' where name='animator_duration_scale'

      

Hope it helps

-1


source







All Articles