How To Port Custom Rom's For 64bit MTK Chipset
Here is a quick guide for getting the basics of the rom working.
Display, sound ,GSM (3g) and Wifi .
I used this method to port CyanogenMod based roms and MIUI and it worked for me.
If anyone finds additional items or wants to complete this guide please feel free to comment below.
If you are tottally new to the whole android porting stuff i recommend to read the below guids so you will get the idea of how the rom porting works.
How To Port Lollipop/Marshmallow ROMs
Fixing bugs when porting a KitKat MTK Custom ROMs
Fixing bugs when porting a Lollipop Custom ROMs For Mediatek
NOTE: ALWAYS REMOVE RECOVERY-FROM-BOOT.P before you do anything else.
FOR CROSS PORT
SO THE FILES NEEDED TO REPLACE FROM STOCK TO PORT:
BIN FOLDER:
afm_server
akmd09911
applysig
audiocmdservice_atci
climax
custom_sn
encfs
factory
factory_reset.sh
fusermount
gzip_static
ipod
kpoc_charger
mtkbt
nvram_proximity
seeder
updater
vold
IF YOU THINK SOME FILES ARE ABSENT, DONT WORRY JUST SKIP THEM
NOW MODEM FILES:
take the whole firmware folder from system/etc/
take the whole mddb folder from system/etc/
NOW LIBS Folder:
lib3a.so
libacdk.so
libbluetoothdrv.so
libbluetooth_mtk.so
libbypass.so
libcam.camadapter.so
libcam.camnode.so
libcam.camshot.so
libcam.client.so
libcam.device1.so
libcam.device3.so
libcam.exif.so
libcam.exif.v3.so
libcam.hal3a.v3.so
libcam.halsensor.so
libcam.iopipe.so
libcam.jni.lomohaljni.so
libcam.metadataprovider.so
libcam.paramsmgr.so
libcam.sdkclient.so
libcam.utils.so
libcam3_app.so
libcam3_hwnode.so
libcam3_hwpipeline.so
libcam3_pipeline.so
libcam3_utils.so
libcamalgo.so
libcamdrv.so
libcameracustom.so
libcamera_client_mtk.so
libcam_hwutils.so
libcam_platform.so
libcustom_nvram.so
libdpframework.so
libfeatureio.so
libfeatureiodrv.so
libhardware_legacy.so
libimageio.so
libimageio_plat_drv.so
libipod.so
libJpgDecPipe.so
libJpgEncPipe.so
liblocSDK5c.so
liblocSDK_2_5OEM.so
libm4u.so
libMA3-wavesfx-Coretex_A9.so
libmhalImageCodec.so
libMiraVision_jni.so
libmtkjpeg.so
libmtk_drvb.so
libnetworklocation.so
libnvram.so
libnvramagentclient.so
libnvram_platform.so
libnvram_sec.so
libshowlogo.so
libtfa9897_interface.so
libvc1dec_sa.ca7.so
libvcodecdrv.so
libvcodec_oal.so
libvcodec_utility.so
libweibosdkcore.so
mtk-ril.so <= IF U GET BOOT LOOP TRY WITHOUT REPLACING THIS FILE
mtk-rilmd2.so <= IF U GET BOOT LOOP TRY WITHOUT REPLACING THIS FILE
And this subfolder with these libs:
drm\libfwdlockengine.so
egl\egl.cfg
egl\libGLES_mali.so
hw\audio.primary.mt6752.so
hw\audio_policy.default.so
hw\bluetooth.default.so
hw\camera.mt6752.so
hw\gps.default.so
hw\gralloc.mt6752.so
hw\hwcomposer.mt6752.so
hw\lenovopower.default.so
hw\lights.default.so
hw\sensors.mt6752.so
soundfx\libdownmix.so
soundfx\libmaxxeffect-cembedded.so
NOW LIB64 Folder:
lib3a.so
libacdk.so
libbluetoothdrv.so
libbluetooth_mtk.so
libcam.camadapter.so
libcam.camnode.so
libcam.camshot.so
libcam.client.so
libcam.device1.so
libcam.device3.so
libcam.exif.so
libcam.exif.v3.so
libcam.hal3a.v3.so
libcam.halsensor.so
libcam.iopipe.so
libcam.jni.lomohaljni.so
libcam.metadata.so
libcam.metadataprovider.so
libcam.paramsmgr.so
libcam.sdkclient.so
libcam.utils.sensorlistener.so
libcam.utils.so
libcam1_utils.so
libcam3_app.so
libcam3_hwnode.so
libcam3_hwpipeline.so
libcam3_pipeline.so
libcam3_utils.so
libcamalgo.so
libcamdrv.so
libcameracustom.so
libcamera_client_mtk.so
libcamera_metadata.so
libcam_hwutils.so
libcam_mmp.so
libcam_platform.so
libcam_utils.so
libcustom_nvram.so
libdpframework.so
libfeatureio.so
libfeatureiodrv.so
libhardware_legacy.so
libimageio.so
libimageio_plat_drv.so
libJpgDecPipe.so
libJpgEncPipe.so
libm4u.so
libmhalImageCodec.so
libMiraVision_jni.so
libmtkjpeg.so
libmtk_drvb.so
libnvram.so
libnvramagentclient.so
libnvram_platform.so
libnvram_sec.so
libtfa9897_interface.so
libvcodecdrv.so
libvcodec_utility.so
And this subfolder with these libs:
drm\libfwdlockengine.so
egl\libGLES_mali.so
hw\audio.primary.mt6752.so
hw\audio_policy.default.so
hw\camera.mt6752.so
hw\gps.default.so
hw\gralloc.mt6752.so
hw\hwcomposer.mt6752.so
hw\lenovopower.default.so
hw\lights.default.so
hw\mmsdk.default.so
hw\sensors.mt6752.so
soundfx\libdownmix.so
NOW VENDOR FOLDER:
system\vendor\etc\audio_effects.conf
system\vendor\etc\default.mps
FOR DIFFERENT CHIPSET (i.e. 6795 to 6752)
Proceed as above THEN
open build.prop
EDIT THESE LINES
ro.mediatek.platform=MT6795 to MT6752
mediatek.wlan.chip=MT6630to CONSYS_MT6752
mediatek.wlan.module.postfix=_mt6630to _consys_mt6752
And Now Boot.img
Unpack both stock and port boots from CarlivImageKitchen Tool
Now
In port boot.img
replace the boot.img-kernel
and in ramdisk folder add these files:
fstab.mt6752
init.mt6752.rc
init.mt6752.usb.rc
AND DELETE THOSE with mt6795 and mt6595 words.
REPACK THE KERNEL
MAKE THE FLASHABLE ZIP
AND FLASH THE ROM
If u get WIFI AND BLUETOOTH NOT SWITCHING ON OR BATTERY PERCENTAGE WRONG THEN REPLACE init.project.rc
FOR SAME CHIPSET PORTING
Just replace
etc/firmware
etc/mddb
and from lib and lib64 hw folder replace all libs named like this camera.mt6752.so
and replace audio_policy.default.so from both hw folder
from lib and lib64
replace
libcameracustom.so
libaudiocomponentengine.so
libaudiocustparam.so
libnvram.so
libnvramagentclient.so
libnvram_platform.so
libnvram_sec.so
libcustom_nvram.so
Thats it.....
Read Also:
How To Port Lollipop/Marshmallow ROMs
Fixing bugs when porting a KitKat MTK Custom ROMs
Fixing bugs when porting a Lollipop Custom ROMs For Mediatek
I am not responsible if you use this and brick your device or if your device blows up, implodes, flames start shooting from it, or it kills your neighbor’s dog.. It was the other guy… I swear !
How to port RR marshmallow ROM using my android 5.1 lollipop ROM?? It contains recovery, firmware folder too..I don't want to change my recovery by flashing this rom ,
ReplyDeleteI've already posted the steps for porting rom.
DeleteYou will have to change your recovery to flash the ported rom. You cant flash custom roms via stock recovery. So you gonna need a custom recovery to flash rom.
I already have twrp recovery and cm 12.1 ROM but I want to port marshmallow ROM . but the problem is that it (mm ROM) have a folder "recovery" I want to know that does my recovery changes or not if I flash these ROM after porting. I don't want to change my recovery as it have my ROM backup .
DeleteWhat are the contents inside that recovery folder?
DeleteI think you can safely delete that folder. because port roms recovery don't have anything to do with your device.
having some bugs like wifi not working bt also not work audio and hostport... how to fix them
ReplyDeleteHave you tried searching
DeleteHere, try this
How To Fix Bugs
I miss bluetooth not working rom miui chipset mtk 6752
ReplyDeletehelp me please
Copy the following files from STOCK ROM:
Deletesystem / lib / modules / mtk_stp_bt.ko
system / lib / libbluetooth_mtk.so
system / lib / libbluetoothem_mtk.so
thanks pro
ReplyDeletehow to port rom for infinix hot 4 pro x5511
ReplyDeleteThe process is same for all devices. Just make sure you follow the correct guide for your device's chipset.
Delete