yashsingh1/xdaforums huggingface dataset:
[Android General] Nasheich Xfiles:
Hello XDA members, in this guide, i'll give you the easiest way to porting rom for your device, i've broken my porting record by ported 5 roms in less than 1 hour using this method, have enjoy and hope it'll works for you too :)

What you need ?

- Rom base (CM or AOSP)

- Rom port (any roms that you like to port)

- Apktool (for compiling .apk and .jar files)

- Note++ (for editing .txt and .xml files)

- Winrar or 7zip (for extracting and repacking rom)

- dsixda's Android Kitchen, you really need this to Port MIUI, PAC, and Slimrom

- Open mind and never give up to trying ;)

Rules

1. Find the rom port with similar CPU like your device, clock speed doesn't matter here, the important is the number of CPU Cores, if your device is single core, find the single core rom, dual-core with dual-core, etc

2. Forget about screen sizes(4, 5, or 7 inci), the important is screen DPI(pixels destiny) you can port rom from tablet or devices that have bigger/smaller screen sizes

example

> LDPI & LDPI

> MDPI & MDPI

> HDPI & HDPI

> xHDPI & xHDPI

> etc

3. Same Android SDK version(Check in build.prop)

Example, you can port Android 4.4.3 using Android 4.4.2

4. GSM and GSM, CDMA and CDMA

Step by step

Extract booth of the roms(rom base and rom port)

> In rom port folder <

1. Delete all files and folders except "system" folder

2. Delete these folders and files in system

> tts

> usr

> vendor

> build.prop

3. Delete these folders in system/etc

> Bluetooth

> Firmware (if exist)

> Wifi

4. Delete these folders in system/lib

> hw

> modules

5. Go to system/framework

> Open framework-res.apk

> Go to res/xml

> Replace storage-list.xml with your rom base

> In rom base folder <

1. Copy all files and folders except "system" to rom port folder

2. Copy these folders and files in system folder to rom port system folder

> tts

> usr

> vendor

> build.prop

3. Copy these folders in system/etc to rom port system/etc

> Bluetooth

> Firmware (if exist)

> Wifi

4. Copy these folders in system/lib to rom port system/lib

> hw

> modules

Repack the rom then flash it in the recovery

Now the rom port should booted(to menu) now, not stuck on bootanimation anymore :p

if you still stuck on bootanimation, check bootclasspath in boot.img, unpack it, and check in "init.environ.rc", use note++ to edit it, there's must be something miss there ;)

If the rom doesn't boot to menu or stuck on manufacturer logo(LG, Sony, Samsung, etc), find the same rom port from other devices. I've this experience while porting Liquid Smooth, then i used other devices and it's booted :D

Notes :

If you successful ported the rom, please do these before your releasing your ROM

> Ask the permission from the developers of the rom base and rom port

> Give credit for them

> And give credit for me too if you using this guide :p

> And don't forget to hit THANKS button ;)

For porting MIUI Kitkat, you need to unpack boot.img from both roms, then do these

- Copy paste init.miui.rc from rom port to rom base ramdisk folder

- Open init.rc from both roms, then compare it, there's some line you need to be edited...
[Android General] Nasheich Xfiles:
Troubleshooting

Now, to fix some issues in rom port, do these...

1. Information about rom

Open build.prop from booth of the rom then edit information just like the rom port

You can edit these lines in build.prop

# begin build properties

# autogenerated by buildinfo.sh

ro.build.display.id=

ro.build.date=

ro.build.user=

ro.build.host=

ro.product.name=

ro.product.locale.language=

ro.product.locale.region=

ro.cm.device=

# end build properties

#

# ADDITIONAL_BUILD_PROPERTIES

#

persist.sys.root_access=

ro.modversion= > replace with rom port

ro.cm.version= > you can delete this

ro.config.ringtone=

ro.config.notification_sound=

ro.config.alarm_alert=

ro.sf.lcd_density=

and the other lines relating information about rom

2. RIL

Replace these files in rom port with your rom base files

system/bin/rild

