Hey guys, I am going to make a new thread about cooking, since I receive a lot of requests on HOW TO cook your own ROMs. I am always glad to help, but since those are always pretty much the same questions, I am going to gather all the information I have got about it in one simple thread, so everyone who is interested in cooking new ROMs for our device can get an easy start
I wanna start with really basic stuff and slowly come to more and more "complicated"/detailed information. I am still pretty much at the beginning of cooking, especially when it comes to kernels and stuff, but I think I will learn from it as well
But first of all, where do you begin with?
Pretty simple, with either installing a stock ROM and make your own ROM directly from this, or simply download a .zip ROM of your choice.
Either you take CM or a stock ROM like V20n from the repack of my nandroid by Redy.
Maybe you also want an already cleaned/deodexed ROM to start with. Grab them HERE
But watch out, cause this MIGHT contain bugs.
You can also grab any other flashable .zip ROMs out there, that you wanna modify.
For the second possible startpoint, you already will need dsixda's Android Kitchen so grab it and set it up, cause you will also need it for more advanced cooking/and even already some very basic steps. The kitchen simply provides a lot of scripts, that allow you to apply tweaks/mods very easily, without having to do it all manually.
A guide of how to set up kitchen for our device, will come. But I think the one in the thread should be enough for now.
Then you wanna flash a stock ROM, like one of these: http://forum.xda-developers.com/showthread.php?t=1480392
If you use other stock ROMs, you will need to root them, install ClockWorkMod and make a nandroid.
The Nandroid is, what you ll need to start. Copy it from your sd card (scard/clockworkmod/backup/THE-DATE-YOU-CREATED-IT) to your PC.
Then take system.ext4.tar/system.ext3.tar and boot.img and put it to your working folder of kitchen. Working folder path should be similar to this: C:\cygwin\home\USERNAME\kitchen\original_update.
Then start kitchen, by going to cygwin, cd (change directory) to the directory, where you can find the file menu.
Then type ./menu and kitchen will load.
1. Push "1" to set up the working folder.
2. Press enter, if you already added the needed files to working folder.
3. Select "1" again. Or if you already have got more ROMs in there, choose the one, you desire most. ENTER
4. Push "y" and give the folder a name, you will recognize, e.g. V20n if you cook a v20n ROM. ENTER
5. Chill
5.1. DO NOT I REPEAT, DO NOT convert updater-script to update-script! Otherwise your ROM wont boot! So type 2 and hit ENTER.
6. Press "Enter"
8. Now you can enter your Working_Folder (in .../kitchen/Working_FolderName) and e.g. delete /apps, apply tweaks,...
7. Select "99" to build a new flashable ROM. (How to apply tweaks will come later)
8. Select "1" except you know, what you are doing.
9. You can already zipaligne the apk files, but since you wanna do some more modding, push n in order to save time.
10. Push "y"
11. Sign your ROM by pushing "y"
12. Rename it, in order to be able to identify it again, even if you cook more ROMs parallely, so push "y". And then enter the epic name of your ROM
13. Find the ROM in: C:\cygwin\home\USERNAME\kitchen\OUTPUT_ZIP or whatever you called your folders.
Now it's time to get it on. First thing, most of you might wanna do, is to remove all the apps you dont need.
Find lists of removeable files HERE
or HERE.
In order to be able to remove them, you either need a packer like 7zip, but I always simply extract the .zip file, cause it is easier to operate and probably also faster. You will get the following folders:
-META-INF (Dont TOUCH IT! Except you know EXACTLY what you are doing
-system
-boot.img
In system folder, you can find the folder app. Here you can find all the files you wanna remove.
Next step will probably be, that you wanna add some tweaks and mods.
Therefor simply look around in the Dev section and choose whatever you like.
I ll list some of my personal favourites:
- Change the lockscreen: Either take one of these file or simply modify the build.prop, like Huexx found out HERE
- Add eRecovery by Huexxx
- Fix Audio Bug in CM
- Enhance Scores on benchmarks
- Add/remove build.prop tweaks
- Replace libsqlite.so BUT WATCH OUT, this breaks bluetooth file sending. If you only cook for yourself, extract the one from Zeus ROM, if you wanna release your ROM, ask Huexxx, before using his file.
Whenever you wanna try to flash your ROM, you ll first have to pack it and then sign it. Simply mark the folder system, META-INF and the file boot.img and click on add to .zip file. Best method to begin with is storage,because it "compresses" fastest. Then you already have a flashable .zip, but in order to flash it, you ll also have to sign it. Here is the simple way, I am doing it: http://forum.xda-developers.com/showthread.php?p=6232592. Just set it up, like it is said in the thread. Then right click your .zip ROM and click on sign this file. Wait till a popup comes up that tells you the file has been signed and find the new folder. The folder is called "Signed files" and in there, you can find the signed version of your ROM.
Here is a second possible solution.
Now you can flash it and test your new custom ROM.
If your phone gets stuck in a bootloop, you ll have to unbrick it. Look it up in my noob how to do it, there are several ways you can do it. The most simple is to set up adb and simply send the command adb reboot recovery to the phone.
To be able to fix errors, I think it will be best, if you always only make one change at a time and flash it directly afterwards. Then you can
More coming Have fun so far and if you experiance problems, while cooking, post it here, so I can correct the thread/add new cool stuff dsixda's kitchen thread will be posted in the next couple of days. Also, how to add cust kernels. Maybe a dev can help me, on how to compile one's own.
Oh I almost forgot: I am not responsible, for any damage, you do to your phone, bricking, not waking up, because you messed the alarm clock, bad food you made yourself, smelling feet, wars, bad films,...
dsixda's Android Kitchen guide coming here:
Like zipaligne, deodex, replace the kernel, ...
Going to edit this a bit tonight Hope you ll enjoy it
Reserved 10 CHARS
There are a lot a of cooking tutorials already in xda, instead you could make a collections of links to tutorials already out there.
Enviado desde mi LG-P970 usando Tapatalk
Thanks N00BY0815
I actually tried to cook a rom yesterday but bricked my device.
Dont hesitate to post links here, I will add em up there, if necessary, or already modify them to fit our device
It's a great idea N00by I have your tips yet but for others noobs (I'm too!) it a good thing to debut developping a ROM! I just meditate : do you think it is possible to create a topic where everyone could post his/her work?
Sent from my LG-P970 using XDA
hi... I had a couple of question to ask:
1. what If I want to add eg. erecovery by huexxx... I download the zip file, and extract the 2 files in the folder /system/bin and extract it to my /system/bin folder... is that step are right ? or do I have to add the updater-script to add permission of that 2 files
2. And what if I delete the default LG launcher and copy zeam.apk to /system/app does the system automaticaly detect zeam as a launcher, or do I have change the script?
thanx...
About the launcher, you simply have to delete one and add another one. To be on the safe side, I always renamed the new launcher to the old ones name, but the other solution works as well.
About eRecovery, idk, I need to confess, should work without, but I think you need to try. If it doesnt work, add these lines to updater-script:
set_perm(0, 0, 0755, "/system/bin/pvrsrvinit");
set_perm(0, 0, 0755, "/system/bin/pvrsrvinit2");
What if I take the stock Gingerbread launcher and replace with LG's stock one by just renaming it or overwriting it?
Will it work ??
ok I bricked my phone 5 times while trying cook my own rom... so I gonna back again from square one... Delete all my previous work and start again
V.0.2 Using v20N from redy, open dsixda, just zippalign, using updater-script from dsixda... test... result... When flashing my ROM I get the error "mount expects 4 args got 3"
V.0.3 using redy's original updater-script & update-script fille copy to my V.0.2 rom.. result... working perfect
V.0.4 Deodexed all files, except 3 files... result: missing market android
V.0.5 Delete bloatware and add google market apk (vending.apk)... result... good... I'm gonna use it to check the stability of this rom...
N00BY0815 said:
About the launcher, you simply have to delete one and add another one. To be on the safe side, I always renamed the new launcher to the old ones name, but the other solution works as well.
About eRecovery, idk, I need to confess, should work without, but I think you need to try. If it doesnt work, add these lines to updater-script:
set_perm(0, 0, 0755, "/system/bin/pvrsrvinit");
set_perm(0, 0, 0755, "/system/bin/pvrsrvinit2");
Click to expand...
Click to collapse
And if i add other apps that there isn't on default system, eg. OI File Manager, the app is installed automatically when i put it on system/app?
And if i want to put the beats audio mod, It's only necessary to put the file in the correct folder?
For the apps it's true, but its always better not to put too many new apps in there, since I think they cant be updated.
About beats audio, I think putting in the right folder should be enough, but pls check the updater-script and if needed add the corresponding lines to the updater-script of your ROM
Hum.... I'll try this... Worst that can happen?
s1ck82 said:
Hum.... I'll try this... Worst that can happen?
Click to expand...
Click to collapse
Worst that can happen is, you have to unbrick your device... At least as long as you dont REALLY mess it. But as long, as you stick to the guide you wont have problems I think And the unbricking guide is in my noob how to, so basically nothing can happen Just do a nandroid and your back to normal within 10 minutes
Hi... I always get trouble when using updater-script & update binary after build my rom from cygwin...
some times I get the error "mount expects 4 args got 3"
and I already changed my update-binary files from folder update_files folder...
but when I flash again CWM error (7) or sometime error (0)
sometime the resolution is to copy the update-binary and updater-script from previous Redy's rom
But now I want to make add /data/app functionality in my custom rom... and if I using update-binary and updater-script from previous Redy's rom it doesn't work...
I think the problem is in my updater script file created by cygwin:
Code:
package_extract_file("check_data_app", "/tmp/check_data_app");
set_perm(0, 0, 0777, "/tmp/check_data_app");
run_program("/tmp/check_data_app");
mount("MTD", "userdata", "/data");
package_extract_dir("data", "/data");
set_perm_recursive(1000, 1000, 0771, 0644, "/data/app");
show_progress(0.900000, 30);
format("ext4", "EMMC", "/dev/block/mmcblk0p8");
mount("ext4", "EMMC", "/dev/block/mmcblk0p8", "/system");
mount("MTD", "system", "/system");
package_extract_dir("system", "/system");
symlink("busybox", "/system/xbin/[");
symlink("busybox", "/system/xbin/[[");
I think it is missing "format" code, because it mounts system and data, but only format system...
and now i dont have a clue...
Try using a virtual machines.
Trolling in the deep
Pls gimme the full updater-script. And always watch to change update-script back to updater-script.
Because lines like these, I think are unreadable for some devices...
mount("MTD", "userdata", "/data");
mount("MTD", "system", "/system");
should look like this:
mount("ext4", "EMMC", "/dev/block/mmcblk0p8", "/system");
other mountpoints (e.g. for data) can be found by typing mount into terminal emulator.
Hope you get it working and I somewhen find time to make a step by step guid for kitchen
N00BY0815 said:
Pls gimme the full updater-script. And always watch to change update-script back to updater-script.
Because lines like these, I think are unreadable for some devices...
mount("MTD", "userdata", "/data");
mount("MTD", "system", "/system");
should look like this:
mount("ext4", "EMMC", "/dev/block/mmcblk0p8", "/system");
other mountpoints (e.g. for data) can be found by typing mount into terminal emulator.
Hope you get it working and I somewhen find time to make a step by step guid for kitchen
Click to expand...
Click to collapse
ok this is updater script from cygwin
Im still trying to mod it but get another bootloop
If you have any free time, N00by, could you tell us if/how we can use the google ADV Manager to simulate our cooked ROM ?
So I installed a very bloat-free and well tweaked/optimized ROM, PureBlood V2 for my Xperia SOLA.
I added all the features I wanted (into system) such as Google Now, stock APPS and modified System UI and QuickPanelToggles and Camera Mods, Lockscreen Mods and what not.
Then I took a FULL NANDROID BACKUP of it.
Now the thing is, I want to share my ROM with other's as well. What I'm using at the moment is insanely stable, feature packed yet super fast and still far lighter and bloat free than STOCK ROM. What makes it complete is that it's got every feature you could be looking for too (in a stock ROM that is).
So, is it possible to make a ROM ZIP for flashing from my NANDROID BACKUP ZIPs?
IF YES. HOW?
thunderising said:
So I installed a very bloat-free and well tweaked/optimized ROM, PureBlood V2 for my Xperia SOLA.
I added all the features I wanted (into system) such as Google Now, stock APPS and modified System UI and QuickPanelToggles and Camera Mods, Lockscreen Mods and what not.
Then I took a FULL NANDROID BACKUP of it.
Now the thing is, I want to share my ROM with other's as well. What I'm using at the moment is insanely stable, feature packed yet super fast and still far lighter and bloat free than STOCK ROM. What makes it complete is that it's got every feature you could be looking for too (in a stock ROM that is).
So, is it possible to make a ROM ZIP for flashing from my NANDROID BACKUP ZIPs?
IF YES. HOW?
Click to expand...
Click to collapse
Just get an update zip which has system and data and replace it with your files remove the .a extension so its just .tar you should be able to extact using winrar in the zip delete system and data folder make rename your extracted dir to their respective name data and system pop them back into the zip and your done
You might want customize \META-INF\com\google\android\updater-script
to something like this
Code:
[CODE]ui_print("Mounting system...");
run_program("/sbin/busybox", "mount", "/system");
[COLOR="Red"]format("ext4", "EMMC", "/system");[/COLOR]
run_program("/sbin/busybox", "mount", "/data");
[COLOR="Red"]format("ext4", "EMMC", "/system");[/COLOR]
show_progress(1, 15);
ui_print("Copying files...");
package_extract_dir("system", "/system");
show_progress(1, 15);
ui_print("Fixing Permissions...");
set_perm_recursive(0, 0, 0755, 0644, "/system/app");
package_extract_dir("data", "/data");
ui_print("Unmounting system...");
run_program("/sbin/busybox", "umount", "/system");
set_perm_recursive(1000, 1000, 0771, 0644, "/data/app");
ui_print("Unmounting Data...");
run_program("/sbin/busybox", "umount", "/data");
[/CODE]
The Formart Commands are optional if you use wipe / formart before installing the zip
I
emove the .a extension so its just .tar you should be able to extact using winrar in the zip delete system and data folder make rename your extracted dir to their respective name data and system pop them back into the zip and your done
Click to expand...
Click to collapse
Sorry didn't understand this clearly. Could you please elaborate (point form reply would help here)
Hi.
There are links in my All Things Xperia guide (see sig) that will help with extracting the files from the system.img that is your backup. You'll then be able to add them to an CWM.zip for flashing.
XperienceD said:
Hi.
There are links in my All Things Xperia guide (see sig) that will help with extracting the files from the system.img that is your backup. You'll then be able to add them to an CWM.zip for flashing.
Click to expand...
Click to collapse
It's vast vast. I must have missed it. Could you please direct it
Give me heading words or relevant words. Will search on browser which will redirect me to the related section.
Tap on his profile picture then look under posted topics
http://forum.xda-developers.com/showthread.php?t=2067008
don't be scared it's only a phone
ogd x d2g x2 sg3
old ladies ^
bad bone said:
Tap on his profile picture then look under posted topics
http://forum.xda-developers.com/showthread.php?t=2067008
don't be scared it's only a phone
ogd x d2g x2 sg3
old ladies ^
Click to expand...
Click to collapse
That gives me another mess of posts by that user.
I just wanna know from all those ZIPS that a full Nandroid backup from CWM creates, which files do I take to make it into a flashable ZIP to distribute.
thunderising said:
That gives me another mess of posts by that user.
Click to expand...
Click to collapse
Which is why I have given each part a clear heading and the relevant part you should have gotten to was Development.
thunderising said:
I just wanna know from all those ZIPS that a full Nandroid backup from CWM creates, which files do I take to make it into a flashable ZIP to distribute.
Click to expand...
Click to collapse
My backup is a .yaffs2 img, which I open with [Tool] Yaffey - Utility for reading, editing and writing YAFFS2 images
Why don't u share the whole clockwork folder. Other may restore it with cwm. Lol...
Sent from my GT-S5570 using xda premium
Need backup file for Note N7000 to get factory apps and features
Hi,
I rooted my phone and mistakenly installed Paranoid android 4.2.2, without taking a backup of my phone N7000 and lost all the apps/features that come with the phone.
Now my phone has an updated ROM but all the applications and features of Note are gone.
Can anyone please provide me with the backup file so that i can get all the default applications (that come by default with samsung Note N7000) and also on how can I install it on my phone.
I want to go back to official version of N7000 (latest official version 4.2.2 ) with all the default apps and features.
I appreciate your time and help.
Please feel free to reach me at [email protected].
Thank you in advance for your help guys,
Cheers
Every time, when i build a rom, i modificate the updater-script: i use the command ui_print(" .... "); but it never works.
i have tried it with scripts from custom roms which i had modificated them but again it failed.
i have read that the only thing that u have to do is to use this command and save the script.
what is going wrong???
Sent from my Galaxy Nexus using xda premium
kagouro said:
Every time, when i build a rom, i modificate the updater-script: i use the command ui_print(" .... "); but it never works.
i have tried it with scripts from custom roms which i had modificated them but again it failed.
i have read that the only thing that u have to do is to use this command and save the script.
what is going wrong???
Sent from my Galaxy Nexus using xda premium
Click to expand...
Click to collapse
Hmmm, How many guesses do we get? :silly:
How about uploading one of the zip file that fails then we'll know what you're dealing with. Also how are you modifying the script? on the device? on you desktop? Have you tried different methods?
There's also the recovery log which you can print out which is located in CWM Advanced menu and finally you can download this tool that I'm casually developiong, This allow you to do basic syntax and parameter count checking on you desktop machine, In Actual fact that full thread is pretty useful for edify scripting
Thanks
kagouro said:
Every time, when i build a rom, i modificate the updater-script: i use the command ui_print(" .... "); but it never works.
i have tried it with scripts from custom roms which i had modificated them but again it failed.
i have read that the only thing that u have to do is to use this command and save the script.
what is going wrong???
Sent from my Galaxy Nexus using xda premium
Click to expand...
Click to collapse
Proper format for UI Print is....for example...
ui_print("Installing Evil Alex Unleashed V2");
Note there are no spaces except what is in the (....). also must have a semi-colon at the end. NO spaces.
Use Notepad++ and open your updater script, make your changes, save, then re-compress your rom. Best not to do this via 7zip. Best to extract the updater script. make changes, then copy it into your rom zip.
MD
The way it should read is this
ui_print(" Installing Evil Alex Unleashed V2 ");
Alot of you probably already know of this but theres probably some that dont. I found this thread over in the Htc0ne themes and apps forum, thought it would be cool if we were aware of it here too.
Ive used alot of these fonts and they do work on the Sprint Htc0ne variant. You may have to edit the Meta on some of them.
All in all its nice to have options for fonts. You can find them here http://forum.xda-developers.com/showthread.php?p=45437057 i know gianton worked pretty hard putting all these flashables together so dont forget to hit gianton's thanks button.
http://forum.xda-developers.com/showthread.php?p=45437057
EDIT: Heres a flashable .zip for our device you can use to flash the fonts.
Just pull the system/fonts file from the .zip you've chosen,
Add it to the .zip I've provided and flash in recovery.
Enjoy
The zips from the original thread flashes just fine. Also downloading the zip and moving the fonts into the zip provided would be redundant as they are indentical in the update script.
Code:
run_program("/sbin/busybox", "mount", "/system");
package_extract_dir("system", "/system");
unmount("/system");
im0rtalz said:
The zips from the original thread flashes just fine. Also downloading the zip and moving the fonts into the zip provided would be redundant as they are indentical in the update script.
Code:
run_program("/sbin/busybox", "mount", "/system");
package_extract_dir("system", "/system");
unmount("/system");
Click to expand...
Click to collapse
More just to let people know they're there. But thanks for the input,,,,,,,,
Thanks for sharing
what am i doing wrong
I have the HTC one m7spr running 4,3 sense 5.0. I download them on my phone and then flash them and they do not work. Not a single one. I have downloaded fonts from another site, droid views. I think it wad and they worked but now the download link doesentvwork for me. But when I flash them it just says failed. I do have the nearest version of twrp
Try it without the zip in this thread. I'm on 4.3 with Sense 5.0 and I just went to the thread, chose the font I wanted, downloaded it and flashed it with twrp.
Sent from my HTCONE using XDA Premium 4 mobile app
Thank. Gonna have to try this.