[HOW TO] Porting ROM from another device? - myTouch 3G, Magic Android Development

I want to port some ROM from 32B to my 32A. I am new in this Android ROM Development section, but I have some knowledge. In WM I used to cook ROMs every day (Link), also I have managed to create Hero port for HTC Niki device (Link).
I have some procedure in mind:
1. Extract system.img from ROM which I want to port
2. Extract boot.img from ROM which I want to port (with AmonRA porting tools)
3. Replace boot.img-kernel with the one from my stock boot.img
4. Rebuild boot.img
5. Build update.zip, sign it and flash
- Now, before I create update.zip I have some questions:
* Do I need to replace wlan.ko with the one from my stock ROM?
* Do I need to replace build.prop?
* And what else?
AmonRA in his tutorial, has explained everything, but his porting is just for boot.img, and I am guessing that his nk02ion_r4 (system folder) is already prepared for 32A.
Thanks in advance?

You'll definitely need to replace wlan.ko, otherwise your wifi won't work. As for what other changes you may need to do - there's no universal way to do it, it varies from ROM to ROM (that is if you want to retain all or at least most of the functionality of the original ROM). In some ROMs, for example, I had to modify the ramdisk image slightly. In other, I had to replace a few of the system tools with my own compiled one to get the functionality I wanted back. Or remove a few files that work on 32B/G1 but create unnecessary problems on 32A (like HeroLED.apk). And then of course after such changes you may need to modify the update-script accordingly.
One thing that bothered me to the extent that I even started with compiling kernel and creating "porting packages" myself was that when porting, people often just replaced the kernel image itself (boot.img-kernel) and wlan.ko while other kernel modules were left unreplaced (because the person porting the ROM probably didn't even have them available), therefore many things from the original ROM were not available in the port. Case in point - compcache: whether we need it or not on 32A is another thing, but I believe that if it's supported in the original ROM, we should have the option to use it even on 32A should we want to try it.
I understand it's better to port this way rather than not to port at all (and I've done this myself, yes, guilty as charged), but it's still quite wrong to me to simply create "mashups" where ramdisk belongs to one ROM, kernel to another one and kernel modules to yet another one. It's easier, but it's not the right way to do it if you can prevent it.

Case_ said:
You'll definitely need to replace wlan.ko, otherwise your wifi won't work. As for what other changes you may need to do - there's no universal way to do it, it varies from ROM to ROM (that is if you want to retain all or at least most of the functionality of the original ROM). In some ROMs, for example, I had to modify the ramdisk image slightly. In other, I had to replace a few of the system tools with my own compiled one to get the functionality I wanted back. Or remove a few files that work on 32B/G1 but create unnecessary problems on 32A (like HeroLED.apk). And then of course after such changes you may need to modify the update-script accordingly.
One thing that bothered me to the extent that I even started with compiling kernel and creating "porting packages" myself was that when porting, people often just replaced the kernel image itself (boot.img-kernel) and wlan.ko while other kernel modules were left unreplaced (because the person porting the ROM probably didn't even have them available), therefore many things from the original ROM were not available in the port. Case in point - compcache: whether we need it or not on 32A is another thing, but I believe that if it's supported in the original ROM, we should have the option to use it even on 32A should we want to try it.
I understand it's better to port this way rather than not to port at all (and I've done this myself, yes, guilty as charged), but it's still quite wrong to me to simply create "mashups" where ramdisk belongs to one ROM, kernel to another one and kernel modules to yet another one. It's easier, but it's not the right way to do it if you can prevent it.
Click to expand...
Click to collapse
Thanks Case_. I am new to linux and I love Android, but this seems to be very hard to understand. Is there any way to set up kitchen (or something similar), or I need to compile from source (but I have no idea how to port ROM with this method)?

Related

[Question] Whats the process to get ROMs portet for 32A?

