Christ this ROM cooking thing is poorly documented - XPERIA X1 ROM Development

I'd like to start building my own ROMs.
I have now read two massive articles on how to do this. Two hours later I do not have a clue what either of them was on about.
Here is how I would expect the process to work. Roughly.
1. Get OS base files
2. Get device-specific kernel
3. Get device drivers
4. Get important apps and files to cook with ROM
5. Get less important apps and files to add in customisation
6. Set reg keys and provision XMLs
Then I'd expect at least one tutorial or page of notes which goes something like:
"First get a kitchen. Popular visual kitchens include Ervius Visual Kitchen and OSKitchen. This example talks about Ervius Visual Kitchen. There is a predefined hierarchy which you must use to build your ROM. The Tools folder is for [...], so you [...] to change the files there. To build a ROM for your device you need to first [...], the OS base files for a given OS can typically be found be searching for something like [...], and the kernel by searching for [...]. Don't forget to [...]. There is a comprehensive list of apps available as packages here on XDA at [...]. To add an app to your kitchen you'll need to either find or make a packaged version. More about packages here [...]. Packages [...] be made from CAB files. Here is a list of bullet points that you need to work through [...]. If you flash your ROM and the device fails to boot [...]."
As it is all the tutorials are assume you already know everything and skew off on more tangents than a kid with an electric spyrograph.
I get that some people have tried to write tutorials. I haven't found one yet though that's was worth the hour or more it took to read. All I've learned is that you can flash the radio separately to the OS and I'm not even sure about that. Does anyone know of some decent reading material?

at45 said:
I'd like to start building my own ROMs.
I have now read two massive articles on how to do this. Two hours later I do not have a clue what either of them was on about.
Here is how I would expect the process to work. Roughly.
1. Get OS base files
2. Get device-specific kernel
3. Get device drivers
4. Get important apps and files to cook with ROM
5. Get less important apps and files to add in customisation
6. Set reg keys and provision XMLs
Then I'd expect at least one tutorial or page of notes which goes something like:
"First get a kitchen. Popular visual kitchens include Ervius Visual Kitchen and OSKitchen. This example talks about Ervius Visual Kitchen. There is a predefined hierarchy which you must use to build your ROM. The Tools folder is for [...], so you [...] to change the files there. To build a ROM for your device you need to first [...], the OS base files for a given OS can typically be found be searching for something like [...], and the kernel by searching for [...]. Don't forget to [...]. There is a comprehensive list of apps available as packages here on XDA at [...]. To add an app to your kitchen you'll need to either find or make a packaged version. More about packages here [...]. Packages [...] be made from CAB files. Here is a list of bullet points that you need to work through [...]. If you flash your ROM and the device fails to boot [...]."
As it is all the tutorials are assume you already know everything and skew off on more tangents than a kid with an electric spyrograph.
I get that some people have tried to write tutorials. I haven't found one yet though that's was worth the hour or more it took to read. All I've learned is that you can flash the radio separately to the OS and I'm not even sure about that. Does anyone know of some decent reading material?
Click to expand...
Click to collapse
Brother,I agree with you 100%. I tried to follow their tutorials and I'm as lost as ever

did you read this thread?
http://forum.xda-developers.com/showthread.php?t=548130

Why not post your queries/concerns in the tutorial threads. No need to create a new thread for this
Thread closed

Related

how to build custom extended ROM?