system/lib/libreference-ril.so

system/lib/libril.so

system/lib/librilutils.so

system/lib/libsec-ril.so

system/lib/libsecril-client.so

And add any files with "ril" in the name of file

3. Sensor

Replace these files in rom port with your rom base files

system/bin/sensord

system/bin/sensorservice

system/lib/libsensorservice.so

system/lib/libhardware.so

system/lib/libhardware_legacy.so

4. WiFi

Replace these files in rom port with your rom base files

system/bin/wifimac

system/bin/wpa_cli

system/bin/wpa_supplicant

system/lib/libwpa_client.so

5. Missing files

You have to copy the rest of files in base rom to port rom to make rom better, but don't replace it if the files/folders was exist

6. Files can be replace in your ported rom using files from base rom

Bin

>adb

>dalvikvm

>debuggerd

>dhcpcd

>dnsmasq

>drmserver

>gdbserver

>glgps

>hostapd

>hostapd_cli

>ime

>ip

>ip6tables

>iptables

>logcat

>logwrapper

>media

>mediaserver

>mtpd

>ndc

>netcfg

>netd

>ntfs-3g

>ping

>ping6

>pppd

>radiooptions

>rild

>screenshot

>sdcard

>sensord

>sensorservice

>service

>servicemanager

>toolbox

>vdc

>vold

>wifimac

>wpa_cli

>wpa_supplicant

Lib

>lge-ril.so (for LG devices)

>libbluetooth_jni.so

>libbt-hci.so

>libbt-utils.so

>libhardware.so

>libhardware_legacy.so

>liblgehdmi.so

>libnfc.so

>libnfc_jni.so

>libnfc_ndef.so

>libreference-ril.so

>libril.so

>librilutils.so

>libsensorservice.so

>libwpa_client.so

>

>

7. Video streaming

> libstagefright.so

and all libs with "libstagefright" of the lib's name
[Android General] Nasheich Xfiles:
Rom that can be ported

What roms can be ported using this guide ?

This guide should can port any costum roms base on AOSP or CM, not manufacturer roms, not yet...

My experience, I've ported these roms

Mokee Open Source Project

Carbon Rom

Paranoid Android

Xperience

SDK NX v1

AOKP

Hellfire

Codename Lungo

AOSB Project

OMNI Rom

SlimKat

PAC man

SOKP

AICP

MIUI V5 Kitkat

Rom ported by XDA Members using this guide

- Liquid Smooth
[Android General] Nasheich Xfiles:
Credits

- Nasheich Xfiles

- JulianJenner

- ZduneX25

If this guide helping you, please do these

> Donate to me

> Hit my THANKS button

> Rate the thread

> Poll the thread

> Hit "Tip us" ? to make this thread on portal, so many people will know it the easiest way to porting any costum rom

> Mention me (@nasheich) at your rom thread

> Keep this thread at first page by posting

Best Regards

Nasheich
[Android General] Jagdish2011jat:
Thanks a lot

There is a doubt in my mind....

Can we port mtk6589 roms to mtk6582 using this tutorial...:confused:
[Android General] wahyuwidi:
thanks bro,. will try this ,.. semoga berhasil di ascend p6 ane gan,.
[Android General] lock.in:
thanx bro, i'll try
[Android General] amrinal:
found it from fb,,, thx, gonna try it:good:

salam kenal bro
[Android General] Nasheich Xfiles:
Just try it, make sure you have the cm/aosp as a base rom

;)

Good luck to you all, :)

Don't forget to give me credit at your rom thread if you have success port the rom you like using this guide ;)

And don't forget to press THANKS button too :p

I'll update the thread to fix the issues asap...
[Android General] Mister-v:
I followed your guide but I'm stuck in a bootloop.

I'm trying to port the Pacman rom from umts_spyder
[Android General] Nasheich Xfiles:
PAC man is using AOSP as base and we (LG L9 p760) doesn't have AOSP

Try to port another roms, cause you LG L9 user, i suggest you to port rom that use CM as base

