[GUIDE]How To Port a Custom Rom (Noob Friendly) - Android Software Development

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
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

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.

If you have any questions or queries then feel free to ask

Reserved

for future

Just in case

what to do if there is no system folder?

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.

gracefang said:
If you have any questions or queries then feel free to ask
Click to expand...
Click to collapse
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

Related

CUSTOM ROM (deodexed)

Hey guys,
you probably don't know me, but I have created a custom rom for our Galaxy 3 based on Froyo.
It comes with both, the TW Launcher and the stock launcher, Launcher2.
So YOU are able to choose one of them.
It has modiefied framework-res.apk and twframework-res.apk too (Gingerbread look).
And last but not least, I rebuild the zImage kernel for speed and this is probably the first DEODEXED rom avaiable for Galaxy 3.
The only PROBLEM is, that my rom comes an an update.zip package which i cannot sign with the samsung key since I don't have it.
So if you guys could manage to create a custom recovery that lets us apply update.zip packages like in times of ECLAIR, we could use my rom.
So I need you guys to to this.
Then we can use my deodexed, optimized froyo rom.
rayman33 said:
Hey guys,
you probably don't know me, but I have created a custom rom for our Galaxy 3 based on Froyo.
It comes with both, the TW Launcher and the stock launcher, Launcher2.
So YOU are able to choose one of them.
It has modiefied framework-res.apk and twframework-res.apk too (Gingerbread look).
And last but not least, I rebuild the zImage kernel for speed and this is probably the first DEODEXED rom avaiable for Galaxy 3.
The only PROBLEM is, that my rom comes an an update.zip package which i cannot sign with the samsung key since I don't have it.
So if you guys could manage to create a custom recovery that lets us apply update.zip packages like in times of ECLAIR, we could use my rom.
So I need you guys to to this.
Then we can use my deodexed, optimized froyo rom.
Click to expand...
Click to collapse
question: what deodexed means??? i never heard that word before...
why this isnt in dev forum?
Thats good buddy.... Plz upload the zImage kernel with Deodexed
ready to try
Need some more information
Ok buddy,
I'll upload it...let's see..
maybe tomorrow after school.
But can you tell me : For theming and so on,
what needs to be deodexed ?! I only deodexed /system/app .
Does /system/framework also need to be deodexed ?!
AND : GOOD NEWS :
I succesfully created a flashable ODIN package based on XXJPA, which is deodexed in /system/app !
So please tell me if I should deodex /system/framework !
I'll add the Kernel and all the other stuff in my 2nd release
STAY TUNED BUT HELP ME .
rayman33 said:
Ok buddy,
I'll upload it...let's see..
maybe tomorrow after school.
But can you tell me : For theming and so on,
what needs to be deodexed ?! I only deodexed /system/app .
Does /system/framework also need to be deodexed ?!
AND : GOOD NEWS :
I succesfully created a flashable ODIN package based on XXJPA, which is deodexed in /system/app !
So please tell me if I should deodex /system/framework !
I'll add the Kernel and all the other stuff in my 2nd release
STAY TUNED BUT HELP ME .
Click to expand...
Click to collapse
If possible, could you PM the instructions on how to deodex a ROM?
Sent from my Samsung Galaxy 3 FROYO
great now we can modify the indivisual apps in the samsung...crap.......
and yes i thinkthe framework folder also needs to be deodexed...
right now we can only modify /hack the framework-res.apk and twframework-res.apk as they do not have odex files with them i.e deodexed....
while others are odexed...
this is the first great step to galaxy 3 custom roms and from that i mean great roms....
Instructions
So for you guys, here is the instruction for deodexing .
First, go to youtube and follow the video instructions of nokia7vista's tutorial for creating a custom rom for Samsung Galaxy S.
(Download a base rom that you want to customize (i.e. XXJPF) and download and install magiciso to open the factoryfs.rfs from XXJPF (in magic iso, go to open and then select all files, then you can open factoryfs.rfs). When you have done this, extract the content of factoryfs.rfs to your desktop and put it into a folder called "System". Put the folder "System" into a new folder called "CFW". Now you have to download the rombasics.zip based on JPA FROYO, which are found in another post in the xda - Forum in the development section. (Sorry I'm a new user so i'm not allowed to post links. When I am, I'll do !
Then, put the content of rombasics.zip into the folder "CFW".
After that, follow nokia7vista's tutorial part 4 to install cygwin correctly and install the HTC Android kitchen.
When you followed the tutorial, you should know how to start the kitchen (open cygwin, cd to folder where you placed the kitchen and type "./menu" (without quotes ).
And in the kitchen, you must first do nr. 1 (building working folder from the folder "CFW"). Then, you can type 0 to access the advanced options and type 11 to deodex. Easily select if you only want to deodex either only /system/app or only /system/framework or both.
AFTER you have followed all these steps, you have to select 99 in the kitchen. This will set up "CFW.zip" in the /kitchen/output folder.
When this is finished, you have to extract the "CFW.zip" and copy the factoryfs.rfs to any Froyo based ROM for Galaxy 3 you like.
THEN you're done
rayman33 said:
So for you guys, here is the instruction for deodexing .
First, go to youtube and follow the video instructions of nokia7vista's tutorial for creating a custom rom for Samsung Galaxy S.
(Download a base rom that you want to customize (i.e. XXJPF) and download and install magiciso to open the factoryfs.rfs from XXJPF (in magic iso, go to open and then select all files, then you can open factoryfs.rfs). When you have done this, extract the content of factoryfs.rfs to your desktop and put it into a folder called "System". Put the folder "System" into a new folder called "CFW". Now you have to download the rombasics.zip based on JPA FROYO, which are found in another post in the xda - Forum in the development section. (Sorry I'm a new user so i'm not allowed to post links. When I am, I'll do !
Then, put the content of rombasics.zip into the folder "CFW".
After that, follow nokia7vista's tutorial part 4 to install cygwin correctly and install the HTC Android kitchen.
When you followed the tutorial, you should know how to start the kitchen (open cygwin, cd to folder where you placed the kitchen and type "./menu" (without quotes ).
And in the kitchen, you must first do nr. 1 (building working folder from the folder "CFW"). Then, you can type 0 to access the advanced options and type 11 to deodex. Easily select if you only want to deodex either only /system/app or only /system/framework or both.
AFTER you have followed all these steps, you have to select 99 in the kitchen. This will set up "CFW.zip" in the /kitchen/output folder.
When this is finished, you have to extract the "CFW.zip" and copy the factoryfs.rfs to any Froyo based ROM for Galaxy 3 you like.
THEN you're done
Click to expand...
Click to collapse
oh ... can you make deotexed (system app & framework) rom based on jpf ?
rayman33 said:
So for you guys, here is the instruction for deodexing .
First, go to youtube and follow the video instructions of nokia7vista's tutorial for creating a custom rom for Samsung Galaxy S.
(Download a base rom that you want to customize (i.e. XXJPF) and download and install magiciso to open the factoryfs.rfs from XXJPF (in magic iso, go to open and then select all files, then you can open factoryfs.rfs). When you have done this, extract the content of factoryfs.rfs to your desktop and put it into a folder called "System". Put the folder "System" into a new folder called "CFW". Now you have to download the rombasics.zip based on JPA FROYO, which are found in another post in the xda - Forum in the development section. (Sorry I'm a new user so i'm not allowed to post links. When I am, I'll do !
Then, put the content of rombasics.zip into the folder "CFW".
After that, follow nokia7vista's tutorial part 4 to install cygwin correctly and install the HTC Android kitchen.
When you followed the tutorial, you should know how to start the kitchen (open cygwin, cd to folder where you placed the kitchen and type "./menu" (without quotes ).
And in the kitchen, you must first do nr. 1 (building working folder from the folder "CFW"). Then, you can type 0 to access the advanced options and type 11 to deodex. Easily select if you only want to deodex either only /system/app or only /system/framework or both.
AFTER you have followed all these steps, you have to select 99 in the kitchen. This will set up "CFW.zip" in the /kitchen/output folder.
When this is finished, you have to extract the "CFW.zip" and copy the factoryfs.rfs to any Froyo based ROM for Galaxy 3 you like.
THEN you're done
Click to expand...
Click to collapse
please post your deodexed rom, atleast we can get to know if it works for g3 or not
is it working for you??
after deodexing what advantages have you taken of that???
So my deodexed base ROM so far has not booted.
Any reason why?
Custom Rom (XXJPA)
@DarkLestat :
My custom rom (deodexed) is working, yes. But I think it's way to slow to use it every day because it's based on JPA.
When you gyus want me to release a super fast and super stable deodexed rom, which I'm actually able to build, you have to share the rombasics.zip based on XXJPF.
If anyone could do that, that would be great.
rayman33 said:
@DarkLestat :
My custom rom (deodexed) is working, yes. But I think it's way to slow to use it every day because it's based on JPA.
When you gyus want me to release a super fast and super stable deodexed rom, which I'm actually able to build, you have to share the rombasics.zip based on XXJPF.
If anyone could do that, that would be great.
Click to expand...
Click to collapse
I'm using Gsam101's JPA Clean ROM with the ronbasics for JPA.
is that a reason?
How exactly did you get the factoryfs.rfs from the CFW.zip? All my .zip has are the folders I zipped into it, and its supposedly the finished ROM?
Sent from my Samsung Galaxy 3 FROYO
How would i go about creating a factoryfs.rfs?
EDIT: Anyone?
CFW.zip ?!
Ehhhhm...DarkLestat... If I#m understanding right, you wanna build a custom rom with an update.zip package..
If you are doing so, let me say that it don't works since samsung has implemented a new recovery in Froyo builds which don't allows us to flash the update.zip packages anymore.
You actually have to create a flashable odin package.
(including cache.rfs, datafs.rfs, factoryfs.rfs, modem.bin and zImage)
After you have done that, repack these files to a odin .tar package with the following commands in cygwin : (after you cd'd to your rom's folder)
Code:
tar -H ustar -c cache.rfs datafs.rfs factoryfs.rfs modem.bin zImage > output.tar
@The Dark Lestat: What's the source? JPF or older?
i have deodexed the jpf system/app all contents except settings .
deodexing settings causes loopback boot and phone does not boot.....
though i am verifying but deodexing is great....
i have tried changing the icons of apps, now they work, in odexed they were'nt...
though the gallery app, music player seems to be slower
spl. gallery is a tonn times slower. dont know the reason....
boot is fast.....
lets see..
Szaby59 said:
@The Dark Lestat: What's the source? JPF or older?
Click to expand...
Click to collapse
JPA
Sent from my Samsung Galaxy 3 FROYO
So we cant install this rom throw recovery menu, because samsung changed something in froyo update? Am i right? Its posible to flash back into enclair and flash it throw enclair recovery menu?
Meybe this is very newbie question.... i dont understand to these things (but i want to)
Sent from my GT-I5800 using XDA App
How do you create a factoryfs.rfs?
Terminal?
froyo is not released by samsung yet right??? i mean officially then how the hell can samsung change something in **** **** **** so the **** update cannot be done....i dont get this
is froyo out?

[Q]flashing SGY custom to SGY Duos

As the title says.. Would that be possible? Because there isnt much roms made for the duos and those roms for SGY looks really good but i dont want to brick my phone.. So i just wanted to.confirm just to be safe..I dont mind if i cant use dual sims.. I only use one anyway.
Nopae.You have to mod the roms according to your phone's compatibility.
As written in post above you must port the rom
for example - if you were to flash a systemui.apk for galaxy y gt-5360 in duos everything would work (excluding dual sim in status bar) except it would force close if you tried to connect your phone to your pc because the usb smali files are slightly different
easy just to copy over usb smali files from duos ui to the 5360 ui but its just stuff like that
you can flash it and it will probably boot (if not just flash your nandroid backup or flash stock rom via odin) - just make sure there is no boot.img in the zip or delete that file - and then you will have to go through the rom and find all the force closes and things not working due to smali differences or different lib files and so on
you may also have to make build.prop changes and changes to updater script

[Q] Implementing features from other sources

I have the PAC source downloaded and now I want to figure out how to add other features from either github or wherever to it. There's some things from the xposed framework that I'd like to implement in the ROM but I'm not sure how to go about doing it. I'm new to android programming, just been porting PAC to my phones that don't have support. Any help is greatly appreciated.
Help injecting features or settings
I use file manager pro from cheeta mobile to open the rom.zip then copy and paste the system/file context/meta inf /and any other files in the zipped folder to the ExtSdcard1 root directory, then open the copied files which will be opened for modifications, then add the mods directly to the appropriate locations ( use this method(very slow) or use an apk decompiler to make your changes to apps. There are instructions for that on xda forums. But since the update to lollipop we have seen the new compression format change to system.new.dat file compression so if you want to modify lollipop roms you have to find (Optimized) version or use the dat file decompiler to translate the system.dat.new file or others in that format to readable/writable or understandable format. Let us know if this gets you on track or if you have solved this issue, thanks.

Rom porting tutorial for beginers

Its all about MTK
This porting guide is succesfull for beginers for porting Roms using SMART PHOBES
#PC can also be used for this porpose
I'am currently using MTK 6582 .This method is 100 % working
____starting rom porting_____
1) create 2 folders called port and stock
2)extract port rom in port folder and system (folder of your stock) in stock
3) replace boot img for stock to port
[You can also use custum kernals]
4) Delete vendor folder and replace it
5) Delete this files
Systel/lib/hw
/modules
/etc/wifi
/firmware
Repace this with your stock
6) Replace This files from stock to port
System/bin/pq
/vold
/lib/lib.camalgo.so
/lib.camdrv.so
/libcameracustum.so
/libdpframework.so
/libsensorservice.so
/libvcodecdrv.so
/etc/apns.conf.xml
/vold.fstab
/vold.fstab.nand
If you was porting from diferent key phase phones please replace system/user/keylayouts/generic.kl
7) change your mountpoints with your stock
8) now using 7zip from playstore compress the system,boot.img,meta
9) flash the zip using cwm or twrp or etc
points to be noted
@ if recovery shows zip as bad compress it with solid explorer
@you have to use same version of androi
@select custum rom based on
Soc
Version
Cores of processor
RAM.
If anyone found more improved files.please suggest for knowledge.
Bugs can be solved by asking
THANKZ

Samsung J3 Pro (SM-J3110) Custom Rom

Asalam Alaikum! (Greetings)
I am having issue on connecting my Samsung on Odin, when i put my Samsung in Download Mode and Check Odin, there is no device shows and also Taskbar shows Unknown Device. Is there any Custom Rom available for Samsung J3 Pro (SM-J3110) which i can put on memory card and installed it, because my mobile has TWRP Recovery installed.
Thank You,
Regards,
Muhammad Naveed Haroon
Maybe you receive a (more) suitable answer if you post in one of the respective Samsung J3 forums:
https://forum.xda-developers.com/galaxy-j3-2016
https://forum.xda-developers.com/galaxy-j3-2017
Make a custom rom
How I can make a custom rom without PC in a smart phone? Please answer me.
NaveedHaroon said:
Asalam Alaikum! (Greetings)
I am having issue on connecting my Samsung on Odin, when i put my Samsung in Download Mode and Check Odin, there is no device shows and also Taskbar shows Unknown Device. Is there any Custom Rom available for Samsung J3 Pro (SM-J3110) which i can put on memory card and installed it, because my mobile has TWRP Recovery installed.
Thank You,
Regards,
Muhammad Naveed Haroon
Click to expand...
Click to collapse
Alaikum salam
Did you downloaded the samsung drivers??
Custom rom
I searched in the net and now I know that there is no any custom rom for this phone (sm-j3110) but u can make one using your PC or your mobile phone.
1.download its official rom
2.decompile your rom and extract system.img.ext4 and boot.img both.(winrar need)
3.decompile system.img.ext4 file ( many apps available for PC to do this but in android just android image studio (ais) =>( This app does not require root)available)
4.put all files and folders into a folder and rename it as system
5.download the file which exists in https://forum.xda-developers.com/an...oid-o-beta-redesigned-emoji-set-t3608280/amp/ and then extract the meta-inf folder.
6.create a new folder and rename it as custom rom and move the system folder which you make it in step 4 ,move boot.img file and meta-inf which you extracted it in step 5
7.compress all as custom rom
8.put the custom rom into you sd card and after wipping data and cache ,install the custom rom, magisk and nano package of 5.1 arm gapps
9.reboot your device and enjoy ☺☺☺
#attention
Your device maybe take bootloop so do it with your own risk and I'm not responsible for the problems

Categories

Resources