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:
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).
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





sweet
Do I have to use virtual box, or can I do this on a computer already running Ubuntu??
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!
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 😉
You can run it in ubuntu. I hate that everyone assumes everyone else uses Windows.
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. 🙂
Will this work on Fedora?
Justin,
That is a good question, I’m not actually familiar with Fedora so not sure. Maybe someone else can chime in?
@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!
Wilskywalker,
Nice addition!
Will this work with 62bit windows?
Gunz,
Yep!
TheUnlockr Kitchen is ready can’t wait for step 2, thanks
for some reason when i try to type in my password in the terminal it wont type nothing.
BlazE,
Just type it in and hit enter (it’s typing, just not showing characters as you type I promise).
Sweet, I’m ready to build a ROM and get something custom tailored the way I want.
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!!!!
DsiXDA,
Thanks for making such a great app!
Feel free to link to this How To in your posts if you think it will help others get setup easier!
DO i Have to re-run the whole ubuntu install process again each time i want to use the virtual box?
BlazE,
No, just open the virtual box and click start then goto terminal and type ./menu and hit enter. Done.
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?
Hi David, yes it has been linked to the FAQ. 🙂
You can use this on either a VB or Linux itself. I am running it on Ubuntu 10.04 and love it.
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.
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
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.
Blaze,
You have to set it up in VB first, so yes you must do the language selection and all that.
i can do a rom for mytouch 1.2 with this procedure
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?
video one success….looking forward for part 2 n more….!!! thanks!!!
If your running Ubuntu 10.04 it is still buggy. Install Ubuntu 9.10 and you will be fine.
@Magic32b Read the FAQ for the kitchen at http://forum.xda-developers.com/showpost.php?p=5626300&postcount=3 – It gives you an alternate method for downloading Java if the apt-get method doesn’t work.
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?
@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.
Dsixda,
Got it, updating it now.
The unlockr I have this problem, each time start the virtual machine have to download the kitchen because is not in the virtual machine.
once i download Ubuntu and open the virtualbox then click start nothing comes up telling me to install.
Gunz,
Follow the written procedure. It tells you to click on Devices at the top and continue from there.
the internet is really slow on the virtual machine, and i cant get to this website.
any ideas?
For those having trouble installing Ubuntu on your virtual machine in Windows, try installing Cygwin on your Windows PC instead. Cygwin is a type of Unix environment for Windows.
I have only tested this for the Nexus One so far, and I am able to create and flash a custom ROM without issue:
http://forum.xda-developers.com/showpost.php?p=5646155&postcount=76
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 🙁
Oh and I promise thats not a virus I just couldnt find any other way to show anyone interested what the error report is…
This tool is a great contribution. I was able to cook a ROM from SuperEclair for the 32a Magic, 6.35 new radio. It took me an hour or so to get my first working ROM and maybe 2 hours to cook up what I think is as good a ROM as any Eclair ROM for the 32a Magic 6.35 new radio.
http://forum.xda-developers.com/showthread.php?t=654284
on the part were you have to type in ./menu..wen i do it it says no such file or directory …i need help
@jerry .. you must type it in the folder that has the kitchen.. “menu” is the name of a script file from the kitchen…
where is part two???
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.
@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..
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
S[print Johnathan,
There isn’t one yet lol Doing it this week, read the other comments.
@Sprint Jonathan
Go to the page of the kitchen download link. That same post tells you how to run and use the kitchen.
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}
@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.
when will part 2 be posted?
This is awesome! I already tweaked my first rom changing out the bootanimation as a small test… when will part 2 be coming out?
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.
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”
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.
Jay,
Lol no worries. FYI, Part 2 is going up tomorrow 🙂
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
@jay …there are instructions in the FAQ, as I have already mentioned. Anyways, enjoy Part 2.
so you have to have 2 computers to do this?
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
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.
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.
Cheecho06,
Unplug the external keyboard and you can use the laptop keyboard… why do you need to use the laptop keyboard if you have an external one?
TheUnlockr I need to uninstall my virtual machine can you help me on how to please thank.
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.
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?