But unfortunately, i have ported almost all cm rom :p
[Android General] Mister-v:
So I have to wait till you update aosp for our device?

And yes you have ported almost all roms
[Android General] Mister-v:
Still got some errors I'm trying to find it on the net but maybe could you help me?

It doesn't have a signal and it doesn't recognise external SD
[Android General] Nasheich Xfiles:
For network, you have to compile telephony-common.jar too, L9 have different "RIL" files...

For Sdcard, you have to replace storage-list.XML with your base rom
[Android General] Mister-v:
I changed storage list but i shall try it again.

And could you expain for network a little more? :)
[Android General] Nasheich Xfiles:
Use this guide for compiling .jar and .apk
[Android General] 991luy:
I have found boot.img-ramdisk & my bootclasspath in my base rom but in port rom there is nothing!! its says no ramdisk found
[Android General] Nasheich Xfiles:
search in etc folder/firmware or type .img in whole ROM port, should be .img file there
[Android General] Mubasher96:
Wonderful guide. Helped me alot.
[Android General] 991luy:
i found boot.img on port Rom but when i try to unpack it says ramdisk no found and just give zimage file
[Android General] LittleSpanner:
HEHE im sorry

sorry for not being clear in my 1st post. im just looking for someone that know about my phone .. anyway sir i tried this guide i just want to ask something when im flashing the rom that i port its always "aborted" and there is no error showed after the checking compressed blah blah .. installation aborted any idea sir ? :) btw thankyou for your response
[Android General] ice.man:
port rom from similar device

I found your guide really interesting.

I still have some doudlts.

I'm interesting in buyng a UMI x3

The device spec are nice compared to the price (180$+shipping from HK)

The matter is: there isn't actually any kitkat based rom (that's one of the reasons why the device price has been cut down so much), neither from manufacturer, nor community.

So I was wondering if I can just take a custom mkt6592 rom (CM or AOSP based) and use your guide to have it working on the UMI. For example a Zopo 998 with has similar specs (mkt6592, fullHD display, 13Mpixel camera, dedicated camera shooting button)

How much slimmed down are the kernels out there, I mean they have native support for all of the hardware or they are trimmed down to the very little needed to the specific device?

regards
[Android General] sugarkane87:
Help me bros, try porting PA with CM11 as base, the ROM is booted up but the camera is missing in app drawer or home screen, check in setting>apps>all camera is exist :confused: try flashing latest gapps no avail, try installing 3rd party camera app it's says something like "please close other camera.... camera hardware is in use..."
[Android General] arunal_123:
Try to remove/uninstall CM11 stock camera.apk and replace with SlimRom camera.apk

Search in XDA for SlimRom camera.apk

That might probably solve your problem.

Thanks...
[Android General] sugarkane87:
No luck, still the same. Very strange issue because right after finish boot the camera is in the dock! After a while it's gone
[Android General] DallasCZ:
Zte v5 moto g

Hello i am stuck in bootloop (in the very first screen that appears after turning on).

I am trying to port stock Motorola Moto G XT1033 Android 4.4.4. stock rom (asia version with dual sim) to ZTE V5 V9180 (stock rom 4.4.2. nubia ui, dual sim).

The devices have same SoC (MSM 8226), same resolution (720p), screen size is 4,7 versus 5,0.

I made exactly the same as described in the first post except the framework-res.apk which I edited in 7zip.

I thought it will be more simple when the devices have same SoC.

please HELP
[Android General] Nasheich Xfiles:
Installation aborted like status 0, 6 or 7 because there's something wrong at your updater.script, check it...

I don't know what you talking about, make it simple

replace libexif.so

hope it will works

