header image
 

How to Install Android x86 4.4 RC2 on Hyper-V – Part 2: Configuration, Screen resolution and Network



Completing the series with the Part 2 of ‘How to install Android x86 4.4 RC2 on Hyper-V’.

On my last Post “How to install Android x86 on Hyper-V – Part 1: Install” we had:

– Phase 1: Download Android x86 4.3 and prepare a VM to run it
– Phase 2: Install Android x86 4.3 on a VM
– Phase 3: Run and Configure Android x86 for the first time

On this post I’ll cover:

– Phase 4: Run and Configure Android x86 for the first time
– Phase 5: Advanced settings – Screen resolution
– Phase 6: Advanced settings – Network configuration

 

Phase 4: Run and Configure Android x86 for the first time

When you boot the Android VM for the first time you need to configure the initial settings.

Before you start make sure you Eject the ISO image from the VM.

1. Ignore the Bluetooth warning and click “Ok” and select the preferred Language option “English United-States

boot

boot1

2. Ignore the Wifi Selection and click “Skip” and on the next screen confirm that by selecting “Skip anyway

boot2

boot3

3. If the Hyper-V vSwitch assigned to your Android VM is connected to the external network with Internet access and has a DHCP Server to assign IP Address configuration automatically you can choose “Yes” and accept the Terms to configure your Google account, if not click “No” to skip this.

boot4

4. Add your Google account sign in information.

boot5

5. On Google services click on the Down arrow and Right arrow afterwards.

boot6

6. You can skip the Payment info by clicking on “NOT NOW

boot7

7. On the Table info insert the desired name.

boot8

8. On the Welcome screen click “OK” and “OK” again

boot9

boot10

 

 

Phase 5: Advanced settings – Screen resolution

Android-x86 default config has been made for smaller form factors and screen resolutions, running it with the defaults on your VM environment is unpractical.

To change the screen resolution you need to accomplish the following:

– Determine what’s the best screen resolution for you
– Test the new screen resolution
– Make persistent changes of the new screen resolution
– Modify the font size of the Terminal Emulator

1. Determine what’s the best screen resolution for you

1.1  Start the VM and In the GRUB menu press the [a] key

1.2  In the next screen append vga=ask and press [Enter], on the next screen press [Enter] again

screen

You will be presented with the possible screen resolutions. Each resolution is defined by an hex value on the ‘Mode’ column (see below).

Example: 1024×768 16 bits has the hex value of ‘317’, however to use this screen resolution you need to convert the value from hex to decimal.

image

1.3 Determine what is your convenient Screen resolution through the following table, on the Mode Decimal column you have the appropriate value that you’ll use on testing and configuration.

Mode (hex): Mode Decimal Resolution Type Mode (hex): Mode Decimal Resolution Type
F00 3840 80×25 VGA F01 3841 80×50 VGA
F02 3842 80×43 VGA F03 3843 80×28 VGA
F05 3845 80×30 VGA F06 3846 80×34 VGA
F07 3847 80×60 VGA 300 768 640x400x8 VESA
301 769 640x480x8 VESA 311 785 640x480x16 VESA
312 786 640x480x32 VESA 326 806 800x512x8 VESA
327 807 800x512x16 VESA 328 808 800x512x32 VESA
303 771 800x600x8 VESA 314 788 800x600x16 VESA
315 789 800x600x32 VESA 329 809 896x600x8 VESA
32A 810 896x600x16 VESA 32B 811 896x600x32 VESA
305 773 1024x768x8 VESA 317 791 1024x768x16 VESA
318 792 1024x768x32 VESA 31D 797 1024x768x8 VESA
32C 812 1152x768x8 VESA 32D 813 1152x768x16 VESA
32E 814 1152x768x32 VESA 307 775 1280x1024x8 VESA
31A 794 1280x1024x16 VESA 324 804 1600x1024x8 VESA
325 805 1600x1024x16 VESA 320 800 1600x1200x8 VESA
322 802 1600x1200x16 VESA

2. Test the new screen resolution

I recommend that you test the screen resolution before you do the permanent changes. Example with a screen resolution of 1024x768x16 the configuration decimal value is ‘791’.

2.1 Start the VM and In the GRUB menu press the [a] key

2.2  In the next screen append vga=791 and press [Enter]

Android VM will start with the screen resolution of 1024×768 16 bits, if this is not the best configuration for yourself you can repeat the process with other resolution decimal value.

3. Make persistent changes of the new screen resolution

We will make persistent changes for screen resolution through GRUB, for that we need to mount the image and edit the ‘menu.lst’.

3.1 Start the Android VM and from the GRUB menu select ‘Debug Mode

3.2 Type the following to mount the image and edit GRUB ‘menu.lst’:

# mount -o remount,rw /mnt
# cd /mnt/grub
# vi menu.lst

