How to test your site for compatibility with all kind of devices

testsite_featured

Computer devices become obsolete in 5-6 years. It's from my own experience. But devices produced during last 5 years are in use. So a good quality website should work fine on all of them. If now is 2018, then this is the period from 2013 till 2018. Let's think about it. If there is a PC produced in 2013, it probably runs Windows 7, 8 or 10. In this case desktop browser would automatically update to the latest version.

But what about phones and tablets? Latest versions of Opera or Chrome may crash on old versions of Android/iOs. And built-in browsers are bound with Adroid/iOs version, and can't be updated. The best choice, as for me, is when website works fine in Adroid/iOs built-in browser. But how to check it?

We can run an emulator with Android. And use it's built-in browser to test sites.

This article is my step-by-step instruction how to install Adroid in emulator, without purchasing any software.

I have read in Wikipedia that in 2013 Android 4.4 was released. Lets download it's installation from here:

android-x86-4.4-r5.iso

Then we need an virtual computer. The best choice is Oracle VirtualBox. It's basic version is free for individual and commercial use. Lets download it from www.virtualbox.org and install it.

Lunch it and create new virtual machine.

  • Type Linux
  • Version Other Linux 32 bit
  • Without hard drive
new_1

Then make settings

  • Base memory 1024MB
  • Chipset ICH9
  • Pointing device PS/2
  • Enable I/O APIC
2
  • Quantity of processors equal to the quantity of cores in your computer's CPU
3
  • Video memory 128 MB
4
  • Adapter 1 - NAT
  • Adapter type AMD PCNet FAST III
5
  • No audio
6

Now let's create new 4GB SATA hard disk. And a virtual IDE cd-rom. Insert in it the file android-x86-4.4-r5.iso

new_9

Lunch virtual machine. To get back mouse from virtual machine press right <Ctrl>.

In boot menu select "Installation - Install Android-x86 to harddisk". Create new partition on all available disk space. File system type should be ext2.

new_10
new_10_1
11
12
new_11
13
14
15
new_11_3
new_103

On all next windows press Yes, except "Do you want to intsall EFI GRUB2".

new_12

When installation is complete choose Reboot. Remove virtual disk with Android installation.

After reboot you should get the Android.

19
new_101
new_102

If virtual machine "hangs", it is maybe in suspend mode. Press "Menu" to wake it up.

menu_key

To shut down virtual Android press : <Right Ctrl> + H

26

I usually use two virtual machines, one with 1024х768х16 resolution, the other with 320х480х16. They substitute me potential tablet and smartphone. So lets set up Android to 320х480х16 resolution. Restart the virtual machine and run Android in the Debug mode :

new_104

Now in Windows create new cmd file with commands:

"c:\Program Files\Oracle\VirtualBox\VBoxManage.exe" setextradata "android44" "CustomVideoMode1" "320x480x16"
pause

Where "c:\Program Files\Oracle\VirtualBox\VBoxManage.exe" should be your path to VirtualBox,  and "android44" your virtual machine name.

new_109

Launch the cmd file. It should work without errors.

new_110

Now go to your Android virtual machine, and enter commands in console:

mount -o remount,rw /
mkdir /mnt/sda1
mount -t ext2 /dev/block/sda1 /mnt/sda1
vi /mnt/sda1/grub/menu.lst

new_106

As the result you will get the file menu.lst opened in the vi editor. To start editing press i . To save changes press   <Esc>:wq

After the "androidboot.hardware=android_x86" append "vga=ask"

new_107

After changes are saved run:
umount /mnt/sda1

And reboot the virtual machine. You will get the video modes list. Find the mode id corresponding to 320x480x16 and enter it.

new_111

Android will boot with 320x480x16 resolution.

new_108

If you don't want to enter video mode id every boot, you can write it in menu.lst file, but with 0x prefix. (for example vga=0x360)

Enable screen keyboard for better website testing.

In the same way you can install newer version of Android. Installation files are located here.

In the next article I'll write about website testing under Mac and iPhone.

September 21, 2017
My photo

Hi. Welcome to my website. My name is Ihor. I am a web programmer with ten years of experience. I work online, as a freelancer. I do projects in English, Ukrainian and Polish languages. Live in Lviv, Ukraine.