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”
2. Ignore the Wifi Selection and click “Skip” and on the next screen confirm that by selecting “Skip anyway”
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.
4. Add your Google account sign in information.
5. On Google services click on the Down arrow and Right arrow afterwards.
6. You can skip the Payment info by clicking on “NOT NOW”
7. On the Table info insert the desired name.
8. On the Welcome screen click “OK” and “OK” again
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
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.
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|
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
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):
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:
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
4.2 Click on the Top right button to slide down the menu options and select ‘Preferences’
4.3 On the ‘Preferences’ screen click on ‘Font size’
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
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:
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
1.2 Verify your Network configuration settings
On Terminal run the following to verify your network settings:
You can also use netcfg to verify the NIC (eth0) state:
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.
dhcpcd -k eth0 –> Release
dhcpcd -n eth0 –> Renew
2. Manual Network configuration through terminal
On Terminal run the following to configure your network settings:
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:
Android x86 does not support ethernet persistent network settings, after reboot you need to run the same terminal commands to configure your machine.