I've been debating trying my hand at cooking up my own ROM sometime here soon since I've not been entirely happy with the precooked ones. You know what they say, if you want something done right you just gotta do it yourself. ;-)
Anyways, I was thinking that I would probably like to install more software than I can put in just the ROM itself. I know I can do this through the extended ROM but I don't have the first clue where to begin and there doesn't seem to be any sort of tutorials floating around on the subject (or, indeed, of cooking in general). So how DO you create an extended ROM and add programs through it?
Avatar28 said:
I've been debating trying my hand at cooking up my own ROM sometime here soon since I've not been entirely happy with the precooked ones. You know what they say, if you want something done right you just gotta do it yourself. ;-)
Anyways, I was thinking that I would probably like to install more software than I can put in just the ROM itself. I know I can do this through the extended ROM but I don't have the first clue where to begin and there doesn't seem to be any sort of tutorials floating around on the subject (or, indeed, of cooking in general). So how DO you create an extended ROM and add programs through it?
Click to expand...
Click to collapse
There's a great kitchen that i got from the forum. I can't upload it right now, but hopefully someone has some bandwidth to get a link. Search for Wizard extended rom kitchen. I believe Faria put it together. Check out the .pdf it contains for instructions.
Basically, you'll use a tool called Winimage to "inject" files into a file called ext-rom-base.nb. In the image is a text file that tells the installer what to run.
Each file must be selected as "read only" after injecting, or it won't work.
Injecting is basically dragging and dropping cabs or exe's into the file, nothing fancy. Note that each file type is called differently, so watch out for that one.
Also - the cabs cannot require operator intervention - or the installer will hang. Make sure they run and tell you that they're done.
Then when you run nb2nbf_wizard, you can check Ext_rom, browse to the file ext-rom-base.nb, image name is Extension_ROM, and address is 9B000000.
You can create the nb.nbk to include just the extended rom, just the OS, just the Splash screens, or any combination you want.
A bit intimidating at first - but actually very easy. I never messed up my phone once working with the extended rom on the Wizard. I broke my Hermes twice already, and still can't figure it out
ftp://xda:[email protected]/Wizard/Extended_Roms/Extended_ROM_Kitchen/
Enjoy.
Post also moved to wizard upgrading.
hi guys,
I had problem when cooking ext rom. I got ''htc-wizard-ext-rom-maker-kit" by faria from ftp. I did exactly all the steps in faria pdf guide, but after hard reset it didn't work. I don't know why? Anyone help me pls.
My device:
IPL/ISL: 3.08
Radio: 2.19.11
ROM: TNT 3 Pro

Troubles

Hello people,
I gave this short title to this topic because... I'm simply having troubles. Troubles upgrading, syncing, translating.
I have a Qtek2020. It had WM2003 installed. Had, because I finally managed to install WM6.
But let's go by order.
Some days ago I found this awesome fantastic forum full with binaries.
I have some experience with ROM flashing with various devices. I also did upgrade my OS several times on my 2020. And I decided now it's time for WM6. Many people here said it works, and I wanted to upgrade too.
I'm Italian, so you would understand that I prefer using an Italian OS. But I first wanted to install English WM6 to try it out.
I downloaded TofClock AKU 0.7 and tried to install. But then, the first troubles.
I could no way upgrade my device on my home PC, which runs Vista x64. When I put the device in bootloader mode, the upgrade software returned error 101.
So I tried to do the upgrade at office, under XP SP2 (x86 platform), and everything gone fine.
OK, you would say, you got your new fresh OS. I actually don't have musch to complain about TofClock: I really say BIG BIG HUGE THANKS to the genius that did it!
But here's another problem. Still at office, I could no way sync my PDA on ActiveSync 4.5. Windows didn't install the driver properly.
I came back home: as I said, I run Vista x64. Fortunately, Vista downloaded a driver from Windows Update and the whole thing worked.
OK, you would say. You even got your sync relationship at home.
But now that I saw it worked, I wanted to install an Italian version, maybe even cooked a bit, so I downloaded both the Kitchen and the Microwave for m0dding and translation. The firts thing I tried was the Microwave I found at http://forum.xda-developers.com/showthread.php?t=334421&highlight=italian+microwave
I followed the full tutorial literally but I had the following problems:
There was no dump directory. Only dump.src. And dump, filled with tons of files, was required
There was no nk.nb file
There was no 800401-OS.bin file, required by other parts of the batch script
I tried on my Vista x64 and I also tried on a XP SP2 Virtual Machine on my desktop PC. Same result. I found another tutorial. I will probabily try it, but I'm so confused now. Why am I the only one who can't translate his ROM by following literally a tutorial?
Can somebody help me? Maybe with an already-working ROM for Himalaya that I can flash by myself?
At this time, I'm trying to connect my USB cradle to my Virtual Machine using USB over Network, because if I want to do this at home I have no other choice than using XP x86.
Meanwhile, I ask you help with translation. Please! I just need to run it in Italian. I will take care of Kitchen and all the mess that comes with customization later. I only need Italian now, and I need to be able to upgrade. I still have 15 days (by now) of trial license for USB over Network. I could even share my cradle with somebody that is able to do the upgrade remotely, because, as far as I know, if connection breaks during upgrade and the process fails, the Bootloader mode prevents the PDA to become another brick in the wall and the operation can be still tried again.
I will leave my MSN Messenger contact on my profile. You can find me everytime but business days/hours.
Thanks in advance.
I'm sorry, but the Microwave is for HTC Wizard only, you can not use it for Himalaya.
Download the Himalaya kitchen, find Italian *.dll.04xx files or extract them from the free Microsoft Italian WM6 emulator. Use the quick and dirty way to create Italian ROM as described in
http://forum.xda-developers.com/showthread.php?t=311078
success
I tried that tutorial (still in Virtual Machine). I had error "file temp\dump\imageinfo.bin already exists" when clicking the green arrow in Kitchen. I tried both Anichilius and TofClock's Kitchens
[Add]: I'm trying with HyperCore. I'll let you know
Anichilius kitchen is for Hermes, not for Himalaya
Tofclock worked on several devices
Hypercore is Hermes as well
Get your facts straight before trying to cook a ROM or you'll brick your device
Unfortunately I'm no expert in ROM cooking. It's my first time here. I don't know about the differences between the devices.
As far as I know, most of the Kitchens carry the same program: BuildOS. I found the problem running it. I'm trying to learn everything now by reading the forum.
I dumped TofClock's ROM (OS ver. 6.0) using ImgfsToDump and got all the files. I dumped WM6 Emu too. I found that TofClock ROM doesn't carry the *409.mui files that are inside emulator's ROM, like explained in the tutorial. So when I renamed the files from 410 to 409 and copied them I didn't actually overwrite anything.
Running BuidOS, which is a script that comes with every kitchen with no modifications (I didn't binary compare the files but I think it's the same script), so it doesn't seem to be device-specific, I always got the error "File temp\dump\imageinfo.bin already exists". I tried to find out the reason by reading Hypercore documentation. And it seems, as I thought, that the files I want to build are in conflict with the original files. I tried to understand why. I'm not sure about it, but by the hex address I saw around in the dump files it seems that the ROM is not organized as a file system, where every file is dynamically allocated and indexed in a file table, but they are allocated to raw memory address somehow.
I don't know why. For example, if I want to cook a Windows XP setup CD with my own bootloader I have to simply burn a CD with a modified ntoskrnl.exe file and here we go every XP installation from now on shows my ugly/sweet face (choose the best that suits)
As far as I know, apart from obvious size limits that vary with the device, there's a new limit in ROM cooking: I can't copy&paste files. I thought that the BuildOS script "simply" packed all the files into the ROM rebuilding the file table, adding checksums and other info according to the ROM format (which I don't know), and maybe I'm wrong.
[Add]: I have been trying to get in contact with slumpolo, which is very expert in Italian ROMs. Meanwhile, I read on that tutorial one of his replies: he said that not all ROMs have MUI files. So TofClock doesn't use MUI (btw Windows Vista does, but that's other things), but WM6 emu does, and that may be the reason why they are not compatible.
I know Himalaya devices are a bit "ancient", but I wonder if there's another ROM than TofClock to work on. I may try with it.
I wouldn't like to ask "can somebody [with big big experience] do the translation for me?". I would like to do it myself, but I need tools and knowledge. I think I already got the tools...
There is already a great Tofclock WM6 AKU 0.7.0 especially for Himalaya. Download it from http://forum.xda-developers.com/showthread.php?t=331637
and the Xplode Kitchen Tutorial. This kitchen has all files and registry hives extracted and nicely organized. So you don't need to dump them yourself.
Of course you will need the emulator dump. Keep folders well separated and organized.
It does have all the 0409.mui files. If you use the quick and dirty method of simply renaming your mui files/folders to *.0409.mui and overwriting the original ones, you should get a fairly acceptable result. Not perfect, the emulator runs an older version of WM6 than the one in the kitchen. If you want perfect, you'll have to spend a lot of time...
Your big "WHY" question: Intel X86 architecture is very much different than the ARM/Xscale architecture. The ARM is a child from the Acorn RISC processor. So operating systems for X86 and ARM are very different in structure as well. But if you want your pretty face on the Hima bootloader screen, it can be done, search the forum for "splash screen"
Hima is by no means "ancient", it is still one of the best HTC designs ever. All right, the newer models are lighter, have beter cameras and some even 640x480 and a "modern" price tag...
Don't worry, I won't offer to do the translation for you. I'm still trying to create the perfect Dutch ROM.
We talked about the same Kitchen. I tried it too in the beginning. But now I found something more. Many of the 409.mui files in this Kitchen are in subdirectories. So I could simply paste them there and find no error in BuildOS... Maybe... I'll let you know.
BTW the face thing was a joke: I already know how to change a bootscreen and I will do that as last thing once the ROM is stable and Italian.
About the "perfect" ROM, I can accept the challenge and spend some more time on it once created the BASIC Italian Rom, at least...
And I said Hima may be "ancient" because my Qtek 2020 is more than 3 yrs old
Cya 2moro
In desktop PC's I consider 2 years old the equivalent of stone age, I'm really surprised that this hardware has such an enormous life span. I even believe we've yet to discover the full potential of this little beasty.
Lol.
By the way, here's the thing I wanted to show you.
The files in Microwave directory are the dump of emulator, while the files in Work directory are from TofClock.
So I "simply" have to match directories while pasting emu files into TofClock after renaming
djechelon said:
So I "simply" have to match directories while pasting emu files into TofClock after renaming
Click to expand...
Click to collapse
Simple, as long as you're concentrated. Because in the Quick and dirty method both directories have identical names, I once started dragging and dropping in the wrong direction, overwriting Dutch with English...
Next pitfall, some files point to one another
a.04xx refers to b.04xx
I use Ultra€dit to search inside all these files for the string 0413 (dutch) both in plain ASCII and in Unicode. Do not automatically replace, watch in the hex editor if it's actually a string, not a piece of code.
Now edit initflash.dat using a good unicode editor (like ultraedit) and take care to save as unicode. Do not allow the editor to convert it into anything else. Take care that there's only one initflas.dat in your kitchen, the edied one, and not for example an autogenerated backup (Ultraedit can do that...)
Read cooking tutorials on how to edit initflash.dat
Add OEMs (see cooking tutorials)
Cook, burn, test
I think you're going to tell me that the ROM I managed to cook now won't work until I manually edit each single MUI file against 410 pointers... Actually I forgot to paste initflashes.dat, because when i pasted the whole directory I always found out that the names were correctly translated! Yea, just because I pasted it.
I'm gonna use TortoiseMerge to compare initflashes.dat from emu to TofClock.
Fortunately, I can make as many mistakes as I like because if I brick the device I can reflash it using Bootloader mode with a working ROM (which I'll jealously keep on my hard drive in more copies ).
However, I was unable to flash under my XP SP2 Virtual Machine. I'm trying again under Vista, else I'll have to do it at office where it worked last time...
It's really harassing, but it's a fascinating world I'm exploring.
Brick
Oh finally I bricked my device!!!
Hahahaha. OK I managed to build my first Italian ROM but, as expected, the device got stuck on the Windows Mobile logo.
Not bad. I tried a little modification and re-flashed it. Same error. So I gotta restore TofClock original for now... It makes me little sad because I ran in lots, lots, lots and lots of troubles, putting all of my efforts, to build the f***** ROM.
Till my device still lives, I can test as much as I want. By the way, Maggy, I need your help now.
You talked about cross-links in MUI files. I tried to find them. I used UltraEdit and tried to search for "410" (Italian) in the MUI files I renamed into 409, but I can't find anything. I tried with a lot of files, not all files, but no one has cross-links.
Just to see if everything's fine, I'm trying to re-cook the TofClock ROM that came with the Kitchen, with no modifications, not even the bootscreen. It's just a check. It's 3 AM now: should I take a nap? I think so...
Anyway, let's get back to my problems. I noticed that both on Vista and XP (btw I managed to cook&flash with Vista so I can now throw the VM in the bin together with the shareware version of USB Over Network that installed me a harassing driver blocking all USB devices including mouse & key if I don't manually disable driver signature...) the BuildImgfs program... explodes!
Well, actually it consumes too much memory. The heap goes up to 1GB before crashing. I think here is a bug in the script: destructors should be called to free memory from unused object ASAP. .NET and Java have Garbage Collectors, which take care of destroying unused object, but it's not the same with unmanaged code like C++ or whatever used to make the program.
I tried to search, but I found nothing (did I say something about a nap...?). I need, if available, a newer version of BuildImgfs that manages memory correctly and doesn't crash. I saw many people having the same problem. I don't add too many packages: I'm even forced to remove Windows Media Player to let it build!!!
[Add]: as expected, the re-cooked TofClock works. OK I'll go sleep now. Promise!

