Switch android x86 screen resolution
I would like to use Android-x86 2.2 as an emulator on my Windows 7. I have downloaded VirtualBox and the ISO, and I've made a virtual machine with it, but I can't set the resolution to 320x480
or something similar.
The following tutorial "Using the Android-x86 Port as your Emulator" suggests to insert:
<ExtraDataItem name="CustomVideoMode2" value="320x480x16" />
to my .vbox
file and I did it. Then I added UVESA_MODE=320x480
and vga=ask
to the boot config. When it boots, I have to press Enter to see the available options, but there is no 320x480
among them. How can I get it to work?
Solution 1:
To change the Android-x86 screen resolution on VirtualBox you need to:
-
Add custom screen resolution:
Android <6.0:VBoxManage setextradata "VM_NAME_HERE" "CustomVideoMode1" "320x480x16"
Android >=6.0:
VBoxManage setextradata "VM_NAME_HERE" "CustomVideoMode1" "320x480x32"
Figure out what is the ‘hex’-value for your
VideoMode
:
2.1. Start the VM
2.2. In GRUB menu enter a (Android >=6.0: e)
2.3. In the next screen appendvga=ask
and press Enter
2.4. Find your resolution and write down/remember the 'hex'-value forMode
columnTranslate the value to decimal notation (for example
360
hex is864
in decimal).-
Go to
menu.lst
and modify it:
4.1. From the GRUB menu selectDebug Mode
4.2. Input the following:mount -o remount,rw /mnt cd /mnt/grub vi menu.lst
4.3. Add
vga=864
(if your ‘hex’-value is360
). Now it should look like this:kernel /android-2.3-RC1/kernel quiet root=/dev/ram0 androidboot_hardware=eeepc acpi_sleep=s3_bios,s3_mode DPI=160 UVESA_MODE=320x480 SRC=/android-2.3-RC1 SDCARD=/data/sdcard.img vga=864
4.4. Save it:
:wq
-
Unmount and reboot:
cd / umount /mnt reboot -f
Hope this helps.
Solution 2:
Based on my experience, it's enough to use the following additional boot options:
UVESA_MODE=320x480 DPI=160
No need to add vga definition. Watch out for DPI value! As bigger one makes your icons bigger.
To add the previous boot options, go to debug mode (during grub menu selection)
mount -o remount,rw /mnt
vi /mnt/grub/menu.lst
Now edit on this line:
kernel /android-2.3-RC1/kernel quiet root=/dev/ram0 androidboot_hardware=eeepc acpi_sleep=s3_bios,s3_mode SRC=/android-2.3-RC1 SDCARD=/data/sdcard.img UVESA_MODE=320x480 DPI=160
Reboot
Solution 3:
In VirtualBox you should add custom resolution via the command:
VBoxManage setextradata "VM name" "CustomVideoMode1" "800x480x16"
instead of editing a .vbox
file.
This solution works fine for me!
Solution 4:
I'd like to clarify one small gotcha here. You must use CustomVideoMode1 before CustomVideoMode2, etc. VirtualBox recognizes these modes in order starting from 1 and if you skip a number, it will not recognize anything at or beyond the number you skipped. This caught me by surprise.
Solution 5:
I'm using ubuntu 13.04 as host. This clear tutorial works:
https://software.intel.com/en-us/blogs/2011/10/11/getting-started-on-android-for-x86-step-by-step-guide-on-setting-up-android-2223-for-x86-testing-environment-in-oracle-virtualbox
To add more resolutions, do the following:
- Start your desired VM at Oracle Virtualbox
-
Execute at terminal:
~# VBoxManage list runningvms
Check your VM name
-
Add a new resolution:
~# VBoxManage setextradata "[YourVmNameHere]" "CustomVideoMode1" "800x480x16"
Find in above tutorial: "Test different screen size and resolution"