If you want to run a virtual machine on your Google Pixel smartphone, then Nestbox is the way to go.
If you’ve ever wanted to become a smartphone power user, then you’ve probably come across the likes of Termux. It’s an Android terminal emulator and Linux environment app, and some people have used it to develop Python scripts and even run Minecraft servers from their smartphones. Now you can take that a step further though with a rooted Pixel 6 or a regular Pixel 7, thanks to Nestbox by XDA Senior Member kdrag0n, available on his Patreon.
What is Nestbox?
Nestbox is an app that allows you to create containers and run real virtual machines on your smartphone, with the catch that it needs to be a recent Google Pixel smartphone to work. This is because Nestbox uses pKVM (protected Kernel-based Virtual Machine), which is available in more recent versions of the Android Common Kernel, including on the Google Pixel 6 series and Google Pixel 7 series. According to Mishaal Rahman of Esper, the reason root is required on the Pixel 6 series is because pKVM isn’t enabled out of the box.
The big deal here is that it’s essentially a more beefed-up Termux. Termux can already get you most of the way there for most power user use cases, but with virtualization, you’ll be able to run the likes of Docker containers on your smartphone. It’s a bit over-the-top, in all fairness, but it’s something that some people may have use for. You get kernel access and root in containers created by Nestbox, which is more than you get with Termux.
Installing and setting up Nestbox
If you want to use Nestbox on your Google Pixel, you’ll need to subscribe to kdrag0n’s Patreon. We used a Google Pixel 7 Pro to install and test it out, though the steps will slightly differ on the Pixel 6 series. Currently, Pixel 6 devices need to grant the app root access, though kdrag0n says this may change in the future.
On the Pixel 7, the most configuration you’ll need to do is similar to Shizuku. You connect to your own phone over wireless adb, configure the maximum container size, and then choose your Linux distribution. It’ll download, configure, and then execute the virtual machine.
What can you do with Nestbox?
As for things that you can do, it’s basically whatever you can think of. It’s a Linux container, though I did find that I needed to install a lot of tools before being able to do anything. I needed to use the advanced package tool (apt in Ubuntu) to install wget and curl, for example, since it’s a barebones setup out of the box. You can then add whatever you like after that. Currently, there is no virtual GPU support, and kdrag0n says that he doesn’t plan on supporting it either.
As an idea, you can host a web page or Minecraft server from your phone. While both work currently, you can’t actually access them from outside the container. I spoke to kdrag0n, and he confirmed that there is no port forwarding in place currently, and it’s impossible to interact with these instances outside the container. He tells me that will change in the future, though, when he does implement port forwarding, which he expects to complete soon.
If you want to try out Nestbox, you can get it from kdrag0n’s Patreon. It’s quite limited currently because of network constraints, but once those limitations are lifted, you’ll be able to connect to your container from outside of it and host web pages, game servers, and more. What would you use Nestbox for?
Thanks kdrag0n for sharing Nestbox with us!