Custom ROM from existing ROM

Hi,
I would like to customize a ROM for myself but i would need your advice...
Is it possible to use a ROM (Lets say NRG ROM 2.5), and to customize it (reg tweaks, MMS config, Exchange Server config with password set by default, install some cab and put the registration keys by default....) ?
If this is possible, is it hard to update it ? for exemple if NRG updates his ROM, i also want to be up to date with mine, is it easy to "synchronize", or reapply all previous actions without too much hassle ?
Do you have any links i should read to start a Kitchen ?
Thanks in advance
It might be worth having a search around for SASHIMI. It'll let you collect .cabs and .reg files etc and automate running then after youve flashed a new ROM.
if you figure out how your reg details are kept for each piece of software (in the registry or a file etc.), you can get it to reinstate them after flashing too.
You could DL the latest verion of a ROM, pull it apart and change whatever you like and then flash it to your phone but it'd be a pain for pain version.
Using sashimi, its also easy to update your setup when indiviudual apps and settings change, without needing to reflash your phone and then re-sync etc.
The way I see it, sashimi only really needs setting up the once and then given a tweak when something changes rather than needing to be re-done as with a ROM...the only down-side I can really find is it needs running after a hard-reset, whereas if you cook the changes in they wouldnt (so its no good for 'find or nuke my stolen phone' type apps).
I believe a lot of cooked ROMs include 'User Customization' (UC) which does a similar thing, but i havent used it myself.
Also, I may be wrong, but i think you could need certain details from the original chef before you can pull apart a cooked ROM too (i remember reading about file somewhere in your kitchen, memory fails me though)-and, of course, the chefs permission
Let us know what you try out.
'tunes

