Common Bug Fixes When Porting Custom Roms


https://www.oneclickroot.com/wp-content/uploads/2014/12/Android-bugs.jpg

IF you are planning to port a ROM for your android device, you will definitely encounter bugs along the ride. So here are some Bug fixes you can try to fix that buggy rom!

Use this on an MTK device ONLY!!!

Bootloop FIX
 *libandroid_runtime.so
*libandroid_servers.so
*libmedia_jni.so
*Repack boot.image

RadioFM fix
\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

Sensors not working? Replace the following
/system/bin/akmd*
/system/lib/libsensors.so
/system/lib/libms3c_yamaha.so
/system/etc/firmware (folder)
/system/bin/servicemanager

Bluetooth\Wifi not turning On\Off
\system\lib\module\mtk_stp_wmt

Bluetooth FIX
/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

Wifi FIX
/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)

Camera FIX
/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

SD card/Memory FIX

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

GPS FIX
\system\xbin\libmnlp
/system/etc/gps.conf

Touch Screen(Haptic)
/system/usr
/system/usr\keylayout\Generic.kl ->fix HomeKey

Sim1/2 Inactive/Not working
\system\etc\firmware\modem.img
\system\etc\permission (RIL)
/system/bin/stmd
/system/bin/rild*
/system/etc/rril

Audio/Sound FIX
\system\lib\libaudio* .so

Credits 
XDA