BuilduntuVM – Compile Android ROMs in Windows and Mac OSX

UPDATE 7/04/2016 – STABLE based on Xubuntu 16.04 LTS and OpenJDK 8 available! See Downloads

BuilduntuVM is a ready-made virtual machine, based on my guide here for preparing Ubuntu 16.04 to compile Android ROMs from source. It includes everything needed to sync with the repo of your choice (Cyanogenmod, AOKP, AOSP, etc) and start building.

– Xubuntu Core 16.04 base
– Installed all packages for compiling (list available in the guide link above)
– Unnecessary junk removed (media players, games etc.)
– Geany for editing code
– Repo located in ~/bin and added to PATH
– Ctrl-F12 quick access drop-down Terminal

– Ready to compile Android N/O (6/7) ~ Now with JDK7!

All you have to do is download the source code!

The only requirement is that your computerย has a 64 bit processor

32 bit will not work!

1. Download and install the latest VirtualBox for your host system from here.
2. Download and extract the OVA file to your hard drive.
3. Start VirtualBox, click File > Import Appliance. Select “Open Appliance” and navigate to the OVA, then click Next to import the virtual machine.
4. Highlight builduntu in VirtualBox Manager and open Settings. Under “System” you may want to give it more RAM and Processor Cores. The higher these values are, the faster ROMs will compile.
5. Start the machine, pull up a terminal and initialize a git repo. Once the source is finished downloading, it’s ready to go!

Username/Password: android/android



via BitTorrent – PLEASE HELP SEED!

builduntuvm.v2.torrent (14354 downloads )


via Google Drive (21232 downloads )

md5sum: 1f7b4cda1c15149b92aeeb178c0a744f


OLD v1.6 (with older Java for Android L 5.x)


builduntuvm.torrent (15027 downloads )



builduntuvm.mega (8794 downloads )


via Dropbox

builduntuvm.dropbox (14445 downloads )


via MediaFire

builduntuvm.mediafire (13253 downloads )

md5sum:ย 34ceb3dcd89ab0f10d790a681986c422

For a ready-to-go Builduntu Install Disc (to dual boot etc.) check out the ISO here.

Are there any features you would like to see? Did it work for your project? Respond below!

Feel free to contribute to the new hardware fund if you appreciate my work.


v1 – Initial Release Dec 26, 2013

v1.01 – Released Jan 03, 2014
.. Added swap space
.. Increased dynamic drive max to 100 GB
.. Installed latest VirtualBox Guest Additions
.. Updated
.. Optimized

v1.1 – Jan 16, 2014
.. Updated and repackaged OVA file for VMWare

v1.2 – Feb 04, 2014
.. System updated
.. Packaged Manifest for data integrity verification
.. FINAL 13.10 edition (future releases will be based on 14.04)

v1.3 – Feb 08, 2014
.. Changed version numbering because I felt like it
.. Rebuilt with Ubuntu 14.04 base system
.. Increased swap space
.. Increased max disk size to 500 GB

v1.31 – Mar 02, 2014
.. Rebuilt from scratch using the latest Xubuntu 14.04 Beta 1 release
.. Testing semi-automated environment script

v1.32 – Mar 20, 2014
.. Rebuilt from scratch again with freshly made Builduntu Install Disc
.. Torrent distribution

v1.4 – Apr 20, 2014
.. Rebuilt with Xubuntu 14.04 LTS Final Release
.. Max HD size 250 GB dynamically allocated
.. Added Guake dropdown terminal for increased command line functionality (check it out!)
.. Shared folders should be working now (so you can build in a folder located on your host system, add the directory in Virtual Box Settings > Shared Folders)

v1.5 – Dec 27, 2014
.. Xubuntu 14.10 base system
.. Transition to JDK7 for Android L builds
.. Installed ccache

v1.6 – Jul 17, 2015
.. Xubuntu Core 15.04 base
.. Switch to LVM
.. Reduced OVA size (almost 1 GB smaller!)
.. Removed Guake in favor of xterm drop-down. Ctrl-F12 for the terminal hotkey
.. Cleaned up package list

v2.0 – Apr 29, 2016

.. Rebase to Xubuntu 16.04 LTS with Builduntu ISO v2