I was wondering, what the process for porting ROMs?
Some new files, like the wlan.ko and add some BT lines in a init file.
What else? Can I get a direction?
I like to mess around with it, I like this stuff.. Im totally in love with this Magic phone..
We need more porting got the 32A device..
Look at this thread http://forum.xda-developers.com/showthread.php?t=530972 Amon_RA have postet a good guidline in his post http://forum.xda-developers.com/showpost.php?p=4040214&postcount=23 I did follow that guide as I made the cm-recovery-1.4-32A.img all I had to make was to edit the filenames.
If it was that easy, then we have seen more roms for the 32A
We can report the 32B that way, but not directly from G1.
ChrisB said:
If it was that easy, then we have seen more roms for the 32A
We can report the 32B that way, but not directly from G1.
Click to expand...
Click to collapse
That's not completely true, all of the g1 roms have custom kernels which mean custom modules and features that are added which will make the rom your porting limited to certain features... for example cm's kernel which is on every cm rom for the g1 has cgroup which is a module that basically optimized running tasks, squashfs which is a mount type you can use on the system, compcache which is module that you can use for swap memory which is very useful... and i'm pretty sure there is other stuff too... but this issue creates a limitation for us 32A users as far as porting roms because some roms are very unique because of certain stuff that comes with the kernel...
32Bs on the other hand are google branded phones so the g1 kernels work on them and the only thing that you change in the proccess of porting in simply renaming init.trout.rc to init.sapphire.rc from the ram disk and you don't need to change the kernel because it will work since both devices are google branded.
so yeah you can almost port every rom but just don't expect the full features and also another note when porting to 32A you have mess to around with the update-script file most of the time when not touching it you will not be able to get any command to work under the command line due to the symlinks, i would suggest using the update-script from fatal1y's hero rom 1.4 ported by skittleguy or the hofo community rom because those are the ones that i looked at to basically learn...
Good luck,
This basically untill HTC will release the kernel patches. Then you'll be able to port every single ROM to 32a.

Interactive updates?

Just throwing an idea out there, and since it's for developers (specifically people who make their own recovery images) I assume this is the right section.
Since we have 'control' over the recovery image on our phones, would it not be possible to add a little script to an update.zip that a suitably modified recovery image could extract and run to interactively prompt the user for various Rom options? I'm thinking specifically of kernel choices, but it could be extended to almost anything that needs to be done prior to booting the installed image.
Imagine installing a rom, and during the install you got a little menu like this:
1: RamHack, BFS Kernel
2: RamHack, CFS Kernel
3: No-RamHack, BFS....
etc...
inefficient, it adds extra baggage to rom, and more things can go wrong. what would you rather downlaod a 90mb file or a 110 mb file.
Which would you rather download, one 110MB ROM or 2 90MB ROMS?
I'm pretty sure there's more than a few people who'll download different variations of the same ROM so they can see which is faster, how much easier would it be to just download one thing and then choose which options you want in there without downloading anything else.
I believe it is entirely possible. As a matter of fact, I was working on a ROM project that would have an interactive installer from the update.zip that would selectively install different features, apps, customization, themes, etc., based on the recovery menu application. It would use a lot of the /cache for temp space, though, as the installer application and its resources and configuration file, and later, the necessary parts of the ROM itself, would need to be unzipped before the install can run, if I recall correctly.
Does anyone have a good link to a reference for the command syntax for the /META-INF/com/google/android/update-script file? I'll go search for it in a few moments myself. I could probably make a simple ROM installer that chooses between ROM X and ROM Y based on a key input, as a proof of concept. I'll test it myself, I don't really mind half-bricking my device for science. (As long as I don't need to touch the SPL/Radio, that is.)
Update: Some creative searching finds me this:
JesusFreke said:
Assuming you mean update-script in an update.zip update, you will need to either look at existing update-script files for an example of the syntax, or look at the source of the recovery program in the android source
Click to expand...
Click to collapse
There's also a "make-update-script.c" file I'm seeing here and there, I'm trying to find the file in the Android source.
Update 2: From install.c at donut from cyanogen's android_bootable_recovery:
Code:
#define ASSUMED_UPDATE_SCRIPT_NAME "META-INF/com/google/android/update-script"
#define ASSUMED_UPDATE_BINARY_NAME "META-INF/com/google/android/update-binary"
and in commands.c, toward the bottom at register_update_commands is all the commands defined, and above that are all the functions they carry out.
sorry about that deicist i was sleepy when i wrote that so i must have been cranky yea i guess that is a fine idea, with just 30 more mb you have like 300mb worth of stuff. and you can pick which 90 mb you want.
markolo25 said:
sorry about that deicist i was sleepy when i wrote that so i must have been cranky yea i guess that is a fine idea, with just 30 more mb you have like 300mb worth of stuff. and you can pick which 90 mb you want.
Click to expand...
Click to collapse
Well, on the 32B platform with the Death SPL (my phone) we have the following partitions of the internal NAND memory (mtdblock*) from the df and mount command:
NAND 3: /system 92160kb - OS partition, static and read-only
NAND 5: /data 91904kb - User, system config, app config, and apps (without a2sd)
NAND 4: /cache 30720kb - OTA cache, Recovery/update config and temp
And I'd assume NAND 1 and 2 are the kernel, ramdisk, and bootloader config.
So the ROM wouldn't exceed 92MB installed (most leave some room in /system for hacks and updates). And the update process doesn't ever really "flash", per se; it just formats, copies files, and sets permissions and initialization configs, like Windows or Mac.
So the files that are common to the different ROMs being packaged don't need to be duplicated, only the ones that are changed (like a boot.img, or 32A/B compatibility, or different apps). The update script and chooser menu will decide which files to copy. Meaning the ROM package in and of itself shouldn't really need to exceed 128MB, even if choosing from a wide variety of platforms. And upon installation, the system might take less than 32 MB.
yeah, what he said ^
The scenario I was thinking about specifically was SuperD. If you look here:
http://forum.xda-developers.com/showthread.php?t=613809
There's 8 different downloads there. How many files are actually different between those 8? I guess the themes mean a lot of application files are different (due to having different resources in them) but the underlying framework files will be pretty much the same I think.
Deicist said:
yeah, what he said ^
The scenario I was thinking about specifically was SuperD. If you look here:
http://forum.xda-developers.com/showthread.php?t=613809
There's 8 different downloads there. How many files are actually different between those 8? I guess the themes mean a lot of application files are different (due to having different resources in them) but the underlying framework files will be pretty much the same I think.
Click to expand...
Click to collapse
I could download them all, and find the differences of each. It would be cool if a ROM like this were available in a single download, from which you would choose the content from the device before flashing.
Also, inspired by talking about this, I wrote up a guide on the update-script in the package file. It's still not finished, but it'll be the only guide available for that syntax yet (trust me, I couldn't find one myself ). Link's in my sig.
I'm surprised that nobody's mentioned the Droid... the sholes.info rom (now called droidmod) have used a .tgz archive instead of a .zip, the .tgz installs have always allowed this customization, droidmod makes one of the most common recovery's AND rom's. (SPRecovery/Droidmod).
It give you the option to choose what launcher to install, what theme, what apps to remove.
page here: http://droidmod.org/news/droidmod-v1-0-is-out/
how big of a ROM are you thinking about?
There are roms (WG etc...) that offer more than one kernel as update.zip you can flash over an existing installation of your rom instead of adding all the stuff to one big file. also you can download themes for several roms/for metamorph.
so why would you want some big install script instead of just downloading the files you like and flash it?
jmhalder said:
I'm surprised that nobody's mentioned the Droid... the sholes.info rom (now called droidmod) have used a .tgz archive instead of a .zip, the .tgz installs have always allowed this customization, droidmod makes one of the most common recovery's AND rom's. (SPRecovery/Droidmod).
It give you the option to choose what launcher to install, what theme, what apps to remove.
page here: http://droidmod.org/news/droidmod-v1-0-is-out/
Click to expand...
Click to collapse
Is the Droid's recovery image capable of running on the G1, and/or is it open-source enough to be cross-built to the G1? If so, we could port it here. Only problem there though, is that all the roms are in update.zip format for the G1 already, we'd need to make it dual-compatible if we don't want to split the community and annoy generally everyone ("My rom only supports TGZ recovery!" "ROMs are in ZIP format, and I will not make a TGZ one for those unfortunate enough to use the other Recovery!")
domenukk said:
There are roms (WG etc...) that offer more than one kernel as update.zip you can flash over an existing installation of your rom instead of adding all the stuff to one big file. also you can download themes for several roms/for metamorph.
so why would you want some big install script instead of just downloading the files you like and flash it?
Click to expand...
Click to collapse
Well, for one, devs need to host one file only, and users need to download one file only. The file won't be much bigger or more complex at all, really. And the way things look on the recovery side, we could probably put a selection of themes in with the updater and patch them in post-install with a Metamorph script straight from recovery. That way, the rom is as you want it out-of-the-box, no multiple reboots, etc.
Also, those scripts that usually run on first-boot, like zipalign, dexopt, apps2sd etc. should run from the recovery environment, instead of before the Android bootanimation (I do get tired of hearing "This ROM will take a LONG time on the first boot. If it's stuck at the G1 screen, just wait 10-30 minutes.")
So what would you rather have, one single ROM (G1_Android_ROM_v1.17.zip) for each version released,
or six different ZIPs to flash (G1_Android_ROM_10MB_CFS.zip, G1_Android_ROM_Greentheme.zip, G1_Android_ROM_Bluetheme.zip, G1_Android_Nowipe_GApps.zip)?
Would you rather select what you want to include at flash (and be able to change things like themes or features after flashing), or have 20 different files to choose from, wiping and flashing on each?
I am aware of the no-wipe upgrades for many ROMs, but they can get confusing (I once flashed a CFS_10MB.zip that was for a Hero ROM, stupidly thinking that it might have been for the Eclair that I just downloaded.) Needless to say, I had to wipe and reflash. Again.
TylTru said:
Is the Droid's recovery image capable of running on the G1, and/or is it open-source enough to be cross-built to the G1? If so, we could port it here. Only problem there though, is that all the roms are in update.zip format for the G1 already, we'd need to make it dual-compatible if we don't want to split the community and annoy generally everyone ("My rom only supports TGZ recovery!" "ROMs are in ZIP format, and I will not make a TGZ one for those unfortunate enough to use the other Recovery!")
Well, for one, devs need to host one file only, and users need to download one file only. The file won't be much bigger or more complex at all, really. And the way things look on the recovery side, we could probably put a selection of themes in with the updater and patch them in post-install with a Metamorph script straight from recovery. That way, the rom is as you want it out-of-the-box, no multiple reboots, etc.
Also, those scripts that usually run on first-boot, like zipalign, dexopt, apps2sd etc. should run from the recovery environment, instead of before the Android bootanimation (I do get tired of hearing "This ROM will take a LONG time on the first boot. If it's stuck at the G1 screen, just wait 10-30 minutes.")
So what would you rather have, one single ROM (G1_Android_ROM_v1.17.zip) for each version released,
or six different ZIPs to flash (G1_Android_ROM_10MB_CFS.zip, G1_Android_ROM_Greentheme.zip, G1_Android_ROM_Bluetheme.zip, G1_Android_Nowipe_GApps.zip)?
Would you rather select what you want to include at flash (and be able to change things like themes or features after flashing), or have 20 different files to choose from, wiping and flashing on each?
I am aware of the no-wipe upgrades for many ROMs, but they can get confusing (I once flashed a CFS_10MB.zip that was for a Hero ROM, stupidly thinking that it might have been for the Eclair that I just downloaded.) Needless to say, I had to wipe and reflash. Again.
Click to expand...
Click to collapse
You could just have flashed the original rom without wipe.
Would be a step forward if you could simply put roms and additional files in folders... maybe even whole zip files containing some updates and an xml like file to describe them. This would guarantee compatibility with earlier boot images (just unpack the updates in the zip). Tar might work better than zip as it is not compressed thus faster afaik.
http://droidninja.com/?p=26334
We got ninja'd. Apparently the Droid Does exactly this.
So let's get to work on porting it! Like this comment says, I'm working on finding the source code to a good Droid recovery image (sadly Droid hasn't its own forum here), and if it's closed source, I'll get on reverse-engineering a .tgz rom to see exactly how it works.
TylTru said:
http://droidninja.com/?p=26334
We got ninja'd. Apparently the Droid Does exactly this.
So let's get to work on porting it! Like this comment says, I'm working on finding the source code to a good Droid recovery image (sadly Droid hasn't its own forum here), and if it's closed source, I'll get on reverse-engineering a .tgz rom to see exactly how it works.
Click to expand...
Click to collapse
This is pretty awesome. I was going to say, we could easily run bash scripts but this is so much better.
This needs to be merged with both Amon_ra's recovery and the new 2.x based recovery...

[32ANR][PORT] Multiple ROMs : sanpei 2.6.32.9 Repack Cooks Test and Info

Edit: wasn't even aware of the ROM kitchen before this.
Untested! I don't plan to provide support for these ports!
The reason I am publishing is from my recent trials of compiling my own kernel for new radio 32A Magic. I have learned a lot about what sanpei's kernel consists of and the similarities between our device and the GSM Hero. In particular, the only difference between our ROMs seems to be mainly just the kernel. Everything else is almost identical. As such I want the community to try to use a tested NR kernel, sanpei's 2.6.32.9, and apply it to some different ROMs and report back with results.
We don't need multiple threads of the same kernel on different ROMs. So I'm trying to consolidate some information here.
I can test it on my cousins phone probably this weekend as well. Hoping for some preliminary results till then.
sanpei2.6.32.9_villain_port
This is a repack of sanpei's kernel repacked via ordinary boot.img method, with init.hero.rc copied to init.sapphire.rc
Flash this after you flash Villain ROM:
http://www.villainrom.co.uk/viewtopic.php?f=44&t=680#p11789
2.1 Sense UI ROM
sanpei2.6.32.9_anykernel.zip
This is a repack of sanpei's kernel repacked via Koush Anykernel
The idea is that you can flash most ROMs from old radio using this port with some caveats.
READ THIS BEFORE YOU FLASH
You cannot use this port if:
1) You are NOT on a 6.35 series radio. This rules out any 32Bs or myTouch 1.2
2) the ROM uses squashfs anywhere (open up the update.zip of the ROM and look at /system/modules/lib and /system/
3) modules have special directory structure under /system/modules/lib (such as Cyanongenmod, which has modules under 2.6.xx.x-cyanogenmod instead of just 2.6.xx.x)
4) you use an ext4 apps2sd partition (it will simply not recognize it)
Explanations:
If the ROM uses squashfs, this kernel does not support it and you will need to fix those problems yourself.
There may be other issues involved when you use this kernel. It is recommended that you stick to the one that came with the ROM.
This rules out any Cyanogenmod because of the use of squashfs.
If missing init.sapphire.rc, copy the Hero one (if flashing a Hero ROM) using:
adb shell cp init.hero.rc init.sapphire.rc
Refer to the ROM Bible for reference:
http://forum.xda-developers.com/showthread.php?t=682243
Any new or old ROMs that already use new radio
This is just the kernel carz12 posted repacked:
http://forum.xda-developers.com/showthread.php?t=689652
Credits:
cyanogen for everything
Koush anykernel
sanpei for his version of AOSP kernel with integrated new radio support
And a lot more I might be missing
FYI and FWIW a few weeks back there were a lot of 6.35 roms that were cooked and posted in this forum. They were all using the 2.6.32.9 kernel that Sanpei ported. That is, the boot.img-kernel was the same for all. The ramdisk was changed as you have done and the two were re-packed into the boot.img.
I have successfully applied this approach for maybe 3 or 4 different 1.6 roms and maybe 10 different 2.1 roms.
dsixda's ROM Kitchen makes executing these steps a piece of cake
http://forum.xda-developers.com/showthread.php?t=633246
Then you just replace the wlan.ko module and GPS lib file for wifi and GPS compatibility.
You're probably aware of these details but I thought they might help others.
Tried to flash VillainROM 6.1, but during the flash it aborts saying "Failure at line 2: assert getprop("ro.product.device") == "hero"
How do I solve this?
pellen said:
Tried to flash VillainROM 6.1, but during the flash it aborts saying "Failure at line 2: assert getprop("ro.product.device") == "hero"
How do I solve this?
Click to expand...
Click to collapse
Must have hero recovery not patched recovery by cursor
Ahh...thougt cursors tweaked recovery didn't differ that much. *change recovery*
I am pretty sure the update script can also be modified. The assert statement can be removed and the rom should load fine on the Hero, Cursor and Amon Ra recoveries.
Ok, so now I've flashed VillainROM 6.1 with the sanpei2.6.32.9_villain_port and I can't say it's working especially well
First of all it doesn't ask me to enter the SIM card PIN when i boot, so the mobile connection is dead. Wifi and bluetooth is dead too. The camera flicker, and then fades to black, taking a pic resulted in reboot.
giant_rider said:
FYI and FWIW a few weeks back there were a lot of 6.35 roms that were cooked and posted in this forum. They were all using the 2.6.32.9 kernel that Sanpei ported. That is, the boot.img-kernel was the same for all. The ramdisk was changed as you have done and the two were re-packed into the boot.img.
I have successfully applied this approach for maybe 3 or 4 different 1.6 roms and maybe 10 different 2.1 roms.
dsixda's ROM Kitchen makes executing these steps a piece of cake
http://forum.xda-developers.com/showthread.php?t=633246
Then you just replace the wlan.ko module and GPS lib file for wifi and GPS compatibility.
You're probably aware of these details but I thought they might help others.
Click to expand...
Click to collapse
I completely missed that post actually . Plus it's now closed.
But I wanted to see specifically how well Hero ROMs translate over to Magic ROMs because of what I've been reading about the similar kernels. The thing is that while I know to copy over init.sapphire.rc to resolve some conflicts, I'm not sure what else is involved in porting a ROM right now to get it to work.
I'm new to porting ROMs.
Maybe mods ought to close this one then?
With Eris ports you will be missing SIM card features.
So with 2.6.32.9 bluetooth and wifi break? I was actually expecting bluetooth to work. What works?
I guess I'll do some reading again. But I haven't seen that information posted regarding how to resolve some of the issues of porting ROMs.
I was looking to figure out some of the incompatibility of the kernel I was compiling so I thought this might help
If the Hero ROMs worked well enough I had the idea of modifying the AnyKernel script to add cpio to recovery by updating busybox so that ROMs can be unpacked, modified and repacked all in recovery. It means unpacking the ramdisk gunzip, modifying it and repacking it, essentially adding one script to AnyKernel. But I guess they don't work that well so
xaueious said:
I'm new to porting ROMs......
I guess I'll do some reading again. But I haven't seen that information posted regarding how to resolve some of the issues of porting ROMs.
Click to expand...
Click to collapse
A lot of the issues when porting are not related to the kernel but to the modules and lib files.
Try testing and hacking through some issues. For example, replace the wlan.ko file in the /system/lib/modules folder with one from a similar rom that is working on 32a same radio version. If you're porting Hero, then pull the wlan.ko from one of Capy's roms.
To get camera working, you'll need to replace the camera related libs in the in the /system/lib/ folder with ones from a similar rom that is working on 32a and so on.
Porting involves, at a minimum, replacing the boot.img-ramdisk and the files for stuff that is not compatible with the 32a hardware, radio version, etc.
Once you figure out these basics by experimenting with swapping out stuff with working pieces from a 32a compatible rom on the same radio version, you can then get into making updates to the files in the boot.img-ramdisk yourself, the update-script, the build.prop files, the init files in /system/etc/init.d, etc.
xaueious said:
Maybe mods ought to close this one then?
Click to expand...
Click to collapse
I think it's a good thread. Maybe some of the guys who have been porting roms will add their comments. I may be wrong but I don't there is a how to guide for porting.
anykernel is useful for a direct kernel port like cm5 to EABI1 on same rom scenarios, nice piece of coding by koush though, way many files to change, an update package would work on roms made for your device(proper assert) but most need the update script modified and at least wlan.ko changed.
testing now Flashing
how long does it take to boot?
Working:
USB
Music app (Sound ok)
Gallery 3D OK takes a while to work
Not Working:
Camara
Wifi
Bluetooth
GSM connection
Issues:
Very very long and slow boot alot of patient is required.
Slow Menu Scrolling
Freezes some times (have to take battery)
Reboots alone sometimes

