[GUIDE]How To Port a Custom Rom (Noob Friendly)

Search This thread

gracefang

Senior Member
Aug 17, 2014
1,491
1,861
Faisalabad
Well lots of people asked me here and on facebook to expain how i port custom roms for my device so i decided to make a Noob friendly thread for those who want to learn how to port custom rom for their device i use this method for porting samsung roms for my device but it may also work on any other device as well

I will make myself as clear and as simple as possible so anyone can understand what actually is happening in each part of the guide

The method i use for porting roms is as following :
Things which you need are : Notepad++ , 7Zip a laptop and a brain :p


First of all you need to understand what really matters when porting a custom rom for you device and that is the compatibility of both the devices one which is yours and one from which you are trying to port the rom from in order to port a custom rom the specifications of both the devices should be similar i.e. they should be sharing the same Chipset ,same Internal memory , same Ram and Camera resolution

Terms used in the guide:
-Base rom(this is the rom which was made for your device which you would use as a base for porting the roms)
-Port rom
(this is the rom which your are trying to port for your device)

Step 1
Make a folder at your desktop and name it port now take any custom rom you want to port for your device and put it into that folder now just like this make another folder on the desktop and name it base and put a rom made for your device into it but be careful if youre trying to port a cyanogenmod based rom or a AOSP based rom then your base rom should be a ASOP or a cyanogenmod rom and if youre trying to port a samsung rom then the base rom should be a samsung rom and same as for htc , xperia or any other device

