How To: Create Your Own Custom ROM for Android, Part 1 – Setting Up The Android Kitchen

So you love loading custom ROMs, but you just wish you could choose what features you wanted in the ROM or even grab a ROM from another device and port it to your phone? Well, thanks to DsiXDA over at XDA Developers, there is a neat little program that can help you do just that. And best of all? No programming skills required. So here’s how to setup the program and get started on your first custom ROM!

I. Before You Begin

1. This ONLY works for HTC Android devices at the moment, later versions might support others (check here for an update when it does).

II. Download a Virtual Machine and Set It Up.

1. Download VirtualBox for free from here (the one for Windows Hosts at the top). Then click next on the setup process until it installs.

2. Open VirtualBox and click on New.

3. Name the New Virtual Machine whatever you want (we named it Linux for simplicity’s sake).

4. For Operating System choose Linux, then choose Ubuntu for Version and click next.

5. Click Next again leaving the Memory Setting at what it is preselected at (should be 384mbs).

6. Click Next on the Boot Disk screen as well leaving boot hard disk and create new hard disk both selected.

7. Keep clicking Next until you get to the slider that asks how much space to set for the Linux. Move the slider to 8Gbs and click next.

8. Click next until it is done and shows you the original screen you started on but now with the Linux Machine Powered Off on the left.

III. Install Linux Ubuntu on the Virtual Machine

1. Download Ubuntu from here.

2. Once it is downloaded, in the VirtualBox program, click the Start button at the top.

3. Close out all the warnings that come up.

4. Then click on Devices > CD/DVD Devices > More CD/DVD Images… then select the .iso image for Ubuntu you downloaded.

6. Follow the prompts on the screen to install Ubuntu on your Virtual Machine.

7. Once it is installed and reboots, goto Applications > Accessories > Terminal and type this line with hitting enter at the end:

sudo apt-get install sun-java6-bin sun-java6-jre

It will ask you for a password, type in the password you created when you went through the Ubuntu installation process (it asked you for it before finishing the install).

Then it will ask you y/n. Hit y then enter. Then when it shows you the terms and conditions, hit right arrow on your keyboard and click enter to select ok. Then hit left arrow on your keyboard and enter to select Yes.

*NOTE – Your keyboard and mouse will not function on your regular computer once you use them in the Ubuntu virtual machine. To re-enable them, click the Ctrl button on the right side of your keyboard.

**IF YOU GET AN ERROR INSTALLING THE JAVA FILES,
Download the java files manually FROM INSIDE THE EMULATOR/LINUX using Firefox here:

Java6 Bin
Java6 Jre

Then open the Terminal App in Ubuntu and type this with hitting enter at the end of the line:

sudo dpkg -i sun-java6-jre_6.18-4_all.deb sun-java6-bin_6.18-4_i386.deb

And that should fix it.

IV. Download and Setup The Android ROM Kitchen

!THIS NEXT SECTION NEEDS TO BE DONE WITHIN THE UBUNTU VIRTUAL MACHINE!

1. Click on the Firefox logo at the top of your Ubuntu installation (in the Virtual Machine).

2. Type this into the url box:

theunlockr.com/2010/03/26/how-to-create-your-own-custom-rom-for-android-part-1-setting-up-the-kitchen (to navigate to this page from within the virtual machine).

3. Now download the latest version of the kitchen file  in the first post from the link below(again from inside the Ubuntu installation on the virtual machine. We are doing this because we want to save this file in our Ubuntu Virtual machine, NOT our regular computer).

Kitchen

4. Again on the Ubuntu machine, Find the .zip file you just downloaded, right click it and click open with Archive Manager and then click Extract at the top.

5. Once you click Extract, it will ask you where. Double click the folder that has the name you created when you installed Ubuntu (my username was theunlockr so my folder is called theunlockr. It is the first folder under recently used in the list on the left). Then click Extract at the bottom right.

V. Run the Android ROM Kitchen

1. To run the Android ROM kitchen, click on Applications at the top of Ubuntu > Accessories > Terminal then type the following and hit enter:

./menu

2. You will now be greeted by the simple text menu of the application. Enjoy!