[Q] Custom ROM, complete howto?

This question is probably already asked, but I can't find a clear answer for it.
2nd thing is that I can`t see the forest for the trees anymore cause I'm quite an android noob.
I wan't to try to build a custom rom, but how do I get started?
As far as I know there are 2 ways:
1) Take an existing rom (either stock or custom) and mod it.
2) Start from scratch.
The 2nd method is of course the most interesting (but probably also the hardest) method.
So say we take that method.
First of all I think android basically consists of 2 parts, being the kernel + all the rest.
You can take a kernel from a working rom, which may be moddified, but can you also build the original kernel from the source? For getting that to work on my device I'll probably need the drivers, but how? Extract it from the latest official rom? And how to add them?
Samsung (yes I have a samsung s5660 aka gio) also uses the rfs filesystem, would it be possible to use ext4 and does the kernel need to be adapted to that?
And how do you make the rom flashable for odin?
A lot of questions, I know, but isn't there a step to step guid for doing this kind of things?
Thanks
yes, its possible to create an odin flashable rom with ext4 as default filesystem. and yes, obviously the kernel need to support ext4.
read this thread, particularly the first post.
http://forum.xda-developers.com/showthread.php?t=1202049

[Q] Creating Custom ROM

Hello, I'm new to all this Android stuff (I don't even have a phone yet, but its on it way)
I have been reading up on custom ROM creation but there are some things I don't quite understand.
Let's say I have a phone in Android 2.3. I want to create an Android 4.0 ROM to put on the phone.
Now... to compile Android 4.0 I need the drivers for my phone (which I doubt I will ever have access too since its only a cheap Android with a MediaTek CPU)
So I have a 2.3 ROM that contains all the compiled drivers and the Android 4.0 source code.
Is it possible to compile 4.0 and replace the zImage (if I'm correct) with the 2.3 zImage. From what I have read, that's where all the drivers are stored.
I guess its not that simple since I also think the zImage contains the OS. If so, is it then possible to extract the zImage and replace the invalid driver files in 4.0 with the correct drivers from 2.3?
Also, I think my phone will arrive with an annoying UI, is it possible to just get any 2.3 ROM (that doesn't have an annoying UI and shares the same CPU as my phone) and replace the zImage in that with my phones 2.3 zImage?
Sorry, if my questions are stupid but this is all new to me. I've tryed to read up on this but nothing is straight to the point.
Thanks
Anyone there?
try out some roms first. see what you like and dont like. it'll probably give you a better idea for how you would make your own rom.
I don't think you could just port an entire zimage to ICs and say it will work (it might not even compile i think). It won't work. You could probably take some drivers' code (screen, speaker, etc), modify them a bit so it compiles, and test to so if it works. You more than likely have to modify the ICS code also so it works. And the zimage is just the kernel no? And the kernel really only has to do with low level system processes, drivers, etc. I think UI's and such are more fitted in frameworks and such.
Personally if it was so easy to port ICS by simply replacing the zimage or file with another, ICS would have been ported to many devices, fully working, by now.
Kailkti said:
I don't think you could just port an entire zimage to ICs and say it will work (it might not even compile i think). It won't work. You could probably take some drivers' code (screen, speaker, etc), modify them a bit so it compiles, and test to so if it works. You more than likely have to modify the ICS code also so it works. And the zimage is just the kernel no? And the kernel really only has to do with low level system processes, drivers, etc. I think UI's and such are more fitted in frameworks and such.
Personally if it was so easy to port ICS by simply replacing the zimage or file with another, ICS would have been ported to many devices, fully working, by now.
Click to expand...
Click to collapse
Yeh, but my problem is I don't have the drivers for the phone. I just have the stock ROM that come with it.
Is not that simple. I am 99% sure that you can't do that.
The phone I'm getting has a horrible theme on it. Its running Android 2.3
I have the ROM for a very similar phone (also using Android 2.3), uses the exact same CPU so it should be compiled using the correct platform.
Is it possible to use that phones ROM but replace it with my phones Kernel and .prop (so it has all my phones drivers and settings etc...)?
the hard work required in making a custom rom
I think you can take from the stock rom and compared with existing custom rom
but some sources are not shared freely as an example Tegra
CMIIW
I will mess about with the ROM when I get my phone. Hopefully I wont brick it...
I too am fairly new to android. I spent a couple weeks reading and watching TONS of youtube videos on how to ROOT and Unlock my bootloader. My best advice from one n00b to another would be to do the same. In particular...research how to do it on YOUR phone. Also, Roms are device specific. I recommend you finding the forum here on XDA for your phone and read up on whatever ROMS are available here. This might not be the ONLY place to find ROMS, but this place simply rocks! Once you get your device rooted and if necessary, your bootloader unlocked...you can easily try out any ROM without much fear. Just make a good backup...make sure you also have a factory recovery image too...just in case. For backups...if you install and use Clockwork Mod (CWM) you can use the nandroid backup it offers. I bought Titanium backup from the market and used it to do a full backup before I started...it backs up to dropbox even, which was a nice feature for me. Extra safety so incase I hosed my external SD card which had my backups...I could easily retrieve a backup ANY place that had internet access. Lastly...get ready to have some FUN! Flashing ROMs is VERY addictive!! :-D
Ok, Thanks. I will see what I can do then.

Categories

Resources