Step 2
Now go to base folder and right click on the base rom and choose extract here using either winrar or 7zip ( i recommend 7zip) now go to port folder and right click on it and choose open archive option from 7zip( there will be two options for open archive one and two just chose the upper one because the lower one will extract the rom and we don't want that for this one )

Step 3
The port rom elements will be shown like meta inf and system and boot img ( absent in some cases) now go to port roms system folder then proceed as following system>etc>firmware and delete the firmware folder now go to base rom and copy the firmware folder from the same path by going from system>etc>firmware and paste it into the etc folder of the port rom

Step 4
Now go to the port rom proceed as following system>lib>modules and delete the module folder and just like how we did before copy the module folder from the base rom into the port roms lib folder

Step 5
Now go to port rom and proceed as following system>usr>keylayout>generic.kl and delete it and copy the generic.kl from the base rom into the port rom

Step 6
now copy and replace the boot.img from the base rom into the port rom

Step 7
No go to port folder and and proceed as following system>meta-imf>com>google>android>updater binary and updater script and delete these two and replace from the ones in the base folder

Step 8
Now put the port rom into your external-sd card and flash via recovery with a full data and cache wipe
 
Last edited:

gracefang

Senior Member
Aug 17, 2014
1,491
1,861
Faisalabad
Some fixes for bugs and issues:

Note: try replacing the files into the port rom and see if the problem solves or not

NFC
/system/app/Nfc.apk
/system/lib/libnfc*.so
/system/bin/pcscd

Radio
/system/bin/fmradio


Sensors
/system/bin/akmd*
/system/lib/libsensors.so


Bluetooth
/system/bin/bd_prov
/system/bin/uim*
/system/bin/hcid
/system/bin/bluetooth*
/system/bin/hciattach
/system/bin/sdptool
/system/xbin/hciconfig


Wifi
also copy and replace the wlan.ko file from system>libs>modules into the port rom from the base rom if the file name is pronto_wlan.ko then rename it to wlan.ko before replacing
/system/bin/netcfg
/system/bin/dhcpcd
/system/bin/ifconfig
/system/bin/hostap
/system/bin/hostapd
/system/bin/hostapd_bin
/system/bin/pcscd
/system/bin/wlan*
/system/bin/wpa*


RIL
/system/bin/stmd
/system/bin/rild*
/system/etc/rril


Camera
Copy libcamera*.so from base to port rom
If rom does not boot after that, replace file one by one and see which file is the problem.
 
Last edited:
Jan 6, 2021
6
0
Can anyone pls pls please help me finnd a ROM for lenovo tab 10 tbx-103f. I need a oreo or a pie update. Pls. My device has 16 GB storage and 1 GB ram.
 

Ajitpal_007

New member
Dec 5, 2020
1
1
If you have any questions or queries then feel free to ask
If i have to port one ui 4 rom (which is already ported to galaxy Note 9) for galaxy Note 8, then which rom to should be base rom and which should be ported?? I already have installed hades q one ui 2.5 on galaxy Note 8 which is ported from note 9..
Please help
 
  • Like
Reactions: 01MT01

ALIYAARALI

Member
Jul 1, 2024
42
6
did ur port work ? i wanna try porting a rom to my s8plus (currently using the hades rom based on one ui 2.5)
If i have to port one ui 4 rom (which is already ported to galaxy Note 9) for galaxy Note 8, then which rom to should be base rom and which should be ported?? I already have installed hades q one ui 2.5 on galaxy Note 8 which is ported from note 9..
Please help
 

Top Liked Posts

  • There are no posts matching your filters.
  • 10
    Well lots of people asked me here and on facebook to expain how i port custom roms for my device so i decided to make a Noob friendly thread for those who want to learn how to port custom rom for their device i use this method for porting samsung roms for my device but it may also work on any other device as well

    I will make myself as clear and as simple as possible so anyone can understand what actually is happening in each part of the guide

    The method i use for porting roms is as following :
    Things which you need are : Notepad++ , 7Zip a laptop and a brain :p


    First of all you need to understand what really matters when porting a custom rom for you device and that is the compatibility of both the devices one which is yours and one from which you are trying to port the rom from in order to port a custom rom the specifications of both the devices should be similar i.e. they should be sharing the same Chipset ,same Internal memory , same Ram and Camera resolution

    Terms used in the guide:
    -Base rom(this is the rom which was made for your device which you would use as a base for porting the roms)
    -Port rom
    (this is the rom which your are trying to port for your device)

    Step 1
    Make a folder at your desktop and name it port now take any custom rom you want to port for your device and put it into that folder now just like this make another folder on the desktop and name it base and put a rom made for your device into it but be careful if youre trying to port a cyanogenmod based rom or a AOSP based rom then your base rom should be a ASOP or a cyanogenmod rom and if youre trying to port a samsung rom then the base rom should be a samsung rom and same as for htc , xperia or any other device

    Step 2
    Now go to base folder and right click on the base rom and choose extract here using either winrar or 7zip ( i recommend 7zip) now go to port folder and right click on it and choose open archive option from 7zip( there will be two options for open archive one and two just chose the upper one because the lower one will extract the rom and we don't want that for this one )

    Step 3
    The port rom elements will be shown like meta inf and system and boot img ( absent in some cases) now go to port roms system folder then proceed as following system>etc>firmware and delete the firmware folder now go to base rom and copy the firmware folder from the same path by going from system>etc>firmware and paste it into the etc folder of the port rom

    Step 4
    Now go to the port rom proceed as following system>lib>modules and delete the module folder and just like how we did before copy the module folder from the base rom into the port roms lib folder

    Step 5
    Now go to port rom and proceed as following system>usr>keylayout>generic.kl and delete it and copy the generic.kl from the base rom into the port rom

    Step 6
    now copy and replace the boot.img from the base rom into the port rom

    Step 7
    No go to port folder and and proceed as following system>meta-imf>com>google>android>updater binary and updater script and delete these two and replace from the ones in the base folder

    Step 8
    Now put the port rom into your external-sd card and flash via recovery with a full data and cache wipe
    2
    Some fixes for bugs and issues:

    Note: try replacing the files into the port rom and see if the problem solves or not

    NFC
    /system/app/Nfc.apk
    /system/lib/libnfc*.so
    /system/bin/pcscd

    Radio
    /system/bin/fmradio


    Sensors
    /system/bin/akmd*
    /system/lib/libsensors.so


    Bluetooth
    /system/bin/bd_prov
    /system/bin/uim*
    /system/bin/hcid
    /system/bin/bluetooth*
    /system/bin/hciattach
    /system/bin/sdptool
    /system/xbin/hciconfig


    Wifi
    also copy and replace the wlan.ko file from system>libs>modules into the port rom from the base rom if the file name is pronto_wlan.ko then rename it to wlan.ko before replacing
    /system/bin/netcfg
    /system/bin/dhcpcd
    /system/bin/ifconfig
    /system/bin/hostap
    /system/bin/hostapd
    /system/bin/hostapd_bin
    /system/bin/pcscd
    /system/bin/wlan*
    /system/bin/wpa*


    RIL
    /system/bin/stmd
    /system/bin/rild*
    /system/etc/rril


    Camera
    Copy libcamera*.so from base to port rom
    If rom does not boot after that, replace file one by one and see which file is the problem.
    2
    If you have any questions or queries then feel free to ask
    2