[GUIDE] How to port ROMS

Search This thread

saywhatt

Inactive Recognized Contributor
Apr 17, 2012
2,939
1,703
Land of Ooo
I know that there are actually LOTS of "How to port ROMS" in this forum now.. but I would like to share a certain source I found that is actually fool proof :)

Here it goes!

find a ROM that is designed for the same CPU type and the same phone manufacturer. Any stock Gingerbread, ICS, or CyanogenMod 7/9 ROM should work, but you’ll have to make sure your phone can handle the ROM – no ICS for an HTC Hero, for example. Also, your Port ROM's original Phone should have the same RESOLUTION with that of your phone's.

You will need:
**Notepad++
**a compression program (WinZip or 7zip and etc)
**the ROM you want to port to your phone (let’s call it the "Port ROM")
**a ROM designed for your phone (let’s call it"Base ROM")

This guide may mention some files or directories that aren’t present in your particular ROM; don’t worry, just carry on.

On your PC, extract the .ZIP files containing the two ROMs, and navigate to /system/app in your extracted Port ROM and copy stk.apk, vpnservices.apk, camera.apk, and bluetooth.apk into a temporary directory somewhere else on your PC.

Now, delete the following folders from your Port ROM and replace them with the ones from your Base ROM: /data, /system/app, /system/framework, /system/fonts and /system/media.

From your Base ROM, copy /system/lib/libandroid_runtime.so to the system/lib/ directory of your Port ROM, overwriting the file.

Next up, move the .APKs you copied earlier back into the /system/app directory of your Port ROM.
Open up /system/lib in your Port ROM and copy all the files and folders. Paste them into the Base’s /system/lib directory, replacing all. Then go back to the Port ROM and delete the /system/lib folder, and replace it with the /system/lib folder from the Base ROM.

Next, navigate to the /system/etc/init.d folder in the Port ROM and do the same copy-from-Port, paste-to-Base, delete-from-Port, copy-from-Base, paste-to-Port shuffle as before.

Navigate to /system/etc/permissions and do that same copy-paste dance one more time.
open system/build.prop from both the port and the base ROM in Notepad++. Update the Base build.prop to match the values for “ro.build.description=” and “ro.build.fingerprint=” from your Port. Now save the Base build.prop, exit Notepad++, and copy the Base build.prop into the Port ROM, overwriting the Port build.prop.

In Notepad++, open \META-INF\com\google\android\updater-script from both your base and port ROMs. Edit the Port’s script to be like the Base’s updater-script: specifically, change, edit, or add the sections for permissions, ui_prints, asserts, run_programs, and installing the kernel. Don’t change any of the symlinks. In the Port script, make sure that the ‘format’ values are appropriate for your device (compare them to the Base script).

Finally, make sure that your kernel is specifically for your device.

Now, if you desire, you can update any apps you require, or add any tools like BusyBox or SuperSU.

And that’s it! Your base ROM is now ready to be zipped and installed on your device via Clockwork Mod! :D


SOURCE: http://apcmag.com/port-roms-to-your-android-device.htm

ADDITIONAL INFORMATION:

CUSTOM ROM FOLDERS EXPLAINED
List of Resolution for Smartphones
How to change Kernel of ROM Before installation in its zip file.
[GUIDE][How to Make CWM Recovery Flashable Zip file without Computer]
 
Last edited:

kemaro30

Senior Member
Dec 7, 2011
353
28
Manila
erm hello, can you put the other guides in your OP? some are in your other posts and it would not be easy for others to see..
nice guide and gonna try this when i got time :)

:good:
 

mandeep1

Senior Member
Oct 5, 2011
63
11
Jabalpur
Hello I Wanted to port Cm7 On a New cpu named as - MediaTek 6573 ! it is an armv6 one ... any suggestions from where to start ....etc ?
 

saywhatt

Inactive Recognized Contributor
Apr 17, 2012
2,939
1,703
Land of Ooo
Okay, question: what is the point of porting a ROM made for a device with the same CPU and same manufacturer?? there is VERY few phones that are made by the same company and the same cpu!

Well that is to ensure "safety" when porting a ROM.. the guide i posted was a beginner's guide on how to port.. as you can see, almost 80% of the procedure is just basically copy&paste..

however, if you have a good background now in codes and porting things, i believe you may not follow step-by-step the procedures i stated above.

Sent from my GT-I9300 using xda premium
 
  • Like
Reactions: PreetSaluja

uoY_redruM

Senior Member
May 1, 2010
3,469
1,941
Longwood, FL
Does anyone have any idea what would cause a "Modem Crashed Forced Upload Mode" on a port for SGS3?

I can't seem to pinpoint what causes that (I think it's a kernel panic but I could be wrong)
 

teshxx

Senior Member
Jul 19, 2010
1,712
3,362
FL
Looks like this would work on International Note 2 and Tmobile Note 2. They have the exact same hardware and everything. I was wondering about the last statement about kernel. Can't I just copy the boot.img from tmobile note 2 to international note 2 ? would that work ? I am not familiar with kernels and stuff. Need advice.

Thanks
 

Top Liked Posts