[question] Cooking installed app into rom

Hello folks,
what I want to accomplish is to create perfect image of all apps and settings I have already in phone and create a rom from it, so I can distribute all the actual settings to more phones and the settings will also survive hard reset.
I read some tutorials on cooking roms and it seemed too difficult, so I just wondered if there is a utility, that could create a rom from what is installed at the moment. Or if there is some utility, that allows me to just extract settings from applications, put it together with cab files from that apps, also some rom and cook it all together.
I dont need to make any changes to the rom, just preinstall and preconfigure some apps.
Thanks for your replies. If you know about somethink that could be helpful, please add link and maybe some quick steps.
lpgsk said:
Hello folks,
what I want to accomplish is to create perfect image of all apps and settings I have already in phone and create a rom from it, so I can distribute all the actual settings to more phones and the settings will also survive hard reset.
I read some tutorials on cooking roms and it seemed too difficult, so I just wondered if there is a utility, that could create a rom from what is installed at the moment. Or if there is some utility, that allows me to just extract settings from applications, put it together with cab files from that apps, also some rom and cook it all together.
I dont need to make any changes to the rom, just preinstall and preconfigure some apps.
Thanks for your replies. If you know about somethink that could be helpful, please add link and maybe some quick steps.
Click to expand...
Click to collapse
did you see the tutorial for complete rom backups? sticky section
sounds most reasonable for what you intend
cheers
I just read it yesterday. Wanted to ask if it would do the trick, but as new member I couldnt post links so I dropped. I think this would do the trick
lpgsk said:
I just read it yesterday. Wanted to ask if it would do the trick, but as new member I couldnt post links so I dropped. I think this would do the trick
Click to expand...
Click to collapse
as your motivation is to preserve (and pass to other phones) a fixed set of installed apps and customized settings on a static rom, that should exactly do the trick for you, yes

