Search code examples
androidresizeadbscreentablet

how to resize physical android screen from terminal/shell


A while ago, I was able to resize the screens on Android. For example, I had a Xoom, and was able to run a command from ADB which shrunk it down to a 7" screen (leaving a black border around it). Granted, it was a little buggy because the home/back/app-switch buttons disappeared, but I know it's possible. It's a 1 line command where I input the new screen resolution in X and Y pixels for the Xoom.

I was wondering if anyone was familiar with this, and knows how to do it.

(and if anyone says it's not possible, I can assure you it is)

(and I want to do this so I can test apps in various screen sizes on my Nexus 10, and I'd prefer not using an emulator)


Solution

  • I believe it is:

    adb shell am display-size 
    

    but i am away from a computer to try it. An example use would be:

    adb shell am display-size 640x480