Running a stock or custom ROM in a virtual machine on Android⠀ Can I run a virtual Android machine on my Samsung Galaxy S6 Edge? Or maybe can I run a custom ROM without flashing stock?
Part 1: Using Multiple ROMs without flashing again and again

App required: MultiRom 

Introduction:


MultiRom powerful utility that installs itself into your Custom Recovery.
First Step:
"BACKUP"
It is recomended to make a nandroid backup of your current ROM in case something goes wrong you can just restore it.


Procedure:


Once you have installed MultiRom open up the app. MultiRom will ask for Root Access.
After granting it, you should see Multirom and its current version, the recovery that is required to manage Multirom with, and the MultiRom Kernel (Kexec-hardboot patch)
Just tick all 3 boxes to install Multirom, the recovery patch, and the kernel. Once it’s finished installing, MultiRom Manager should prompt you to reboot into Recovery to complete the installation. Once you’ve entered the Custom recovery, it should complete the installation and will soon reboot itself.
A message will appear saying something similar like the device will boot into the internal rom in 5 seconds, unless you click cancel. You haven’t installed another Rom into MultiRom yet, so you should only see one option to boot into, and that should say Internal. Internal is pretty much your current Rom, or whatever you were using before installing Multirom. If you do not click cancel, your device will boot into the Internal Rom by default, so click cancel in the event you decide to boot into a different Rom. 
Now, in order for you to boot into a different Rom, first you have to download the different Custom Roms you want.


ONLY DOWNLOAD THE CUSTOM ROM THAT’S SUPPORTED BY YOUR DEVICE


Note that once you install your Custom Rom, Google Apps and Services will not be installed on it, so you will have to download something called GAPPS (Google Apps) for the respective Android version.
so now download the GAPPS zip file.
Once you are back into your device’s Stock Rom, we will be using TWRP Recovery, as it is the default Custom recovery supported by MultiRom. Once you are in TWRP, click advanced. You should see a new option called MultiRom. Click that, and you can configure settings, as well as install your Custom Rom to boot from.
Assuming you now have your Custom Rom downloaded on your device,click “Add Rom.” You will see many settings on the screen. For Choose ROM type, leave it by default, which is Android. Share Roms with Internal ROM, just leave that as don’t share. You can also see where the Custom Rom will be installed to. By default it will list your internal memory, but if you have an SD card, or even a USB Flash drive that is plugged into your device VIA OTG cable, it will be listed there as well. So just pick the destination of where you want your Custom Rom to be installed/saved on.
Click next, and select your source of installing your custom Rom. 3 Options will appear, which include Zip File, Backup, and ADB Sideload. You should have downloaded your Custom Rom earlier in for form of a .zip file, so just select ZIP File. Next, you will navigate to the place where you downloaded your Custom Rom, which most likely will be located in your Downloads folder. So find that and select it. Once you have it selected, you will reach a page where it shows you to confirm flash. So swipe the bar to confirm the Flash, or installation of your Custom Rom, and let it install on its own. Once the installation has ended, do not be so quick as to click reboot. 
Click the back button on the bottom right hand side, and head over to the List Roms option from earlier. Then, click on the Rom that you just installed, and click Flash Zip, which will flash the Zip file for that individual Rom. Now, flash Google’s apps and services that you have downloaded now Reboot>system. 
You should be prompted with the same interface as earlier when you installed MultiRom where it asks you which Rom you want to boot into. Click Cancel, as we do not want to boot into our internal rom. Now you should see your brand new installed Custom Rom name listed in the Boot options. Click on that, and confirm you want to boot into it.
Now the Custom Rom’s default boot animation should appear, so that indicates you’ve done everything right. Note that this simulates the process of a brand new fresh operating system being booted up for the first time, so the boot process should take a while longer, just wait a few minutes until you reach the device setup screen.
In the case that you want to uninstall MultiRom, just boot back into your Internal rom and head over to the Multirom Manager app, and click on the big trash can at the top right corner, as this just means the removal and deletion of MultiRom. Click on confirm delete, and follow the on-screen instructions for uninstallation. 


Step by Step Video Tutorial

Part 2:Running Linux Distros On Android using Linux Deploy.


Linux Deploy is open source app offers an easy way to install and run a supported Linux distribution in a chroot environment.


Apps Required:


Linux Deploy.
VNC client.


Procedure:


Tap the Properties button it includes distros like


• Kali

• Debian

• Ubuntu

• Arch Linux

• Fedora, and openSUSE.


For certain distributions, you can also select a specific version. Choose Debian, for example, and you can pick the desired version (stable, testing, unstable, etc.) in the Distribution suite list.
Linux Deploy lets you install a graphical desktop environment, too, and the app supports several popular graphical desktops, including LXDE, Xfce, Gnome, and KDE. To install a desktop environment, pick the desired desktop from the Desktop environment list and enable the Install GUI option.
The next stop is the Startup section. To start, make sure the SSH option is enabled; otherwise, you won’t be able to connect to the running Linux instance. If you chose to install a graphical desktop environment, you will have to enable the VNC option as well, so you can connect to the desktop using a VNC client app. Next, scroll down to the VNC section and configure the VNC settings, such as color depth and resolution as well as desktop dimensions.
Once you’re done tweaking settings and specifying options, you can tap the Install item and wait until Linux Deploy finishes the installation.
The installation procession in Linux Deploy is completely automated.When the installation operation is completed, you should see the following status message:
&lt;&lt;&lt; end: install
Then, tap the Start button to boot the installed Linux distro. Note the IP address of the running Linux instance. Launch the VNC client app and connect to the running VNC server using the default "changeme" password. 
You can access the graphical desktop using a VNC client directly on Android


Step By Step Video Tutorial