VI. Create Your First Custom ROM

Head over to our How To: Create Your Own Custom ROM for Android, Part 2 – Creating Your First ROM

225 thoughts on “How To: Create Your Own Custom ROM for Android, Part 1 – Setting Up The Android Kitchen”

    1. Mr. O,

      No, not at all. The virtual box is just for Windows users. Go ahead and and use your regular Ubuntu computer and start in the procedure at that point. Good luck!

      1. Actually Windows users can also use WUBI (Windows UBuntu Installer) : http://www.ubuntu.com/desktop/get-ubuntu/windows-installer.

        That’s a Windows .exe file that will create a Ubuntu boot option on Windows startup.

        IMHO it’s easier than to set up a VirtualBox virtual machine and Ubuntu, when booted will run much better (full hardaware capacity), full-screen and without the annoying Mouse cursor being trapped in VirtualBox…

        That’s a “virtual” dual-boot option so it can be un-installed like any Windows program, so no big deal if you don’t like it… All Windows users needing sometimes to run Ubuntu should try it 😉

    1. Cbowley,

      Here’s the thing. According to Google analytics, 80% of our readers are using Windows. Not too mention it happens to be the MOST popular OS in the world, by ALOT. And there was even a study that showed that the majority of people who own the next popular OS (Mac), actually ALSO own a Windows PC as well lol. It’s like saying, “Why are all the street signs in the US in English?! Assholes!” lol For those of you already using Ubuntu, you are not your average joe, and are probably a developer or at least someone with enough computer knowledge who can figure out that you can just start from after the virtual machine in this procedure. 🙂

  1. @Mr. O
    I am running Ubuntu9.10 already, if this is the case, then just follow the tutorial from part 3, wherever it says ‘Virtual Machine’ that is just your Ubuntu ‘as is’!

    To make things a bit tidier in your ‘Home’ folder, create a simply named folder inside your ‘home’ folder (I called mine ‘rom’), and extract the contents of the Kitchen download into this.

    Then you can use the following command to access that folder:

    cd /home/username/rom/
    ./menu

    Hope this helps!

  2. Thanks for mentioning my kitchen and for the video!

    The alternative method for setting up in Windows is with Cygwin, which is a much faster setup, but there is a problem with the kernel repacking scripts. Follow the post #3 in the kitchen thread for instructions. If someone can figure out why it doesn’t work for Cygwin, please let us know! Thanks!!!!

  3. when im done typing in my password (after i type in that sudo command) it tells me E: Broken package…am i doing something wrong?

  4. Unlockr,

    It works on Fedora 12 (which I’m running). The menu file is just a bash script, so it should work on any platform where you can run a full bash implementation.

  5. I’ve tried that but then it opens up Ubuntu n it takes me to the main setup process again where i have to select the language and then click either install, or install without changes to the computer

    1. When i try to add Ubuntu to visual box, it gives me ….

      Error failed to open C:/ blah blah could not open the media

      and i click details i get this

      Result Code:
      E_FAIL (0x80004005)
      Component:
      Medium
      Interface:
      IMedium {1d578f43-5ef1-4415-b556-7592d3ccdc8f}
      Callee:
      IVirtualBox {3f36e024-7fed-4f20-a02c-9158a82b44e6}

      Help a guy out?

      Thanks, great vid’s.

  6. Hello Unlockr,
    I never had a problem from using one of your tutorial until now, when I arrived to part 3 step 7 and when I typed in “sudo apt-get install sun-java6-bin sun-java6-jre”, I get…

    Reading package lists… Done
    Building dependency tree
    Reading state information… Done
    E: Couldn’t find package sun-java6-bin

    What did I do wrong?

    1. Thanks DsiXDA!

      I’ll put it here as well for people. Can they just put the files in their Home folder and then be able to use the sudo -i command just as you have it written?

  7. @TheUnlockr

    Yes you can put those downloaded files anywhere, and “sudo dpkg -i ” to install them. As shown in the command here, you have to have both *.deb files built together in a *single* command, because they depend on each other.

  8. The unlockr I have this problem, each time start the virtual machine have to download the kitchen because is not in the virtual machine.

  9. I have been able to install ubuntu and its running perfectly fine on my laptop but I am stuck at Part III step 7…i had to download the two seperate files in the ubuntu enviornment I even got the accepting the licence part but then I get this HUGE list of issues some of which include not enough space etc etc…I took a print screen of the error report and I uploaded the .jpg file to mega upload here : http://www.megaupload.com/?d=S7LQMHUT

    So please can some one tell me whats the problem…what Im doing wrong…I`ve been following the instructions verbatim and this is the only problem Im getting 🙁

  10. Oh and I promise thats not a virus I just couldnt find any other way to show anyone interested what the error report is…

  11. @jerry .. you must type it in the folder that has the kitchen.. “menu” is the name of a script file from the kitchen…

    1. James V,

      Coming… had some phones come in that I had to do videos for before I had to send them back… soon as those are all done, will be doing the part 2 ASAP.

  12. @Aziz. Follow the link to the kitchen FAQ that I had posted earlier. Download the other Java installer (*.deb) if this one gives you problems. If all else fails read the other part about installing Cygwin..

  13. sprint johnathan

    Yo cant find the 2nd video on how to run the android kitchen i have all that is told me to im not shore past that some one help

  14. @Sprint Jonathan

    Go to the page of the kitchen download link. That same post tells you how to run and use the kitchen.

  15. So whenever I go to virtual box, find the Ubuntu iso file and try to add it, it tells me I can’t open it because it is in the wrong medium.

    Result Code:
    E_FAIL (0x80004005)
    Component:
    Medium
    Interface:
    IMedium {aa8167ba-df72-4738-b740-9b84377ba9f1}
    Callee:
    IVirtualBox {2158464a-f706-414b-a8c4-fb589dfc6b62}

  16. @EJ. Did you manage to figure it out? Remember to add it under the CD drive settings of the new virtual image you created for Ubuntu. If you are still stuck, I can go and check my PC to see what I did for my virtualbox setup.

    There is the easier and faster Cygwin alternative setup as well.

    Also check the xda-developers thread for the Kitchen for more questions and answers.

  17. This is awesome! I already tweaked my first rom changing out the bootanimation as a small test… when will part 2 be coming out?

  18. What do you guys need to see in Part 2? The kitchen is straightforward enough. Also the FAQ page in post #3 of the xda-developers kitchen thread has plenty of info and answers to questions.

  19. What do we need to see? Well, what exactly do we do from here? Does this kitchen allow for adding or removing applications to or from the ROM? How? If no one is prepared to answer these questions, then this tutorial should be labeled, “For Experienced Developers Only” or “Not For Beginners or the General Public”

  20. holy crap, I’m sorry. What a d-bag thing to say. I didn’t look into the Working folder, I was still looking at the terminal. I sincerely apologize for my previous comment.

      1. i am not able to install java files i downloaded it in ubuntu and the one which are mentioned in this post are 6.18-4 whereas when we download we get 6.24-1

  21. Hey I see in the directions it says the keyboard and mouse will not work, and click the ctrl on the right side of the keyboard to ungrab it, but when I click ctrl nothing happens, any suggestions? VirtualBox is running, and the keyboard and mouse is not working. Thanks

    1. Cheecho06,

      You click on the virtual box and then your keyboard and mouse in Ubuntu should work (but not in windows). Then when you click the right Crtl button on your keyboard that pops you out so you cna use Windows again.

  22. ok so I connected an external keyboard and clicked the right control and now I can use my mouse, and I can use the external keyboard, but I still can’t use my laptop keyboard. Thanks for the quick response.

  23. when i goto install the java jre file it gives me this message: Error: Dependency is not satisfiable: sun-java6-bin (>= 6.20-dlj-1)|ia32-sun-java6-bin (>= 6.20-dlj-1)

    and i dnt know what else todo. i tried jus opening the file and letting it install. AND YES IM USING IT THROUGH UBUNTU / virtual box. but its not working for me any suggestions.

  24. when i am getting to the window that i need to press the:
    “install ubuntu”
    it just dont do anything and get stuck.
    what to do?

Leave a Comment

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