liuyq / android-issues

place to write notes about investigation on android issues
0 stars 0 forks source link

AOSP-hikey960: Unable to write to file '/config/usb_gadget/g1/UDC': Unable to write file contents: Device or resource busy #5

Open liuyq opened 2 years ago

liuyq commented 2 years ago

https://www.21ic.com/evm/evaluate/MCU/201706/724733_2.htm

开发板上引出的USB 3.0 ,USB 2.0以及 USB TYPE-C接口,都是通过USB HUB(USB 5734)模块与Kirin960 的USB控制器连接并实现复用。具体连接方式如下
Kirin960-HiKey960开发板15.jpg

注意:USB TYPE-C ,USB 2.0以及USB 3.0 是通过SWITCH来进行切换的,所以如果同时使用USB TYPE-C ,USB 2.0 以及 USB 3.0接口的话,会导致其中USB 3.0和USB 2.0接口失效,这个硬件设计上的原因,使用时需要注意这一点。

hikey960-usb connections hikey960-sub HiKey960_Schematics.pdf

when the usb otg cable plugged out, it shows the "Unable to write to file '/config/usb_gadget/g1/UDC'" message infinitely on the kernel console side.

console:/ $ [   65.353013][  T409] healthd: battery l=85 v=3600 t=35.0 h=2 st=2 chg=au
[   65.353554][  T272] type=1400 audit(1647186749.427:74): avc: denied { getattr } for comm="health@2.1-serv" path="/sys/devices/platform/soc/ffd72000.i2c/i2c-1/1-004e/power_supply/tcpm-source-psy-1-004e/online" dev="sysfs" ino=30174 scontext=u:r:hal_health_default:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=0
[   65.356208][  T202] android_work: sent uevent USB_STATE=DISCONNECTED
[   65.360498][  T409] healthd: battery l=85 v=3600 t=35.0 h=2 st=2 chg=au
[   65.388123][  T272] type=1400 audit(1647186749.435:75): avc: denied { getattr } for comm="health@2.1-serv" path="/sys/devices/platform/soc/ffd72000.i2c/i2c-1/1-004e/power_supply/tcpm-source-psy-1-004e/online" dev="sysfs" ino=30174 scontext=u:r:hal_health_default:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=0
[   65.429255][  T272] type=1400 audit(1647186749.435:76): avc: denied { getattr } for comm="health@2.1-serv" path="/sys/devices/platform/soc/ffd72000.i2c/i2c-1/1-004e/power_supply/tcpm-source-psy-1-004e/online" dev="sysfs" ino=30174 scontext=u:r:hal_health_default:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=0
[   65.457514][  T272] type=1400 audit(1647186749.467:77): avc: denied { getattr } for comm="health@2.1-serv" path="/sys/devices/platform/soc/ffd72000.i2c/i2c-1/1-004e/power_supply/tcpm-source-psy-1-004e/online" dev="sysfs" ino=30174 scontext=u:r:hal_health_default:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=0
[   65.468432][   T78] xhci-hcd xhci-hcd.1.auto: xHCI Host Controller
[   65.469956][  T190] ueventd: Loading module /vendor/lib/modules/xhci-hcd.ko with args ''
[   65.500542][   T78] xhci-hcd xhci-hcd.1.auto: new USB bus registered, assigned bus number 1
[   65.509068][   T78] xhci-hcd xhci-hcd.1.auto: hcc params 0x0220fe65 hci version 0x110 quirks 0x0000000002010010
[   65.512072][  T190] xhci_hcd: exports duplicate symbol __SCK__tp_func_xhci_dbg_quirks (owned by kernel)
[   65.519193][   T78] xhci-hcd xhci-hcd.1.auto: irq 35, io mem 0xff100000
[   65.535581][   T78] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.18
[   65.544546][   T78] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[   65.552467][   T78] usb usb1: Product: xHCI Host Controller
[   65.558039][   T78] usb usb1: Manufacturer: Linux 5.18.0-rc2-mainline-09850-gdf58c3c817af xhci-hcd
[   65.567038][   T78] usb usb1: SerialNumber: xhci-hcd.1.auto
[   65.573005][   T78] hub 1-0:1.0: USB hub found
[   65.576704][  T471] read descriptors
[   65.577478][   T78] hub 1-0:1.0: 1 port detected
[   65.581067][  T471] read strings
[   65.585862][   T78] xhci-hcd xhci-hcd.1.auto: xHCI Host Controller
[   65.590156][    T1] init: processing action (sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1) from (/system/etc/init/hw/init.usb.configfs.rc:20)
[   65.595079][   T78] xhci-hcd xhci-hcd.1.auto: new USB bus registered, assigned bus number 2
[   65.595088][   T78] xhci-hcd xhci-hcd.1.auto: Host supports USB 3.0 SuperSpeed
[   65.595128][   T78] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
[   65.611178][    T1] init: Command 'symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f1' action=sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1 (/system/etc/init/hw/init.usb.configfs.rc:22) took 0ms and failed: symlink() failed: File exists
[   65.617867][   T78] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 5.18
[   65.625916][    T1] init: Command 'write /config/usb_gadget/g1/UDC ${sys.usb.controller}' action=sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1 (/system/etc/init/hw/init.usb.configfs.rc:23) took 0ms and failed: Unable to write to file '/config/usb_gadget/g1/UDC': Unable to write file contents: Device or resource busy
[   65.633836][   T78] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[   65.633842][   T78] usb usb2: Product: xHCI Host Controller
[   65.633845][   T78] usb usb2: Manufacturer: Linux 5.18.0-rc2-mainline-09850-gdf58c3c817af xhci-hcd
[   65.633850][   T78] usb usb2: SerialNumber: xhci-hcd.1.auto
[   65.634072][   T78] hub 2-0:1.0: USB hub found
[   65.730292][   T78] hub 2-0:1.0: 1 port detected
[   65.752566][  T190] ueventd: Failed to insmod '/vendor/lib/modules/xhci-hcd.ko' with args '': Exec format error
[   65.762707][  T190] ueventd: LoadWithAliases was unable to load /vendor/lib/modules/xhci-hcd.ko
[   65.771431][  T190] ueventd: LoadWithAliases was unable to load platform:xhci-hcd
[   65.780279][  T190] ueventd: Loading module /vendor/lib/modules/xhci-hcd.ko with args ''
[   65.812643][  T190] xhci_hcd: exports duplicate symbol __SCK__tp_func_xhci_dbg_quirks (owned by kernel)
[   65.857169][  T190] ueventd: Failed to insmod '/vendor/lib/modules/xhci-hcd.ko' with args '': Exec format error
[   65.867310][  T190] ueventd: LoadWithAliases was unable to load /vendor/lib/modules/xhci-hcd.ko
[   65.876040][  T190] ueventd: LoadWithAliases was unable to load platform:xhci-hcd
[   65.886211][  T190] ueventd: LoadWithAliases was unable to load usb:v1D6Bp0002d0518dc09dsc00dp01ic09isc00ip00in00
[   65.897098][  T190] ueventd: LoadWithAliases was unable to load usb:v1D6Bp0002d0518dc09dsc00dp01ic09isc00ip00in00
[   65.909646][  T190] ueventd: LoadWithAliases was unable to load usb:v1D6Bp0003d0518dc09dsc00dp03ic09isc00ip00in00
[   65.920522][  T190] ueventd: LoadWithAliases was unable to load usb:v1D6Bp0003d0518dc09dsc00dp03ic09isc00ip00in00
[   65.932167][  T190] ueventd: Loading module /vendor/lib/modules/xhci-hcd.ko with args ''
[   65.964622][   T78] usb 1-1: new high-speed USB device number 2 using xhci-hcd
[   65.972864][  T190] xhci_hcd: exports duplicate symbol __SCK__tp_func_xhci_dbg_quirks (owned by kernel)
[   66.017387][  T190] ueventd: Failed to insmod '/vendor/lib/modules/xhci-hcd.ko' with args '': Exec format error
[   66.027526][  T190] ueventd: LoadWithAliases was unable to load /vendor/lib/modules/xhci-hcd.ko
[   66.036257][  T190] ueventd: LoadWithAliases was unable to load platform:xhci-hcd
[   66.140582][   T78] usb 1-1: New USB device found, idVendor=0424, idProduct=2734, bcdDevice= 2.02
[   66.149535][   T78] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[   66.157383][   T78] usb 1-1: Product: USB2734
[   66.161743][   T78] usb 1-1: Manufacturer: Microchip Tech
[   66.208570][   T78] hub 1-1:1.0: USB hub found
[   66.213363][   T78] hub 1-1:1.0: 5 ports detected
[   66.213562][  T190] ueventd: LoadWithAliases was unable to load usb:v0424p2734d0202dc09dsc00dp02ic09isc00ip01in00
[   66.267462][  T202] usb 2-1: new SuperSpeed USB device number 2 using xhci-hcd
[   66.279167][  T190] ueventd: LoadWithAliases was unable to load usb:v0424p2734d0202dc09dsc00dp02ic09isc00ip02in00
[   66.294512][  T202] usb 2-1: New USB device found, idVendor=0424, idProduct=5734, bcdDevice= 2.02
[   66.303406][  T202] usb 2-1: New USB device strings: Mfr=2, Product=3, SerialNumber=0
[   66.311242][  T202] usb 2-1: Product: USB5734
[   66.315598][  T202] usb 2-1: Manufacturer: Microchip Tech
[   66.350090][  T202] hub 2-1:1.0: USB hub found
[   66.354664][  T202] hub 2-1:1.0: 5 ports detected
[   66.355295][  T190] ueventd: LoadWithAliases was unable to load usb:v0424p5734d0202dc09dsc00dp03ic09isc00ip00in00
[   66.372955][  T190] ueventd: LoadWithAliases was unable to load usb:v0424p5734d0202dc09dsc00dp03ic09isc00ip00in00
[   66.567879][   T78] usb 1-1.1: new low-speed USB device number 3 using xhci-hcd
[   66.648765][  T471] read descriptors
[   66.652456][  T471] read strings
[   66.657821][    T1] init: processing action (sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1) from (/system/etc/init/hw/init.usb.configfs.rc:20)
[   66.673306][    T1] init: Command 'symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f1' action=sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1 (/system/etc/init/hw/init.usb.configfs.rc:22) took 0ms and failed: symlink() failed: File exists
[   66.699599][    T1] init: Command 'write /config/usb_gadget/g1/UDC ${sys.usb.controller}' action=sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1 (/system/etc/init/hw/init.usb.configfs.rc:23) took 0ms and failed: Unable to write to file '/config/usb_gadget/g1/UDC': Unable to write file contents: Device or resource busy
[   66.731287][   T78] usb 1-1.1: New USB device found, idVendor=275d, idProduct=0ba6, bcdDevice= 1.00
[   66.740354][   T78] usb 1-1.1: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[   66.748362][   T78] usb 1-1.1: Product: USB OPTICAL MOUSE 
[   66.818341][  T190] ueventd: LoadWithAliases was unable to load usb:v275Dp0BA6d0100dc00dsc00dp00ic03isc01ip02in00
[   66.818968][   T78] input: USB OPTICAL MOUSE  as /devices/platform/soc/ff100000.dwc3/xhci-hcd.1.auto/usb1/1-1/1-1.1/1-1.1:1.0/0003:275D:0BA6.0001/input/input1
[   66.829380][  T190] ueventd: LoadWithAliases was unable to load hid:b0003g0001v0000275Dp00000BA6
[   66.842931][   T78] hid-generic 0003:275D:0BA6.0001: input,hidraw0: USB HID v1.11 Mouse [USB OPTICAL MOUSE ] on usb-xhci-hcd.1.auto-1.1/input0
[   66.852337][  T190] ueventd: LoadWithAliases was unable to load input:b0003v275Dp0BA6e0111-e0,1,2,4,k110,111,112,r0,1,8,B,am4,lsfw
[   66.879142][  T190] ueventd: LoadWithAliases was unable to load hid:b0003g0001v0000275Dp00000BA6
[   66.888580][  T190] ueventd: LoadWithAliases was unable to load usb:v275Dp0BA6d0100dc00dsc00dp00ic03isc01ip02in00
[   66.943621][   T78] usb 1-1.5: new high-speed USB device number 4 using xhci-hcd
[   67.050251][   T78] usb 1-1.5: New USB device found, idVendor=0424, idProduct=2740, bcdDevice= 2.00
[   67.050260][   T84] hisi_thermal fff30000.tsensor: sensor <1> THERMAL ALARM: 65370 > 65000
[   67.067661][   T78] usb 1-1.5: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[   67.075706][   T78] usb 1-1.5: Product: Hub Controller
[   67.080869][   T78] usb 1-1.5: Manufacturer: Microchip Tech
[   67.090485][  T190] ueventd: LoadWithAliases was unable to load usb:v0424p2740d0200dc00dsc00dp00icFFiscFFipFFin00
[   67.692217][  T471] read descriptors
[   67.695859][  T471] read strings
[   67.700358][    T1] init: processing action (sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1) from (/system/etc/init/hw/init.usb.configfs.rc:20)
[   67.715784][    T1] init: Command 'symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f1' action=sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1 (/system/etc/init/hw/init.usb.configfs.rc:22) took 0ms and failed: symlink() failed: File exists
[   67.741491][    T1] init: Command 'write /config/usb_gadget/g1/UDC ${sys.usb.controller}' action=sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1 (/system/etc/init/hw/init.usb.configfs.rc:23) took 0ms and failed: Unable to write to file '/config/usb_gadget/g1/UDC': Unable to write file contents: Device or resource busy
[   67.989698][   T84] hisi_thermal fff30000.tsensor: sensor <1> THERMAL ALARM stopped: 61065 < 65000
[   68.732396][  T471] read descriptors
[   68.736038][  T471] read strings
[   68.740368][    T1] init: processing action (sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1) from (/system/etc/init/hw/init.usb.configfs.rc:20)
[   68.755437][    T1] init: Command 'symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f1' action=sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1 (/system/etc/init/hw/init.usb.configfs.rc:22) took 0ms and failed: symlink() failed: File exists
[   68.781123][    T1] init: Command 'write /config/usb_gadget/g1/UDC ${sys.usb.controller}' action=sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1 (/system/etc/init/hw/init.usb.configfs.rc:23) took 0ms and failed: Unable to write to file '/config/usb_gadget/g1/UDC': Unable to write file contents: Device or resource busy
[   69.776399][  T471] read descriptors
[   69.780034][  T471] read strings
[   69.784365][    T1] init: processing action (sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1) from (/system/etc/init/hw/init.usb.configfs.rc:20)
[   69.799427][    T1] init: Command 'symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f1' action=sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1 (/system/etc/init/hw/init.usb.configfs.rc:22) took 0ms and failed: symlink() failed: File exists
[   69.825103][    T1] init: Command 'write /config/usb_gadget/g1/UDC ${sys.usb.controller}' action=sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1 (/system/etc/init/hw/init.usb.configfs.rc:23) took 0ms and failed: Unable to write to file '/config/usb_gadget/g1/UDC': Unable to write file contents: Device or resource busy
[   70.812404][  T471] read descriptors
[   70.816070][  T471] read strings
[   70.820395][    T1] init: processing action (sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1) from (/system/etc/init/hw/init.usb.configfs.rc:20)
[   70.835445][    T1] init: Command 'symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f1' action=sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1 (/system/etc/init/hw/init.usb.configfs.rc:22) took 0ms and failed: symlink() failed: File exists
[   70.861126][    T1] init: Command 'write /config/usb_gadget/g1/UDC ${sys.usb.controller}' action=sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1 (/system/etc/init/hw/init.usb.configfs.rc:23) took 0ms and failed: Unable to write to file '/config/usb_gadget/g1/UDC': Unable to write file contents: Device or resource busy
[   71.848439][  T471] read descriptors
[   71.852104][  T471] read strings
[   71.856443][    T1] init: processing action (sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1) from (/system/etc/init/hw/init.usb.configfs.rc:20)
[   71.871507][    T1] init: Command 'symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f1' action=sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1 (/system/etc/init/hw/init.usb.configfs.rc:22) took 0ms and failed: symlink() failed: File exists
[   71.897184][    T1] init: Command 'write /config/usb_gadget/g1/UDC ${sys.usb.controller}' action=sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1 (/system/etc/init/hw/init.usb.configfs.rc:23) took 0ms and failed: Unable to write to file '/config/usb_gadget/g1/UDC': Unable to write file contents: Device or resource busy
[   72.892478][  T471] read descriptors
[   72.896121][  T471] read strings
[   72.900452][    T1] init: processing action (sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1) from (/system/etc/init/hw/init.usb.configfs.rc:20)
[   72.915557][    T1] init: Command 'symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f1' action=sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1 (/system/etc/init/hw/init.usb.configfs.rc:22) took 0ms and failed: symlink() failed: File exists
[   72.941232][    T1] init: Command 'write /config/usb_gadget/g1/UDC ${sys.usb.controller}' action=sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1 (/system/etc/init/hw/init.usb.configfs.rc:23) took 0ms and failed: Unable to write to file '/config/usb_gadget/g1/UDC': Unable to write file contents: Device or resource busy
[   73.933057][  T471] read descriptors
[   73.936695][  T471] read strings
[   73.941037][    T1] init: processing action (sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1) from (/system/etc/init/hw/init.usb.configfs.rc:20)
[   73.956114][    T1] init: Command 'symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f1' action=sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1 (/system/etc/init/hw/init.usb.configfs.rc:22) took 0ms and failed: symlink() failed: File exists
[   73.981789][    T1] init: Command 'write /config/usb_gadget/g1/UDC ${sys.usb.controller}' action=sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1 (/system/etc/init/hw/init.usb.configfs.rc:23) took 0ms and failed: Unable to write to file '/config/usb_gadget/g1/UDC': Unable to write file contents: Device or resource busy
[   74.977031][  T471] read descriptors
[   74.980671][  T471] read strings
[   74.984995][    T1] init: processing action (sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1) from (/system/etc/init/hw/init.usb.configfs.rc:20)
[   75.000070][    T1] init: Command 'symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f1' action=sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1 (/system/etc/init/hw/init.usb.configfs.rc:22) took 0ms and failed: symlink() failed: File exists
[   75.025742][    T1] init: Command 'write /config/usb_gadget/g1/UDC ${sys.usb.controller}' action=sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1 (/system/etc/init/hw/init.usb.configfs.rc:23) took 0ms and failed: Unable to write to file '/config/usb_gadget/g1/UDC': Unable to write file contents: Device or resource busy
[   76.017069][  T471] read descriptors
[   76.020707][  T471] read strings
[   76.025080][    T1] init: processing action (sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1) from (/system/etc/init/hw/init.usb.configfs.rc:20)
[   76.040143][    T1] init: Command 'symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f1' action=sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1 (/system/etc/init/hw/init.usb.configfs.rc:22) took 0ms and failed: symlink() failed: File exists
[   76.065824][    T1] init: Command 'write /config/usb_gadget/g1/UDC ${sys.usb.controller}' action=sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1 (/system/etc/init/hw/init.usb.configfs.rc:23) took 0ms and failed: Unable to write to file '/config/usb_gadget/g1/UDC': Unable to write file contents: Device or resource busy
[   77.064660][  T471] read descriptors
[   77.068296][  T471] read strings
[   77.072502][    T1] init: processing action (sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1) from (/system/etc/init/hw/init.usb.configfs.rc:20)
[   77.087582][    T1] init: Command 'symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f1' action=sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1 (/system/etc/init/hw/init.usb.configfs.rc:22) took 0ms and failed: symlink() failed: File exists
[   77.113256][    T1] init: Command 'write /config/usb_gadget/g1/UDC ${sys.usb.controller}' action=sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1 (/system/etc/init/hw/init.usb.configfs.rc:23) took 0ms and failed: Unable to write to file '/config/usb_gadget/g1/UDC': Unable to write file contents: Device or resource busy
[   78.105040][  T471] read descriptors
[   78.108679][  T471] read strings
[   78.113028][    T1] init: processing action (sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1) from (/system/etc/init/hw/init.usb.configfs.rc:20)
[   78.128097][    T1] init: Command 'symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f1' action=sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1 (/system/etc/init/hw/init.usb.configfs.rc:22) took 0ms and failed: symlink() failed: File exists
[   78.153787][    T1] init: Command 'write /config/usb_gadget/g1/UDC ${sys.usb.controller}' action=sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1 (/system/etc/init/hw/init.usb.configfs.rc:23) took 0ms and failed: Unable to write to file '/config/usb_gadget/g1/UDC': Unable to write file contents: Device or resource busy
[   79.148241][  T471] read descriptors
[   79.151883][  T471] read strings
[   79.156256][    T1] init: processing action (sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1) from (/system/etc/init/hw/init.usb.configfs.rc:20)
[   79.171305][    T1] init: Command 'symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f1' action=sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1 (/system/etc/init/hw/init.usb.configfs.rc:22) took 0ms and failed: symlink() failed: File exists
[   79.196975][    T1] init: Command 'write /config/usb_gadget/g1/UDC ${sys.usb.controller}' action=sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1 (/system/etc/init/hw/init.usb.configfs.rc:23) took 0ms and failed: Unable to write to file '/config/usb_gadget/g1/UDC': Unable to write file contents: Device or resource busy
[   80.189028][  T471] read descriptors
[   80.192667][  T471] read strings
[   80.197023][    T1] init: processing action (sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1) from (/system/etc/init/hw/init.usb.configfs.rc:20)
[   80.212087][    T1] init: Command 'symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f1' action=sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1 (/system/etc/init/hw/init.usb.configfs.rc:22) took 0ms and failed: symlink() failed: File exists
[   80.237763][    T1] init: Command 'write /config/usb_gadget/g1/UDC ${sys.usb.controller}' action=sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1 (/system/etc/init/hw/init.usb.configfs.rc:23) took 0ms and failed: Unable to write to file '/config/usb_gadget/g1/UDC': Unable to write file contents: Device or resource busy
[   81.236230][  T471] read descriptors
[   81.239866][  T471] read strings
[   81.244223][    T1] init: processing action (sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1) from (/system/etc/init/hw/init.usb.configfs.rc:20)
[   81.259289][    T1] init: Command 'symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f1' action=sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1 (/system/etc/init/hw/init.usb.configfs.rc:22) took 0ms and failed: symlink() failed: File exists
[   81.284962][    T1] init: Command 'write /config/usb_gadget/g1/UDC ${sys.usb.controller}' action=sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1 (/system/etc/init/hw/init.usb.configfs.rc:23) took 0ms and failed: Unable to write to file '/config/usb_gadget/g1/UDC': Unable to write file contents: Device or resource busy
[   82.277046][  T471] read descriptors
[   82.280687][  T471] read strings
[   82.285042][    T1] init: processing action (sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1) from (/system/etc/init/hw/init.usb.configfs.rc:20)
[   82.300140][    T1] init: Command 'symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f1' action=sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1 (/system/etc/init/hw/init.usb.configfs.rc:22) took 0ms and failed: symlink() failed: File exists
[   82.325811][    T1] init: Command 'write /config/usb_gadget/g1/UDC ${sys.usb.controller}' action=sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1 (/system/etc/init/hw/init.usb.configfs.rc:23) took 0ms and failed: Unable to write to file '/config/usb_gadget/g1/UDC': Unable to write file contents: Device or resource busy
[   83.317051][  T471] read descriptors
[   83.320689][  T471] read strings
[   83.325047][    T1] init: processing action (sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1) from (/system/etc/init/hw/init.usb.configfs.rc:20)
[   83.340111][    T1] init: Command 'symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f1' action=sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1 (/system/etc/init/hw/init.usb.configfs.rc:22) took 0ms and failed: symlink() failed: File exists
[   83.365789][    T1] init: Command 'write /config/usb_gadget/g1/UDC ${sys.usb.controller}' action=sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1 (/system/etc/init/hw/init.usb.configfs.rc:23) took 0ms and failed: Unable to write to file '/config/usb_gadget/g1/UDC': Unable to write file contents: Device or resource busy
[   84.364223][  T471] read descriptors
[   84.367859][  T471] read strings
[   84.372243][    T1] init: processing action (sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1) from (/system/etc/init/hw/init.usb.configfs.rc:20)
[   84.387304][    T1] init: Command 'symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f1' action=sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1 (/system/etc/init/hw/init.usb.configfs.rc:22) took 0ms and failed: symlink() failed: File exists
[   84.412977][    T1] init: Command 'write /config/usb_gadget/g1/UDC ${sys.usb.controller}' action=sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1 (/system/etc/init/hw/init.usb.configfs.rc:23) took 0ms and failed: Unable to write to file '/config/usb_gadget/g1/UDC': Unable to write file contents: Device or resource busy
[   85.405015][  T471] read descriptors
[   85.408650][  T471] read strings
[   85.412969][    T1] init: processing action (sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1) from (/system/etc/init/hw/init.usb.configfs.rc:20)
[   85.428046][    T1] init: Command 'symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f1' action=sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1 (/system/etc/init/hw/init.usb.configfs.rc:22) took 0ms and failed: symlink() failed: File exists
[   85.453721][    T1] init: Command 'write /config/usb_gadget/g1/UDC ${sys.usb.controller}' action=sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1 (/system/etc/init/hw/init.usb.configfs.rc:23) took 0ms and failed: Unable to write to file '/config/usb_gadget/g1/UDC': Unable to write file contents: Device or resource busy
[   86.453033][  T471] read descriptors
[   86.456676][  T471] read strings
[   86.461019][    T1] init: processing action (sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1) from (/system/etc/init/hw/init.usb.configfs.rc:20)
[   86.476096][    T1] init: Command 'symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f1' action=sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1 (/system/etc/init/hw/init.usb.configfs.rc:22) took 0ms and failed: symlink() failed: File exists
[   86.501768][    T1] init: Command 'write /config/usb_gadget/g1/UDC ${sys.usb.controller}' action=sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1 (/system/etc/init/hw/init.usb.configfs.rc:23) took 0ms and failed: Unable to write to file '/config/usb_gadget/g1/UDC': Unable to write file contents: Device or resource busy
[   87.500293][  T471] read descriptors
[   87.503924][  T471] read strings
[   87.508260][    T1] init: processing action (sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1) from (/system/etc/init/hw/init.usb.configfs.rc:20)
[   87.523416][    T1] init: Command 'symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f1' action=sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1 (/system/etc/init/hw/init.usb.configfs.rc:22) took 0ms and failed: symlink() failed: File exists
[   87.549209][    T1] init: Command 'write /config/usb_gadget/g1/UDC ${sys.usb.controller}' action=sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1 (/system/etc/init/hw/init.usb.configfs.rc:23) took 0ms and failed: Unable to write to file '/config/usb_gadget/g1/UDC': Unable to write file contents: Device or resource busy
[   88.549063][  T471] read descriptors
[   88.552701][  T471] read strings
[   88.557033][    T1] init: processing action (sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1) from (/system/etc/init/hw/init.usb.configfs.rc:20)
[   88.572116][    T1] init: Command 'symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f1' action=sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1 (/system/etc/init/hw/init.usb.configfs.rc:22) took 0ms and failed: symlink() failed: File exists
[   88.597794][    T1] init: Command 'write /config/usb_gadget/g1/UDC ${sys.usb.controller}' action=sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1 (/system/etc/init/hw/init.usb.configfs.rc:23) took 0ms and failed: Unable to write to file '/config/usb_gadget/g1/UDC': Unable to write file contents: Device or resource busy
[   89.592210][  T471] read descriptors
[   89.595843][  T471] read strings
[   89.600837][    T1] init: processing action (sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1) from (/system/etc/init/hw/init.usb.configfs.rc:20)
[   89.616887][    T1] init: Command 'symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f1' action=sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1 (/system/etc/init/hw/init.usb.configfs.rc:22) took 0ms and failed: symlink() failed: File exists
[   89.643087][    T1] init: Command 'write /config/usb_gadget/g1/UDC ${sys.usb.controller}' action=sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1 (/system/etc/init/hw/init.usb.configfs.rc:23) took 0ms and failed: Unable to write to file '/config/usb_gadget/g1/UDC': Unable to write file contents: Device or resource busy
[   90.637014][  T471] read descriptors
[   90.640652][  T471] read strings
[   90.644968][    T1] init: processing action (sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1) from (/system/etc/init/hw/init.usb.configfs.rc:20)
[   90.660032][    T1] init: Command 'symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f1' action=sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1 (/system/etc/init/hw/init.usb.configfs.rc:22) took 0ms and failed: symlink() failed: File exists
[   90.685701][    T1] init: Command 'write /config/usb_gadget/g1/UDC ${sys.usb.controller}' action=sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1 (/system/etc/init/hw/init.usb.configfs.rc:23) took 0ms and failed: Unable to write to file '/config/usb_gadget/g1/UDC': Unable to write file contents: Device or resource busy
[   91.681047][  T471] read descriptors
[   91.684684][  T471] read strings
[   91.689009][    T1] init: processing action (sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1) from (/system/etc/init/hw/init.usb.configfs.rc:20)
[   91.704069][    T1] init: Command 'symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f1' action=sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1 (/system/etc/init/hw/init.usb.configfs.rc:22) took 0ms and failed: symlink() failed: File exists
[   91.729750][    T1] init: Command 'write /config/usb_gadget/g1/UDC ${sys.usb.controller}' action=sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1 (/system/etc/init/hw/init.usb.configfs.rc:23) took 0ms and failed: Unable to write to file '/config/usb_gadget/g1/UDC': Unable to write file contents: Device or resource busy
[   92.740240][  T471] read descriptors
[   92.743873][  T471] read strings
[   92.748235][    T1] init: processing action (sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1) from (/system/etc/init/hw/init.usb.configfs.rc:20)
[   92.763293][    T1] init: Command 'symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f1' action=sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1 (/system/etc/init/hw/init.usb.configfs.rc:22) took 0ms and failed: symlink() failed: File exists
[   92.788965][    T1] init: Command 'write /config/usb_gadget/g1/UDC ${sys.usb.controller}' action=sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1 (/system/etc/init/hw/init.usb.configfs.rc:23) took 0ms and failed: Unable to write to file '/config/usb_gadget/g1/UDC': Unable to write file contents: Device or resource busy
[   93.789016][  T471] read descriptors
[   93.792650][  T471] read strings
[   93.796967][    T1] init: processing action (sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1) from (/system/etc/init/hw/init.usb.configfs.rc:20)
[   93.812042][    T1] init: Command 'symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f1' action=sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1 (/system/etc/init/hw/init.usb.configfs.rc:22) took 0ms and failed: symlink() failed: File exists
[   93.837714][    T1] init: Command 'write /config/usb_gadget/g1/UDC ${sys.usb.controller}' action=sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1 (/system/etc/init/hw/init.usb.configfs.rc:23) took 0ms and failed: Unable to write to file '/config/usb_gadget/g1/UDC': Unable to write file contents: Device or resource busy
[   94.829043][  T471] read descriptors
[   94.832680][  T471] read strings
[   94.837007][    T1] init: processing action (sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1) from (/system/etc/init/hw/init.usb.configfs.rc:20)
[   94.852075][    T1] init: Command 'symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f1' action=sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1 (/system/etc/init/hw/init.usb.configfs.rc:22) took 0ms and failed: symlink() failed: File exists
[   94.877742][    T1] init: Command 'write /config/usb_gadget/g1/UDC ${sys.usb.controller}' action=sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1 (/system/etc/init/hw/init.usb.configfs.rc:23) took 0ms and failed: Unable to write to file '/config/usb_gadget/g1/UDC': Unable to write file contents: Device or resource busy
[   95.872209][  T471] read descriptors
[   95.875845][  T471] read strings
[   95.880212][    T1] init: processing action (sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1) from (/system/etc/init/hw/init.usb.configfs.rc:20)
[   95.895282][    T1] init: Command 'symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f1' action=sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1 (/system/etc/init/hw/init.usb.configfs.rc:22) took 0ms and failed: symlink() failed: File exists
[   95.920988][    T1] init: Command 'write /config/usb_gadget/g1/UDC ${sys.usb.controller}' action=sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1 (/system/etc/init/hw/init.usb.configfs.rc:23) took 0ms and failed: Unable to write to file '/config/usb_gadget/g1/UDC': Unable to write file contents: Device or resource busy
[   96.912394][  T471] read descriptors
[   96.916025][  T471] read strings
[   96.920361][    T1] init: processing action (sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1) from (/system/etc/init/hw/init.usb.configfs.rc:20)
[   96.935457][    T1] init: Command 'symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f1' action=sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1 (/system/etc/init/hw/init.usb.configfs.rc:22) took 0ms and failed: symlink() failed: File exists
[   96.961146][    T1] init: Command 'write /config/usb_gadget/g1/UDC ${sys.usb.controller}' action=sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1 (/system/etc/init/hw/init.usb.configfs.rc:23) took 0ms and failed: Unable to write to file '/config/usb_gadget/g1/UDC': Unable to write file contents: Device or resource busy
[   97.960406][  T471] read descriptors
[   97.964040][  T471] read strings
[   97.968384][    T1] init: processing action (sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1) from (/system/etc/init/hw/init.usb.configfs.rc:20)
[   97.983434][    T1] init: Command 'symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f1' action=sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1 (/system/etc/init/hw/init.usb.configfs.rc:22) took 0ms and failed: symlink() failed: File exists
[   98.009119][    T1] init: Command 'write /config/usb_gadget/g1/UDC ${sys.usb.controller}' action=sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1 (/system/etc/init/hw/init.usb.configfs.rc:23) took 0ms and failed: Unable to write to file '/config/usb_gadget/g1/UDC': Unable to write file contents: Device or resource busy
[   99.004237][  T471] read descriptors
[   99.007901][  T471] read strings
[   99.012248][    T1] init: processing action (sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1) from (/system/etc/init/hw/init.usb.configfs.rc:20)
[   99.027306][    T1] init: Command 'symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f1' action=sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1 (/system/etc/init/hw/init.usb.configfs.rc:22) took 0ms and failed: symlink() failed: File exists
[   99.052982][    T1] init: Command 'write /config/usb_gadget/g1/UDC ${sys.usb.controller}' action=sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1 (/system/etc/init/hw/init.usb.configfs.rc:23) took 0ms and failed: Unable to write to file '/config/usb_gadget/g1/UDC': Unable to write file contents: Device or resource busy
[  100.048234][  T471] read descriptors
[  100.051872][  T471] read strings
[  100.056222][    T1] init: processing action (sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1) from (/system/etc/init/hw/init.usb.configfs.rc:20)
[  100.071281][    T1] init: Command 'symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f1' action=sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1 (/system/etc/init/hw/init.usb.configfs.rc:22) took 0ms and failed: symlink() failed: File exists
[  100.096953][    T1] init: Command 'write /config/usb_gadget/g1/UDC ${sys.usb.controller}' action=sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1 (/system/etc/init/hw/init.usb.configfs.rc:23) took 0ms and failed: Unable to write to file '/config/usb_gadget/g1/UDC': Unable to write file contents: Device or resource busy
[  101.092163][  T471] read descriptors
[  101.095797][  T471] read strings
[  101.100140][    T1] init: processing action (sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1) from (/system/etc/init/hw/init.usb.configfs.rc:20)
[  101.115210][    T1] init: Command 'symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f1' action=sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1 (/system/etc/init/hw/init.usb.configfs.rc:22) took 0ms and failed: symlink() failed: File exists
[  101.140884][    T1] init: Command 'write /config/usb_gadget/g1/UDC ${sys.usb.controller}' action=sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1 (/system/etc/init/hw/init.usb.configfs.rc:23) took 0ms and failed: Unable to write to file '/config/usb_gadget/g1/UDC': Unable to write file contents: Device or resource busy
[  102.152398][  T471] read descriptors
[  102.156031][  T471] read strings
[  102.160322][    T1] init: processing action (sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1) from (/system/etc/init/hw/init.usb.configfs.rc:20)
[  102.175389][    T1] init: Command 'symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f1' action=sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1 (/system/etc/init/hw/init.usb.configfs.rc:22) took 0ms and failed: symlink() failed: File exists
[  102.201083][    T1] init: Command 'write /config/usb_gadget/g1/UDC ${sys.usb.controller}' action=sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1 (/system/etc/init/hw/init.usb.configfs.rc:23) took 0ms and failed: Unable to write to file '/config/usb_gadget/g1/UDC': Unable to write file contents: Device or resource busy
[  103.193040][  T471] read descriptors
[  103.196678][  T471] read strings
[  103.201013][    T1] init: processing action (sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1) from (/system/etc/init/hw/init.usb.configfs.rc:20)
[  103.216116][    T1] init: Command 'symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f1' action=sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1 (/system/etc/init/hw/init.usb.configfs.rc:22) took 0ms and failed: symlink() failed: File exists
[  103.241805][    T1] init: Command 'write /config/usb_gadget/g1/UDC ${sys.usb.controller}' action=sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1 (/system/etc/init/hw/init.usb.configfs.rc:23) took 0ms and failed: Unable to write to file '/config/usb_gadget/g1/UDC': Unable to write file contents: Device or resource busy
[  104.233041][  T471] read descriptors
[  104.236704][  T471] read strings
[  104.241045][    T1] init: processing action (sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1) from (/system/etc/init/hw/init.usb.configfs.rc:20)
[  104.256110][    T1] init: Command 'symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f1' action=sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1 (/system/etc/init/hw/init.usb.configfs.rc:22) took 0ms and failed: symlink() failed: File exists
[  104.281784][    T1] init: Command 'write /config/usb_gadget/g1/UDC ${sys.usb.controller}' action=sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1 (/system/etc/init/hw/init.usb.configfs.rc:23) took 0ms and failed: Unable to write to file '/config/usb_gadget/g1/UDC': Unable to write file contents: Device or resource busy
[  105.273037][  T471] read descriptors
[  105.276675][  T471] read strings
[  105.281003][    T1] init: processing action (sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1) from (/system/etc/init/hw/init.usb.configfs.rc:20)
[  105.296069][    T1] init: Command 'symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f1' action=sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1 (/system/etc/init/hw/init.usb.configfs.rc:22) took 0ms and failed: symlink() failed: File exists
[  105.321740][    T1] init: Command 'write /config/usb_gadget/g1/UDC ${sys.usb.controller}' action=sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1 (/system/etc/init/hw/init.usb.configfs.rc:23) took 0ms and failed: Unable to write to file '/config/usb_gadget/g1/UDC': Unable to write file contents: Device or resource busy
[  106.312406][  T471] read descriptors
[  106.316074][  T471] read strings
[  106.320415][    T1] init: processing action (sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1) from (/system/etc/init/hw/init.usb.configfs.rc:20)
[  106.335474][    T1] init: Command 'symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f1' action=sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1 (/system/etc/init/hw/init.usb.configfs.rc:22) took 0ms and failed: symlink() failed: File exists
[  106.348593][   T78] xhci-hcd xhci-hcd.1.auto: remove, state 4
[  106.348811][  T279] usb 1-1: USB disconnect, device number 2
[  106.348825][  T279] usb 1-1.1: USB disconnect, device number 3
[  106.361301][    T1] init: Command 'write /config/usb_gadget/g1/UDC ${sys.usb.controller}' action=sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1 (/system/etc/init/hw/init.usb.configfs.rc:23) took 0ms and failed: Unable to write to file '/config/usb_gadget/g1/UDC': Unable to write file contents: Device or resource busy
[  106.367540][  T409] healthd: battery l=85 v=3600 t=35.0 h=2 st=2 chg=au
[  106.367659][  T272] type=1400 audit(1647186790.439:78): avc: denied { getattr } for comm="health@2.1-serv" path="/sys/devices/platform/soc/ffd72000.i2c/i2c-1/1-004e/power_supply/tcpm-source-psy-1-004e/online" dev="sysfs" ino=30174 scontext=u:r:hal_health_default:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=0
[  106.367781][  T272] type=1400 audit(1647186790.439:79): avc: denied { getattr } for comm="health@2.1-serv" path="/sys/devices/platform/soc/ffd72000.i2c/i2c-1/1-004e/power_supply/tcpm-source-psy-1-004e/type" dev="sysfs" ino=30180 scontext=u:r:hal_health_default:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=0
[  106.367848][  T272] type=1400 audit(1647186790.439:80): avc: denied { getattr } for comm="health@2.1-serv" path="/sys/devices/platform/soc/ffd72000.i2c/i2c-1/1-004e/power_supply/tcpm-source-psy-1-004e/current_max" dev="sysfs" ino=30178 scontext=u:r:hal_health_default:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=0
[  106.367913][  T272] type=1400 audit(1647186790.439:81): avc: denied { getattr } for comm="health@2.1-serv" path="/sys/devices/platform/soc/ffd72000.i2c/i2c-1/1-004e/power_supply/tcpm-source-psy-1-004e/voltage_max" dev="sysfs" ino=30175 scontext=u:r:hal_health_default:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=0
[  106.379985][    T6] hub 2-0:1.0: hub_ext_port_status failed (err = -108)
[  106.408137][  T409] audit_log_lost: 4 callbacks suppressed
[  106.408142][  T409] audit: audit_lost=1 audit_rate_limit=5 audit_backlog_limit=64
[  106.408593][  T272] type=1400 audit(1647186790.483:82): avc: denied { getattr } for comm="health@2.1-serv" path="/sys/devices/platform/soc/ffd72000.i2c/i2c-1/1-004e/power_supply/tcpm-source-psy-1-004e/online" dev="sysfs" ino=30174 scontext=u:r:hal_health_default:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=0
[  106.415008][  T190] ueventd: LoadWithAliases was unable to load input:b0003v275Dp0BA6e0111-e0,1,2,4,k110,111,112,r0,1,8,B,am4,lsfw
[  106.427358][  T279] usb 1-1.5: USB disconnect, device number 4
[  106.442590][  T409] audit: rate limit exceeded
[  106.443174][  T409] healthd: battery l=85 v=3600 t=35.0 h=2 st=2 chg=au
[  106.470997][  T190] ueventd: LoadWithAliases was unable to load hid:b0003g0001v0000275Dp00000BA6
[  106.571735][    T6] usb 2-1: USB disconnect, device number 2
[  106.571784][   T78] usb usb2: USB disconnect, device number 1
[  106.575838][  T190] ueventd: LoadWithAliases was unable to load usb:v275Dp0BA6d0100dc00dsc00dp00ic03isc01ip02in00
[  106.604122][   T78] xhci-hcd xhci-hcd.1.auto: USB bus 2 deregistered
[  106.605189][  T190] ueventd: LoadWithAliases was unable to load usb:v0424p2740d0200dc00dsc00dp00icFFiscFFipFFin00
[  106.613132][   T78] xhci-hcd xhci-hcd.1.auto: remove, state 4
[  106.619283][  T190] ueventd: LoadWithAliases was unable to load usb:v0424p2734d0202dc09dsc00dp02ic09isc00ip02in00
[  106.624552][   T78] usb usb1: USB disconnect, device number 1
[  106.625242][   T78] xhci-hcd xhci-hcd.1.auto: USB bus 1 deregistered
[  106.635459][  T190] ueventd: LoadWithAliases was unable to load usb:v0424p5734d0202dc09dsc00dp03ic09isc00ip00in00
[  106.690419][  T190] ueventd: LoadWithAliases was unable to load usb:v1D6Bp0003d0518dc09dsc00dp03ic09isc00ip00in00
[  106.701183][  T190] ueventd: LoadWithAliases was unable to load usb:v1D6Bp0002d0518dc09dsc00dp01ic09isc00ip00in00
[  106.712050][  T190] ueventd: Loading module /vendor/lib/modules/xhci-hcd.ko with args ''
[  106.740283][  T190] xhci_hcd: exports duplicate symbol __SCK__tp_func_xhci_dbg_quirks (owned by kernel)
[  106.788456][  T190] ueventd: Failed to insmod '/vendor/lib/modules/xhci-hcd.ko' with args '': Exec format error
[  106.798610][  T190] ueventd: LoadWithAliases was unable to load /vendor/lib/modules/xhci-hcd.ko
[  106.807337][  T190] ueventd: LoadWithAliases was unable to load platform:xhci-hcd
[  107.204829][  T279] android_work: sent uevent USB_STATE=CONNECTED
[  107.341831][  T279] android_work: sent uevent USB_STATE=CONFIGURED
[  107.353688][  T409] healthd: battery l=85 v=3600 t=35.0 h=2 st=2 chg=au
[  108.323347][  T272] type=1400 audit(1647186792.395:102): avc: denied { getattr } for comm="health@2.1-serv" path="/sys/devices/platform/soc/ffd72000.i2c/i2c-1/1-004e/power_supply/tcpm-source-psy-1-004e/online" dev="sysfs" ino=30174 scontext=u:r:hal_health_default:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=0
[  108.323408][  T409] healthd: battery l=85 v=3600 t=35.0 h=2 st=2 chg=au
[  108.352110][  T272] type=1400 audit(1647186792.395:103): avc: denied { getattr } for comm="health@2.1-serv" path="/sys/devices/platform/soc/ffd72000.i2c/i2c-1/1-004e/power_supply/tcpm-source-psy-1-004e/type" dev="sysfs" ino=30180 scontext=u:r:hal_health_default:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=0
[  108.358458][  T409] audit: audit_lost=20 audit_rate_limit=5 audit_backlog_limit=64
[  108.386551][  T272] type=1400 audit(1647186792.395:104): avc: denied { getattr } for comm="health@2.1-serv" path="/sys/devices/platform/soc/ffd72000.i2c/i2c-1/1-004e/power_supply/tcpm-source-psy-1-004e/current_max" dev="sysfs" ino=30178 scontext=u:r:hal_health_default:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=0
[  108.393956][  T409] audit: rate limit exceeded
[  108.427272][  T272] type=1400 audit(1647186792.395:105): avc: denied { getattr } for comm="health@2.1-serv" path="/sys/devices/platform/soc/ffd72000.i2c/i2c-1/1-004e/power_supply/tcpm-source-psy-1-004e/voltage_max" dev="sysfs" ino=30175 scontext=u:r:hal_health_default:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=0
[  108.456345][  T272] type=1400 audit(1647186792.435:106): avc: denied { getattr } for comm="health@2.1-serv" path="/sys/devices/platform/soc/ffd72000.i2c/i2c-1/1-004e/power_supply/tcpm-source-psy-1-004e/online" dev="sysfs" ino=30174 scontext=u:r:hal_health_default:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=0
[  108.634913][  T409] healthd: battery l=85 v=3600 t=35.0 h=2 st=2 chg=au
127|console:/ $ 
liuyq commented 2 years ago

