ROM Cross Porting Guide from MT6735/MT6753 to MT6750/MT6755

ROM Cross Porting Guide from MT6735/MT6753 to MT6750/MT6755 (Last Updated On: December 25, 2018)

Introduction:

In this post we will learn about Custom ROM Cross Porting Guide from MT6735/MT6753 to MT6750/MT6755. The Chipsets MT6750 & MT6755 are the part of Helio P10. Currently, the following processors are built-on Helio P10 hardware:

1. MT6738 = 1.5 GHz + 1.0 GHz (Mali-T860MP2 – 500 MHz)
2. MT6750 = 1.5 GHz + 1.0 GHz (Mali-T860MP2 – 500 MHz)
3. MT6750T = 1.5 GHz + 1.0 GHz (Mali-T860MP2 – 700 MHz)
4. MT6755 = 1.8 or 2.0 GHz + 1.2 GHz (Mali-T860MP2 – 700 MHz)
5. MT6755T (Helio P15) = 2.2 GHz + 1.2 GHz (Mali-T860MP2 – 800 MHz)

The cross porting method here includes 4 Steps:
Step 1: System Folder patching
Step 2: Boot.img patching
Step 3: Additional steps
Step 4: Bug fixes




ROM Cross Porting Guide from MT6735/MT6753 to MT6750/MT6755:

Step 1: System Folder patching

Notes:
A. Some mentioned name here includes folder too. You have to replace them too.
B. If you have MT6755, you should copy the files having MT6755 in their names in lib/hw & lib64/hw i.e camera.mt6755.so
C. If you can’t find a file in your stock ROM, skip it.

Now, copy these from your stock rom to the port one:

1. BIN

6620_launcher
akmd8963
akmd8975
akmd09911
ami304d
applysig
audiocmdservice_atci
bmm050d
ccci_fsd
ccci_mdinit
emdlogger1
factory
fuelgauged
geomagneticd
gsm0710muxd
gzip_static
kpoc_charger
mc6420d
md_ctrl
mdlogger
memsicd
memsicd3416x
meta_tst
mobile_log_d
msensord
mtk_agpsd
mtkrild
muxreport
netdiag
nvram_daemon
orientationd
pq
s62xd
slpd
terservice
thermal_manager
vold
wifi2agps
wmt_loader

2. ETC

audio_param (whole folder)
firmware (whole folder)
fmr (whole folder)
mddb (whole folder)
ecc_list.xml
factory.ini
mtklog-config.prop

3. PERMISSIONS

android.hardware.bluetooth.xml
android.hardware.bluetooth_le.xml
android.hardware.camera.xml
android.hardware.faketouch.xml
android.hardware.location.gps.xml
android.hardware.microphone.xml
android.hardware.sensor.accelerometer.xml
android.hardware.sensor.light.xml
android.hardware.sensor.proximity.xml
android.hardware.telephony.gsm.xml
android.hardware.touchscreen.multitouch.distinct.xml
android.hardware.touchscreen.multitouch.jazzhand.xml
android.hardware.touchscreen.multitouch.xml
android.hardware.touchscreen.xml
android.hardware.usb.accessory.xml
android.hardware.usb.host.xml
android.hardware.wifi.direct.xml
android.hardware.wifi.xml
android.software.live_wallpaper.xml
android.software.managed_users.xml
android.software.sip.voip.xml
android.software.sip.xml
android.software.webview.xml
com.android.location.provider.xml
com.android.media.remotedisplay.xml
com.android.mediadrm.signer.xml
com.google.android.maps.xml
com.google.android.media.effects.xml
com.google.widevine.software.drm.xml
handheld_core_hardware.xml
media_codecs.xml
platform.xml

4. FRAMEWORK

com.google.widevine.software.drm.jar

5. LIB

