[Huawei P9 Lite Guides, News, & Discussion] millo1978:
Android 6 L21C432B170 ...

Usb Host works good.

init.chip.usb.rc

on property:sys.usb.config=hisi_debug,adb
write /sys/class/android_usb/android0/enable 0
write /sys/class/android_usb/android0/idVendor 12d1
write /sys/class/android_usb/android0/idProduct 107e
write /sys/class/android_usb/android0/iSerial $ro.serialno
write /sys/class/android_usb/android0/f_rndis/wceis 1
write /sys/class/android_usb/android0/functions rndis,adb,balong_acm
write /sys/class/android_usb/android0/enable 1
stop atcmdserver
start hw_cdma_service
start adbd
start usbshell
write /sys/class/net/rndis0/queues/rx-0/rps_cpus f
setprop sys.usb.state $sys.usb.config

on property:sys.usb.config=hisi_debug
write /sys/class/android_usb/android0/enable 0
write /sys/class/android_usb/android0/idVendor 12d1
write /sys/class/android_usb/android0/idProduct 107e
write /sys/class/android_usb/android0/iSerial $ro.serialno
write /sys/class/android_usb/android0/f_rndis/wceis 1
write /sys/class/android_usb/android0/functions rndis,balong_acm
write /sys/class/android_usb/android0/enable 1
stop atcmdserver
start hw_cdma_service
start usbshell
write /sys/class/net/rndis0/queues/rx-0/rps_cpus f
setprop sys.usb.state $sys.usb.config

on boot
chown system system /sys/devices/ff100000.hisi_usb/plugusb

Android 7 L21C432B370 & B380

Usb Host don't work.

init.chip.usb.rc

import /init.hisi.usb.rc

on init && property:sys.usb.configfs=0
write /sys/class/android_usb/android0/iManufacturer ${ro.product.manufacturer}
write /sys/class/android_usb/android0/iProduct ${ro.product.model}

on property:sys.usb.config=hisi_debug,adb && property:sys.usb.configfs=0
write /sys/class/android_usb/android0/enable 0
write /sys/class/android_usb/android0/idVendor 12d1
write /sys/class/android_usb/android0/idProduct 107e
write /sys/class/android_usb/android0/iSerial ${ro.serialno}
write /sys/class/android_usb/android0/f_rndis/wceis 1
write /sys/class/android_usb/android0/functions rndis,adb,balong_acm
write /sys/class/android_usb/android0/enable 1
stop atcmdserver
start hw_cdma_service
start adbd
start usbshell
write /sys/class/net/rndis0/queues/rx-0/rps_cpus f
setprop sys.usb.state ${sys.usb.config}

on property:sys.usb.config=hisi_debug && property:sys.usb.configfs=0
write /sys/class/android_usb/android0/enable 0
write /sys/class/android_usb/android0/idVendor 12d1
write /sys/class/android_usb/android0/idProduct 107e
write /sys/class/android_usb/android0/iSerial ${ro.serialno}
write /sys/class/android_usb/android0/f_rndis/wceis 1
write /sys/class/android_usb/android0/functions rndis,balong_acm
write /sys/class/android_usb/android0/enable 1
stop atcmdserver
start hw_cdma_service
start usbshell
write /sys/class/net/rndis0/queues/rx-0/rps_cpus f
setprop sys.usb.state ${sys.usb.config}

on property:sys.usb.config=hisi_debug,adb && property:sys.usb.configfs=1
write /config/usb_gadget/g1/UDC "none"
write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "hisi_debug_adb"
write /config/usb_gadget/g1/idVendor 0x12d1
write /config/usb_gadget/g1/idProduct 0x107e
start adbd

