• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

[GUIDE] How To Port Different Roms to Your Device - For CM, AOSP & AOKP

Did this guide work for you?


  • Total voters
    96
Search This thread

Maurice5813

Guest
Jan 1, 1970
0
907
Many users have had trouble porting Roms due to Google's new file System optimizations and Setup. Here I will show you how too, this guide works 9.5/10 times:highfive:

Your base Rom MUST Be Cyanogenmod, this guide is also known to work on AOSP Android 4.4, You can NOT Port different android versions!!! Also, Devices need to be the same resolution! Also You can NOT port CM Based roms with AOSP as a base! You can NOT port CM based roms with AOKP. Same goes for vice verse!

Also, YOU CANNOT USE STOCK AS A BASE OR PORT STOCK ROMS!

Before we get Started, you need:
  • Winrar - For extracting and building zips
  • Notepad ++ - For editing scripts
  • Tiny bit of experience with the Android File System
  • 20 minutes of your Life
  • A Desktop (Windows/Linux/Mac - Works on all!)
  • A Brain:p

Lets Clear Up Some Fog:

Q. What Is Base Rom?
A. The Rom which Is developed and working for YOUR Device.

Q. What is Port Rom?
A. The Rom that you want to port to your Device.

Q. What Roms Can I port?
A. Any Cyanogenmod Based Roms, and AOSP based You cannot port AOSP to CM Based roms with this guide. For AOSP you can only port AOSP based roms, same goes for AOKP.

Q. What about Hybrid Roms? Can I port those?
A.Yes and No. Before you port Hybrid Roms, read the threads carefully. Hybrid Roms are based on one Rom with "cherrypicks" of others. Find out what it is based on. If it is based on CM with cherrypick from aosp, slimrom,etc. than use CM as base rom If it is based on AOSP with cherrypicks of CM than use AOSP a base rom.




Instructions

STEP1:

Take any clean CM7, CM9, CM10, CM11, AOKP or AOSP Android 4.4 ROM which is running on your device as Base ROM.
STEP2:

Make a New Folder on your desktop, name it "Project - (Name of Your Device)". This is our Working Folder.
1z1qkpc.jpg

SETP3:

Inside that folder, Create 2 more folders. One Named "BASE" and one Named "PORT"
2vds56c.jpg

STEP4:

Extract Your Base Rom to the "BASE" folder using Winrar.

STEP5:

Extract Your Port Rom to the "PORT" folder using Winrar.

STEP6:

Delete addon.d, app, Framework, Fonts, Media and priv-app (if there is one) folder inside System Folder of Base ROM.
14szfcy.jpg

STEP7:

Now copy the addon.d, app, Framework, Fonts, Media and priv-app (if there is one) folders inside System Folder of Port rom to the Base rom System folder.
or7h.png

STEP8:

Now Go back to Base Rom folder. Navigate to etc folder (BASE/System/etc) and open init.d folder.
d6pz.png

STEP9:

Open init.d Folder (if there is one, if not skip to step 11) in Base ROM and Delete everything except 00banner.
ge8c.png

STEP10:

Navigate to init.d folder in Port Rom (PORT/System/etc/init.d). Copy all the files inside of init.d folder of Port Rom to Base Rom. Don't Copy the 00Banner!
4gb4.png

STEP11:

Open permissions folder of Base Rom (BASE/System/etc/permissions). Do the same in the Port Rom.
9v7r.png

STEP12:

Pay Close Attention!!! Open permissions folder of Port Rom (PORT/System/etc/permissions). Copy all the permission files to Base Rom's permission folder except for :

handheld_core_hardware
org.cyanogenmod.hardware
platform
mjo6.png

STEP13:

Now open build.prop file using Notepad++ and make changes to these of Base Rom that you want.

ro.build.id=
ro.build.display.id=
ro.build.date=
ro.build.date.utc=
ro.build.user=
4iv1.png

Change ro.product.locale.language and ro.product.locale.region if you need different language.

STEP14:

In build.prop file change these to same as Port Rom build.prop values:

ro.config.ringtone=
ro.config.notification_sound=
ro.config.alarm_alert=
yf7q.png

STEP15:
You've done it! Now all we have to do is to make it into a flashable ZIP. Pay close Attention!

SELECT META-INF, system,file_contexts(if it is one) boot.img, data(if it is one).
Right Click and Select Add to Archive..
Select the Zip button.
Type the Name (Don't delete ".zip" at the end).
Click OK when ready..
2qrl.png
 
Last edited:

Maurice5813

Guest
Jan 1, 1970
0
907
Fixing a Bootloop:​

Your Port should take less than 5-8 minutes to boot. When the screen dims during boot logo, your Rom has successfully boot:highfive: But If your waiting for like 15 minutes, and boot logo is still going, YOU HAVE A BOOTLOOP. Luckily, the fix is easy!;)


STEP2:

Go to lib folder inside System folder of Base Rom.
9z3v.png

STEP3:

Inside lib folder search for these libs:

libandroid_runtime.so
libandroid_servers.so
libmedia_jni.so
a2pu.png


Once you find each, copy them to the lib folder of Base Rom. Right-click lib folder of Base Rom, select paste, and click the box in the lower left corner. Now "Click Move and Replace"
egpu.png

STEP4:

All done! Now add to a zip and flash!
 
Last edited:

praveenbablu

Senior Member
Feb 13, 2013
78
3
I want to port a rom from galaxy y s5360 to ace s5830i.but the resolution of the "y" is less than "ace I" is there any solution to increase the resolution(like apps icon's dpi etc to "ace I")

Sent from my GT-S5830i using xda premium
 

Maurice5813

Guest
Jan 1, 1970
0
907
I want to port a rom from galaxy y s5360 to ace s5830i.but the resolution of the "y" is less than "ace I" is there any solution to increase the resolution(like apps icon's dpi etc to "ace I")

Sent from my GT-S5830i using xda premium

Yeah it should work, but somethings may be too big, I would recommend porting roms from the galaxy mini, they both have the same resolution;)
 

Maurice5813

Guest
Jan 1, 1970
0
907

gamerman123x

Senior Member
May 30, 2013
639
480
Toronto
IDK, I don't like using macOSX, strictly windows and ubuntu:laugh:

ya i dont like mac either but its the only computer in my house that has wifi and i cant get another one for a bit anyways the port rom has an extra folder in system called cameradata should i copy that to base and in the init.d folder in the port rom it has a whole bunch of init.d tweaks idk if its compatible with the galaxy nexus and or should i copy them to base and it has the regular init.d files that i deleted from base ?
 

Top Liked Posts