1. init.rc
import /init.environ.rc //setup global environment. For example: export PATH /sbin:/vendor/bin:/system/sbin:/system/bin:/system/xbin
import /init.usb.rc //USB configuration common for all android devices
{for example
on property:sys.usb.config=adb
write /sys/class/android_usb/android0/enable 0
write /sys/class/android_usb/android0/idVendor 18d1
write /sys/class/android_usb/android0/idProduct D002
write /sys/class/android_usb/android0/functions ${sys.usb.config}
write /sys/class/android_usb/android0/enable 1
start adbd
}
import /init.${ro.hardware}.rc
import init.flo.usb.rc
{
on property:sys.usb.config=mtp
stop adbd
write /sys/class/android_usb/android0/enable 0
write /sys/class/android_usb/android0/idVendor 18D1
write /sys/class/android_usb/android0/idProduct 4EE1
}
import /init.trace.rc
//# Permissions to allow system-wide tracing to the kernel trace buffer.