> For the complete documentation index, see [llms.txt](https://riteshs4hu.gitbook.io/infosec-notes/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://riteshs4hu.gitbook.io/infosec-notes/android-appsec/setting-up-virtual-device/virtual-machine.md).

# Virtual Machine

This method allows you to run **Android OS on your PC** using a virtual machine.

**1. Download Android-x86 ISO**

* Official website: <https://www.android-x86.org/>

**2. Create a Virtual Machine in VirtualBox**

* **Allocate Minimum Resources**:
  * **RAM:** 3 GB or more
  * **Disk Space:** 8 GB or more
* Create a **new virtual machine**, select **Linux → Other Linux 64-bit**, and attach the downloaded ISO.

**3. Boot the VM**

* Start the virtual machine → you will see the **boot menu** (Boot Up Page).
  1. Go to **Advanced Options** in the boot menu.
  2. Select **Auto\_installation** → confirm **Yes**.

> The installation will begin and complete in CLI (Command Line Interface) mode.

**5. Switch from Console to GUI**

* Restart Your VM Box
* Go to **Debug Mode** in the console.

<figure><img src="/files/SQJyaoeO6wauJhZAR2MH" alt=""><figcaption></figcaption></figure>

* Remount the partition so it’s writable:

```
mount -o remount,rw /mnt
```

* Navigate to GRUB folder and edit the boot configuration:

```
cd /mnt/grub
vi menu.lst
```

* In the first boot entry, add the line: `nomodeset xforcevesa`

  <figure><img src="/files/9X2iSkhM3QTXBPF53iQC" alt=""><figcaption></figcaption></figure>
* Save the file and **reboot the VM**:

```
reboot -f
```

* The system will now boot into (After some time) **Android with GUI**.

<figure><img src="/files/ikK7xW7AWipIVnZxmWFB" alt=""><figcaption></figcaption></figure>