screen1

3.3. Modify the GRUB menu boot option (menu.lst) with the appropriate screen resolution

For that you need to append to the identified line on the image below the value ‘vga=791’ (hex value would be 317 for the screen resolution 1024x768x16):

screen2

We will be using the ancient Unix editor Vi (http://www.cs.rit.edu/~cslab/vi.html), if you are not familiar you should know that editing a file with Vi is not as simple as Windows Notepad or other Linux editors (e.g. nano), so please do the following:

– Move the cursor to the start of the line mentioned on the above image

– Press the keys [SHIFT] + [A} to start the file editing mode

– Append ‘vga=791’ to the end of that line, you should end up with something like this (single line):

kernel /android-4.4-RC2/kernel root=/dev/ram0 androidboot.hardware=android_x86 video=-16 SRC=/android-4.4-RC2 vga=791

– When finished press the [ESC] key to exit the edit mode

– Save changes and quit with ‘:wq

Tip: Typing ‘:q’ woucd ld quit if no changes were done, ‘:q!’ would quit and discard any changes.

3.4 Unmount the image and reboot:

cd /
umount /mnt
reboot -f

On the next boot you will have the new screen resolution set.

4. Modify the Font size on the Terminal emulator

If you open the Terminal Emulator on it’s default font size you will get a very tiny Font size and you can barely read anything, so let’s adjust this.

4.1 Start your Android x86 VM, unlock the screen, click on the Apps button and open the “Terminal Emulator” on the Apps menu

settings

settings1

4.2 Click on the Top right button to slide down the menu options and select ‘Preferences

settings2

4.3 On the ‘Preferences’ screen click on ‘Font size

settings3

4.4 Now select your preferred Font size (reasonable size would be between 12 – 16pt) and clock on the Back button (bottom left) to return to the Terminal screen with the newer font size

settings4

 

Phase 6: Advanced settings – Network configuration

You can configure Android x86 network automatically through DHCP or manually. Manual network configuration will disappear every time you reboot Android x86 and you’ll need to repeat the network configuration. Due to this limitation I recommend that you configure Android x86 network settings automatically through DHCP.

To configure my network I can chose one of the following options:

– Automatic Network configuration through DHCP
– Manual Network configuration through terminal

 

For your better understanding I will use this network settings during the Terminal configuration:

IP: 192.168.1.20
Netmask: 255.255.255.0
Gateway: 192.168.1.1
DNS: 192.168.1.1

1. Automatic Network configuration through DHCP

If you have a DHCP Server on the same Network as your Android x86 the network settings should be set automatically.

1.1 Start your Android x86 VM, unlock the screen, click on the Apps button and open the “Terminal Emulator” on the Apps menu

settings

settings1

1.2 Verify your Network configuration settings

On Terminal run the following to verify your network settings:

ip a

image

You can also use netcfg to verify the NIC (eth0) state:

netcfg

image

Note: I’ve seen some situations where particular
routers (e.g. Linksys with dd-wrt firmwares) send invalid UDP packets and the Android x86 can’t pick the IP Address configuration. If that’s the case you can try the following in Terminal, if this either fails you need to connect to a different DHCP Server source or define your Network Settings manually.

adb shell
su
dhcpcd -k eth0                –> Release
dhcpcd -n eth0                –> Renew

2. Manual Network configuration through terminal

On Terminal run the following to configure your network settings:

adb shell
su

ifconfig eth0 192.168.1.20 netmask 255.255.255.0 up
route add default gw 192.168.1.1 dev eth0
setprop net.dns1 192.168.1.1

We had to use the Android Debug Bridge (adb) to allow you to communicate with Emulator, enable root access (su),  only after this you can configure your IP Address/netmask (ifconfig), default gateway (routeadd) and dns (setprop).

Verify your networking settings with:

ip a

image

Android x86 does not support ethernet persistent network settings, after reboot you need to run the same terminal commands to configure your machine.

 

This completes the series of “How to install Android x86 4.4 RC2 on Hyper-V”.

R-Tape Loading error,
Luís Rato

~ by lrato on July 1, 2014.

Hyper-V, Linux

3 Responses to “How to Install Android x86 4.4 RC2 on Hyper-V – Part 2: Configuration, Screen resolution and Network”

  1. Good info !
    Have you tried PXE boot? See here:
    http://www.vercot.com/~serva/an/NonWindowsPXE3.html

  2. Very informative.. Thanks for sharing..
    I tried it on vmware workstation,it works fine but after few minutes screen went to sleep and never come back its gone black although the vm is running fine.
    is there any way to bring the screen on back?

    • Thanks for your feedback. It’s actually a bug on Android x86, it will not recover from sleep. I would recommend that you change the configuration so that it will never sleep.

      Regards,
      Luis

Leave a Reply