How to port Custom Rom for Mtk Chipset
Kinds of Mtk chipset
MTK means MediaTek. There are two kinds of MTK chipset. One is 64bit & another is 32bit.
All Mt65xx likes mt6575, mt6571, mt6582, mt6590, mt6592, mt6580, mt6577, mt6582m, mt6572m etc. are 32bit.
All Mt67xx likes Mt6755, mt6750, mt6789, mt6735, mt6753m, mt6735m,mt6755m etc. are 64bit.
Why do you need to port a Rom ?
- For getting new design ui
- For getting the statusbar, navigation bar, multi-tasking style of your choice
- For updating phone API, Android Version.
Must read these :
_ After flashing a new rom,phone's internal memory will not increase than previous. If you see much storage, it is fake.
- After flashing a new rom, phone's ram will not increase. But you can see, & edit fake ram and informations.
- All things will be same likes : Processor, Ram, Memory, Sensor, Camera etc
- You will get new designed ui, customized ui and tweaking many things etc.
Question : Can I port a rom myself and is it hard?
Answer : Yes, it is easy
How to port? What should I do? 🙋
You just need to edit some files for making a rom stable for your device.
Which Rom can I port?
You can't port any rom for your rom. You can port a rom which chipset, kernal is same as your device.
How to find your phone chipset and kernel?
= Use Cpu-z apk and found. Remember hardware isn't chipset.
After downloading currect rom, you need to do some editing for making the downloading rom stable to your device.
Cpu-Z Apk Download Here 🔗
Where should I edit ?
You can see a zip of rom for flashing. Actually some folders are compressesd in a zip. Extract the zip. You will some folders of them :
System
META-INF
boot.img
Etc. Files. These files are for all things of a rom.
What do you need to edit ?
Actually boot.img is the main magic. Rom booting depends on it. If you don't port boot.img correctly you will get bootloop etc.
And about '' System ''. There are many files in System. Actually these are most important things. Without System files, your phone will not on. But in this "System" folder, you don't need to edit much. You can flash a rom without editing "System" files. But without porting boot.img, your phone power will not on.
" META-INF " There you need to edit mountpoints of updater-script for setting correct places of flashing. But if you are porting same chipset rom then you don't need to edit.
Now download a ROM and extract. Collect your phone boot.Img and system files yourself.
For getting backup of boot.img Use Flashify apk
Flashify apk link here 🔗
Tutorial of backup of System 🔗
----------------------------------------------------------------------
Boot.img :
Extract boot.img of your phone's and Custom rom. Think phone's boot.img = stock and custom rom boot.img = port
After extracting boot.img of both :-
Replace kernal from stock to port
Now repack boot.img
+ If you are porting same Android version's rom then only replace kernal of boot.img
+ If you are porting 1 to 2 of Android version likes : 4.2.2 to 5.1 , 5.1 to 6.0 etc. then replace kernal and repack boot.img
+ If you are porting Miui rom and if you're porting from Kitkat to Marshmallow then =
replace kernal from stock to port
replace ueventd.rc from ramdisk of stock to ramdisk of port
Repack boot.img now.
How to Extract boot.img?
- Use Unpack/RepackImg Tools ( For Android )
_ Use Mtk Extractor ( For Computer)
_ Apktool does not work. It extract wrong permissions files
Unpack/RepackImg Tools tutorial
Get Mtk Extractor Here 🔗
How to edit system files ?
Now move your collected systems files of phones to a folder named as Stock... Now think,, the System folder of custom rom is port.
Now replace these : (All replacement types = stock to port folder,,,, stock sub-folder to port sub-folder)
* Open etc of System and replace from stock to port :-
firmware
mddb
* Replace these from stock to port lib of System :-
soundfx
modules
libaudio.primary.default.so
libcustom_nvram.so
libMali.so
* Open hw of Lib of system and replace only all audio And camera related files
* Now replace vendor from stock to port
* Now open build.prop of both rom and replace these names & numbers : ( stock to port of build.prop )
ro.sf.lcd_density=
ro.product.model=
ro.product.brand=
ro.product.name=
ro.product.device=
ro.product.board=
ro.product.manufacturer=
ro.sf.hwrotation=
How to edit updater-script?
You don't need to edit updater-script, if you're porting same chipset Rom.
Remember : Different Chipset = Different MountPoints
Watch a little tutorial of it 🔗
$$$$$$$$$$ All files can not be find in System from above list, if you don't get any of these just ignore it $$$$$$$$$$$$
Now zip those folders means compress these likes : META-INF, system, boot.img etc..
Boot.img :
Extract boot.img of your phone's and Custom rom. Think phone's boot.img = stock and custom rom boot.img = port
After extracting boot.img of both :-
Replace kernal from stock to port
Now repack boot.img
+ If you are porting same Android version's rom then only replace kernal of boot.img
+ If you are porting 1 to 2 of Android version likes : 5.0 to 5.1 , 5.1 to 6.0 , 6.0 to 7.1 etc. then replace kernal and repack boot.img
+ If you are porting Miui rom then =
replace kernal from stock to port
replace ueventd.rc from ramdisk of stock to ramdisk of port
Repack boot.img now.
How to Extract boot.img?
- Use Mkbootimg ( For Android )
_ Use Mtk Extractor ( For Computer)
_ Apktool does not work. It extract wrong permissions files which is a cause of bootloop.
Mkbootimg tutorial Get Here 🔗
Get Mtk Extractor Here 🔗
How to edit system files ?
Now move your collected systems files of phones to a folder named as Stock... Now think,, the System folder of custom rom is port.
Now replace these : (All replacement types = stock to port folder,,,, stock sub-folder to port folder)
* Open etc of System and replace from stock to port :-
First mware
mddb
* Replace these from stock to port lib & lib64 of System :-
soundfx
modules
libcamalogo.so
libcamdrv.so
libcameracustom.so
libaudio.primary.default.so
libcustom_nvram.so
libMali.so
* Open hw of Lib&lib64 of both system and replace all audio And camera related files
* Now replace vendor from stock to port
* Now open build.prop of both rom and replace these names & number :
ro.sf.lcd_density=
ro.product.model=
ro.product.brand=
ro.product.name=
ro.product.device=
ro.product.board=
ro.product.manufacturer=
ro.sf.hwrotation=
How to edit updater-script?
You don't need to edit updater-script, if you're porting same chipset Rom.
Remember : Different Chipset = Different MountPoints
Watch a little tutorial of it 🔗
$$$$$$$$$$ All files can not be find in System from above list, if you don't get any of these just ignore it $$$$$$$$$$$$
Now zip those folders means compress these likes : META-INF, system, boot.img etc..
----------------------------------------------------------------------
How to flash custom Rom?
- Reboot in TWRP/CTR/PHILZ/CWM
- Format system, data, cache, dalvik cache
- Format option can be found in advanced option
- After format choose zip from SDCARD, after flash latest supersu zip
- Now Reboot in System
- Rom booting can take upto highest 10 minutes.
Thanks for your valuable information . Now I can port many rom for my mtk device.
ReplyDeleteIs it valid for all devices
DeleteBende meraklısıyım bu işlerin, lakin bazen karmaşık hale gelebiliyor. Bende GiONEE Marathon M5 var. Mt 6735 3.10.65+ kernel.
ReplyDeleteValla bende aylardır kafa yoruyorum bende de casper via A1 var gioone çakması stabil rom yapamadım deli oluyorum daha
DeleteThanks so much I've been looking for such a guide
ReplyDeletedear i am try rom not working start up black screen hang
ReplyDelete