[GUIDE] Set-up VirtualBox with Ubuntu on Windows to unlock the bootloader of the OnePlus One

  1. Rapante Donut Jul 19, 2014

    Rapante, Jul 19, 2014 :
    This is a complementary guide to @nguser's [GUIDE] OnePlus One: unlock the bootloader, install TWRP and SuperSU on Ubuntu to unlock the bootloader. install TWRP & SuperSU. This guide will not cover the rooting process, but all steps to make it possible on a Ubuntu VM running within VirtualBox.

    I am not responsible of any damage or loss of data that may occur before, during and after the whole process. By following this guide, your warranty will not be voided.



    I wrote this guide to help people that face similar problems as I did when trying to root their One under Windows. I had the problem that the RSA Key authentification was not triggered when using ADB under Win7 x64 so my last resort was to use an old vm ubuntu installation I had lying around. To make this as easy as possible for other users, this guide is based on an existing ubuntu 14.04 image that can be found on http://virtualboximages.com.

    So lets get right into it!

    This guide is based on Windows 7 x64 and VirtualBox 4.3.14


    You will need a working installation of VirtualBox, which is free to use for personal use. Get your copy here:


    and install it.

    Additionally to that you will need a virtual machine image that runs ubuntu. If you don't have one already, please download the following image:

    http://virtualboximages.com/Ubuntu 14.04 LTS i386 Desktop VirtualBox VDI Virtual Computer

    Once downloaded and all files within the archive unpacked into a directory of your choice start up VirtualBox


    First things first, so go to the preferences by either pressing CTRL+G or choosing it from the “File” menu. You should be within the “General” tab of the settings, select the dropdown list of “Default Machine Folder” and choose the directory you have extracted the image files. This step is not necessary but it's good for convinience.


    Now on with the more important stuff. Select “Machine” from the menu and click on the green plus ( add ) to add your downloaded VM image. If not already in the right folder, browse to the folder you have extracted your image to and select the vbox image.


    You should now see an new virtual machine in a list on the left side of the main screen. Now just click “start” to boot up the machine.


    Once booted this image is configured to automatically start firefox and a couple of websites. Just close it down by right clicking the icon and selecting “quit”.


    The next step is only for user with non English keyboard layouts, so you can be sure what you type is actually aligning with your hardware's keyboard layout. So just click on that little square icon labeled “EN” in the upper right corner of the desktop and further select ”Text Entry Settings...”. In the menu that pops up, click on the little plus underneath the list and add whatever keyboard layout language you deem necessary. Close down the menu and click the “EN” again to then select your newly added keyboard layout.

    vb_07.jpg vb_08.jpg


    The next step is probably the most important step to succeed. You will need to gain full access to your one plus bypassing the host OS' drivers and directly accessing the hardware through a usb driver tunnel. To do this, select ”Devices” then “USB Devices“ and from the list that appears, select your OnePlus One.


    Once that is done, a MTP window should appear and you should be able to browse the contents of your phone.


    One additional hint if you want the convenience to copy&paste the commands that @nguser 's guide outlines into the console window. If you activate to “Devices“ -> “Shared Clipboard” -> “Host to Guest” you can just copy the commands in your host system's browser and copy them right over to your VM.


    Now you can start using @nguser 's guide to root which can be found here:
    [GUIDE] OnePlus One: Unlock the bootloader, install TWRP and SuperSU on Ubuntu

    Last but not least a little glimps into the last steps the rooting process described in the guide above:

    When you boot your device into fastboot mode, it will be removed from “devices”.
    To access it in this mode, you will then need to activate tunneling for a “Google Android” device that will appear, once your phone is in fastboot mode.
    Similarly after leaving fastboot mode, you will need to activate tunneling for your “OnePlus One“ again.


    I hope you found this guide helpful, and if you have suggestions or questions, let me know, thanks!
    Last edited: Jul 20, 2014

    iomollie, Shuffler505, Brenda and 3 others like this.
  2. Rapante Donut Jul 19, 2014

    Rapante, Jul 19, 2014 :

    Q: So what were your symptoms, so I can quickly make a call if this guide would make my life easier

    A: I had the problem that my One and my Windows 7 x64 were unable to make the RSA KEY authentification via ADB happening.

    To give you an overview what I did for about 3h to get it to work:

    • used every usb port on my computer to see if that enables the auth dialog.
    • used both PTP and MTP mode of the One
    • reset the authorized computer list via "Developer Options -> Revoke USB debugging authorization"
    • tried various generic USB drivers provide by Koush, XDA and Google to see if that helped
    • typed "adb kill-server/start-server into my console windows so often it makes me want to puke just thinking about it ;)
    • deactivating my firewall/antivirus suite

    I did all of the above in a grid, meaning a methodical checklist that combines each of these steps with every other step on the list. A little later than 3h I still had no working result.

    Q: How long should this process take?

    A: Assuming you already have all necessary files downloaded, the pure VM setup should not take more than 5-10 minutes, including the rooting part, you might take 15-20 minutes if you take it slow. Keep in mind re-installing your windows and hoping it will work then, is a lot more time consuming.

    Q: Why don't you use tool "XYZ"? It can do the same, but without that long and complicated setup you describe here!

    A: All the of the existing "worry free", one click solutions I am aware of, use the exact same setup, namely, Google's Win ADB Api and the generic USB driver that comes with every installation of Android's SDK. There is a pretty good chance, if nothing worked before, this is a very fast, clean and working solution for everyone who doesn't want to spend countless hours to try to fix this using only windows.

    Q: So what is the benefit of this process?

    A: If you face a similar situation as I did, the simple benefit of it is you will have a very easy option to solve this problem without a time consuming windows re-installation. VirtualBox is designed in a way that it allows for USB tunnelling. This is made possible through a special USB driver installed by VirtualBox that will encapsulate direct communication of your device with the guest OS ( ubuntu ) without the need to rely on any of the Windows drivers. Think of it as a virtual private network, but for your One.
    Last edited: Jul 20, 2014

    Brenda likes this.
  3. Rapante Donut Jul 19, 2014

  4. Glissant Froyo Jul 19, 2014

    Glissant, Jul 19, 2014 :
    That's a very specific sort of situation. I'm interested in reading why someone would need this scenario.

  5. caffeine Ice Cream Sandwich Jul 19, 2014

  6. vinit28 Ice Cream Sandwich Jul 19, 2014

    vinit28, Jul 19, 2014 :
    Yeah. thats y i thought @Rapante what benefit would one have using this method.

  7. Mark Joseph Jelly Bean Jul 19, 2014

    Mark Joseph, Jul 19, 2014 :
    just a question, why do i need to unlock boot loader?

    need to google it, have no idea what boot loader even means.

  8. Glissant Froyo Jul 19, 2014

    Glissant, Jul 19, 2014 :
    1. Unlocking Bootloader: Opens the door to the internal memory of the device to be written on to. This allows you to flash images onto the main partitions of the phone.
    2. Installing a Custom Recovery: A custom recovery is flashed onto the recovery partition of the device and overwrites the stock recovery that exists by default. Custom recoveries bring lots of functionality and give you the ability to perform wipes, install flashable zips, create full backups of your NAND (Nandroid backup), and various other features. An unlocked bootloader is needed to install a custom recovery.
    3. Rooting: You can gain root by either flashing via recovery a pre-rooted custom rom, or flashing a zip containing the SuperSU binaries. A custom recovery is necessary to do this.

    vinit28 likes this.
  9. nguser KitKat Jul 19, 2014

    nguser, Jul 19, 2014 :
    Hi all,

    please wait few minutes until @Rapante puts the guide on first comment. Also I need to remove a couple of comments because he needs some reserved post. Thanks :)
    Last edited: Jul 19, 2014

  10. Mark Joseph Jelly Bean Jul 19, 2014

    Mark Joseph, Jul 19, 2014 :
    i have no idea what are this,

    but i guess i can still use my phone the traditional way,
    looks like unlocking bootloader is the equivalent of contacting aliens on another dimension.

    Brenda likes this.
  11. nguser KitKat Jul 19, 2014

    nguser, Jul 19, 2014 :
    Sorry guys, I had to remove your comments.

  12. vinit28 Ice Cream Sandwich Jul 19, 2014

    vinit28, Jul 19, 2014 :
    Got the answers now. But i think the wait for OPO has made most forum members, lol ;) [no one to blame though]

    Thanks, Enjoy

  13. puffinnugz Gingerbread Jul 19, 2014

  14. Rapante Donut Jul 19, 2014

    Rapante, Jul 19, 2014 :
    Please note, if you face the driver problems I had, you cannot use the toolbox, since it also relies on the Win ADB api and USB drivers to work. Since they did not work, this is a very fast and clean alternative to reinstalling your windows and trying your luck.

    nguser and puffinnugz like this.
  15. caffeine Ice Cream Sandwich Jul 19, 2014

    caffeine, Jul 19, 2014 :
    Aha, the key authentication. Sometimes it gives me problems too but right now I can't remember how I fix this. It happened a lot on my N4 so it's most probably driver's fault. Doing all of the steps above seems like an overkill for me. Just my opinion, though. Thanks for the guide :)

    Rapante likes this.
  16. nguser KitKat Jul 19, 2014

    nguser, Jul 19, 2014 :
    Well done @Rapante, I like it a lot. I will translate this guide in Italian and post it on the italian forum.

    Also, I will link this thread in my walkthrough of course. Great job, thanks.


    Rapante likes this.
  17. snappys Honeycomb Jul 19, 2014

    snappys, Jul 19, 2014 :
    Still I don't have One plus phone but useful guide since I'm an Ubuntu user. Thanks

  18. Something Honeycomb Jul 19, 2014

    Something, Jul 19, 2014 :
    You do not need Ubuntu to do all this :eek: Thats all very long winded as you can do it through ADB :)

    EDIT: Sorry, I missed the bit about your RSA Key

    Rapante likes this.
  19. nguser KitKat Jul 19, 2014

    iomollie and Rapante like this.
  20. Rapante Donut Jul 20, 2014

    Rapante, Jul 20, 2014 :
    As I stated before, there are various ways why the Win ADB api and various generic USB drivers fail to operate harmoniously, thus the guide.

    In my own case I apparently have remnants of previous' phones drivers on my system that mess with the ability to trigger the RSA Key auth through ADB on windows. Downloading and installing a VM image is way faster than making a tedious backup procedure and reinstalling my windows.

    In an optimal case, I concur, this guide should necessary, but unfortunately, some of us don't have that particular luck.

    iomollie likes this.