https://cs.android.com/android/platform/superproject/+/master:system/core/rootdir/init.usb.configfs.rc

on property:sys.usb.ffs.ready=1 && property:sys.usb.config=adb && property:sys.usb.configfs=1
    write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "adb"
    symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f1
    write /config/usb_gadget/g1/UDC ${sys.usb.controller}
    setprop sys.usb.state ${sys.usb.config}

properties, some property should not be set when the otg cable plugged out?

console:/ # getprop |egrep "sys.usb.ffs.ready|sys.usb.config|sys.usb.configfs"                                      
[persist.sys.usb.config]: [adb]
[sys.usb.config]: [adb]
[sys.usb.configfs]: [1]
[sys.usb.controller]: [ff100000.dwc3]
[sys.usb.ffs.aio_compat]: [1]
[sys.usb.ffs.ready]: [1]
[sys.usb.mtp.device_type]: [3]
[sys.usb.state]: [adb]
console:/ # 
liuyq commented 2 years ago

one workaround is to stop adbd, but need to echo "none" >/config/usb_gadget/g1/UDC to start adbd again without reboot

init.usb.configfs.rc:23) took 0ms and failed: Unable to write to file '/config/usb_gadget/g1/UDC': Unable to write file contents: Device or resource busy
s[ 6111.342202][ T2137] read descriptors
[ 6111.345882][ T2137] read strings
[ 6111.350690][    T1] init: processing action (sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1) from (/system/etc/init/hw/init.usb.configfs.rc:20)
[ 6111.365786][    T1] init: Command 'symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f1' action=sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1 (/system/etc/init/hw/init.usb.configfs.rc:22) took 0ms and failed: symlink() failed: File exists
[ 6111.391454][    T1] init: Command 'write /config/usb_gadget/g1/UDC ${sys.usb.controller}' action=sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1 (/system/etc/init/hw/init.usb.configfs.rc:23) took 0ms and failed: Unable to write to file 
/config/usb_gadget/g1/UDC': Unable to write file contents: Device or resource busy
top ad[ 6112.390208][ T2137] read descriptors
[ 6112.393856][ T2137] read strings
[ 6112.398650][    T1] init: processing action (sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1) from (/system/etc/init/hw/init.usb.configfs.rc:20)
[ 6112.413746][    T1] init: Command 'symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f1' action=sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1 (/system/etc/init/hw/init.usb.configfs.rc:22) took 0ms and failed: symlink() failed: File exists
[ 6112.439415][    T1] init: Command 'write /config/usb_gadget/g1/UDC ${sys.usb.controller}' action=sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1 (/system/etc/init/hw/init.usb.configfs.rc:23) took 0ms and failed: Unable to write to file '/config/usb_gadget/g1/UDC': Unable to write file contents: Device or resource busy
liuyq commented 2 years ago
console:/ # [ 7029.462634][   T78] xhci-hcd xhci-hcd.1.auto: remove, state 4
[ 7029.463503][  T279] usb 1-1: USB disconnect, device number 2
[ 7029.468483][   T78] usb usb2: USB disconnect, device number 1
[ 7029.474274][  T279] usb 1-1.1: USB disconnect, device number 3
[ 7029.479881][   T78] usb 2-1: USB disconnect, device number 2
[ 7029.491965][  T190] ueventd: LoadWithAliases was unable to load usb:v0424p5734d0202dc09dsc00dp03ic09isc00ip00in00
[ 7029.492796][  T409] healthd: battery l=85 v=3600 t=35.0 h=2 st=2 chg=au
[ 7029.493187][  T272] type=1400 audit(1647193713.567:287): avc: denied { getattr } for comm="health@2.1-serv" path="/sys/devices/platform/soc/ffd72000.i2c/i2c-1/1-004e/power_supply/tcpm-source-psy-1-004e/online" dev="sysfs" ino=30174 scontext=u:r:hal_health_default:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=0
[ 7029.493338][  T272] type=1400 audit(1647193713.567:288): avc: denied { getattr } for comm="health@2.1-serv" path="/sys/devices/platform/soc/ffd72000.i2c/i2c-1/1-004e/power_supply/tcpm-source-psy-1-004e/type" dev="sysfs" ino=30180 scontext=u:r:hal_health_default:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=0
[ 7029.493407][  T272] type=1400 audit(1647193713.567:289): avc: denied { getattr } for comm="health@2.1-serv" path="/sys/devices/platform/soc/ffd72000.i2c/i2c-1/1-004e/power_supply/tcpm-source-psy-1-004e/current_max" dev="sysfs" ino=30178 scontext=u:r:hal_health_default:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=0
[ 7029.493471][  T272] type=1400 audit(1647193713.567:290): avc: denied { getattr } for comm="health@2.1-serv" path="/sys/devices/platform/soc/ffd72000.i2c/i2c-1/1-004e/power_supply/tcpm-source-psy-1-004e/voltage_max" dev="sysfs" ino=30175 scontext=u:r:hal_health_default:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=0
[ 7029.493493][   T78] xhci-hcd xhci-hcd.1.auto: USB bus 2 deregistered
[ 7029.493511][   T78] xhci-hcd xhci-hcd.1.auto: remove, state 1
[ 7029.493520][   T78] usb usb1: USB disconnect, device number 1
[ 7029.505089][  T190] ueventd: LoadWithAliases was unable to load usb:v1D6Bp0003d0518dc09dsc00dp03ic09isc00ip00in00
[ 7029.509050][  T409] audit: audit_lost=116 audit_rate_limit=5 audit_backlog_limit=64
[ 7029.509535][  T272] type=1400 audit(1647193713.583:291): avc: denied { getattr } for comm="health@2.1-serv" path="/sys/devices/platform/soc/ffd72000.i2c/i2c-1/1-004e/power_supply/tcpm-source-psy-1-004e/online" dev="sysfs" ino=30174 scontext=u:r:hal_health_default:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=0
[ 7029.509686][  T272] type=1400 audit(1647193713.583:292): avc: denied { getattr } for comm="health@2.1-serv" path="/sys/devices/platform/soc/ffd72000.i2c/i2c-1/1-004e/power_supply/tcpm-source-psy-1-004e/type" dev="sysfs" ino=30180 scontext=u:r:hal_health_default:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=0
[ 7029.714596][  T409] audit: rate limit exceeded
[ 7029.720719][  T190] ueventd: LoadWithAliases was unable to load input:b0003v275Dp0BA6e0111-e0,1,2,4,k110,111,112,r0,1,8,B,am4,lsfw
[ 7029.732900][  T190] ueventd: LoadWithAliases was unable to load hid:b0003g0001v0000275Dp00000BA6
[ 7029.732965][  T279] usb 1-1.5: USB disconnect, device number 4
[ 7029.741752][  T190] ueventd: LoadWithAliases was unable to load usb:v275Dp0BA6d0100dc00dsc00dp00ic03isc01ip02in00
[ 7029.758344][  T190] ueventd: LoadWithAliases was unable to load usb:v0424p2740d0200dc00dsc00dp00icFFiscFFipFFin00
[ 7029.765906][   T78] xhci-hcd xhci-hcd.1.auto: USB bus 1 deregistered
[ 7029.769070][  T190] ueventd: LoadWithAliases was unable to load usb:v0424p2734d0202dc09dsc00dp02ic09isc00ip02in00
[ 7029.785972][  T190] ueventd: LoadWithAliases was unable to load usb:v1D6Bp0002d0518dc09dsc00dp01ic09isc00ip00in00
[ 7029.796841][  T190] ueventd: Loading module /vendor/lib/modules/xhci-hcd.ko with args ''
[ 7029.836078][  T190] xhci_hcd: exports duplicate symbol __SCK__tp_func_xhci_dbg_quirks (owned by kernel)
[ 7029.883380][   T78] udc ff100000.dwc3: failed to start g1: -19
[ 7029.889377][   T78] dwc3 ff100000.dwc3: failed to add gadget
[ 7029.896168][   T78] dwc3 ff100000.dwc3: failed to initialize peripheral
[ 7029.896605][  T190] ueventd: Failed to insmod '/vendor/lib/modules/xhci-hcd.ko' with args '': Exec format error
[ 7029.912918][  T190] ueventd: LoadWithAliases was unable to load /vendor/lib/modules/xhci-hcd.ko
[ 7029.921635][  T190] ueventd: LoadWithAliases was unable to load platform:xhci-hcd
[ 7030.459339][  T409] healthd: battery l=85 v=3600 t=35.0 h=2 st=2 chg=au
[ 7031.464262][  T409] healthd: battery l=85 v=3600 t=35.0 h=2 st=2 chg=au
[ 7031.465265][  T272] type=1400 audit(1647193715.539:303): avc: denied { getattr } for comm="health@2.1-serv" path="/sys/devices/platform/soc/ffd72000.i2c/i2c-1/1-004e/power_supply/tcpm-source-psy-1-004e/online" dev="sysfs" ino=30174 scontext=u:r:hal_health_default:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=0
[ 7031.471038][  T409] audit: audit_lost=126 audit_rate_limit=5 audit_backlog_limit=64
[ 7031.499355][  T272] type=1400 audit(1647193715.539:304): avc: denied { getattr } for comm="health@2.1-serv" path="/sys/devices/platform/soc/ffd72000.i2c/i2c-1/1-004e/power_supply/tcpm-source-psy-1-004e/type" dev="sysfs" ino=30180 scontext=u:r:hal_health_default:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=0
[ 7031.506851][  T409] audit: rate limit exceeded
[ 7031.539571][  T272] type=1400 audit(1647193715.539:305): avc: denied { getattr } for comm="health@2.1-serv" path="/sys/devices/platform/soc/ffd72000.i2c/i2c-1/1-004e/power_supply/tcpm-source-psy-1-004e/current_max" dev="sysfs" ino=30178 scontext=u:r:hal_health_default:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=0
[ 7031.568460][  T272] type=1400 audit(1647193715.539:306): avc: denied { getattr } for comm="health@2.1-serv" path="/sys/devices/platform/soc/ffd72000.i2c/i2c-1/1-004e/power_supply/tcpm-source-psy-1-004e/voltage_max" dev="sysfs" ino=30175 scontext=u:r:hal_health_default:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=0
[ 7031.597242][  T272] type=1400 audit(1647193715.543:307): avc: denied { getattr } for comm="health@2.1-serv" path="/sys/devices/platform/soc/ffd72000.i2c/i2c-1/1-004e/power_supply/tcpm-source-psy-1-004e/online" dev="sysfs" ino=30174 scontext=u:r:hal_health_default:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=0