on property:sys.usb.ffs.ready=1 && property:sys.usb.config=hisi_debug,adb && property:sys.usb.configfs=1
write /sys/class/android_usb/android0/f_rndis/wceis 1
symlink /config/usb_gadget/g1/functions/rndis.gs4 /config/usb_gadget/g1/configs/b.1/f1
symlink /config/usb_gadget/g1/functions/balong_acm.a_at /config/usb_gadget/g1/configs/b.1/f2
symlink /config/usb_gadget/g1/functions/balong_acm.acm_3g_diag /config/usb_gadget/g1/configs/b.1/f3
symlink /config/usb_gadget/g1/functions/balong_acm.acm_a_shell /config/usb_gadget/g1/configs/b.1/f4
symlink /config/usb_gadget/g1/functions/balong_acm.acm_c_shell /config/usb_gadget/g1/configs/b.1/f5
symlink /config/usb_gadget/g1/functions/balong_acm.acm_ctrl /config/usb_gadget/g1/configs/b.1/f6
symlink /config/usb_gadget/g1/functions/balong_acm.acm_4g_diag /config/usb_gadget/g1/configs/b.1/f7
symlink /config/usb_gadget/g1/functions/balong_acm.acm_gps /config/usb_gadget/g1/configs/b.1/f8
symlink /config/usb_gadget/g1/functions/balong_acm.acm_cdma_log /config/usb_gadget/g1/configs/b.1/f9
symlink /config/usb_gadget/g1/functions/balong_acm.acm_skytone /config/usb_gadget/g1/configs/b.1/f10
symlink /config/usb_gadget/g1/functions/balong_acm.acm_modem /config/usb_gadget/g1/configs/b.1/f11
symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f12
write /config/usb_gadget/g1/UDC ${sys.usb.controller}
stop atcmdserver
start hw_cdma_service
start usbshell
write /sys/class/net/rndis0/queues/rx-0/rps_cpus f
setprop sys.usb.state ${sys.usb.config}

on property:sys.usb.config=hisi_debug && property:sys.usb.configfs=1
write /config/usb_gadget/g1/UDC "none"
stop adbd
write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "hisi_debug"
write /config/usb_gadget/g1/idVendor 0x12d1
write /config/usb_gadget/g1/idProduct 0x107e
write /sys/class/android_usb/android0/f_rndis/wceis 1
symlink /config/usb_gadget/g1/functions/rndis.gs4 /config/usb_gadget/g1/configs/b.1/f1
symlink /config/usb_gadget/g1/functions/balong_acm.a_at /config/usb_gadget/g1/configs/b.1/f2
symlink /config/usb_gadget/g1/functions/balong_acm.acm_3g_diag /config/usb_gadget/g1/configs/b.1/f3
symlink /config/usb_gadget/g1/functions/balong_acm.acm_a_shell /config/usb_gadget/g1/configs/b.1/f4
symlink /config/usb_gadget/g1/functions/balong_acm.acm_c_shell /config/usb_gadget/g1/configs/b.1/f5
symlink /config/usb_gadget/g1/functions/balong_acm.acm_ctrl /config/usb_gadget/g1/configs/b.1/f6
symlink /config/usb_gadget/g1/functions/balong_acm.acm_4g_diag /config/usb_gadget/g1/configs/b.1/f7
symlink /config/usb_gadget/g1/functions/balong_acm.acm_gps /config/usb_gadget/g1/configs/b.1/f8
symlink /config/usb_gadget/g1/functions/balong_acm.acm_cdma_log /config/usb_gadget/g1/configs/b.1/f9
symlink /config/usb_gadget/g1/functions/balong_acm.acm_skytone /config/usb_gadget/g1/configs/b.1/f10
symlink /config/usb_gadget/g1/functions/balong_acm.acm_modem /config/usb_gadget/g1/configs/b.1/f11
write /config/usb_gadget/g1/UDC ${sys.usb.controller}
stop atcmdserver
start hw_cdma_service
start usbshell
write /sys/class/net/rndis0/queues/rx-0/rps_cpus f
setprop sys.usb.state ${sys.usb.config}

on post-fs-data && property:sys.usb.configfs=1
write /config/usb_gadget/g1/bcdUSB 0x0200

init.hisi.usb.rc

on boot
chown system system /sys/devices/platform/ff100000.hisi_usb/plugusb
chmod 0660 /sys/devices/platform/ff100000.hisi_usb/plugusb

[MENTION=8134750]Avsky0[/MENTION]

Maybe something isn't well written?

I have no Idea.

Or we have to search elsewhere?