The correct file to modify is the build prop. Which can be risky to modify. This will enable everything needed. Through the file system modify the build.prop or with a computer. If the custom recovery is TWRP or possibly CWM. Then adb comes pre-enabled. Then you also need root and a computer with adb.
boot into your custom recovery.
Plug your device into your computer and open an elevated command prompt.
- Throw these commands.
adb shell
su
mount -o remount,rw /system
cd /
echo "persist.service.adb.enable=1" >> default.prop
echo "persist.service.debuggable=1" >> default.prop
echo "persist.sys.usb.config=mtp,adb" >> default.prop
echo "persist.service.adb.enable=1" >> /system/build.prop
echo "persist.service.debuggable=1" >> /system/build.prop
echo "persist.sys.usb.config=mtp,adb" >> /system/build.prop
I have done it this way with a nexus 4 and since this is the build prop. Here are some others that have too.