Huawei Technologies Co., Ltd. E353/E3131 contains software intended to be automatically started. Wifi doesn't work

Solution 1:

You're solving the wrong problem here. Why run the script when you can just have the system auto-detect your modem and Just Work™.

If you run a modeswitch command on the modem, it will activate itself as a modem instead of mass storage, and you system will automatically detect it as such.

Reading your lsusb output, we have this:

Bus 002 Device 003: ID 12d1:1f01 Huawei Technologies Co., Ltd. E353/E3131 (Mass storage mode)

So, let's make the mode auto-set to modem mode. In a terminal, run the following command:

sudo nano /lib/udev/rules.d/40-usb_modeswitch.rules

At the very bottom of the opened file, paste in this exact string:

# Huawei E353/E3131
ATTR{idVendor}=="12d1", ATTR{idProduct}=="1f01", RUN +="usb_modeswitch '%b/%k'" 

Unplug your modem and reboot the system. Upon restart, plug in the modem. The system should automatically detect it as a modem and connect you to the internet. You won't need to auto-run anything, and you won't have the partition mounted on your computer.

(source)

Solution 2:

Your sudo fdisk -l output with the adapter unplugged contains the following at line 112:

Disk /dev/sdb: 3,7 GiB, 4003463168 bytes, 7819264 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xc3072e18

Device     Boot Start     End Sectors  Size Id Type
/dev/sdb1  *     8064 7819263 7811200  3,7G  c W95 FAT32 (LBA)

The output with your adapter unplugged ends at line 107.


Edit 1 - New Information from OP

Here is a screenshot of USB files:

USB Startup

In order to disable auto-run of the USB (generating the error message) go to System Settings, Details, Removable Media and check the last box to never auto-run inserted media:

Removable Media

This should make the error message go away when the USB is inserted.