[BLISS ROMS Development] youling257:
you want to use USB gadget, your device running Androidx86 as a USB device, connect other one Windows/Linux PC USB host.

on boot

# USB gadget configuration

setprop sys.usb.configfs 1

mkdir /config/usb_gadget/g1

mkdir /config/usb_gadget/g1/strings/0x409

mkdir /config/usb_gadget/g1/configs/b.1

mkdir /config/usb_gadget/g1/configs/b.1/strings/0x409

mkdir /config/usb_gadget/g1/functions/ffs.adb

mkdir /config/usb_gadget/g1/functions/ffs.mtp

mkdir /config/usb_gadget/g1/functions/ffs.ptp

mkdir /config/usb_gadget/g1/functions/accessory.gs2

mkdir /config/usb_gadget/g1/functions/audio_source.gs3

mkdir /config/usb_gadget/g1/functions/rndis.gs4

mkdir /config/usb_gadget/g1/functions/midi.gs5

setprop sys.usb.controller dwc3.3.auto

mkdir /dev/usb-ffs 0775 shell shell

mkdir /dev/usb-ffs/adb 0770 shell shell

mkdir /dev/usb-ffs/mtp 0770 mtp mtp

mkdir /dev/usb-ffs/ptp 0770 mtp mtp

mount functionfs adb /dev/usb-ffs/adb uid=2000,gid=2000

mount functionfs mtp /dev/usb-ffs/mtp rmode=0770,fmode=0660,uid=1024,gid=1024,no_disconnect=1

mount functionfs ptp /dev/usb-ffs/ptp rmode=0770,fmode=0660,uid=1024,gid=1024,no_disconnect=1

[ 78.638978] init: processing action (sys.usb.config=mtp && sys.usb.configfs=1 && sys.usb.ffs.mtp.ready=1) from (/init.usb.configfs.rc:27)
[ 78.639232] ffs_alloc()
[ 78.639301] udc dwc3.3.auto: registering UDC driver [g1]
[ 78.639333] configfs-gadget gadget: adding 'Function FS Gadget'/00000000bdae7355 to config 'b'/000000002d575e4d

[ 78.637010] Buffer from user space:
[ 78.637015] : 03 00 00 00 ab 00 00 00 0f 00 00 00 04 00 00 00 ................
[ 78.637017] : 04 00 00 00 07 00 00 00 01 00 00 00 09 04 00 00 ................
[ 78.637019] : 03 06 01 01 01 07 05 81 02 40 00 00 07 05 02 02 .........@......
[ 78.637020] : 40 00 00 07 05 83 03 40 00 06 09 04 00 00 03 06 @......@........
[ 78.637022] : 01 01 01 07 05 81 02 00 02 00 07 05 02 02 00 02 ................
[ 78.637024] : 00 07 05 83 03 00 02 06 09 04 00 00 03 06 01 01 ................
[ 78.637026] : 01 07 05 81 02 00 04 00 06 30 06 00 00 00 07 05 .........0......
[ 78.637028] : 02 02 00 04 00 06 30 06 00 00 00 07 05 83 03 00 ......0.........
[ 78.637030] : 04 06 06 30 00 00 00 00 01 23 00 00 00 01 00 04 ...0.....#......
[ 78.637032] : 00 01 00 00 01 4d 54 50 00 00 00 00 00 00 00 00 .....MTP........
[ 78.637034] : 00 00 00 00 00 00 00 00 00 00 00 ...........

[ 90.163931] init: processing action (sys.usb.config=adb && sys.usb.configfs=1) from (/init.usb.configfs.rc:18)
[ 90.164114] init: starting service 'adbd'...
[ 90.165151] kauditd_printk_skb: 72 callbacks suppressed
[ 90.165156] audit: type=1400 audit(1544208860.591:1077): avc: denied { dac_read_search } for pid=1 comm="init" capability=2 scontext=u:r:init:s0 tcontext=u:r:init:s0 tclass=capability permissive=1
[ 90.165322] audit: type=1400 audit(1544208860.591:1078): avc: denied { create } for pid=1 comm="init" name="cgroup.procs" scontext=u:r:init:s0 tcontext=u:object_r:cgroup:s0 tclass=file permissive=1
[ 90.166204] init: Created socket '/dev/socket/adbd', mode 660, user 1000, group 1000
[ 90.237366] ffs_ep0_open()
[ 90.237370] ffs_data_opened()
[ 90.237383] ffs_ep0_write()
[ 90.237386] Buffer from user space:
[ 90.237391] : 03 00 00 00 90 00 00 00 0f 00 00 00 03 00 00 00 ................
[ 90.237393] : 03 00 00 00 05 00 00 00 01 00 00 00 09 04 00 00 ................
[ 90.237395] : 02 ff 42 01 01 07 05 01 02 40 00 00 07 05 82 02 ..B......@......
[ 90.237397] : 40 00 00 09 04 00 00 02 ff 42 01 01 07 05 01 02 @........B......
[ 90.237399] : 00 02 00 07 05 82 02 00 02 00 09 04 00 00 02 ff ................
[ 90.237400] : 42 01 01 07 05 01 02 00 04 00 06 30 04 00 00 00 B..........0....
[ 90.237402] : 07 05 82 02 00 04 00 06 30 04 00 00 00 01 23 00 ........0.....#.
[ 90.237404] : 00 00 01 00 04 00 01 00 00 01 00 00 00 00 00 00 ................
[ 90.237406] : 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

[ 90.237528] Buffer from user space:
[ 90.237530] : 02 00 00 00 20 00 00 00 01 00 00 00 01 00 00 00 .... ...........
[ 90.237532] : 09 04 41 44 42 20 49 6e 74 65 72 66 61 63 65 00 ..ADB Interface.

[ 328.071082] init: processing action (sys.usb.config=rndis && sys.usb.configfs=1) from (/init.usb.configfs.rc:127)
[ 328.071461] using random self ethernet address
[ 328.071482] using random host ethernet address
[ 328.071930] rndis_register: configNr = 0
[ 328.072115] udc dwc3.3.auto: registering UDC driver [g1]
[ 328.072150] configfs-gadget gadget: adding 'rndis'/000000004f2ba22a to config 'b'/000000002d575e4d

[ 330.818507] init: processing action (sys.usb.config=audio_source && sys.usb.configfs=1) from (/init.usb.configfs.rc:77)
[ 330.818800] udc dwc3.3.auto: registering UDC driver [g1]
[ 330.818832] configfs-gadget gadget: adding 'audio_source'/0000000035e7cb24 to config 'b'/000000002d575e4d

[ 332.817036] init: processing action (sys.usb.config=midi && sys.usb.configfs=1) from (/init.usb.configfs.rc:111)
[ 332.817535] udc dwc3.3.auto: registering UDC driver [g1]
[ 332.817581] configfs-gadget gadget: adding 'gmidi function'/00000000df7c580a to config 'b'/000000002d575e4d
[ 332.819014] configfs-gadget gadget: f_midi_register_card() finished ok