We have already covered guides for Porting Custom Rom And Custom Recovery For Spreadtrum SC7731/SC8830 Chipsets.
If you are facing bugs in your ported rom then here are the fixes you can try to solve issues/bugs.
The porting methods should not lead any bugs as the procedure contains major files from stock rom...
But still if u flash a rom of a clone of ur device or what ever u port leads bugs then these are the steps to fix those bugs.....
Take these files from your stock  and paste them in port.

Read More :


Bug: Stuck on boot.
Solution:  libandroid_runtime.so (if rom wont boot with port roms lib)
                  libandroid_servers.so
Bug:  wifi not working
Solution:   /system/lib/modules/libhardware_legacy.so 
                   /system/lib/modules/8723as.ko
                   /system/lib/modules/unifi_sdio.ko.

if u are confused what is your wifi driver then do these steps
. open libhardware_legacy.so in notepad++ & search for /system/lib/modules/ the name(*****.ko) u will find after that is your wifi driver.

                   /system/lib/libeng_wifi_ptest.so
                   /system/bin/wpa_supplicant
                   /system/bin/synergy_wifi_attach
                   /system/bin/synergy_service
                   /system/bin/netd
                   /system/bin/eng_setbtwifiaddr
                   /system/bin/engmodemclient
                   /system/bin/engservice
                   /system/bin/engtest
                   /system/etc/dhcpcd
                   /system/etc/wifi (folder)
                   /system/etc/firmware (folder)

Bug:  Bluetooth not working
Solution:    /system/lib/libhardware_legacy.so
                   /system/lib/libbluedroid.so 
                   /system/lib/libbluetoothd.so
                   /system/lib/libbluetooth.so
                   /system/lib/from binaries
                   /system/bin/bluetoothd
                   /system/bin/synergy_service
                   /system/bin/netd
                   /system/bin/eng_setbtwifiaddr
                   /system/bin/ engmodemclient
                   /system/bin/engservice
                   /system/bin/engtest
                   /system/etc/ bluetooth (folder)
                   /system/etc/ firmware (folder)

Bug:  Headset not working
Solution:    /system/lib/modules/headset.ko

Bug: Sensors not working
Solution:    /system/lib/libsensorservice.so
                   /system/lib/hwsensors.sprdbp.so                   /etc/permissions/android.hardware.sensor.proximity.xml

Bug:  gpu related problems
Solution:   /system/lib/egl
                   /system/lib/modulesmali.ko
                   /system/lib/hw/gralloc.mali.so

Bug:  hardkeys/softkeys not working
Solution:   /system/usr (folder)

Bug:  Touch not working
Solution:    /system/sps (folder)
.
Read More: