[Miscellaneous Android Development] Yousef Algadri:
To the point!

When you found a bug when porting a ROMs, you can try to fix using this methods! :)

Just replace it from Stock ROM to your Custom ROMs.

~~For MTK~~

Bootloop when porting

*libandroid_runtime.so

*libandroid_servers.so

*libmedia_jni.so

*Repack boot.image

RadioFM

\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

/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

/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

/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

/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\libcameraprofile.so

\system\lib\libcameraservice.so

\system\lib\libmhal.so\system\lib\libmhalcontent.so

\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.front.xml

\system\lib\libOmx*.so ->fix camcoder

SD card/Memory

/system/bin/vold

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

\system\etc\vold.fstab.nand

GPS

\system\xbin\libmnlp

/system/etc/gps.conf

Touch Screen(Haptic)

/system/usr

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

Sim1/2 (RIL)

\system\etc\firmware\modem.img

\system\etc\permission (RIL)

/system/bin/stmd

/system/bin/rild*

/system/etc/rril

Audio/Sound

\system\lib\libaudio* .so

Ads

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

~~SNAPDRAGON QUALCOMM~~

BUGS SIGNAL

Change all file berextensi librilxxx.so in system/lib with file from stock rom.

If doesn't appear, check imei *#06#

BUGS SENSOR

Change file sensorservice in system/bin with file from stock rom

Chamge file libsensorservice.so in system/lib with file from stock rom

Change file sensor.default.so in system/lib/hw with file from stock rom

BUGS CAMERA

Change all file extensi mm-qcameraxxx in system/bin with file from stock rom

Change file v4I2-qcamera-app in system/bin with file from stock rom

Change file camera.msm7627a.so in system/lib/hw with file from stock rom

Change file libcamera_client.so and libcameraservice.so in system/lib with file from stock rom

Change all file libmmcameraxxx.so in system/lib with file from stock rom

Change all libs started with *cam* in lib and lib64

Change all libs started with *omx* in system/vendor

BUGS FINGERPRINT (FPC/GOODIX)

Change gx_fpd in bin folder from stock to port

Change hwservicemanager in bin folder from stock to port

Change android.hardware.fingerprint.xml in etc folder from stock to port

Change libcom_fingerprints_service.so from lib and lib64 from stock to port

Change fingerprint.default.so and fingerprint.msmxxxx.so in hw folder in lib and lib64 from stock to port

Change name started in *fp* in vendor from stock to port

BUGS WIFI

Change file wpa_supplicant im system/bin with file from stock rom

Change folder firmware and wifi in system/etc with file from stock rom

Change file wifitest_recv.sh and wifitest_send.sh in system/etc with file from stock rom

Change file libwpa_client.so in system/lib with file from stock rom

Change file cfg80211.ko in system/lib/modules with file from stock rom

Change folder ath6kl in system/lib/modules with file from stock rom

Change file in folder wifi in system with file from stock rom

BUGS GPU

Change all file in folder egl in system/lib with file from stock rom

BUGS USB

Change file vfold.fstab in system/etc with file from stock rom

NB: still bug? Repack boot.img and see the ramdisk files.

BUGS VIDEO

Change all file berextensi libchromaticxxx.so in system/lib with file from stock rom.

Thanks in advance! :)

Give like if you like it!