no clues for porting stock rom, my guide only for custom roms
[Android General] sugarkane87:
Still the same, not works bro
[Android General] laciegy:
Hello guys i have a zte blade 3 and i want to make a dirty unicorn to my phone and i found one for samsung galaxy s whats have almost the same specs and i did everything well i could install it from cwm and my phone stuck where its says "dirty unicorns" and its stays like that. I was thinking but im not sure that problem is this but my phone only working with kernels whats have pmem, but why i donno that this is the problem because im not doing anything with the kernel! Can u please help me guys?? And sorry for my english :D
[Android General] farz2farz:
hi, i want to port cm12 from htc m7 to htc butterfly s, but i have one doubt what about android 5 kernel?? please help. do i need to create kernel?
[Android General] FirmLearner:
Bookmarked and thank you bro. Great guide! :good:
[Android General] :
've been searching for a solution to Note3 CDMA Rom port working on GSM Network

I know it involves editing build.pop and after reading reading a couple of forums it seems the port that I'm working with (Rebirth 1.5 Note 4 Port is missing some key files that would allow att and tmoble Network to function properly on a sprint ROM PORTs

If have suggestions on this matter please:banghead::banghead::banghead:
[Android General] 4Freedom:
Yes, you mus use a lollipop compatible kernel...

If noone have it, you must build it from source :(
[Android General] rrajesh011:
[MENTION=4792862]Nasheich Xfiles[/MENTION] my mobile's stock rom version is 4.1.2. can we port kitkat based rom to my device.
[Android General] rrajesh011:
can i port rom from quad core to dual core. if i do what will be the results...?
[Android General] TheWMDev:
Great guide.......I Have Tried It And ported Cm12 To My ZenFone 5:good:
[Android General] eragon5779:
Won't work.
[Android General] amarbunty:
I successfully ported rom for my mobile, thanks for sharing this info

can you share steps to port lolipop version rom for mt6592 cpu??
[Android General] ombladon24:
Good job.
[Android General] rrajesh011:
[MENTION=4792862]Nasheich Xfiles[/MENTION] i followed this guide to port rom. every thing is working but systemui always crash i cant procceed to next step. any help will be appreciated,
[Android General] Nasheich Xfiles:
many things causing system ui crash, best way to find the solutions is using logcat, but you can try one of these

- replace these libs

libandroid.so

libandroidruntime.so

libandroidfw.so

libmedia.so

libmedia-jni.so

- replace storage-list.xml inside framework-res.apk

- replace vold inside bin folder

Good luck...
[Android General] rrajesh011:
does screen resolution metter...?my device has 4 inch screen, and ported device has 5 inch screen.?
[Android General] Nasheich Xfiles:
nope, i was ported bigger screen than you did...
[Android General] rrajesh011:
what could be the reason for this error..? i didn't find any solution.
[Android General] Nasheich Xfiles:
I've told you at previous post....
[Android General] rrajesh011:
logcat attached... plz take a look.
[Android General] aKiLL3r:
porting miui from non cm/aosp base

hello! I just want to port miui v5 kitkat rom to z3 compact D5803. I'm not a dev so i red your detailed guide! I have just this question: why is needed a cm or aosp base and a stock sony rom is not in the list?

I had before this phone a z1 compact, and russel5 did a miui v5 rom based on stock sony rom, i remember.

Tomorrow i'll try however this guide starting from the regular stock base, hoping in some your answer!
[Android General] n.vk1305:
anyone please help me,have cm11,12 booting on phone.cm11 works fine in cm12 camera force closes.is there anyway to port 4.4 camera libs to 5.0? this guid is for same sdk.sorry if am posting in wrong thread.
[Android General] ajituchiha:
can i port snapdragon rom with 2 cores to my mt6572 with 2 cores ?
[Android General] mochamadyp:
Hey, i just ported Galaxy S4 custom ROM to my Galaxy S5. I follow your tutorial completely but the problem is always after extract system. It say set_perm failed. I think its from META_INF folder. When i try compress the ROM with META_INF from PORT ROM, nothing happened to my device but it says success, then i try use META_INF from BASE ROM it says error status 7, and at last i try to copy set_perm line from PORT ROM to BASE ROM then it says set_perm failed. What step i miss ? Thanks for your answer and sory for my bad english :D
[Android General] AhmadRkein:
Hello, I have galaxy s4 I9515 that have mostly the same specs of the normal s4 I9505 but dont have any rom, but we had ported googymax tw 4.4.2 kernel to my device and and fixed all the problems, by applying some patches to a rom, except the bluetooth didn't work. I had tried many things and none works and most ends in bluetooth share fc. Please can anyone help me in fixing my problem or at least give me some hints.

Thanks in advance.
[Android General] GoreGRIND:
Hi all!

Very need ur help, such problem: i`m porting rom for my xperia go, it`s working but there is serious issue with all interface, because ported rom was for 240 density and my screen is only 160 density.

So, i don`t know how to convert(remake) (i`m russian, sorry for my funny english;)) all graphic in my rom, adapt it for my dpi.

