[Infinix HOT 2] Mysteryagr:
Guide to Cross-port lollipop roms for Mediatek MT6580 chipset​

This guide is intended for advanced and experienced porters only, if you are a noob you may stuck at some part.

I made this guide because too many people were asking for it.

As usual, you do everything at your own risk!

Using this Guide, you will be able to cross port lollipop 5.1 roms from chipset MT6582 and MT6592 with kernel 3.10.72

You can even port MT6580 roms with this method, which bootloops when using normal porting!​

Some Notices:

- Huawei roms comes in update.app format, you must extract it first.

- Huawei roms has a separate file called cust.img or custom.img, you have to unpack this too and move the files to the right places in system

- Replacing libcameraserivces.so and libcameracilent.so are known to cause bootloop

- Replacing lib/drm folder , libdrmmtkutil.so and libdrmmtkwhitelist.so are figured out to cause bootloop or problem in displaying/playing all media; like photos, videos, music.

- Some roms might bootloop even after applying this method, you have to take a logcat and try to fix it.

Now let's start:

1- Download the port rom, and unpack system.img using SuperR's Kitchen (This is the only fully working kitchen I know)

By using this kitchen you will be able to unpack the system.img and generate the updater-script, but you will still need a full META-INF folder.

If you can't generate Updater-script or don't know how, please stop here, or you will have bugs and FCs in your ported rom.

2- After unpacking the system.img, go to /system search for all files with name mt6582/92 and delete them.

- Open build.prop using Notepad++

- Replace all MT6582 or MT6592 to MT6580

- Check this line for on screen buttons: qemu.hw.mainkeys , (To disable or enable it)

- Check this line for screen resolution: ro.sf.lcd_density

3- Go to system/app and delete MTKThermalManager

you can replace this from your stock rom.

4- Go to system/bin and add or replace the following:

- 6620_launcher

- 6620_wmt_concurrency

- 6620_wmt_lpbk

- aee

- aee_archive

- aee_core_forwarder

- aee_dumpstate

- akmd8963

- akmd8976

- akmd09911

- ami304d

- acti_service

- atcid

- audicmdservice_acti

- bmm050d

- ccci_fsd

- ccci_mdinit

- geomagneticd

- gsm0710muxd

- gsm0710muxdmd2

- guiext-server

- lsm303md

- mc6420d

- md_ctrl

- mdlogger

- memsicd

- memsicd3416x

- mtk_agpsd

- mtkbt

- MtkCodecService

- muxreport

- nvram_agent_binder

- nvram_daemon

- permission_check

- ppl_agent

- pq

- s62xd

- spm_loader

- terservice

- thermal

- thermal_manager

- thermald

- tiny_mkswap

- tiny_swapoff

- tiny_swapon

- wifi2agps

- wmt_loader

5- Go to system/etc and add or replace the following:

- firmware

- fmr

- mddb

- radvd

- wifi

- audio_device.xml

- audio_effects.conf

- audio_policy.conf

- custom.conf

- mtk_omx_core.cfg

- mtklog-config.prop

- throttle.sh

6- Go to system/lib and add or replace the following:

- egl

- hw

- lib3a.so

- libaal.so

- libadpcm.so

- libaed.so

- libAGifEncoder.so

- libatciserv_jni.so

- libaudiocompensationfilter.so

- libaudiocomponentengine.so

- libaudiocustparam.so

- libaudiodcrflt.so

- libaudiomtkdcremoval.so

- libaudiosetting.so

- libbessound_hd_mtk.so

- libblisrc32.so

- libblisrc.so

- libbluetooth_mtk.so

- libbluetooth_relayer.so

- libbluetoothdrv.so

- libbluetoothem_mtk.so

- libBnMtkCodec.so

- libbwc.so

* Note: You will probably need all camera libs to get camera working, but do not replace libcameraservices.so and libcameraclient.so , these two libs are known to cause bootloop!

- libcamalgo.so

