Skip to content

Instantly share code, notes, and snippets.

@osmero
Created May 20, 2014 14:29
Show Gist options
  • Select an option

  • Save osmero/ef7e66a2c27ac043048a to your computer and use it in GitHub Desktop.

Select an option

Save osmero/ef7e66a2c27ac043048a to your computer and use it in GitHub Desktop.
Change device display size. Just make sure the screen is not currently displaying at the moment you run the command.
# change
./adb shell am display-size 800x480
# revert to default
./adb shell am display-size reset
# In Android 4.3 these options moved from the "am" command (ActivityManager)
# to the "wm" command (WindowManager). Type "adb shell wm" for details.
#
# So you can now run on 4.3 devices:
adb shell wm size 1280x800
# or whatever size or reset
# and
adb shell wm density 480
# or whatever density or reset
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment