[Q][REQ]Porting roms among different devices - Android Q&A, Help & Troubleshooting

Hey there XDAians....
Can someone here point me to a walkthrough or tutorial on porting roms from and to devices of different manufacturers,resolution(mdpi,hdpi etc.) etc.I am familiar with the zip method of porting roms from same manufacturer(sony in my case,xperia U to Sola)but i want to know about porting roms from others like htc,samsung etc and Tools/apps needed to accomplish this.Most of the tutorials i found on XDA are based on the same method of zip porting.
Please help me with this,i really want to learn more about porting.

In the minimum, you must learn how to create a boot.img for your new device based on the boot.img (especially the ramdisk) from the old device.
To do this, you must extract the boot.img of your old device, edit the ramdisk (As there are lots of files named like the device, and those must be renamed to match the new device's name) Probably you must also change the content, to match the needs or to update references to some files, where the name changed.
After this, you can recreate the ramdisk.
Than extract a boot.img of your new device to get the kernel. Take the new Kernel and the new Ramdisk and make a new boot.img
Extracting and recreating a boot.img is described in the later part of this article: How to build a custom kernel
Recreating a ramdisk is described in this article: Create/Modify ramdisk
This might be the first step of a lot of steps...
Kind regards Uwe

Related

Precook Kernel into Rom Zip

Is there a unified manner in which this is done?
I've been looking for a way to precook this kernel here: http://forum.xda-developers.com/showthread.php?t=756774 into my ROM's zip before flashing, to save myself the extra step.
Is there anything special to it? I assumed it might just be as straightforward as copying the entire folder structure into the ROM's zip, but the kernel inquestion actually has a third folder called "kernel".
Any help would be much appreciated, this combined with my LauncherPro cooking question earlier will make this ROM perfect for me
LiquidSolstice said:
Is there a unified manner in which this is done?
I've been looking for a way to precook this kernel here: http://forum.xda-developers.com/showthread.php?t=756774 into my ROM's zip before flashing, to save myself the extra step.
Is there anything special to it? I assumed it might just be as straightforward as copying the entire folder structure into the ROM's zip, but the kernel inquestion actually has a third folder called "kernel".
Any help would be much appreciated, this combined with my LauncherPro cooking question earlier will make this ROM perfect for me
Click to expand...
Click to collapse
unpack the existing rom zip's boot image, copy in the kernel you wants zImage, repack it and plop the boot image back into the sip. then remove all the modules in /system/lib/modules in the rom zip and copy all the modules from the kernel zip into the modules folder in your rom zip.
then you ware ready to go.
Yes man, but where to put the zImage? i have 2 GZ files and 1 folder. i tried to put it in the folder and repack that, and the rom stuck at the splash screen. where to put it and how?
thanks

[Q] Creating boot.img for Galaxy S Advance

I hope this IS the thread for asking questions..haha...
Firstly I'm a noob at Android developing, but I'm willing to learn..So I just got myself a Samsung Galaxy S Advance, and I'm going to try to root it myself.. But I'm quite buffled with the firmwares that I downloaded at samfirmware for this phone, cos the file inside are quite different from what we always see, listed like this:
cache.img.md5
system.img.md5
hidden.img.md5
kernel.bin.md5
modem.bin.md5
And there is also this file (SS_DL.dll) which I don't know how to use.. for rooting, I'm supposed to find the boot.img and modify some files in it, but I have no idea where to look for it... I suspected it would be in the kernel.bin, or compiled from that file, but that would be out of my knowledge... Is there anyone who can point me to the right direction?
So far i have been trying to decompile the system.img to get their NAND imgs using unyaffs and unyaffs2, but both are not working (segmentation fault and file is not multiple of 2048 + 64 or something)... Is there any other way for me to extract boot.img from the files above?
I have decompiled system.img with dsixda kitchen, to get system files, but I don't know how to get boot.img (kernel). I think it is in the kernel.bin file, but the kitchen can't decompile it. I've been asking around how to get boot.img from this phone but nobody gives me any answer. If we somehow manage to get boot.img and decomple it, we can than make insercure kernel, which could be used for rooting the phone.
Here is the guide for rooting Samsung Galaxy S I9070 Advance.
http://software2tech.com/2012/05/01/root-galaxy-s-advance-i9070/#more-18866
There is one problem though, the most important files, that we need, haven't been uploaded yet. I've already searched this group on facebook, and nwrite them to publish those files (kernels), but there was no answer. So I doubt that they even have those rooted kernels. Maybe you could write them too, and lets hope that they will publish kernels soon!
I think they don't really have the rooted kernel.. Cos Samsung haven't even release the opensource k kernel yet.. But yeah, right now I'm stuck.. I have been trying almost every possible way to create the boot.img, including unyaffs and unyaffs2, but keep getting errors... If we can just ask the guys at rootzwiki to port CWM recovery for us, but maybe they need rooted source too..
This would be great if they could build us CWM recovery. I don't think they need kernel source they just need stock recovery, but to get stock recover.img from our phone we need to know here is located. I have pull partitons layout from the phone, but unfortunatly it doesnt tell anything useful. You can see it in the attachment.
whoa...that is great...maybe that could help...i will try to check with other phones, cos it might be that one of this partitions would contain boot.img as well as recovery.img... how exactly you extract this information, using kitchen, perhaps? haha...
No my phone used to be rooted, until I have upgrade it to new firmware (stupid me I know, but I had test firmware before, and had quite few bugs). And I've pulled this from system partition (in /proc folder). But you can also get it with this:
adb shell
cd proc
cat partitions
I can provide some other files, that might be useful. We just need some help from experienced developers, but so far no help was offered. I've been starting threads all over the place, but nothing .
In the attachment are all the files that might help some developer to get us recovery working!
well, after searching throughout the web, I'm starting to think that without the opensource kernel from samsung, it might be quite impossible for us to root this phone... every other imaginable ways to make these system or boot images seemed to require root access... so far samsung had done a very well job in patching those root exploits...
kilsmap said:
well, after searching throughout the web, I'm starting to think that without the opensource kernel from samsung, it might be quite impossible for us to root this phone... every other imaginable ways to make these system or boot images seemed to require root access... so far samsung had done a very well job in patching those root exploits...
Click to expand...
Click to collapse
Yeah I think you are right, but I wish you wer not . Well no we have to wait for samsung to release source code of the kernel.
Ok source code for kernel is now available!!! You can download it from opensource.samsung.com. I will make a thread later, with mirror links! Now lets compile that sh*** !
hahahahaha...at last...i was checking that site every few hours...this would make it!!
I've just made a thread on XDA:
http://forum.xda-developers.com/showthread.php?p=25782811#post25782811
If you managed to compile it before me please PM . I'm just installing linux, but I won't be able to continue until tommorow, cause I do this on work computer .

Create flashable zip

I see this has been asked several times. Yet they all seem related to a small package of APKs or the answer is "unzip someone else's and replace what you need".
I have successfully compiled android for nexus 7 and I am able to use fastboot to flash the device. What I would like to be able to do is create an update.zip that can be flashed.
The situation is we have a few hundred Nexus 7s we need to flash and want to simplify the process as much as possible. If could package an update.zip and flash it via fastboot that would be handy as well. Our current setup is to distribute a zip of the out dir from the android build and use a quick script to automate fastboot flashing.
Even if it doesn't really help our situation. How does one go from a compiled android os with the *.img files to an update.zip that can flash the entire device.
halsafar said:
I see this has been asked several times. Yet they all seem related to a small package of APKs or the answer is "unzip someone else's and replace what you need".
I have successfully compiled android for nexus 7 and I am able to use fastboot to flash the device. What I would like to be able to do is create an update.zip that can be flashed.
The situation is we have a few hundred Nexus 7s we need to flash and want to simplify the process as much as possible. If could package an update.zip and flash it via fastboot that would be handy as well. Our current setup is to distribute a zip of the out dir from the android build and use a quick script to automate fastboot flashing.
Even if it doesn't really help our situation. How does one go from a compiled android os with the *.img files to an update.zip that can flash the entire device.
Click to expand...
Click to collapse
Did you build from source? If so just type this command:
Code:
make otapackage
Sent from my HTC PH39100 using Tapatalk 2
Thanks! I tried autocomplete on the source Makefile to see all the possible targets. Well it appears there are so many autocomplete chokes and never returns.
Thanks again.

[HELP] Modifying ROM doubts

Good evening,
I've written a module for my smartphone and I need to compose a rom to install on my device...
I followed some tutorials, so now I know how to build an android kernel, obtaining a zImage.
Now, a friend told me that I must make a backup with clockworkmod (done!) and download on my pc, than I can recover the boot.img from there and split them in ramdisk and kernel.
Now I can compile my new kernel and merge it (the obtained zImage?) with the ramdisk to have a new rom to flash on my device... is true?
But I don't know how I can split the boot.img (maybe with dsixda kitchen?) and how to create the new rom. I tryied som weeks ago with a .zip rom and the dsixda kitchen and I split and recomposed a rom, but files contained in the .zip files was different from files that I downloaded by my device...
Someone can explain me the correct way to do this process? Thank you!
Paolo.dev said:
Good evening,
I've written a module for my smartphone and I need to compose a rom to install on my device...
I followed some tutorials, so now I know how to build an android kernel, obtaining a zImage.
Now, a friend told me that I must make a backup with clockworkmod (done!) and download on my pc, than I can recover the boot.img from there and split them in ramdisk and kernel.
Now I can compile my new kernel and merge it (the obtained zImage?) with the ramdisk to have a new rom to flash on my device... is true?
But I don't know how I can split the boot.img (maybe with dsixda kitchen?) and how to create the new rom. I tryied som weeks ago with a .zip rom and the dsixda kitchen and I split and recomposed a rom, but files contained in the .zip files was different from files that I downloaded by my device...
Someone can explain me the correct way to do this process? Thank you!
Click to expand...
Click to collapse
So many u can use
1. http://forum.xda-developers.com/showthread.php?t=1619473
2. http://forum.xda-developers.com/showthread.php?t=2036528
3. http://forum.xda-developers.com/showthread.php?t=1877807
and many more if u search

[Q] [KERNEL][DEV HELP] Recreating Stock Kernel

Hello,
I have changed my handset and now have a spare SGS2 (I9100) for learning about the kernel.
I'm running the following stock kernel & rom downloaded from sammobile.com ...
I9100XWLSW_I9100XEULS5_XEU.zip
In order to teach myself more, I am trying to create a replica of my current stock kernel...
3.0.31-1211311
I've downloaded/ familiarized myself with Android SDK, NDK (r8e) and Samsung Open Source (GT-I9100_JB_Opensource.zip).
I've got as far as making a kernel from the Samsung Source, but I've got the following differences:
1. New zImage size is approx 4Mb original zImage (in boot.img from I9100XWLSW_I9100XEULS5_XEU.zip) is approx 8Mb
2. New zImage also compiled 4 Modules in /lib/modules, there are six in the original zImage
Clearly the two are different and this is where I am stuck.
If I unpack the original zImage, I get what looks like a disk image, /data, /dev, /proc etc, if I unpack the new zImage I get two directories /dev & /root both are empty.
The difference in modules is also worrying, makes me think that the config in the original zImage is different to that supplied when I run 'make u1_defconfig'
I've sifted through a lot of forums, tuts and docs to get this far, any dev's help with some pointers? Is it possible to compare kernels?
Thanks,
YYo
**Please save yourself some time by reading the following**
Do not answer with 'I don't know but...'
'...have you tried kernel/ Rom xyz'
'...don't modify your kernel, you'll most likely brick your phone'
'...leave kernel development to people who know how to do it'
'...I am nigerian businessman who has just inherited $2,000,000...'
Bump,... anybody got any ideas how I can find out what was included when the original kernel was compiled (without going back to Samsung)?
YYo

Categories

Resources