1. Kernel and 2. Rom Error Questions

I tried to word the title correctly to establish that I want to ask 2 different questions, but dont want to clutter up the board with 2 separate posts
Please help if you can
1. Kernel
Why do some kernels work with some roms and not others? I have taken a Sprint Rom, ran it through the kitchen, and tried flashing any number of kernels. The only one that works is Zenulators AnyKernel. I know at times only the stock overclocked worked, but I think at certain times I have gotten the no perf lock to work (though that may have been with an NFX Rom, and not one that I created myself). This leads me to ask why would a kernel work for a rom that is built from the same base that I am using, but not on mine? Is dsixda's kitchen not the one everyone uses? I just dont understand why I am limited to one kernel that is not undervolted and overclocked. I would like to put a 768 overclocked, undervolted kernel with this rom, but cant get any to flash. Should I just use the kitchen to "port" the kernel. How does nfinitefx45 get the kernels he posts to work with a Sprint base? Is the kernel edited in some way? Im not calling anyone out, just trying to learn how to get a good kernel to work with my rom.
2. MAJOR issue: when running df, I get an error that etc/mtab: no such file or directory. What I have done is in the paragraph below
I decided to take another cracked at a minimal Sprint 2.1 Rom. I used dsixda kitchen 0.107 to root, add busybox, remove boot sounds, deodex, add data/app, add nano + sysrw, sysro, bash, and zipalign the .7 Rom. I then removed all Sprint apps except for VVM, all google apps, all htc apps and widgets that were not explicity needed (need the contacts and ime apks among a few others), removed a ton of system apps (can provide a list of current system/app dir and a list of all that was removed if it will help). I edited the lockscreen so it wasnt in landscape mode all the time. Added an OMADM.apk file that didnt FC when I tried to update the prl (tested the update and it works). I did find an EPST.apk that adds ## codes back to the dialer (should I include that in the rom...wasnt intending on it as the only ## code that doesnt work is the prl...data works) OMADM.apk is smaller that the EPST...but EPST does exist already...and I might be able to pull OMADM meaning 0 firmware, profile, or prl updates...but you could do ##prl manual...I dont know, still thinking it through. I did end up creating a google apps zip file with the apps from the .7 rom so that market will work (removed maps as it wasnt up to date and the Streets.apk never worked, but left gmail, youtube, voice search to work with jonasl's htc keyboard, and of course gtalk). In doing this, I am thinking about creating some packs for the rom, but really need the above 2 questions answered to find out where to go from here.
evilvoice said:
1. Why do some kernels work with some roms and not others?
2. MAJOR issue: when running df, I get an error that etc/mtab: no such file or directory. What I have done is in the paragraph below
Click to expand...
Click to collapse
afaict, the 'kernels' are literally just the linux kernel that provides some basics to the os... altho linux IS a monolithic kernel, it is not a bsd-system that has all the tools completely-compiled for the system together...
thus, the answer to 2. is that you have deleted too much of the periphery, for instance the actual mount-table system that df uses to to check... (ie: some prog creates the mtab, and apparently it is not the kernel, i guess)
alternatively, the answer to 1. is that there is actually too much in the roms that are using something unique to each kernel that you are trying to install (altho that seems odd to me)... thus, the only way that the rom will work is if you give it the kernel with the tools that it (the rom) needs...
tbh - im not exactly sure - ive not gone into the depths of kernel-swapping that youre trying to explore... in full-linux-systems, the kernel is fairly easy to update without breaking all of the miscellaneous tools - however apparently the android-roms are more tied-together than a normal linux system...
gl and maybe someone with more experience will give an accurate (rather than a guessing) answer...

Categories

Resources