hey everyone,
sory to be late , right now I am working on 3 project in the same time dongle 4g , websocket and Lendspiker.
sorry @Loic I found that doitright’ solution is much easier so I spended all my time to make it work .
@doitright : sorry to bother you but i need some information that i didn’t find it on google .
in fact, there is two file init.rc :
_1/ …/…/bootable/recovery/etc/init.rc _
2/ …/…/system/core/rootdir
ther is also :
…/…/device/linaro/hikey/init.common.rc
…/…/device/linaro/hikey/init.common.usb.rc
I add for all those file :
on device-added-/dev/usb_accessory
usb_modeswitch -J -v 0x12d1 -p 0x1f01
but it didn’t work i even changed usb_accessory many times but nothing change :
those are all the information that i had when i connect my dongle
[ 1484.193980] logd: logdr: UID=2000 GID=2000 PID=8657 b tail=0 logMask=19 pid=0 start=0ns timeout=0ns
[ 1485.742106] usb 1-1.2: USB disconnect, device number 11
[ 1500.304727] usb 1-1.2: new high-speed USB device number 12 using xhci-hcd
[ 1500.414427] usb 1-1.2: New USB device found, idVendor=12d1, idProduct=1f01
[ 1500.422739] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 1500.431729] usb 1-1.2: Product: HUAWEI_MOBILE
[ 1500.436635] usb 1-1.2: Manufacturer: HUAWEI_MOBILE
[ 1500.442153] usb 1-1.2: SerialNumber: 0123456789ABCDEF
[ 1500.482915] usb-storage 1-1.2:1.0: USB Mass Storage device detected
[ 1500.494555] scsi host1: usb-storage 1-1.2:1.0
[ 1501.530641] scsi 1:0:0:0: CD-ROM HUAWEI Mass Storage 2.31 PQ: 0 ANSI: 2
[ 1501.549945] scsi 1:0:0:1: Direct-Access HUAWEI TF CARD Storage 2.31 PQ: 0 ANSI: 2
[ 1501.580109] sd 1:0:0:1: [sde] Attached SCSI removable disk
and this is the result of “ls /dev” :
gpiochip26 ptyp6 tty3 ttyAMA3
ashmem gpiochip27 ptyp7 tty30 ttyFIQ0
autofs gpiochip28 ptyp8 tty31 ttyS0
binder gpiochip3 ptyp9 tty32 ttyS1
block gpiochip4 ptypa tty33 ttyS2
bus gpiochip5 ptypb tty34 ttyS3
cg2_bpf gpiochip6 ptypc tty35 ttyp0
console gpiochip7 ptypd tty36 ttyp1
cpu_dma_latency gpiochip8 ptype tty37 ttyp2
cpuctl gpiochip9 ptypf tty38 ttyp3
cpuset graphics random tty39 ttyp4
cuse hidraw0 rfkill tty4 ttyp5
device-mapper hidraw1 rtc0 tty40 ttyp6
dri hidraw2 rtc1 tty41 ttyp7
ec033000.etr hifi_misc snd tty42 ttyp8
ec036000.etf hwbinder socket tty43 ttyp9
ec802000.etf i2c-0 stune tty44 ttypa
ed002000.etf i2c-1 tty tty45 ttypb
fd i2c-2 tty0 tty46 ttypc
fscklogs input tty1 tty47 ttypd
full ion tty10 tty48 ttype
fuse kmsg tty11 tty49 ttypf
gpiochip0 kmsg_debug tty12 tty5 tun
gpiochip1 loop-control tty13 tty50 uhid
gpiochip10 mali0 tty14 tty51 uinput
gpiochip11 memcg tty15 tty52 urandom
gpiochip12 memory_bandwidth tty16 tty53 usb-ffs
gpiochip13 network_latency tty17 tty54 usb_accessory
gpiochip14 network_throughput tty18 tty55 vcs
gpiochip15 null tty19 tty56 vcs1
gpiochip16 port tty2 tty57 vcsa
gpiochip17 ppp tty20 tty58 vcsa1
gpiochip18 psaux tty21 tty59 vga_arbiter
gpiochip19 ptmx tty22 tty6 vndbinder
gpiochip2 pts tty23 tty60 watchdog
gpiochip20 ptyp0 tty24 tty61 watchdog0
gpiochip21 ptyp1 tty25 tty62 watchdog1
gpiochip22 ptyp2 tty26 tty63 xt_qtaguid
gpiochip23 ptyp3 tty27 tty7 zero
gpiochip24 ptyp4 tty28 tty8
gpiochip25 ptyp5 tty29 tty9
when i remove it :
[ 1593.518561] usb 1-1.2: USB disconnect, device number 12
soo help please