I ll be very thankfull for any help, coz very want to port Flyme OS to my phone!!:D
[Android General] Singh.Harsh:
What all these for .. Is it necessary or only if bug exists.....
[Android General] fate_alter:
Thanks a lot There is a doubt in my mind.... Can we port huawei:c8813q to LA-M1 usi

Thanks a lot

There is a doubt in my mind....

Can we port huawei:c8813q to LA-M1 using this tutorial...
[Android General] ash.21:
thanks for this guide!) :good:
[Android General] Jeanolos:
Will it work with vt10416-2? It has a MT8382 processor and I don't find any CM for it :/
[Android General] NotesOfReality:
Thank you for this guide ,but can we port 4.4.4 rom to 4.3 rom with this guide?
[Android General] nishat009:
need custom rom for symphony w30

i need a custom rom for symphony w30

version 2.3.6

mt6575
[Android General] sharkmobile:
How to change icons and other styles in rom?

I want change icons on some roms is this possible i dont want apps or roms i want make my custom icons and put into my rom is this possible?
[Android General] Trickster22:
I tried porting many custom roms based on 4.4.4 by taking cm11 as base but every time after flashing rom and rebooting device, it boots back to recovery. Any solution for that?
[Android General] antimage05:
There's something wrong with the kernel...
[Android General] Trickster22:
I am using cm11 kernel

---------- Post added at 11:21 AM ---------- Previous post was at 11:15 AM ----------

I want to port custom roms based on 4.4.4 by taking cm11 as base but every time results in bootloop, so please explain steps to port hybrid roms, specially Carbon Rom.
[Android General] ceriqdesign:
Can i port aosp as my base to mokee as port? the mokee spec for Xperia S and mine was Xperia Ion which have the same chipset..I've tried almost 10 times but it just stuck after the Sony logo..can someone help to read the logcat..what should i do to make the rom boot..thanks
[Android General] Slimegod:
Getting a "error while flashing update binary" I'm porting AOSP s4 to my s3 using Omni ROM. I switched updater binary and still getting that error.
[Android General] Anoudroid:
Stuck in boot loop " port omni rom fron s7560m to s7562 ?

And thank for this guide :)
[Android General] TechUser01:
Problems with updater scripts

Hello to everyone who is reading this

