|SOLVED| Fix bugs in Custom ROMs when porting for MT65XX Device

Fix bugs in Custom ROMs when porting for MT65XX (Last Updated On: August 13, 2018)




Intoduction

Lets learn how to Fix bugs in Custom ROMs when porting for MT65XX Device. Most of the custom ROMs are not stable. When you are porting any custom ROM for your mediatek device then its obvious that you will get few minor or major bugs issue.

Most of th bugs can be fixed and there is 100{a6a2ccbe3a1bde101eb0dc81a08c939046e090b2ec3d1cbbe9428f5f624854cb} chance that the custom ROM will work perfectly on your device being totally bugless. While there are also few bugs which are almost impossible to get fixed. So in this article we will discuss how to fix bugs in Custom ROMs for kitkat or lollipop version of any mediatek devices.


Fix bugs in Custom ROMs when porting for MT65XX Device

When you find bugs in custom ROM while porting for your mediatek devices like MT6592, MT6582, MT6735, MT6582 or any other mediatek devices, i.e MT6xxx, then you can apply these fix to your custom ROM. Just you need is extracted system.img file of your official stock ROM and sytem folder of custom ROM that you are going to fix.

Just replace these files from stock ROM to Custom ROM to the same location as mentioned here.

WARNING: Do not replace any file unnecessarily, because it may give rise to new bugs in place of solving it. Always be specific!




1. Audio/Sound

System/lib/libaudio.primary.default.so 

(If above doesn’t work replace all files starting with libaudio.xxxx in System/lib/)
(if this above cause bootloop replace only libaudio.a2dp.default.so

2. Ads

/system/etc/hosts

->replace with new files or use tweak.

3. Bluetooth\Wifi not turning On\Off

\system\lib\module\mtk_stp_wmt

4. Bluetooth

/system/bin/bd_prov
/system/bin/uim*
/system/bin/hcid
/system/bin/bluetooth*
/system/bin/hciattach
/system/bin/sdptool
/system/xbin/hciconfig
/system/bin/brcm_patchram_plus
/system/lib/libbluetooth_mtk.so
/system/lib/libbluetoothem_mtk.so

5. Bootloop when porting

*libandroid_runtime.so
*libandroid_servers.so
*libmedia_jni.so

*Repack boot.image

6. Black Screen After Logo

/system/lib/libMail.so

7. Camera

\system\etc\media_profiles.xml
\system\lib\libcamera.so
\system\lib\liboemcamera.so
\system\lib\hw\camera.default.so
\system\lib\libcamera_client.so
\system\lib\libcameracustom.so\system\lib\libcamer aprofile.so
\system\lib\libcameraservice.so
\system\lib\libmhal.so\system\lib\libmhalcontent.s o
\system\lib\libmhaldrv.so
\system\lib\libmhalmdp.so
\system\lib\libmhalpipe.so
\system\lib\libmhalscenario.so
\system\lib\libmhalutility.so
\system\etc\permission\android.hardware.camera.fro nt.xml
\system\lib\libOmx*.so   -> fix camcoder



#Camera not working or forced closed

Replace all files from \system\lib\ starting with libcam*.so

#Camera showing wrong model in pic property

Change model in build.prop

#If still not working then replace

\system\lib\libexif.so

8. Flipped or Inverted Touch Screen

\system\lib\libinput.so

9. GPS

\system\xbin\libmnlp 
\system\etc\gps.conf

10. LED Notification Not Working

\system\lib\libfeatureio.so

11. Network/3G Network

\system\etc\agps_profiles_conf
\system\etc\APNs-conf
\system\etc\epo-conf
\system\etc\spn-conf
\system\etc\virtual-spn-conf-by-efspn
\system\etc\ virtual-spn-conf-by-IMSli

12. 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\modules\mtk_fm_drv.ko
\system\lib\libfmcust.so

13. Rescent Menu Not Working

/system/usr/keylayout/Generic.kl

14. Screen Resoultion Problem
Open build.prop and add following lines to it.

ro.sf.lcd_density=240

(240 is just an example your dp may be different)

15. Sensors

/system/bin/akmd*
/system/lib/libsensors.so
/system/lib/libms3c_yamaha.so
/system/etc/firmware (folder)
/system/bin/servicemanager



16. Storage/Memory
#For 4.2.2

\system\bin\vold
\system\etc\vold.fstab -> edit file for swap internal and external
\system\etc\vold.fstab.nand

#For 4.4.x and 5.1.1

system\bin\vold
system\bin\pq
system\bin\sdcard
(If still not working replace fstab.mt6xx from boot.img and repack)

#If storage is not mounting then
Decompile framework-res.apk or simply open it with win.rar and replace the following

\res\xml\storage_list.xml

17. Sim1/2 (RIL)

\system\etc\firmware\modem.img
\system\etc\permission (RIL)
\system\bin\stmd
\system\bin\rild*
\system\etc\rril

18. Touch Screen(Haptic)

/system/usr
/system/usr\keylayout\Generic.kl ->fix HomeKey

19. Video Pixelation

/system/lib/libvcodecdrv.so

20. Wifi

/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/bin/netd -> Fix wifi hotspot
/system/lib/libhardwarelegacy.so -> Fix wifi /system/lib/modules/mtk_stp_wmt.ko/system/lib/modules/mtk_wmt_wifi.ko
/system/etc/wifi (folder)
/system/etc/firmware (folder)

21. Power & Volume Key Not Working

Replace Generic.kl

If still does not work

Replace whole usr folder



22. Navigation Bar Not Present
Open build.prop & add a line
To enable navigation bar

qemu.hw.mainkeys=0

To disable navigation bar

qemu.hw.mainkeys=1

23. 2G/3G Toggle

mddb folder if
agps_profiles_conf
apns-conf
epo_conf
spn-conf
virtual-spn-conf-by-efpnn
virtual-spn-conf-by-efspn
virtual-spn-conf-by-imsi

24. Camera Not Connected/Green

ibcamdrv.so
libcameraservice.so
libdpframework.so

25. To fix Compass

Replace libsensorservice.so from /lib

26. Flashlight Not Working

Replace libfeatureio.so from /lib

27. Wallpaper giving Black Screen/not working

Replace libjppeg.so from /system/lib/

So this is how you can Fix bugs in Custom ROMs when porting for MT65XX Device. Best of luck in Advance and Happy Porting.
Comment below if you need fix for any other bugs.

If you successfully port your ROM, always give credits to the Port and Base Rom developers. Also give credits to the people from whom you took help. Always be generous in giving credits because it will not take anything from you, on the other hand it will increase your reputation and strengthen people’s faith in your work.



Recommended For You

Leave a Reply

8 Comments

    1. which rom you are using. If you are trying to fix audio mic calls for Lineage OS or or any nougat roms then sim 2 call mic issue wnt be solved. becuase its the source bug

  1. the camera is with a green filter, I can not fix it, it is not totally green, you know?

    porting the camera it turns totally green but putting only the libdpframework.so, it gets a green filter, does anyone know how to fix it?

    sorry my English..

Ask a Question ?