FORUMS
Remove All Ads from XDA

 View Poll Results: Is this guide useful?

Yes
 
87 Vote(s)
93.55%
No
 
6 Vote(s)
6.45%

[GUIDE] PORTING 64BIT MTK ROMs (CROSS PORT Too)

529 posts
Thanks Meter: 328
 
Post Reply Email Thread
Hi All,

This Guide is For Lenovo K3 Note Other devices can use it but some files may vary.

Here is a quick guide for getting the basics of the rom working.
Display, sound ,GSM (3g) and Wifi .
I used this for 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 add it in here.

Please remember, i am posting this so that people will try things and usually when they do, they end up finding something better and awesome than not trying.
I use this from stock and make it a zip file so it makes easy porting by just dragging the system folder with stock files to the rom to be ported and replace.

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:
Code:
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:
Code:
take the whole firmware folder from system/etc/
take the whole mddb folder from system/etc/
NOW THE MAIN THING OF K3 Note (Audio)
Code:
take the whole folder tfa98xx from system/etc/
NOW LIBS Folder:

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

Code:
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
[IMG="http://postimg.org/image/el5idetzh"][/IMG]
Now
In port boot.img
replace the boot.img-kernel
THIS FILE TO REPLACE
and in ramdisk folder add these files:
Like this
  1. fstab.mt6752
  2. init.mt6752.rc
  3. 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

Code:
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
Code:
libcameracustom.so
libaudiocomponentengine.so
libaudiocustparam.so
libnvram.so
libnvramagentclient.so
libnvram_platform.so
libnvram_sec.so
libcustom_nvram.so
UPDATE :

TIP:To BOOT a rom with minimal replacements

Replace the boot.img files as usual
in system:
ETC FOLDER
etc/firmware
etc/mddb (not needed tho)
etc/tfa**(if your device uses)

LIB & LIB64
lib/libjni_pq.so
lib/libmtk_drvb.so
lib/libtfa****.so

lib64/libjni_pq.so
lib64/libmtk_drvb.so
lib64/libtfa****.so

HW folder
All the 67xx files if crossporting


VIOLA UR A PORTER
The Following 45 Users Say Thank You to sandeep.sethi For This Useful Post: [ View ] Gift sandeep.sethi Ad-Free
 
 
8th February 2016, 06:14 AM |#3  
sandeep.sethi's Avatar
OP Senior Member
Flag Bhubaneswar
Thanks Meter: 328
 
Donate to Me
More
Quote:
Originally Posted by Syaoran Lord

Can you add some image :3

i can add but image of what should i add
The Following User Says Thank You to sandeep.sethi For This Useful Post: [ View ] Gift sandeep.sethi Ad-Free
8th February 2016, 09:50 PM |#4  
Junior Member
Flag Praha
Thanks Meter: 4
 
Donate to Me
More
Porting to Ulefone be touch 2
Hi! Nice tutorial. Will this method work with Ulefone be touch 2? I want to port Aerom v5 from elephone p7000 to Ulefone be touch 2. My kernel version is 3.10.61 and port rom kernel is 3.10.91 so I have to port kernel? Thanks in advance
9th February 2016, 01:19 AM |#5  
sandeep.sethi's Avatar
OP Senior Member
Flag Bhubaneswar
Thanks Meter: 328
 
Donate to Me
More
Quote:
Originally Posted by Ufoner

Hi! Nice tutorial. Will this method work with Ulefone be touch 2? I want to port Aerom v5 from elephone p7000 to Ulefone be touch 2. My kernel version is 3.10.61 and port rom kernel is 3.10.91 so I have to port kernel? Thanks in advance

yes it will work
no need to do anything about kernel u just proceed as the guide says
The Following User Says Thank You to sandeep.sethi For This Useful Post: [ View ] Gift sandeep.sethi Ad-Free
12th February 2016, 04:09 PM |#6  
Junior Member
Flag Praha
Thanks Meter: 4
 
Donate to Me
More
Thank you so much! And one more question please. Some guy try to port CM12.1 for BT2 and volume down button stopped working and screen is laggy. Installing stock ROM not solve that problem. Can happend this when i port android 5.0 or 5.1? Sorry for my bad English. Thanks in Advance.
21st February 2016, 01:04 PM |#7  
sandeep.sethi's Avatar
OP Senior Member
Flag Bhubaneswar
Thanks Meter: 328
 
Donate to Me
More
Quote:
Originally Posted by Ufoner

Thank you so much! And one more question please. Some guy try to port CM12.1 for BT2 and volume down button stopped working and screen is laggy. Installing stock ROM not solve that problem. Can happend this when i port android 5.0 or 5.1? Sorry for my bad English. Thanks in Advance.

try taking logcat while pressing the vol down key
24th February 2016, 05:37 PM |#8  
Senior Member
Thanks Meter: 36
 
More
Hello, I don't undestand that : ALWAYS REMOVE RECOVERY-FROM-BOOT.P before you do anything else. please someone could explain for me ?
24th February 2016, 06:55 PM |#9  
Junior Member
Flag Praha
Thanks Meter: 4
 
Donate to Me
More
Quote:
Originally Posted by jordandroid64

Hello, I don't undestand that : ALWAYS REMOVE RECOVERY-FROM-BOOT.P before you do anything else. please someone could explain for me ?

You need to delete file "recovery-from-boot.p" from system folder of your stock ROM and of port

---------- Post added at 07:55 PM ---------- Previous post was at 07:53 PM ----------

I ended again with black screen when porting cm12.1 from redmi note 2 Is it caused by another size of ram Because my device has 3gb ram and redmi note 2 has 2gb.
The Following User Says Thank You to Ufoner For This Useful Post: [ View ] Gift Ufoner Ad-Free
24th February 2016, 08:18 PM |#10  
Senior Member
Thanks Meter: 36
 
More
thanks but it's an img on my port rom and I don't find this file... and same on my stcok rom (androium) but there are files name recovery i need to delete all of them ?
24th February 2016, 10:16 PM |#11  
Junior Member
Flag Praha
Thanks Meter: 4
 
Donate to Me
More
Quote:
Originally Posted by jordandroid64

thanks but it's an img on my port rom and I don't find this file... and same on my stcok rom (androium) but there are files name recovery i need to delete all of them ?

You need to extract system.img with ext4unpacker and then make it folder with ext2explore. [YOUTUBE]http://m.youtube.com/watch?v=yU1MFYUj6zc[/YOUTUBE]
You dont need recovery so delete it
Post Reply Subscribe to Thread

Tags
64bitmtk, mt6752, mt6795, mtk, porting

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes