Sunday, June 5, 2016

Changing/Customizing Screen Resolution for Remix OS (Android-x86) on VirtualBox VM

I primarily referred to the following site for a step-by-step to setup my custom screen resolution.
https://4sysops.com/archives/change-the-screen-resolution-of-an-android-virtualbox-vm/

This site has instructions for testing different screen resolutions (non-permanent) before implementing the permanently.
http://luisrato.azurewebsites.net/2013/10/15/how-to-install-android-x86-on-hyper-v-part-2-screen-resolution-and-network-configuration/


In this posting I added some additional comments to augment the guide for permanent implementation.  Screen resolutions can be found on Wikipedia.
https://en.wikipedia.org/wiki/Display_resolution

1. Add a custom screen resolution to your VirtualBox VMOpen a Windows Command window.
Change directories to C:\Program Files\Oracle\VirtualBox
    cd ..\..\program files\oracle\virtualbox
Enter the command
    vboxmanage setextradata “<your VM name” “CustomVideoMode1” “<desired resolution>”
    substituting in your VM name and screen resolution in the places noted.
    e.g. vboxmanage setextradata “RM0010” “CustomVideoMode1” “1366x768x16”

Note: According to VBox documentation you can add up to 16 CustomVideoModes using the same approach, e.g., "CustomVideoMode2", etc.





2. Start the VM and, when the GRUB boot menu appears, select the Debug mode.

3. Wait until the Linux boot process is completed, and then press Enter.

4. At the Linux prompt, enter the following commands:
For this step, I first made a copy of the menu file
mkdir /boot
mount /dev/sda1 /boot
    cp /boot/grub/menu.lst /boot/grub/menu.lst.old
vi /boot/grub/menu.lst

5. Move the cursor to the first line that begins with kernel /android

Instead of modifying the existing menu options, I added a new menu option with the custom resolution. To do this is inserted new lines above the existing menu list (menu list items begin with 'title'). When I created the new lines I simply copied the menu entries below. This approach can be used to add multiple menu selections for various screen resolutions.

To distinguish my new menu options from the other menu options, I entered the resolution in the title and modified the title of the original default.


5. (cont.) I did not find “video= -16” so I just added the text at the end of the line. See screenshot below. This site can help with vi navigation and commands.
https://www.cs.colostate.edu/helpdocs/vi.html6. Press the i key (enables insert mode in the vi editor), and then type UVESA_MODE="1366x768"

uvesa_mode as in
UVESA_MODE="1366x768"
case sensitive and quotes
Reference: https://groups.google.com/forum/#!topic/android-x86/IrAVyc_4Tiw

7. Press ESC and then SHIFT+ZZ to save the new GRUB boot menu.

8. Clean up and then restart the VM.
umount /boot
rmdir /boot
reboot –f
note: The command is umount, not unmount.

9. From now on, your Android VM should use the new screen resolution.

Installing Remix OS (Android-x86) on VirtualBox VM

Here are the steps I took modified from this posting.
https://www.reddit.com/r/RemixOS/comments/40ahkc/is_it_possible_to_run_remix_os_on_virtualbox_if/

Here's how I managed to get the 64-bit version running in persistent mode in VirtualBox 5.0.16 on Windows 7.

*My VMs are typically stored on an USB external drive.  I was having trouble creating the Remix VM on the external drive so I started by changing my VBox settings to install to the local drive (e.g. desktop vs USB external drive).

Create a new machine - type: "Linux", version: "Other Linux (64-bit)". I named mine RM0010 but it doesn't matter.
Allocate some RAM for it. I went with 4096MB and couldn't find the minimum required specs, but you should be okay with 2048+.
Create a virtual hard disk. I used the VMDK file type with a fixed size of 64.00GB - simulating running it on a 64GB flash drive. The minimum specs require 8GB of space.
DON'T START THE MACHINE YET!
Click "Settings">"Storage">"Controller:IDE" and add an optical drive (icon looks like an optical disk with a plus symbol). Choose the OS's ISO. This should appear above any existing optical drives and below the hard drive.
Select the drive you just added and check the "Live CD/DVD" toggle. Then click "OK".
*Also increase the number of processors for Remix OS
We are now ready to start the machine. When you do, there should be a splash screen - press the tab key before it tries to perform a default installation. If you missed it, just power down the machine (don't save its state or send the shutdown signal, just power it off) and try again. It only gives you about 3s to press tab.
Type a space then "INSTALL=1 DEBUG=" and press enter/return. Don't forget the spaces.
Press down to select "Create/Modify Partitions" and press return/enter.
Say "No" when it asks if you want to use GPT.
Press the right arrow key to select "New" and press return/enter.
Select "Primary" and press return/enter.
Press return/enter to use the default size.
Select "Bootable" and press return/enter.
Select "Type" and press return/enter until you're back at the main cfdisk screen. (Linux "83")
Select "Write" and press return/enter.
Type "yes" and press return/enter.
Select "Quit" and press return/enter.
Select "sda1" (the partition you just created) and press return/enter.
Select "ext4"
(ignore, replaced with the step above) Select "ext3" as the filesystem format (AFAIK, ext4 is also fine, but I didn't test with it).
Select "Yes" and press return/enter to format the virtual disk.
Select "Yes" and press return/enter to install GRUB.
Select "Skip" and press return/enter to skip installing the EFI GRUB2 loader.
Select "Yes" and press return/enter to enable the /system directory as a read/write.
Select "Run Android-x86" and press return/enter.
Several minutes later, you'll be taken to the language selection screen. Follow the OS install as you would any other.
Once you're on the desktop, shut down the OS (properly).
Open the VM settings and remove the OS ISO from the list of devices - we don't need it any more.