[BLU R1 HD Guides, News, & Discussion] mrmazak:
i dont know about paste bin. i mean i have heard the name but never used it. here is the contents in code boxes.

LineageOS boot init.project.rc

# MTK project .rc configure

import init.mt6735.usb.rc

on init
mkdir /mnt/media_rw/usbotg 0700 media_rw media_rw
mkdir /storage/usbotg 0700 root root

on post-fs-data

#
# Connectivity related device nodes & configuration (begin)
#

#/dev/ttyMT2 for Connectivity BT/FM/GPS usage
chmod 0660 /dev/ttyMT2
chown system system /dev/ttyMT2

# STP, WMT, GPS, FM and BT Driver
# insmod /system/lib/modules/mtk_hif_sdio.ko
# insmod /system/lib/modules/mtk_stp_wmt.ko
# insmod /system/lib/modules/mtk_stp_uart.ko
# insmod /system/lib/modules/mtk_stp_gps.ko
# insmod /system/lib/modules/mtk_stp_bt.ko
# insmod /system/lib/modules/mtk_fm_drv.ko
# insmod /system/lib/modules/mtk_wmt_wifi.ko

# Create char device file for WMT, GPS, BT, FM, WIFI
# mknod /dev/stpwmt c 190 0;
# mknod /dev/stpgps c 191 0;
# mknod /dev/stpbt c 192 0;

# chmod 0660 /dev/stpwmt
# chown system system /dev/stpwmt

# chmod 0660 /dev/wmtdetect
# chown system system /dev/wmtdetect

mknod /dev/wmtWifi c 153 0
chmod 0660 /dev/wmtWifi
chown system system /dev/wmtWifi

#Camera
chmod 0660 /dev/MAINAF
chown system camera /dev/MAINAF

chmod 0660 /dev/MAINAF2
chown system camera /dev/MAINAF2

chmod 0660 /dev/SUBAF
chown system camera /dev/SUBAF

chmod 0660 /dev/GAF001AF
chown system camera /dev/GAF001AF

chmod 0660 /dev/DW9714AF
chown system camera /dev/DW9714AF

chmod 0660 /dev/AD5820AF
chown system camera /dev/AD5820AF

chmod 0660 /dev/BU64745GWZAF
chown system camera /dev/BU64745GWZAF

#SMB
chown system system /proc/smb/ScreenComm
chmod 0660 /proc/smb/ScreenComm

# BT
# chmod 0660 /dev/stpbt
# chown bluetooth radio /dev/stpbt

# GPS
# chown gps gps /dev/stpgps
chown gps gps /sys/class/gpsdrv/gps/pwrctl
chown gps gps /sys/class/gpsdrv/gps/suspend
chown gps gps /sys/class/gpsdrv/gps/state
chown gps gps /sys/class/gpsdrv/gps/pwrsave
chown gps gps /sys/class/gpsdrv/gps/status
# chmod 0660 /dev/stpgps

# WiFi
mkdir /data/misc/wifi 0770 wifi wifi
mkdir /data/misc/wifi/sockets 0770 wifi wifi
mkdir /data/misc/wpa_supplicant 0770 wifi wifi
chown wifi wifi /data/misc/wifi

#Define device for ATCID
chmod 660 /dev/ttyGS0
chown system /dev/ttyGS0
chmod 660 /dev/ttyGS1
chown system /dev/ttyGS1

#Disable for one Single loader
# Load WiFi Driver
# insmod /system/lib/modules/wlan_mt.ko

# Char device for BT 3.0 HS
mknod /dev/ampc0 c 151 0
chown bluetooth bluetooth /dev/ampc0
chmod 0660 /dev/ampc0

# for gesture
chown system system /sys/devices/mx_tsp/gesture_control
chown system system /sys/devices/mx_tsp/gesture_data

# for notification light
chown system system /sys/devices/mx_leds/leds_mode

#FLYME_EDIT:zhouyueguo@SHELL.PowerSavingMode.Feature Permissions add for power saving mode {@
#Permissions for power saving mode
chown system system /sys/power/power_mode
chmod 0660 /sys/power/power_mode
#@}

#
# Connectivity related device nodes & configuration (end)
#

# Encrypt phone function
setprop vold.post_fs_data_done 1

#
# Connectivity related services (Begin)
#

service atci_service /system/bin/atci_service
socket atci-service stream 660 radio system
socket atci-serv-fw stream 660 radio system
user root
disabled
group radio system
service atcid-daemon-u /system/bin/atcid
user system
group radio system media
disabled
oneshot

service atcid-daemon-e /system/bin/atcid
user root
group radio system
disabled
oneshot

on early_property:ro.build.type=eng
start atci_service
start atcid-daemon-e
service audio-daemon /system/bin/audiocmdservice_atci
class main
socket atci-audio stream 660 media system
user media
group nvram media system sdcard_rw
disabled
oneshot

service wmtLoader /system/bin/wmt_loader
user root
group root
class core
oneshot

service conn_launcher /system/bin/6620_launcher -p /system/etc/firmware/
user system
group system
class core

#
# Connectivity related services (End)
#

zen rom working camera init.project.rc 100% match to stock version

# MTK project .rc configure

import init.mt6735.usb.rc

on init
mkdir /mnt/media_rw/usbotg 0700 media_rw media_rw
mkdir /storage/usbotg 0700 root root

on post-fs-data

#
# Connectivity related device nodes & configuration (begin)
#

#/dev/ttyMT2 for Connectivity BT/FM/GPS usage
chmod 0660 /dev/ttyMT2
chown system system /dev/ttyMT2

