Switch android x86 screen resolution

后端 未结 8 1253
我寻月下人不归
我寻月下人不归 2020-12-02 03:40

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

相关标签:
8条回答
  • 2020-12-02 04:20

    To change the Android-x86 screen resolution on VirtualBox you need to:

    1. Add custom screen resolution:
      Android <6.0:

      VBoxManage setextradata "VM_NAME_HERE" "CustomVideoMode1" "320x480x16"
      

      Android >=6.0:

      VBoxManage setextradata "VM_NAME_HERE" "CustomVideoMode1" "320x480x32"
      
    2. 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 append vga=ask and press Enter
      2.4. Find your resolution and write down/remember the 'hex'-value for Mode column

    3. Translate the value to decimal notation (for example 360 hex is 864 in decimal).

    4. Go to menu.lst and modify it:
      4.1. From the GRUB menu select Debug 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 is 360). 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
      
    5. Unmount and reboot:

      cd /
      umount /mnt
      reboot -f
      

    Hope this helps.

    0 讨论(0)
  • 2020-12-02 04:20

    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

    0 讨论(0)
  • 2020-12-02 04:25

    OK, maybe there are more like me that do not have any UVESA_MODE or S3 references in their menu.lst. First, do "VBoxManage setextradata "VM_NAME_HERE" "CustomVideoMode1" "320x480x32"" procedure through terminal. My custom videomode was "1920x1089x32"... (sorry, I use Linux, so procedure works on linux) for Windows, just add .exe to VBoxManage.. Look in the first entry as described before, this is the menu entry you would normally boot. I normally use nano as it works more easy for me. And nano happens to be present in Android >6 too. (other version not tried)

    Procedure:

    • Boot VM, chose the "debug mode" option to boot. Pressing "enter" after a while will result in the prompt
    • Change directory to /mnt/grub "cd /mnt/grub"
    • list directory content with "ls" (not necessary but I like to see where I am)
    • copy menu.lst (make this standard procedure before changing anything) "cp menu.lst menu.lst.bak" (or whatever extension you like to use for backup)
    • open menu.lst, e.g.: "nano menu.lst".
    • look in first menu entry (normally there are 4, starting with the titles you see in the boot menu) the "kernel" entry, which ends with the word "quiet"
    • replace "quiet" with something like "vga=ask" if you would like to be asked every time at boot for the screen resolution, or "vga=(HEX value)" as seen in surlac's anwer.
    • exit and save, don't forget to actually save it! double check this. (ctrl+X, YES, Enter for nano)
    • reboot VM with "YOUR HOST KEY" + "R" (normally "right control" + "R")

    Hope this helps anyone as it did solve my problem.

    edit: I see that I did place this article in the wrong place, since the original question is about another Android version. Does anyone know how to move it to an appropriate location?

    0 讨论(0)
  • 2020-12-02 04:26

    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.

    0 讨论(0)
  • 2020-12-02 04:27

    Verified the following on Virtualbox-5.0.24, Android_x86-4.4-r5. You get a screen similar to an 8" table. You can play around with the xxx in DPI=xxx, to change the resolution. xxx=100 makes it really small to match a real table exactly, but it may be too small when working with android in Virtualbox.

    VBoxManage setextradata <VmName> "CustomVideoMode1" "440x680x16"
    

    With the following appended to android kernel cmd:

    UVESA_MODE=440x680 DPI=120
    
    0 讨论(0)
  • 2020-12-02 04:29

    Set resolution in android x86

    Libvirt/qemu

    Temporarily

    • Add nomodeset and vga=ask to android x86 grub entry's kernel loading options;
    • Find your best resolution and note the code you used.

    Permanently

    • Convert that code to decimal from hex;
    • Add vga=decimal_code to your preferred entry in /mnt/grub/menu.lst (mounted if android is started in debug mode).
    0 讨论(0)
提交回复
热议问题