console:/ # 
liuyq commented 2 years ago

4.14-stable does not have such problem, serial log output when the type-c is unplugged:

console:/ $ 
console:/ $ [  186.390162] [I/hisi_pd] TPC-I:[CC_Alert] 0/0
[  186.395532] [I/hisi_pd] [TCPC-I]ps_change=1
[  186.399876] [I/hisi_pd] TPC-I:** UnattachWait.PE
[  186.404642] [I/hisi_pd] TPC-I:Attached-> NULL
[  186.409116] [E/hisi_pd] pd_dpm_handle_pe_event:!!!,event=7,+++
[  186.414979] [I/hisi_pd] pd_dpm_set_typec_state = 1
[  186.419813] [I/hisi_pd] [TCPC-I]usb_port_detached
[  186.424645] [I/hisi_pd] TPC-I:[CC_Change] 0/0
[  186.429108] [E/hisi_pd] typec_wait_ps_change: typec_wait_ps_change!!!+++++++++++
[  186.436546] [E/hisi_pd] typec_wait_ps_change: typec_wait_ps_change!!!-----------
[  186.443955] [E/hisi_pd] typec_wait_ps_change: typec_wait_ps_change!!!+++++++++++
[  186.451369] [E/hisi_pd] typec_wait_ps_change: typec_wait_ps_change!!!-----------
[  186.458781] [E/hisi_pd] typec_unattached_power_entry:!!!+++++++++++
[  186.465090] [E/hisi_pd] pd_dpm_handle_pe_event:!!!,event=8,+++
[  186.465103] [I/hisi_pd] pd_dpm_report_device_detach 
[  186.465333] [E/hisi_pd] tcpci_disable_vbus_control: !!!++++++++
[  186.465335] [E/hisi_pd] pd_dpm_handle_pe_event:!!!,event=0,+++
[  186.465338] [E/hisi_pd] typec_unattached_power_entry:!!!-----------
[  186.465349] [E/GPIO_HUB] gpio_hub_switch_to_hub: switch to hub
[  186.465353] [I/GPIO_HUB] gpio_hub_change_typec_power: typec power no change
[  186.465363] [USB3][hisi_usb_otg_event]hisi_usb_otg_event in:1
[  186.465366] [USB3][hisi_usb_otg_event]hisi_usb_otg_event in otg:1
[  186.465369] [USB3][hisi_usb_otg_event]event: 1
[  186.465379] [USB3][hisi_usb_otg_event]hisi_usb_otg_event in:2
[  186.465381] [USB3][hisi_usb_otg_event]hisi_usb_otg_event in otg:2
[  186.465383] [USB3][hisi_usb_otg_event]event: 2
[  186.465386] [USB3][hisi_usb_otg_event]schedule event_work wait:2]
[  186.465390] [USB3][event_work]+
[  186.465392] [I/hisi_pd] TPC-I:** Unattached.SNK
[  186.465394] [USB3][handle_event][handle_event] type: 1
[  186.465398] [dwc3_otg_work]+
[  186.465398]  evt = 4
[  186.465401] [dwc3_otg_stop_peripheral]+
[  186.465818] [dwc3_otg_stop_peripheral]-
[  186.465820] [dwc3_suspend_device] +
[  186.466028] [dwc3_suspend_device] -
[  186.466030] [dwc3_otg_work]-
[  186.466032] [I/hisi_pd] pd_dpm_report_bc12 : PD_WAKE_UNLOCK
[  186.466036] [I/hisi_pd] pd_dpm_report_bc12 : event (4)
[  186.466037] [E/hisi_pd] pd_dpm_vbus_notifier_call: pd_dpm_vbus_notifier_call!!!,++++
[  186.466040] [USB3][hisi_dwc3_wake_unlock]usb otg wake unlock
[  186.466042] [USB3][handle_event]hisi usb status: DEVICE -> OFF
[  186.466044] [USB3][handle_event][handle_event] type: 2
[  186.466046] [USB3][set_vbus_power]set port power 1
[  186.466047] [dwc3_otg_work]+
[  186.466047]  evt = 2
[  186.466049] [dwc3_resume_device] +
[  186.468821] android_work: sent uevent USB_STATE=DISCONNECTED
[  186.471659] [dwc3_resume_device] -
[  186.476046] [E/hisi_pd] pd_dpm_vbus_notifier_call: pd_dpm_vbus_notifier_call!!!,++++
[  186.481989] [dwc3_otg_start_host]+
[  186.580584] android_work: did not send uevent (0 0           (null))
[  186.583257] ueventd: LoadWithAliases was unable to load platform:xhci-hcd
[  186.606346] xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
[  186.668534] xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 1
[  186.679205] read descriptors
[  186.679217] android_work: did not send uevent (0 0           (null))
[  186.680121] xhci-hcd xhci-hcd.0.auto: hcc params 0x0220fe65 hci version 0x110 quirks 0x0000000000010010
[  186.680145] xhci-hcd xhci-hcd.0.auto: irq 102, io mem 0xff100000
[  186.680290] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[  186.680294] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[  186.680297] usb usb1: Product: xHCI Host Controller
[  186.680300] usb usb1: Manufacturer: Linux 4.14.282-00288-g0b60c8b1c4cc xhci-hcd
[  186.680303] usb usb1: SerialNumber: xhci-hcd.0.auto
[  186.682103] read strings
[  186.682677] hub 1-0:1.0: USB hub found
[  186.682947] init: processing action (sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1) from (/system/etc/init/hw/init.usb.configfs.rc:20)
[  186.683703] init: Command 'symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f1' action=sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1 (/system/etc/init/hw/init.usb.configfs.rc:22) took 0ms and failed: symlink() failed: File exists
[  186.685592] dwc3 ff100000.dwc3: failed to enable ep0out
[  186.786200] ueventd: LoadWithAliases was unable to load usb:v1D6Bp0002d0414dc09dsc00dp01ic09isc00ip00in00
[  186.790390] hub 1-0:1.0: 1 port detected
[  186.800754] xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
[  186.801241] ueventd: LoadWithAliases was unable to load usb:v1D6Bp0002d0414dc09dsc00dp01ic09isc00ip00in00
[  186.806260] xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 2
[  186.823547] xhci-hcd xhci-hcd.0.auto: Host supports USB 3.0  SuperSpeed
[  186.830303] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
[  186.838517] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003
[  186.845346] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[  186.852584] usb usb2: Product: xHCI Host Controller
[  186.857470] usb usb2: Manufacturer: Linux 4.14.282-00288-g0b60c8b1c4cc xhci-hcd
[  186.864801] usb usb2: SerialNumber: xhci-hcd.0.auto
[  186.869939] hub 2-0:1.0: USB hub found
[  186.871135] ueventd: LoadWithAliases was unable to load usb:v1D6Bp0003d0414dc09dsc00dp03ic09isc00ip00in00
[  186.873703] hub 2-0:1.0: 1 port detected
[  186.887714] [dwc3_otg_start_host]-
[  186.888614] ueventd: LoadWithAliases was unable to load usb:v1D6Bp0003d0414dc09dsc00dp03ic09isc00ip00in00
[  186.891184] [dwc3_otg_work]-
[  186.901571] ueventd: LoadWithAliases was unable to load platform:xhci-hcd
[  186.903617] [USB3][hisi_dwc3_wake_lock]usb otg wake lock
[  186.915718] [USB3][handle_event]hisi usb_status: OFF -> HOST
[  186.921379] [USB3][event_work]-
[  187.055722] usb 1-1: new high-speed USB device number 2 using xhci-hcd
[  187.233264] usb 1-1: New USB device found, idVendor=0424, idProduct=2734
[  187.240218] alloc_contig_range: [20c8c, 20c8d) PFNs busy
[  187.245691] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[  187.252841] usb 1-1: Product: USB2734
[  187.256521] usb 1-1: Manufacturer: Microchip Tech
[  187.264801] alloc_contig_range: [20c8c, 20c8d) PFNs busy
[  187.270382] alloc_contig_range: [20ca0, 20ca1) PFNs busy
[  187.275887] alloc_contig_range: [20c8c, 20c8d) PFNs busy
[  187.281263] alloc_contig_range: [20ca0, 20ca1) PFNs busy
[  187.312654] ueventd: LoadWithAliases was unable to load usb:v0424p2734d0202dc09dsc00dp02ic09isc00ip01in00
[  187.322380] hub 1-1:1.0: USB hub found
[  187.326495] hub 1-1:1.0: 5 ports detected
[  187.330673] alloc_contig_range: [20c8c, 20c8d) PFNs busy
[  187.336101] alloc_contig_range: [20ca0, 20ca1) PFNs busy
[  187.341924] alloc_contig_range: [20c8c, 20c8d) PFNs busy
[  187.347297] alloc_contig_range: [20ca0, 20ca1) PFNs busy
[  187.386260] ueventd: LoadWithAliases was unable to load usb:v0424p2734d0202dc09dsc00dp02ic09isc00ip02in00
[  187.401915] usb 2-1: new SuperSpeed USB device number 2 using xhci-hcd
[  187.428724] usb 2-1: New USB device found, idVendor=0424, idProduct=5734
[  187.435453] usb 2-1: New USB device strings: Mfr=2, Product=3, SerialNumber=0
[  187.442616] usb 2-1: Product: USB5734
[  187.446293] usb 2-1: Manufacturer: Microchip Tech
[  187.455863] ueventd: LoadWithAliases was unable to load usb:v0424p5734d0202dc09dsc00dp03ic09isc00ip00in00
[  187.465689] hub 2-1:1.0: USB hub found
[  187.469767] hub 2-1:1.0: 5 ports detected
[  187.475665] ueventd: LoadWithAliases was unable to load usb:v0424p5734d0202dc09dsc00dp03ic09isc00ip00in00
[  187.597943] alloc_contig_range: [20ca0, 20ca1) PFNs busy
[  187.681574] usb 1-1.1: new low-speed USB device number 3 using xhci-hcd
[  187.800050] usb 1-1.1: New USB device found, idVendor=093a, idProduct=2510
[  187.806992] usb 1-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[  187.814345] usb 1-1.1: Product: USB Optical Mouse
[  187.819058] usb 1-1.1: Manufacturer: PixArt
[  187.861356] input: PixArt USB Optical Mouse as /devices/platform/soc/ff200000.hisi_usb/ff100000.dwc3/xhci-hcd.0.auto/usb1/1-1/1-1.1/1-1.1:1.0/0003:093A:2510.0001/input/input1
[  187.883003] hid-generic 0003:093A:2510.0001: input,hidraw0: USB HID v1.11 Mouse [PixArt USB Optical Mouse] on usb-xhci-hcd.0.auto-1.1/input0
[  187.977684] usb 1-1.5: new high-speed USB device number 4 using xhci-hcd
[  188.083785] usb 1-1.5: New USB device found, idVendor=0424, idProduct=2740
[  188.090930] usb 1-1.5: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[  188.098584] usb 1-1.5: Product: Hub Controller
[  188.103053] usb 1-1.5: Manufacturer: Microchip Tech

before disconnect

console:/ # getprop |grep usb

console:/ #

after disconnected

console:/ # getprop |grep usb

console:/ #