# STP, WMT, GPS, FM and BT Driver
# insmod /system/lib/modules/mtk_hif_sdio.ko
# insmod /system/lib/modules/mtk_stp_wmt.ko
# insmod /system/lib/modules/mtk_stp_uart.ko
# insmod /system/lib/modules/mtk_stp_gps.ko
# insmod /system/lib/modules/mtk_stp_bt.ko
# insmod /system/lib/modules/mtk_fm_drv.ko
# insmod /system/lib/modules/mtk_wmt_wifi.ko

# Create char device file for WMT, GPS, BT, FM, WIFI
# mknod /dev/stpwmt c 190 0;
# mknod /dev/stpgps c 191 0;
# mknod /dev/stpbt c 192 0;

# chmod 0660 /dev/stpwmt
# chown system system /dev/stpwmt

# chmod 0660 /dev/wmtdetect
# chown system system /dev/wmtdetect

mknod /dev/wmtWifi c 153 0
chmod 0660 /dev/wmtWifi
chown system system /dev/wmtWifi

#Camera
chmod 0660 /dev/MAINAF
chown system camera /dev/MAINAF

chmod 0660 /dev/MAINAF2
chown system camera /dev/MAINAF2

chmod 0660 /dev/SUBAF
chown system camera /dev/SUBAF

chmod 0660 /dev/GAF001AF
chown system camera /dev/GAF001AF

chmod 0660 /dev/DW9714AF
chown system camera /dev/DW9714AF

chmod 0660 /dev/AD5820AF
chown system camera /dev/AD5820AF

chmod 0660 /dev/BU64745GWZAF
chown system camera /dev/BU64745GWZAF
chmod 0660 /dev/IMX258_CAM_CAL_DRV
chown system camera /dev/IMX258_CAM_CAL_DRV

#SMB
chown system system /proc/smb/ScreenComm
chmod 0660 /proc/smb/ScreenComm

# BT
# chmod 0660 /dev/stpbt
# chown bluetooth radio /dev/stpbt

# GPS
# chown gps gps /dev/stpgps
chown gps gps /sys/class/gpsdrv/gps/pwrctl
chown gps gps /sys/class/gpsdrv/gps/suspend
chown gps gps /sys/class/gpsdrv/gps/state
chown gps gps /sys/class/gpsdrv/gps/pwrsave
chown gps gps /sys/class/gpsdrv/gps/status
# chmod 0660 /dev/stpgps

# WiFi
mkdir /data/misc/wifi 0770 wifi wifi
mkdir /data/misc/wifi/sockets 0770 wifi wifi
mkdir /data/misc/wpa_supplicant 0770 wifi wifi
chown wifi wifi /data/misc/wifi

#Define device for ATCID
chmod 660 /dev/ttyGS0
chown system /dev/ttyGS0
chmod 660 /dev/ttyGS1
chown system /dev/ttyGS1

#Disable for one Single loader
# Load WiFi Driver
# insmod /system/lib/modules/wlan_mt.ko

# Char device for BT 3.0 HS
mknod /dev/ampc0 c 151 0
chown bluetooth bluetooth /dev/ampc0
chmod 0660 /dev/ampc0
chmod 0666 /dev/sensors_state

#
# Connectivity related device nodes & configuration (end)
#

chmod 0666 /dev/exm0

on init
# Refer to http://source.android.com/devices/tech/storage/index.html
# It said, "Starting in Android 4.4, multiple external storage devices are surfaced to developers through
# Context.getExternalFilesDirs(), Context.getExternalCacheDirs(), and Context.getObbDirs().
# External storage devices surfaced through these APIs must be a semi-permanent part of the device (such as an SD card slot in a battery compartment).
# Developers expect data stored in these locations to be available over long periods of time."
# Therefore, if the target doesn't support sd hot-plugging (Ex: the SD card slot in a battery compartment), we need to export SECONDARY_STORAGE in 'boot' section
#
# export SECONDARY_STORAGE /storage/sdcard1

service fuse_usbotg /system/bin/sdcard -u 1023 -g 1023 -w 1023 -d /mnt/media_rw/usbotg /storage/usbotg
class late_start
disabled

#service fingerprintd /system/bin/fingerprintd
# class late_start
# user system
#service gx_fpd /system/bin/gx_fpd
# class late_start
# user root
# group root system

#
# Connectivity related services (Begin)
#

service atci_service /system/bin/atci_service
socket atci-service stream 660 radio system
socket atci-serv-fw stream 660 radio system
user root
disabled
group radio system
service atcid-daemon-u /system/bin/atcid
user system
group radio system media
disabled
oneshot

service atcid-daemon-e /system/bin/atcid
user root
group radio system
disabled
oneshot

on early_property:ro.build.type=eng
start atci_service
start atcid-daemon-e
service audio-daemon /system/bin/audiocmdservice_atci
class main
socket atci-audio stream 660 media system
user media
group nvram media system sdcard_rw
disabled
oneshot

service wmtLoader /system/bin/wmt_loader
user root
group root
class core
oneshot

service conn_launcher /system/bin/6620_launcher -p /system/etc/firmware/
user system
group system
class core

#
# Connectivity related services (End)
#

#
# vtservice
#
service vtservice /system/bin/vtservice
class main
socket soc_vt_tcv dgram 660 radio system
socket soc_vt_stk dgram 660 radio system
socket soc_vt_svc dgram 660 radio system
user system
group system camera graphics inet net_admin net_raw media sdcard_rw radio sdcard_r media_rw
ioprio rt 4