[Android] adityaupreti:
I Think this Guide going to help u lot:D

With this guide i think u will make a stable rom

So lets Start

1.)For fixing Bootloop when porting rom

Replace :

/system/lib/libandroid_runtime.so
/system/lib/libandroid_servers.so
/system/lib/libmedia_jni.so
*Repack boot.image

2.)Showing black screen after boot

Replace:

/system/lib/libMali.so

3.)Fixing Sensors

Replace:

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

4.)Fixing Bluetooth\Wifi not turning On\Off

Replace:

/system\lib\module\mtk_stp_wmt

5.) Fixing RadioFM

Replace:

\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

6.) Fixing Bluetooth

Replace:

/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

7.) Fixing Wifi

Replace:

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)

8.) Fixing Camera

Replace :

system/lib/libfeatureio.so - camera not working
/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.front.xml
\system\lib\libOmx*.so -fix camcoder
\system\lib\libfeatureo.so -fix cam focus
# camera not working or force close or any other problem
copy all libs starting with /libcam*.so
#Camera showing wrong model in pic property?
Change model in build.prop
Still not working? Replace following file from STOCK to PORT
system/lib/libexif.so

9.)Fixing SD card/memory

Replace:

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

10.)Fixing Storage Not mounting

Replace:

Decompile framework-res.apk using apktool or apk multitool and replace following file from STOCK framework-res.apk to PORT framework-res.apk
/res/xml/storage_list.xml

11.) Fixing GPS

Replace:

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

12.) Fixing Touch Screen(Haptic)

Replace :

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

13.) Fixing Sim1/2 (RIL)

Replace:

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

14.) Fixing Audio/Sound

Relace:

\system\lib\libaudio* .so

15.) Fixing Network / 3G Network

Replace:

/ 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-IMSI

16.)Fixing Pixalation in video

Replace:

Replace following file from STOCK to PORT or Port to ur Ported rom
system/lib/libvcodecdrv.so

---------------------------------------------------------------

Note Some file will not be there so dont worry jst skip it

And last thing Dont forget to Press Thanks If this helped .......................:good::cool:​