- libcamdrv.so

- libcameracustom.so

- Replace other camera libs when needed

- libccci_util.so

- libcurl.so

- libcustom_nvram.so

- libcvsd_mtk.so

- libdirect-coredump.so

- libdpframework.so

- libdrmframework.so

- libextmap.so

- libextmap_jni.so

- libextsimap.so

- libextsimap_jni.so

- libextsys.so

- libextsys_jni.so

- libexttestmode.so

- libfeatureio.so

- libfm* (means all files with name libfm - not important)

- libGdmaScalerPipe.so

- libged.so

- libgpu_aux.so

- libgralloc_extra.so

- libgraphite2.so

- libgui_ext.so

- libh264dec_customize.so

- libh264dec_sd.ca7.so

- libh264dec_xa.ca7.so

- libh264dec_xb.ca7.so

- libh264enc_sa.ca7.so

- libhwm.so

- libimageio.so

- libimageio_FrmB.so

- libimageio_plat_drv.so

- libimageio_plat_drv_FrmB.so

- libion.so

- lbion_mtk.so

- libJpgDecPipe.so

- libJpgEncPipe.so

- libm4u.so

- libMali.so

- libmatv_cust.so

- libmediatek_exceptionlog.so

- libmhalImageCodec.so

- libmmprofile.so

- libmmprofile_jni.so

- libmmsdkservice.feature.so

- libmmsdkservice.so

- libmnl.so

- libmp4dec_sa.ca7.so

- libmp4dec_sb.ca7.so

- libmp4enc_xa.ca7.so

- libmpo.so

- libmpodecoder.so

- libmpoencoder.so

- libmpojni.so

- libmsbc_mtk.so

- libmtb.so

- libmtcloader.so

- libmtk_drvb.so

- libmtk_mali_user.so

- libmtk_mmutils.so

- libmtkjpeg.so

- libMtkOmx* (Means all the files with name LibMtkOmx)

- libmtkplayer.so

- libmtklimiter.so

- libmtkshifter.so

- libnativecheck-jni.so

- libnvram.so

- libnvram_daemon_callback.so

- libnvram_platform.so

- libnvram_sec.so

- libnvramagentclient.so

- libpalsecurity.so

- libpalwlan_mtk.so

- libperfservice.so

- libperfservicenative.so

- libpq_cust.so

- libpq_prot.so

- libsensorservice.so

- libsbccodec.so

- libshowlogo.so

- libspeech_enh_lib.so

- libssladp.so

- libstagefright_amrnb_common.so

- libstagefright_avc_common.so

- libstagefright_enc_common.so

- libstagefright_omx.so

- libstagefright_soft_gsmdec.so

- libstagefrighthw.so

- libsuspend.so

- libSwJpgCodec.so

- libterservice.so

- libtinycompress.so

- libtinyxml.so

- libtouchfilter.so

- libui_ext.so

- libvc1dec_sa.ca7.so

- libvcodec_oal.so

- libvcodec_utility.so

- libvcodecdrv.so

- libvp8dec_sa.ca7.so

- libvp8dec_xa.ca7.so

- libvp9dec_sa.ca7.so

- libwifitest.so

Note: replace ril files in lib and bin folders only when you have FCs or a problem.

7- Go to system/vendor and replace the following:

- lib

8- Go to system/xbin and replace the following:

- BGW

- mnld

9- Boot.img part:

- Use SuperR's kitchen or Carliv image kitchen or any other boot.img tool to unpack the kernel

- Copy from port ramdisk to stock ramdisk:

init.environ.rc (very important)

init.rc

- Compare those files and add extra lines:

init.project.rc

init.mt65xx.rc

defualt.prop

Then repack stock boot.img

10- Zip the rom now and flash it.

This guide is based on Nonta method and my experience​

I won't be able to write this guide without Nonta helping me during my porting Journey xD

Credits:

[MENTION=5193140]Nonta72[/MENTION]