Monday, June 1, 2020

All-in-one ROM porting guide [mediatek] [qualcomm] [For Cross Porting Guide]

=>BUG FIX METHOD {Later in this Guide}<=

All-in-one ROM porting guide [mediatek] [qualcomm] [For Cross Porting Guide]
For Cross Porting Like:


MT6752 etc. to MT6753/MT6735 MT6737
DO REMEMBER TO CHANGE:

System/xbin/mnld

System/mddb

System/etc/firmware/*

System/etc/A pacing

System/etc/spnconf

In System/lib(/64)/HW :- add files
 accordingly to your

CPU or rename them.

BLACK SCREEN AFTER LOGO:

libcam.paramsmgr


BOOT.IMG PORTING:


UNPACK both Base Rom and Port Rom Boot.img

In PORT ROM BOOT.IMG:-

replace the boot.img-kernel

and in ramdisk folder, add these files from Base Boot.img

to Port Boot.img

fstab.mt6735

init.mt6735.rc

init.mt6735.usb.rc

Note:- Name may differ a little according to your CPU

REPACK THE BOOT IMAGE

NOTE:- If you get Wi-Fi And Bluetooth Not Switching ON

or Battery Percentage then replace

init.project.rc

BUG FIXING [MTK]


NOTE: CHANGE LIB FILES FROM BOTH lib & lib64

folders

If you face "This rom is for Coolpad Note 3 Lite and your device

is "K4Note" or something like that, delete the assert lines in

Updater-script


Always change dpi in build.prop according to your rom

Bootloop when porting

/system/lib(/64)/libandroid_runtime.so

/system/lib(/64)/libandroid_servers.so

/system/lib(/64)/libmedia_jni.so

* Repack boot.image (properly)

Radio FM


/system/bin/fmradio

/system/etc/firmware
/mt6620_patch_e3_hdr.bin

/system/etc/firmware
/mt6620_patch_e6_hdr.bin

/system/etc/firmware/WMT*.CFG

/system/lib(/64)/libfmcust.so

/system/lib(/64)/libfmjni.so

Sensors


/system/bin/akmd*

/system/lib/libsensors.so

/system/lib/libms*.so (according to device)

/system/etc/firmware (folder)

/system/bin/servicemanager

/system/bin/sensorservice

/system/bin/msensord

/system/etc/permissions

/android.hardware.sensor.xxxx.xml

FIX Offline charging

* In Boot.img --> sbin/healthd

/system/lib(/64)/Showlogo

/system/bin/Kpoc_charger

Wi-Fi


/system/etc/wifi (folder)

/system/bin/netcfg

/system/bin/dhcpcd

/system/bin/ifconfig

/system/bin/hostap

/system/bin/hostapd

/system/bin/hostapd_bin

/system/bin/pcscd

/system/bin/wlan*

/system/bin/wpa*

/system/lib(/64)/libhardwarelegacy.so

Bluetooth or Wi-Fi not turning On\Off (old)

/system/lib/module/mtk_stp_wmt

Hotspot


/system/bin/netd

* follow Wi-Fi fix also

Camera


** Try one by one

/system/lib(/64)/libcameracustom.so

/system/lib(/64)/libcameraservice.so

/system/lib(/64)/camalgo

/system/etc/media_profiles.xml

/system/lib(/64)/libcamera.so

/system/lib(/64)/liboemcamera.so

/system/lib(/64)/hw/camera.default.so

/system/lib(/64)/libcamera_client.so

/system/lib(/64)/libcameraprofile.so

/system/lib(/64)/libmhal.so

/system/lib(/64)/libmhalcontent.so

/system/lib(/64)/libmhaldrv.so

/system/lib(/64)/libmhalmdp.so

/system/lib(/64)/libmhalpipe.so

/system/lib(/64)/libmhalscenario.so

/system/lib(/64)/libmhalutility.so

/system/etc/permission

/android.hardware.camera*.xml

Other cam files if any
Try one by one

CamCorder/HwDecoder

/system/lib/libOmx*.so

/system/etc/media_codecs.xml

Green/pink Camera or video

/system/lib(/64)/libdpframework.so

SD card/Memory


In boot.img => mt67**.fstab

/system/bin/vold

/system/bin/pq

/system/bin/sdcard

WhatsApp Media Fix

/system/bin/media

/system/bin/mediaserver

/system/bin/netd

/system/bin/service

/system/bin/servicemanager

/system/bin/surfaceflinger
GPS

/system/xbin/libmnlp

/system/etc/gps.conf



Touch Screen (Haptic)


/system/usr (Folder)

/system/usr/keylayout/Generic.kl =>fix HomeKey

NFC (experimental)

/system/etc/ nfc files

/system/etc/permissions/ nfc files

/system/lib/libnfc**** (all starting with nfc)


Sim 1/2 (RIL)

/system/etc/Trustzone.bin (accordingly to LP or MM etc of stock rom)


/system/etc/firmware/modem.img

/system/etc/permission/****telephony**.xml (RIL)

* Try these as well (you may suffer Bootloop)

/system/bin/mtkrild

/system/bin/mtkrildm1

/system/bin/stmd

EXPERIMENTAL FIX for ril

/system/lib(/64)/Nvram

/system/lib(/64)/Nvram_sec

/system/lib(/64)/Nvram_platform

/system/lib(/64)/Nvrammagentclient

/system/bin/Gsm***

/system/etc/trustzone.bin

/system/lib(/64)/Libril

/system/lib(/64)/Libc2k***

/system/lib(/64)/Librilmtk

Audio/Sound

/system/lib\libaudio*.so

/system/lib(/64)/libaudiocustomparam

/system/lib(/64)/libaudiopolicymanager

/system/lib(/64)/libaudiopolicyservice

/system/etc/audio_effects.conf

/system/etc/audio_policy**.xml

/system/lib(/64)/soundfx

Sometimes if Sound isn't working fully

/system/lib(/64)/hw/audioxxxxx (audio files)


Bluetooth


/system/etc/Bluetooth (Folder)

/system/etc/permissions/android.hardware.bluetooth.xml

/system/bin/uim*

/system/bin/bluetooth*

/system/lib(/64)/libbluetooth_mtk.so

/system/lib(/64)/libbluetoothem_mtk.so
Ads

/system/etc/hosts --> replace with new files or use tweak.


===>> ADVANCE BUG FIXING

Volte Fixing

Will only work if your Base Rom, Port Rom & Kernel supports

VoLTE

In Boot.img:-

Zimage ( kernel - volte supported )

init.volte.rc

This Should Normally Fix but if it doesn't try:

/system/bin/volte_stack

/system/bin/volte_imcb

/system/bin/volte_ua

/system/lib(/64)/volte_imsm

** In build.prop (Not always required):-

 ro.mtk_volte_support=1

 persist.mtk.volte.enable=1

Fingerprint

[Try one by one] [If any file missing leave it]

Usual way to fix:

/system/etc/permissions

/android.hardware.fingerprint.xml

/system/lib(/64)/libgatekeeper.so

/system/lib(/64)/hw

/gatekeeper.mt6735.so

/system/lib(/64)/hw/libmcgatekeeper.so

/system/lib(/64)/hw/fingerprint.default.so

 (can break FP in some devices)

Advanced (if usual doesn't work) (if any missing, leave that):

/system/bin/fingerprintd

/system/bin/Gx_fpd

/system/bin/tee_deamon

/system/lib(/64)/Fpclient

/system/lib(/64)/Fpalgorithm

/system/lib(/64)/Fphal

/system/lib(/64)/FPservice

IF ROM DOESNT BOOT, TAKE LOG (From ADB)

 adb shell logcat > log.txt

and check what is causing issue


GUIDE FOR SNAPDRAGON

Qualcomm Rom Porting


Porting from same chipset like SD410 to SD410

Use Android Image Kitchen to unpack the base and port

boot.img in BOOT-BASE and BOOT-PORT folder.

Replace the files from the BASE TO PORT:

boot.img-zImage

boot.img-dtb

Then in the BOOT-PORT/ramdisk/ folder compare fstab.qcom

with that of the base i.e. BOOT-BASE
/ramdisk/fstab.qcom

REPACK BOOT.IMG

Replace this Boot.img in port

FOR MORE INFO

Do , have a look at these guides :


Bug Fixing for Snapdragon


NOTE: These Worked For Few Roms In Yu MSM Devices,

Not Sure If Will Work In All.

If you have properly edited the boot.img, then only these

fixes will help you

Compare the PORT FILES FROM BASE FILES:

uneventd.qcom.rc (will fix sensor)

uneventd.rc

Copy and replace the following files from Base to Port to solve the

given issues:


No sound bug


/system/lib(/64)/hw

/audio.primary.msm****.so

/system/lib(/64)/hw

/audio.primary.default.so

Sound working in speaker but not working through

headphones or vice-versa:

/system/etc/mixer_paths.xml (you can also try patching it with the base)

Distorted Outgoing Sound during Phone call or Partial Sound

/system/etc/acdbdata/MTP/

MTP_***.acdb (all files)


Home or any other button not working


/system/usr/keylayout/goodix.kl

/system/usr/keylayout/gpio-keys.kl (important)

/system/usr/keylayout/Generik.kl

Video hw encoding/decoding not working


/system/etc/firmware/venus.*** (all files
starting with ‘venus’

Sensors not working



/system/lib(/64)/hw/sensors.msm****.so

 (or sensors.lsm6db0.so)

/system/lib(64)/libsensorservice.so

Led notification not working


/system/lib(/64)/hw/lights.msm****.so


Vibration not working



/system/lib(/64)/libhardware_legacy.so

FM not working

/system/lib(/64)/qcomfm_jni.so

Wifi not working


/system/lib(/64)/modules/wlan.ko

[Note: In MIUI, wlan.ko is renamed as pronto_wlan.ko and is also kept in

/system/lib/modules/pronto/ folder, so

 you’ve to replace in both the places.]

If wlan.ko file is missing, try replacing these files

/system/lib(/64)/libwcnss_qmi.so

For slow WiFi network and other WiFi related issues

replace

/system/etc/wifi/ -- all files

/system/etc/firmware/wlan/ -- all files

Camera and flash not working


/system/vendor/lib(/64)/:

libactuator_***.so (all files starting with ‘libactuator’)

libchromatix_***.so (all files starting with ‘libchromatix’)

libmmcamera_***.so (all files starting with ‘libmmcamera’)

/system/lib(/64)/

libmm-qcamera.so

libmmcamera_interface.co

/system/lib(64)/hw/:

camera.msm****.so

[Note: If such files are also available in your

BASE/system/vendor/lib64/ then you have to copy those files also to

their respective place in PORT]


Done, now zip em and flash.😱😱😱😱


My Youtube Channel

No comments:

Post a Comment

How To Root and Install TWRP Recovery On [Panasonic P88] Custom Recovery

Root twrp Recovery for Panasonic P88 is Here, in the article you Will Learn How to Install twrp Recovery and Root Panasonic P88. Rooting i...

Popular Posts