lib3a.so
lib3a_sample.so
libacdk.so
libaed.so
libaudiocompensationfilter.so
libaudiocomponentengine.so
libaudiocustparam.so
libaudiopolicymanager.so
libbessound_hd_mtk.so
libblisrc.so
libblisrc32.so
libbluetooth_mtk.so
libbluetooth_mtk_pure.so
libbt-vendor.so
libbwc.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.dng.so
libcam.hal3a.v3.so
libcam.halsensor.so
libcam.iopipe.so
libcam.metadata.so
libcam.metadataprovider.so
libcam.paramsmgr.so
libcam.sdkclient.so
libcam.utils.cpuctrl.so
libcam.utils.sensorlistener.so
libcam.utils.so
libcam_hwutils.so
libcam_mmp.so
libcam_platform.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
libccci_util.so
libcustom_nvram.so
libcvsd_mtk.so
libdngop.so
libdpframework.so
libdrmmtkutil.so
libdrmmtkwhitelist.so
libfeatureio.so
libfeatureiodrv.so
libfgauge.so
libfile_op.so
libfmcust.so
libgas.so
libged.so
libgpu_aux.so
libgralloc_extra.so
libHEVCdec_sa.ca7.android.so
libhwm.so
libimageio.so
libimageio_plat_drv.so
libion_mtk.so
libJpgDecPipe.so
libJpgEncPipe.so
libm4u.so
libmal.so
libmatv_cust.so
libmdfx.so
libmdloggerrecycle.so
libmemoryDumpEncoder.so
libmhalImageCodec.so
libMiraVision_jni.so
libmmprofile.so
libmmsdkservice.so
libmnl.so
libmp4enc_sa.ca7.so
libmrdump.so
libmsbc_mtk.so
libmtcloader.so
libmtk_drvb.so
libmtk_mmutils.so
libmtkcamera_client.so
libmtkjpeg.so
libmtklimiter.so
libMtkOmxCore.so
libMtkOmxVdecEx.so
libMtkOmxVenc.so
libmtkshifter.so
libn3d3a.so
libnvram.so
libnvram_daemon_callback.so
libnvram_platform.so
libnvram_sec.so
libnvramagentclient.so
libperfservicenative.so
libpq_prot.so
libpqservice.so
librilmtk.so
libshowlogo.so
libSonyIMX230PdafLibrary.so
libspeech_enh_lib.so
libstagefrighthw.so
libSwJpgCodec.so
libvc1dec_sa.ca7.so
libvcodec_oal.so
libvcodec_utility.so
libvcodecdrv.so
libvp8dec_sa.ca7.so
libvp9dec_sa.ca7.so
mtk-ril.so
mtk-rilmd2.so

6. LIB/EGL

egl.cfg
libGLES_mali.so

7. LIB/HW

audio.primary.mt6750.so
audio_policy.default.so
bluetooth.default.so
camera.mt6750.so
gps.mt6750.so
gralloc.mt6750.so
hwcomposer.mt6750.so
lights.mt6750.so
memtrack.mt6750.so
sensors.mt6750.so

8. LIB/SOUNDFX

libdownmix.so

9. LIB64

lib3a.so
lib3a_sample.so
libacdk.so
libaed.so
libaudiocompensationfilter.so
libaudiocomponentengine.so
libaudiocustparam.so
libaudiopolicymanager.so
libbessound_hd_mtk.so
libblisrc.so
libblisrc32.so
libbluetooth_mtk.so
libbluetooth_mtk_pure.so
libbwc.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.dng.so
libcam.hal3a.v3.so
libcam.halsensor.so
libcam.iopipe.so
libcam.metadata.so
libcam.metadataprovider.so
libcam.paramsmgr.so
libcam.sdkclient.so
libcam.utils.cpuctrl.so
libcam.utils.sensorlistener.so
libcam.utils.so
libcam_hwutils.so
libcam_mmp.so
libcam_platform.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
libccci_util.so
libcustom_nvram.so
libcvsd_mtk.so
libdngop.so
libdpframework.so
libdrmmtkutil.so
libdrmmtkwhitelist.so
libfeatureio.so
libfeatureiodrv.so
libfile_op.so
libfmcust.so
libgas.so
libged.so
libgpu_aux.so
libgralloc_extra.so
libhwm.so
libimageio.so
libimageio_plat_drv.so
libion_mtk.so
libJpgDecPipe.so
libJpgEncPipe.so
libm4u.so
libmal.so
libmatv_cust.so
libmdfx.so
libmdloggerrecycle.so
libmhalImageCodec.so
libminiui.so
libMiraVision_jni.so
libmmprofile.so
libmmsdkservice.so
libmrdump.so
libmsbc_mtk.so
libmtk_drvb.so
libmtk_mmutils.so
libmtkcamera_client.so
libmtkjpeg.so
libmtklimiter.so
libMtkOmxCore.so
libmtkshifter.so
libn3d3a.so
libnvram.so
libnvram_daemon_callback.so
libnvram_platform.so
libnvram_sec.so
libnvramagentclient.so
libperfservicenative.so
libpq_cust.so
libpq_prot.so
libpqservice.so
librilmtk.so
libSonyIMX230PdafLibrary.so
libspeech_enh_lib.so
libstagefrighthw.so
libterservice.so
libvcodec_oal.so
libvcodec_utility.so
libvcodecdrv.so
mtk-ril.so



10. LIB64/EGL

libGLES_mali.so

11. LIB64/HW

audio.primary.mt6750.so
audio_policy.default.so
camera.mt6750.so
gps.mt6750.so
gralloc.mt6750.so
hwcomposer.mt6750.so
lights.mt6750.so
memtrack.mt6750.so
sensors.mt6750.so

12. LIB64/SOUNDFX

libdownmix.so

13. VENDOR/LIB

libwvdrm_L3.so
libwvm.so
libWVStreamControlAPI_L3.so

14. VENDOR/LIB/DRM

libdrmwvmplugin.so

15. VENDOR/LIB/MEDIADRM

libwvdrmengine.so

16. XBIN

mnld

After that, remove the files with 6735 or 6753 in their names from Port rom’s lib/hw and lib64/hw. Edit build.prop and change all instances of 6735 or 6753 to 6750 or 6755. And change the DPI to the one that matches your stock DPI as well as the rotation line value (usually 0).