.. Transition to OpenJDK 8 for Android M builds

v2.0 – Jul 06, 2017

.. Moved to stable


    1. A Manifest is now included with the virtual machine image (as of 02-04-2014). This can be used to verify data integrity.

  1. Is there a package for vmware 5? I downloaded the link and was able to import it into virtualbox, but I prefer using vmware as my host. Thank you for all of your work on these build environments. I appreciate it because it is quite a pain to set them up.

    1. @Jerad Have you already tried to import the OVA package into VMWare? I’ve heard mixed results, but have not had a chance to try it myself. Users on another forum have never given me a definitive answer and I’d really appreciate finding out for sure.

      If it definitely doesn’t work, let me know and I’ll see what I can do about exporting it to a different format.

  2. @sylentprofet I have not tried the current version (v1.3) you have available in vmware 5. I am currently downloading the file and will report the results back when it is finished. I do have the release after Jan 16th (v1.1) and it did not work in vmware 5. It did work in virtualbox as described though.

  3. Importing v1.3 into vmware fusion gives me the following error:

    “The import failed because /Desktop/builduntu.v13/builduntu.v13.ovf did not pass OVF specification conformance or virtual hardware compliance checks.
    Click Retry to relax OVF specification and virtual hardware compliance checks and try the import again, or click Cancel to cancel the import. If you retry the import, you might not be able to use the virtual machine in VMware Fusion.”

    I clicked retry and it did import. At the first boot the mouse was a little screwy with me not being able to left click, but I restarted the machine and it seems fine now. I will give it a go for a while and see if any more errors arise.

    1. Thanks man, I appreciate the info and your support.

      I’ve been reading a couple of articles and the consensus seems to be that OVA and OVF files should import into VMWare.

      Not sure what the initial mouse hiccup is about exactly, I’ll look into it, but I’m glad you persisted and it ended up working.

    1. Check out my guide here starting at step number 11. The final 3 instructions are about initializing your android directory with a git repo (CM, AOKP, AOSP etc).

      1. it says “ is no longer available.

        The authors have deleted this site.” when I follow that link ๐Ÿ™

    1. The VM’s hard disk is allocated dynamically, so it only expands out as you need it. Stick to building one branch and for one device at a time, you’ll be fine.

  4. You are the greatest ever! I’ve been trying to compile cm-10 for my devices for two years now with no success until I used your preconfigured machine and now I have built 2 cm-10 roms for the Virgin Mobile Galaxy Victory 4G LTE all because of you. rock n roll and I can’t thank you enough for your hard work and for making my life easier. Thanks again. Oh, I just downloaded your new Builduntu and can’t wait to try it out. Yeah you right!

    New Orleans, LA

  5. You rock n roll dude. I just installed the new Pre-built Machine; I thought it was fairly easy before now this new machine basically sets itself up. I installed Virtual Box, your Machine and in 10 minutes I am already syncing the repo. I can’t thank you enough. Have an awesome evening.

    New Orleans, LA

  6. how can i connect my WD usb harddisk in builduntu 14.04 ?
    M greenhorn in linux. I appreciate ur help.

    1. You have to pass through the USB device to the VM. VirtualBox Guest Additions comes preinstalled, so before you start the builduntu machine, go into Settings and add the USB device. You may have to mount the device once you boot the VM, it may show up automagically on its own. If you don’t see it, try googling “mounting USB hard drive virtualbox VM”.

      Good luck!

    1. To do things as root, use “sudo”.

      The username and password are both android.

      The root account is disabled by default as a security precaution.

  7. Thanks a ton for your work….I have one issue though that I’m not sure if it has to do with your VM or if it has to do with me missing files….I’m trying to port AOKP-kk to my device and i have already reworked most of my device specifics with cm11 as a base but I’m getting a toolchain error please if anyone could help i would really appreciate it!! ๐Ÿ™‚

    I have tried various other build commands and all yield same error for me. I even did make clean and it still persists. I have tried breaking down the error and googling and to no avail. Any help would seriously… appreciated….

    Thanks in advance…

  8. installs great – should we avoid using the software update. I ask because after using software update within xubuntu the size of the display shrinks and will no longer fill the screen.

      1. Using apt-get update and upgrade should be just fine.

        However, it is my personal recommendation to avoid using the dist-upgrade option. It is distinctly different in some important ways, and might break things.

        Thanks for the support everyone! I’ll be releasing a new version soon, stay tuned.

    1. It should work for compiling Android for just about any device, phone, tablet, watch, etc.

      Also, any Linux tools designed to work with Ubuntu or Linux in general will work fine in Builduntu.

        1. Yes, there is a GUI. I’m not sure what you mean by the second question, I’ve never used Android Kitchen. Like Android apps in an emulator?

  9. Hello again,

    I just tried “repo init -u” for the AOSP repo and got the following error:

    error.GitError: manifests var:
    *** Please tell me who you are.


    git config –global “”
    git config –global “Your Name”

    to set your account’s default identity.
    Omit –global to set the identity only in this repository.

    fatal: unable to auto-detect email address (got ‘android@builduntu.(none)’)

    Whats next?


    1. You need to configure git to identify who you are (during builds this info is stamped into the ROM information).

      It can be a made up name and email, you’ve just got to have something. In a terminal:

      git config --global "" && git config --global "Your Name"

      Then re-run repo init, it should finalize. I like to enable colored-terminal output personally, but default works fine too. At this point, you’ll execute “repo sync” and begin the lengthy process of downloading the code. Coffee/beer/cider/coconut water break time!

  10. Hello,

    Forgive my ignorance, but.

    All files are downloaded to the android folder, now what do I do? there is nothing obvious to where to begin.

    Do you have a guide on how to use this ROM making app after it’s installed?


    1. It depends on what flavor of Android you’re building, i.e. AOSP, AOKP, CyanogenMod, etc etc etc.

      They each have their own ways of calling the compile process once you’ve synced with the source repo. Read the documentation provided on their website/GitHub for the particulars, but for example, AOKP goes something like this –

      (from your source directory in the terminal):

      source build/

      After that, you will be presented with a list of available devices. Enter the corresponding number and the build process will begin. This process can take a long time, depending on your machine specs.

      When it’s complete, it will present a message with the location of your flashable zip file. For AOKP that’d be something like:


      Remember, whenever you make changes to your code locally or do a major repo sync you should also execute make clobber in your source directory. This will refresh the target directory for your new build.

  11. Hi Nathan.
    Thank you very much, for your great work!
    I wonna build CWM for my device from Cyanogenmod cm-11.0.
    Is it sufficient to only replace JDK7 with JDK6 in BuilduntuVM v1.5? Or do I have to change other files?

    1. Thanks for the kind words!

      Your builds might work with Java 1.7, but if they don’t, it’s just a couple of quick steps:

      In a terminal:

      sudo apt-get install openjdk-6-jdk
      sudo update-alternatives --config java
      sudo update-alternatives --config javac

      After the two “update-alternatives” commands, you’ll be asked which version of Java to use as the system default. Simply choose JDK6 in place of JDK7. If you wish to build Lollipop ROMs, just run the same commands and switch back to 7. Make sure to do both java and javac!

      Hope this helps!

  12. I have downloaded it 3 or 4 times but everytime i cant extract it because it says that there is no files to extract .. Please help me

        1. I just downloaded the file from Mega and extracted it successfully. It must be something on your system.

          What zip program are you trying to use? What operating system? Walk me through your steps specifically.

          1. I have used 7zip and i also tried on my Lg G3 but no positive result .. It always appears a message that no files to extract ..

          2. Google how to check the MD5 sum of a file and compare it with the original post. Your download may be corrupt.

            Also try the torrent. I know it’s not as fast but in order to help you troubleshoot the issue I think it’s the easiest next step.

            I downloaded the MEGA file and extracted it perfectly using my Linux system, and there have been no reports of anyone else experiencing this issue.

            If you download the torrent and it still will not work, then it is definitely something going on with your system.

            What OS are you using with 7zip? Windows 7?

    1. It appears that somewhere along the lines your download is being corrupted. Technically this should not be possible with the torrent.

      If you re-download the torrent and save it to the same location (C:\Downloads or where ever), it will check the contents of your existing file and verify it against the original. If any of the pieces are missing/broken, they will automatically be downloaded. It will not have to download the whole file again, only the corrupt pieces.

      My recommendation would also be to try using Windows built-in ability to extract zip files instead of 7zip. Also, try a different torrent client. My personal favorite is Deluge. You can change torrent programs and still try the above procedure very easily without needing to download the whole file again.

      If the problem continues to persist, it may be a deeper issue. Perhaps a bad RAM module or a hard disk starting to fail. You will have to do some troubleshooting. Good luck!

      1. Now when i start the machine it ask mo to choose the OS to boot and when i enter ubuntu, only black screen with a blinker pops up? Again Problem

  13. i’m having a problem. when i boot up the virtual machine it only shows a black screen.
    any clue on how to fix this?thanks in advance

    1. How long did you wait? It can take a while for BuilduntuVM to start up for the first time, especially on systems with limited resources.

      It might not look like there is anything going on, but just be patient. Give it a few minutes.

      If you still don’t have any luck, post some more information about your system. It’s hard to troubleshoot without details.

      Good luck!

  14. Thanks for this. BTW It only makes a small difference, but you gain ~100MB savings by compressing with “xz -9e build…ova”. If you want it to go *much* faster and use all of your CPU cores, “7za a -txz -mx=9 builduntuvm.v15.ova.xz builduntuvm.v15.ova”. LZMA compression is available everywhere these days.

  15. Hi Nathan,
    2 things…is there a script to automate the build once we are up and running? not using jenkins, I found that one, but dont want it.. just a script to automate the build on my builduntuvm…i am building cm 12.1 for hammerhead

    and, how should i change the username after i have set everything up…i want my build to show “tnpapadakos@builduntuvm #1” in “Kernel version” rather than “android@builduntuvm #1”

    I have seen conflicting instructions when searching the web

    Thanks for your awesome work on this!

    1. A script would be easy enough. In your source directory, create a file named and inside it put:


      source build/ && lunch ## ** make otapackage

      Where “##” is the number corresponding to your device, hammerhead.

      As for the username, go to the Menu in the upper left corner, and then Settings. Scroll to the bottom, you will see users and groups. From there, add a new user and create a password, then logout and log back in with the new username.

      Thanks for the support! Let me know if you have any other questions.

  16. Thanks. Another question. I’m trying to run virtual box on Windows 10 as the host. Once I import VM, and then close out of it, if I reboot my host I lose mouse and keyboard and network connection. Searched for windows 10 and virtual box to no avail. Any ideas what’s happening? I’ve tried it twice now.

  17. Can you create a docker container for this too? The amount of configuration and dependencies required on Linux tend to break other builds. It would be great to have a disposable container instead. Thanks in advance!

    1. Recently I’ve been learning Puppet, Vagrant, and Xen Hypervisor. I’ll take a look into building a Docker container as well.

      The release of 15.04 brought some interesting bugs into the config process, namely jayatana for Unity flavors.

      Thanks for the suggestion! Stay tuned.

      1. Thank you, you might consider looking into using lxc as docker is just a wrapper and is more targeted at single-app-per-container rather than lxc’s general lightweight VM goal.

  18. Hi…
    Can you please upload in another file hosting…. Mega & dropbox arent working nd torrent is very much slow…. Please

    1. Just checked the Mega link and it appears to be working.

      Had to move the Dropbox link, should be working now.

      I’ll be releasing a new version soon. When I do, I’ll look into uploading it to a more reliable file host.

  19. Installed VirtualBox 5.0.1, imported the builduntuVM, It refused to load. It threw an error and this is what it said….

    Any ideas? Id really love to give this VM a whirl as opposed to dragging another PCout ofthe garage to clutter my desk (Dual booting with Win10 and UEFI hasnt worked out for me yet).

    Also, it will not import to VMWare Workstation 11.
    i7 4820k
    8gb DDR3
    Windows 10 Pro x64

    1. According to – Windows 10 as a host is not yet supported officially with 5.0 (as of writing 08/17/2015)

      Looks like they’re having some issues. Try downloading 5.0.2 and give that a shot. They should have it going soon enough.

      Good luck!

      1. I also want to try but i only want the vitrual drive to be smaller, mine ssd 250 gb is completely used bij virtual drive. Making the drive 50 gb and then import the .ova file doesnt work. Who can help me

        1. The virtual drive will expand as needed. So your 250 gb should be ok. Starting size is very small, building for one or two devices will take less than 100 gb total.

  20. Unable to import with VMWare Player 7. I get the following error:

    Failed to open virtual machine: Line 77: Unsupported element ‘StorageItem’.
    Line 86: Unsupported element ‘StorageItem’.
    Line 95: Unsupported element ‘EthernetPortItem’.

    1. I will take a look at it.

      I’ve been working on a new version based on 15.10 – hopefully that might resolve some issues. What host OS are you using?

      Lots of people reporting problems with Windows 10 and virtualization.

    1. Not yet. I’ll get to work on an update, probably for 15.10

      Some things changed with the way images are packaged on the disc, so I may need to revise the technique for customizing.

      Keep an eye out for new versions soon!

    1. If you are referring to the terminal, use “sudo” – not “su”. Root is disabled for security reasons in Ubuntu.

      Otherwise, it definitely works. A bunch of people around the world have been using it without a problem for months.

  21. obviously this guide’s claim of “everything ready to go after install, just sync repo and go” are not accurate. I’m installing this on a freshly installed and completely updated laptop. It seems as though there are other things that windows needs before this guide is used. It would be a good idea to inform users of what windows needs in place before this guide is used. Also, if it were as simple as install, sync and build then i wouldn’t be getting errors, i installed VM then set the builduntu .img to run in VM, started the VM, started builduntu then went straight to entering the commands in this guide. Something must be missing or needs updating in this guide because following the instructions verbatim is not working.

    1. What are the “other things that Windows needs in place”? What version of Windows are you using? mingw32 is used for compiling VirtualBox in Windows, not sure why it would be needed for the binary install..

      What repository are you trying to sync with? What device are you building for? What version of Android are you trying to compile?

      I need a lot more information to help fix the issue. No one else has reported experiencing this, so it wouldn’t be fair to blame the guide. If the host system is Windows 10, that might be the problem. Many users are reporting issues with Windows 10 and virtualization in general not working properly.

      1. I’m on windows 7, I’m not building anything yet, I’m still dealing with getting everything in your guide setup the way it says, i haven’t moved on to anything beyond initial install and setup. I don’t know why it is giving me the mingw32 error. it did that when i pasted the commands in your guide into my terminal. It is the command you put in your guide so somehow your guide/setup requires mingw32

      2. If you are referring to the “guide” linked to in the first sentence (“based on my guide here”…), I think I see where the issue is coming from.

        This Virtual Machine is ready to go out of the box. That guide is for people setting up a brand new Ubuntu environment from scratch. You don’t need to do both.

        Once you load BuilduntuVM in VirtualBox, google for a guide on how to compile ROMs. All you should have to do is create a working directory (mkdir android), repo init, repo sync and then compile.

        If you want Ubuntu Software Center, run the following command in a BuilduntuVM terminal:

        sudo apt-get update && sudo apt-get install software-center

        Hope that helps!

  22. Can we get the ubuntu software center in this? I’d rather use the GUI to install packages instead of terminal for convenience, seems unnecessary to do all that typing when their is a simpler way, plus, I don’t know all the linux commands and syntax. If i cant use the software center in this setup then i guess builduntu will have to be uninstalled.

  23. Hi !
    Thx for your great work !

    Emulator doesn’t work. OpenGL and virtualBox are not good friends ๐Ÿ˜‰
    Can you test your build on your VM ? I will test emulator with win32 binaries.

    Good job ! ๐Ÿ™‚

  24. Was finally able to get a good hash from the torrent link.

    On importing into VB I get the following error:

    Failed to import appliance C:\Users\Paul\Documents\Vuze Downloads\builduntuVM.v16\builduntuVM.v16.ova.

    Could not create the imported medium ‘E:\Users\Paul\VirtualBox VMs\builduntuVM.v16\builduntuVM.v16-disk1.vmdk’.

    VMDK: Compressed image is corrupted ‘C:\Users\Paul\builduntuVM.v16-disk1.vmdk’ (VERR_ZIP_CORRUPTED).

    Result Code: VBOX_E_FILE_ERROR (0x80BB0004)
    Component: ApplianceWrap
    Interface: IAppliance {8398f026-4add-4474-5bc3-2f9f2140b23e}

    Any ideas?


  25. I have tried downloading from all three links. Mega and Dropbox give me CRC fails under 7zip. The torrent finally downloaded, and I get a good md2sum match. after extracting, it fails to import into VirtualBox, saying the vmdk is corrupted.

    Do you have any suggestions?

  26. Hello,u say that we need a 64 bit os,
    If installinstalling on a virtualbox then this dowsnot matter right?
    My processer supports 64 bit but i use 32 bit os.

      1. Slight correcttion sir,
        As their official documentation, it does support this,
        You only need to have hardware virtualisation enable from BIOS.

        Also a little questions,
        Do we need to take any additional steps to get networking in buildunt.
        My internet works good in host and ubuntu guest I have,but on booting this builduntu I get no connectivity notification.

        1. Nice catch!

          I double checked, as long as the processor supports 64 bit, the host OS can be 32 bit and still run a 64 bit guest. Thanks for the heads up!

          There should not be any additional steps required for networking in the VM. You can double check the image settings in VirtualBox Manager under the Network tab. Everything should work fine with NAT selected, unless you have a special network setup.

          1. I just did that,saw my ubuntu guest settings, everything works fine now,
            Shall I make a installation video for this?

  27. Can you give us instructions on how to build a android rom from source on ubuntu 16.04. jdk 7 does not work and im so confused with all the old tutorial online for ubuntu 14.04.

  28. Any chance I could get access to an older version? I need to compile kit-kat (4.4.3) and the recommended OS for that is Ubuntu 14.04, so your v1.3 would be ideal for me. Thanks!!

  29. Using v1.6 to build 5.1.1_r1 for grouper (asus nexus 7 2012) I get this error:

    out/target/common/obj/PACKAGING/public_api.txt:20: error 5: Added public field android.Manifest.permission.BACKUP
    out/target/common/obj/PACKAGING/public_api.txt:82: error 5: Added public field android.Manifest.permission.INVOKE_CARRIER_SETUP
    out/target/common/obj/PACKAGING/public_api.txt:106: error 5: Added public field android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE
    out/target/common/obj/PACKAGING/public_api.txt:116: error 5: Added public field android.Manifest.permission.RECEIVE_EMERGENCY_BROADCAST

    You have tried to change the API from what has been previously approved.

    To make these errors go away, you have two choices:
    1) You can add “@hide” javadoc comments to the methods, etc. listed in the
    errors above.

    2) You can update current.txt by executing the following command:
    make update-api

    To submit the revised current.txt to the main Android repository,
    you will need approval.

    build/core/tasks/ recipe for target ‘out/target/common/obj/PACKAGING/checkpublicapi-current-timestamp’ failed
    make: *** [out/target/common/obj/PACKAGING/checkpublicapi-current-timestamp] Error 38

    Google says it might have something to do with the wrong java version, but it’s on the correct one (jdk 7). I tried upgrading to the latest openjdk-7-jdk, but no difference.

  30. I just want to study android source code, but while I building the code “repo sync” from aosp, there are always some errors.
    So, why not provide a vmdk include android source code.
    The code can be build success, we don’t care if it is the latest code.
    That is the real android build ready-made virtual machine

  31. Hello , i have one problem here , i am compiling my android kernel and i have 4 GB ram in my laptop , so i have assinged 2 processors in my virtualbox , so how much value i can use in “make -j#”
    -j5 or -j3
    please help me !

  32. Thanks for sharing this info, I appreciate the info and your support.

    Iโ€™ve been reading a couple of articles and the consensus seems to be that OVA and OVF files should import into VMWare.

    Not sure what the initial mouse hiccup is about exactly, Iโ€™ll look into it, but Iโ€™m glad you persisted and it ended up working.
    thanks once again for sharing this info.

  33. My Android system is not working properly, someone told me about this site that I should check the status of my Android system on this website and solve my own problems, am I fixing?

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.