I'm doing a porting of the FlyMe OS for the S3 Neo and I have some big problems with the updater-script of the ported rom... The kitchen made the port well but it says that there are parts that it can't do (and it put the ??? where it don't knows what to write). I tried to fix it but the original s3 neo updater-script is a way different from the ported script... So... If there is everyone who can resolve my problem... Please help me...

Here the link where you can download both updaters: https://mega.co.nz/#F!Zh1xTYIB!A6s6dpXv5UkcTRiBlpQycQ

Here things that the kitchen didn't wrote:

269-mount("mount("ext4", "EMMC", "???", "/data");

86-mount("ext4", "EMMC", "/dev/block/platform/mtk-msdc.0/by-name/custom", "0", "/custom", "???");
[Android General] MoNsTeRmUk:
Hello

Thanks For this Great guide :)

there is something i need to understand

Base rom should be CM or AOSP

Port rom should be anything that can be compatible with the base rom ( same version and same ARM)

The question is , what if my device don't have a CM or an AOSP build ...

Is it Possible to port any rom in this case ?

My phone is Asus ZenFone 5 LTE (A500KL)

Using ARMv7
[Android General] shubham9543:
Bro I am unable to fix video recording in cm11 ROM for mtk devices plz help me

---------- Post added at 02:21 PM ---------- Previous post was at 02:16 PM ----------

You can try using ur stock rom
[Android General] kik4g:
guyz i want a miui custom rom for my device(INTEX AQUA STAR 5)

I have tried so much to build a rom for my device but not succeded plz help me or make a miui custom rom for my device.
[Android General] :
Works with lollipop?
[Android General] ToXiC:
sorry but my stock rom backup does not contain meta inf folder. My stock rom is SP flash tool backup.

so what to do?

How to get meta inf folder in stock rom? (how to extract stock rom?)
[Android General] Lanc-City:
need some help i ported a miui rom boots up everthing is work justed i get unknow baseband no data no imei.......any clue how to fix?????
[Android General] sankha das:
Unable to turn on my mobile

I went through the instruction for increasing internal app storage given above and make it 2.5 gb.. But after wipe cache and dalvik cache my mobile does not turning on.. Only the Micromax logo appears.. & in the recovery when I tried to mount emmc it shows can't mount emmc.. I also can't format emmc.. What to do now.. Plz suggest me soon..
[Android General] darko150:
Is it MTK Chipset?

If it is, just make flash Rom (original or backup) with SP_Flash_Tool

All the details have here at XDA
[Android General] Nasheich Xfiles:
try to use Android kitchen to make it flashable.

do something with telephony jar in framework's folder
[Android General] Alejndrox097:
I ported cm12.1 but have bug

1. AFTER OPTIMIZING/FINISH BOOT }:confused

:SYSTEM UI STOPPED AND COM.ANDROID.PHONE STOPPED.
[Android General] Nasheich Xfiles:
it's related to framework, logcat will be easier to find out the solutions
[Android General] Eversmile23:
Plz clear my doubts.

I have ported two ROMs to my MTK6582M android(Micromax Canvas Power A96) using some other tutorials. I want to use this tutorial and see if ROM porting succeeds or not. Also, I want to know if I can follow this guide to port a ROM for a 1GB RAM MTK 6582 mobile to my 512MB RAM MTK6582M mobile? What are the extra steps/checking(s) needed to port a ROM from a different Mediatek SOC?
[Android General] nitesh9:
Good short guide.:)

But not helping much in MIUI 7 proting. Please update it for latest ROMs.:)
[Android General] Slimegod:
I've built MIUIv6 and v7 for my Sprint device (d2lte) using CM11 4.4.4 as my base. It built fine but getting a "failed" using TWRP 2.8.7.0 and all the other recoveries I get a "installation aborted". My recovery log isn't showing any errors as to why it's failing though http://pastebin.com/65xt7cW3. Just confuses me. My v5 patchrom flashed fine. That base was AOSP. Other developers have built v6 and they didn't run into this problem. Their base is AOSP 4.4.4 so I'm wondering if it's my base. Any help would be appreciated thanks.
[Android General] nitesh9:
I am porting a miui ROM everything is fine but in the voice call the outgoing voice is very low and distorted. Which files should I replace for that. Pls help.
[Android General] Hicham03:
Bootloop...

Plz help me, I tried to port cm11 ROM to Galaxy Star 2 Plus (It doesn't have any custom ROMS) I flashed it but It stucks on bootanimation...

---------- Post added at 05:06 PM ---------- Previous post was at 05:02 PM ----------

Check out this thread:

http://xdaforums.com/showthread.php?t=1749075
[Android General] HelpMeruth:
Can we port marshmallow to lollipop using this method?
[Android General] Nasheich Xfiles:
That's maybe caused by miui bug, remember, rom port brings any bugs from the base and the rom that you've ported

no, you can't

read the rules, "same android version", no one can't port different android version,
[Android General] ExaHamza:
Hi

I tried to port miui for my SPYDER and on recovery mode I got permission denied (something like that)!

My Port is MiUi 6 and may Base is CM11!

HELP

HELP

HELP....

ExHamza Francis