Step 2: Boot.img Patching

You can patch boot.img using various methods. Try them all if needed!

Method 1: Stock boot.img directly
1. Use stock boot.img directly (will likely cause bootloop)

Method 2: Patch the Stock boot.img
2. Unpack Stock and Port boot.img
3. Copy these from port: default.prop, init.environ.rc, sepolicy, services_contexts.
4. Paste them in stock boot.img and replace the existing ones.
5. If there is a proprietary rc file (for example: init.huawei.rc, init.miui.rc, init.flyme.rc etc), copy it from port to stock and then open the stock init.rc file and add import /init.proprietary_file_name.rc at the beginning. Note that the proprietary_file_name corresponds to the name given by the OEM to the file (init.miui.rc for instance, miui is the name here).
6. Pack the boot.img

The ROM should boot, but chances are that few things will force close. if so, add the extra files from port ramdisk. This step is too sensitive! Apply with care. Some proprietary files in the ramdisk can cause the device to bootloop or worst stuck on the kernel logo.


Step 3: Patch the port boot.img

1. Open your unpacked stock boot. Copy these files from stock boot to port boot:

boot.img-base
boot.img-board
boot.img-cmdline
boot.img-kernel
boot.img-kernel_offset
boot.img-pagesize
boot.img-ramdisk_offset
boot.img-ramdisk-compress
boot.img-tags_offset





2. Open stock ramdisk and copy all the files with 6755 in their names.
3. Paste them in port ramdisk. Delete any file in port ramdisk that has 6735 in its name.
4. Select all the files in port ramdisk folder. Click edit with Notepad ++ (you need to have installed Notepad ++ of course).
5. In Notepad ++, click “Ctrl + H”. In “Find what” column, write 6735. In “Replace with” column write 6755. Click “Replace All in All opened documents”.
6. Now, right click on a file name in Notepad ++ (on the top), choose “Close all BUT this”. You’ll be prompted if you want to save the changes to the files modified. Always choose “Yes”.
7. Pack the boot.img

At this point, your ROM should boot but you’ll eventually suffer wifi and bt switches problems (or even the camera opening). If those happen, copy init.project.rc and meta_init.project.rc from your stock ramdisk to port ramdisk. Replace existing ones and pack the boot.img


Step 3: Additional Steps

Note: Because it says additional doesn’t mean it’s expandable!

1. After copying the files in part 1 to the port ROM, your ROM should boot (80% of the cases). But you will need this step to fix the bugs like camera, audio and everything else.
2. Open your Stock ROM and the Port ROM side by side.
3. Go to stock/bin and copy everything, paste the files in port/bin. When prompted, DO NOT REPLACE!
4. Repeat the same process for these folders: ETC, PERMISSIONS, LIB, LIB/HW, LIB64, LIB64/HW, VENDOR, XBIN.


Step 4: Bug fixing

Note: Before you start, make sure you followed the previous steps correctly. Else, you’ll be wasting your time here.

1. Camera bug fix:
– Remove all files in lib and lib64 folders that have cam in their names except libcameraservice.so, libcamera_metadata.so, libcamera_client.so

– Copy all files in lib and lib64 that have cam in their names from your stock ROM and paste them in port ROM.

– Use another camera app. This is important! Due to platform differences, the MT6735/MT6753 camera apps are mostly incompatible with MT6750/MT6755. So, the stock camera apps in these roms will likely not work in your ported ROM. There is no solution to that besides using another camera app.

2. Audio bug fix:
Normally audio should work if you followed the previous steps correctly. If it doesn’t, then you can copy libaudio*.so (meaning all files with audio in their names) from your stock rom’s lib and lib64 to port rom. Use with care, some audio files can cause bootloop. You might also need to copy all the files starting with audio from etc folder of your stock rom to the port rom. That should fix Bluetooth Headset Audio bug as well.

3. Settings Force, Security Settings force bugs fix:
If you get settings app for close or security settings force close, remove these from port rom’s lib/hw and/or lib64/hw:

libGatekeeper.so
gatekeeper.mt6735.so
gatekeeper.mt6753.so
gatekeeper.device_name.so (device_name refers to the device codename).
libMcGatekeeper
keystore.mt6735.so
keystore.mt6753.so


4. Fingerprint bug Fix:
Fingerprint bug is hard to fix. Each device has its own fingerprint drivers. You have to identify your fingerprint drivers and copy them to the appropriate locations. After that, you MUST remove the other fingerprint files for the port device to avoid conflict between the files.
For few devices, the fingerprint files are:

bin/fingerprintd
lib64/hw/fingerprint.default.so
lib64/fprint-x64.so

Most of the time, you will need to remove or add all the files that start with fp or goodix or gx from lib, lib64 and bin folders.


Introduction:

That was all about Custom ROM Cross Porting Guide from MT6735/MT6753 to MT6750/MT6755. The guide was presented by COULIBALY NONTA, who bears all the credits for this post.

Recommended For You

Ask a Question ?

Close