A while back, Canonical released an experimental Ubuntu Touch emulator running Unity 8 and Mir. Back then, there were a few bugs, including a nasty one on 64bit that could break the system and since they were fixed, I though I’d write an article on how to properly install and use the Ubuntu Touch Emulator in Ubuntu 14.04, 13.10 and 12.04.
The initial Ubuntu Touch Emulator installation instructions changed so if you’ve installed the first experimental release, use the instructions below to create new instances.
Below you can watch two quick Ubuntu Touch Emulator test videos I’ve recoded in Ubuntu 14.04:
Install Ubuntu Touch Emulator in Ubuntu 14.04, 13.10 and 12.04
Update 13 May, 2014: The Emulator package from the Phablet tools PPA was updated with Ubuntu Touch x86 support which is much much faster than the ARM instance, as you can see in the videos above!
Ubuntu Touch Emulator is available in the official Ubuntu 14.04 repositories but it’s an old version and futhermore, it doesn’t support x86 instances, so I recommend using the Phablet Tools PPA, which has packages for Ubuntu 14.04, 13.10 and 12.04.
Add the Phablet Tools PPA and install the emulator using the following commands:
The current “stable” image doesn’t seem to work, that’s why I’ve added the Utopic proposed channel for the image in the commands above.
On Ubuntu 12.04, you may get the following error:
Error while converting ~/.local/share/ubuntu-emulator/UbuntuTouch/system.img: Unknown option 'compat'
qemu-img: Invalid options for file format 'qcow2'.
I’m not sure why this error is displayed, but the emulator runs just fine so ignore it.
2. Then, run the new instance by using the following command:
ubuntu-emulator run UbuntuTouch
The first time you run the emulator, the boot process will take quite a while. When it finishes booting, a shell with Ubuntu Touch will start, asking you to enter the username and password:
If you want to interact with the emulator via an interactive ADB session, log in here using “phablet” (without the quotes) for the username and “0000” (without the quotes) as the password. It’s not required to log in here if you only want to use the Ubuntu Touch Emulator GUI.
After this, it might take another few minutes and Unity 8 with Mir should be loaded in the Ubuntu Touch Emulator.
In theory, Ubuntu Touch emulator should support some parameters, such as setting the memory (“–memory”), which by default is set to 512mb of RAM, but for some reason the instance doesn’t start when using this, or at least it didn’t in my test.
3. Optional: change the Ubuntu Touch Emulator size:
Ubuntu Touch Emulator with a 0.7 scale on my 1920×1080 monitor.
If the default Ubuntu Touch Emulator size is too big for your screen, you can scale it down. To do this, run it with the “–scale” option. For instance, to scale the emulator to half its original size, use:
ubuntu-emulator run --scale 0.5 UbuntuTouch
the downloaded images are stored under ~/.cache/ubuntuimages
the images are stored under ~/.local/share/ubuntu-emulator
To delete an Ubuntu Touch Emulator instance, use the following command:
sudo ubuntu-emulator destroy UbuntuTouch
Where “UbuntuTouch” is the name of the instance you’ve created. If you can’t remember the name, you can run the command below to list your Ubuntu Touch Emulator instances:
Creating / restoring snapshots
Ubuntu Touch Emulator supports disk snapshots – to take a snapshot, use the following command: