- Pip install Boto3 - Thu, Mar 24 2022
- Install Boto3 (AWS SDK for Python) in Visual Studio Code (VS Code) on Windows - Wed, Feb 23 2022
- Automatically mount an NVMe EBS volume in an EC2 Linux instance using fstab - Mon, Feb 21 2022
The display resolution after the installation is a bit unusual for tablets and phones. For testing apps, it is better to use a screen size with a typical portrait aspect ratio. It gives you a better impression of how end users experience a certain app, and you can create screenshots in the typical format of mobile devices if you have to send instructions to a user.
In this guide, I used a resolution of 360x640. Depending on the size of your screen, you might choose another format. Unfortunately, changing the resolution of an Android VM is not as easy as with a Windows VM.
VirtualBox Android resolution configuration
- Add a custom screen resolution to your VirtualBox VM by opening a command prompt, navigating to your VirtualBox installation folder, and entering the following command:
VBoxManage setextradata "Android" "CustomVideoMode1" "360x640x16"
I assumed here that the name of your VM is Android.
- Start the VM and, when the GRUB boot menu appears, select the Debug mode.
- Wait until the Linux boot process is completed, and then press Enter.
- At the Linux prompt, enter the following commands:
mount /dev/sda1 /boot
- Move the cursor to the first line that begins with kernel /android. In this line, search for “video= -16”.
- Press the i key (enables insert mode in the vi editor), and then type UVESA_MODE=360x640.
- Press ESC and then SHIFT+ZZ to save the new GRUB boot menu.
- Clean up and then restart the VM.
From now on, your Android VM should use the new screen resolution.
Android on VirtualBox with changed resolution
If you want to work with different resolutions, you just have to add the corresponding entries to the GRUB boot menu. Don’t forget to add a custom screen size to the VirtualBox virtual machine (step 1).
Want to write for 4sysops? We are looking for new authors.
Very useful, android on Vbox is the only way to debug
Can’t find -16 string in new virtualbox version grub menu…. should this be added or has logic changed in new version?
Tommit, can you find “video=”? What do you see?
Will make a copy tomorrow… currently at customers site but there’s no video and no -16 anymore using virtualbox 4.3.20
Can I send a PM with two small screenshots of menu.lst?
or to a info@4sysops ?
Tommit, you can such questions in the forum. You can also upload screenshots there.
running latest 4.4RC2 when I go into debug mode there is no /dev/sda1. Any ideas?
I have tried this hundreds of times but resolution remaied same.
when I enter commad “unmount /boot”
messages displayed is “unmount: not found”
and when I enter next command “rmdir /boot”
message is ” ‘/boot’: Device or resource busy”
see the error here http://i61.tinypic.com/xm72ap.png
Use umount, not unmount.
It's umount and it's not a typo.
when I enter commad “unmount /boot”…
Not unmount -> umount without n
Machine stuck at “Detecting Android-x86……”
what to do?
looks like the 16 set the color to a lower level that the original one … How to reduce the resolution but keep the color nice and sharp?
Thanks Dude !!! U r awesome
Worked like a charm. Awesome easy guide. Thank you!
The textfragment ” video=-16″ was not there (android 4.4r3). I looked for the suggested line
……….android _x86 SRC=/android-4.4….
then I put the cursor just before the letters SRC and inserted: video=-16 UVESA_MODE=1280×800
Then the line becomes:
……….android _x86 video=-16 UVESA_MODE=1280×800 SRC=/android-4.4….
And it works for me!!
Hello! Thanks for the article, it very helpfull, but I still need some help there~ Is there any chance to set bit depth to 24 bit? When I set 480x720x24 or 480x720x32 in VirtualBox, android even don’t load :c only with x16 bit depth.
Hello, I installed android on virtualbox but after installation i turned off the machine. T he problem is when i again go to open the device it asks for installation again. Plz solve the problem. Thanks
Odd, when I follow the instructions it changes my screen not to 360×640 but to 1024x768x16, but only on the line I altered. The debug one remained the original size of 720×400 (note the missing x16)
Running the VM in a windows 7 environment.
This doesn't work for me. Without VGA, it won't boot, and with VGA, I can't get it to use portrait screen resolutions.