Sample Header Ad - 728x90

LineageOS 18 -> USB storage is not being attached

3 votes
0 answers
1619 views
I am using Raspberry Pi with installed LineageOS 18 and basically all works well. The only issue I do have is that when I put an USB stick (storage) it is not visible in the GUI. I tried several USB dongles and SD-Card reader. No luck. I can see it's being recognised correctly: 01-01 18:10:24.804 0 0 I usb 1-1.2.3: new high-speed USB device number 11 using dwc2 01-01 18:10:25.010 0 0 I usb 1-1.2.3: New USB device found, idVendor=0781, idProduct=5583, bcdDevice= 1.00 01-01 18:10:25.019 0 0 I usb 1-1.2.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3 01-01 18:10:25.027 0 0 I usb 1-1.2.3: Product: SanDisk 3.2Gen1 01-01 18:10:25.032 0 0 I usb 1-1.2.3: Manufacturer: USB 01-01 18:10:25.036 0 0 I usb 1-1.2.3: SerialNumber: 0101a3136a5ad2527acb7f7f1499daffd9e96a0672c0c4bf5b3297da4b20ff1acb9900000000000000000000943a3a96ff8b520083558107b9aa4123 01-07 09:16:29.008 247 247 I drm-event-liste: type=1400 audit(0.0:857): avc: denied { read } for path="socket:" dev="sockfs" ino=14421 scontext=u:r:hal_graphics_composer_default:s0 tcontext=u:r:hal_graphics_composer_default:s0 tclass=netlink_kobject_uevent_socket permissive=1 01-01 18:10:25.054 0 0 I usb-storage 1-1.2.3: 1.0: USB Mass Storage device detected 01-01 18:10:25.086 0 0 I scsi host0: usb-storage 1-1.2.3:1.0 01-07 09:16:29.050 401 556 D UsbHostManager: USB device attached: vidpid 0781:5583 mfg/product/ver/serial USB/ SanDisk 3.2Gen1/1.00/0101a3136a5ad2527acb7f7f1499daffd9e96a0672c0c4bf5b3297da4b20ff1acb9900000000000000000000943a3a96ff8b520083558107b9aa4123 hasAudio/HID/Storage: false/false/true 01-07 09:16:29.052 401 556 D UsbDeviceDescriptor: 1 configs 01-07 09:16:29.052 401 556 D UsbHostManager: Added device UsbDevice[mName=/dev/bus/usb/001/011,mVendorId=1921,mProductId=21891,mClass=0,mSubclass=0,mProtocol=0,mManufacturerName= USB,mProductName= SanDisk 3.2Gen1,mVersion=1.00,mSerialNumberReader=com.android.server.usb.UsbSerialReader@1fdb59c, mHasAudioPlayback=false, mHasAudioCapture=false, mHasMidi=false, mHasVideoCapture=false, mHasVideoPlayback=false, mConfigurations=[ 01-07 09:16:29.052 401 556 D UsbHostManager: UsbConfiguration[mId=1,mName=null,mAttributes=128,mMaxPower=112,mInterfaces=[ 01-07 09:16:29.052 401 556 D UsbHostManager: UsbInterface[mId=0,mAlternateSetting=0,mName=null,mClass=8,mSubclass=6,mProtocol=80,mEndpoints=[ 01-07 09:16:29.052 401 556 D UsbHostManager: UsbEndpoint[mAddress=129,mAttributes=2,mMaxPacketSize=512,mInterval=0] 01-07 09:16:29.052 401 556 D UsbHostManager: UsbEndpoint[mAddress=2,mAttributes=2,mMaxPacketSize=512,mInterval=0]]]] 01-07 09:16:29.086 6446 6446 D UsbIntentReceiver: New USB mass-storage device attached. 01-07 09:16:29.086 6446 6446 D UsbIntentReceiver: name: USB SanDisk 3.2Gen1 01-07 09:16:29.088 6446 6446 D UsbIntentReceiver: serialNumber: 0101a3136a5ad2527acb7f7f1499daffd9e96a0672c0c4bf5b3297da4b20ff1acb9900000000000000000000943a3a96ff8b520083558107b9aa4123 01-07 09:16:29.088 6446 6446 D UsbIntentReceiver: productId: 21891 01-07 09:16:29.088 6446 6446 D UsbIntentReceiver: vendorId: 1921 01-07 09:16:29.088 6446 6446 D UsbIntentReceiver: isMassStorage: true 01-07 09:16:29.088 6446 6446 D UsbIntentReceiver: Checking if this is the current backup drive. 01-07 09:16:29.337 401 422 W LocationManagerService: blocking 0,0 location from gps provider 01-01 18:10:26.110 0 0 I scsi 0 : 0:0:0: Direct-Access USB SanDisk 3.2Gen1 1.00 PQ: 0 ANSI: 6 01-01 18:10:26.125 0 0 I sd 0 : 0:0:0: [sda] 240353280 512-byte logical blocks: (123 GB/115 GiB) 01-01 18:10:26.134 0 0 I sd 0 : 0:0:0: [sda] Write Protect is off 01-01 18:10:26.139 0 0 D sd 0 : 0:0:0: [sda] Mode Sense: 43 00 00 00 01-01 18:10:26.140 0 0 I sd 0 : 0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA 01-07 09:16:30.132 28 28 I kdevtmpfs: type=1400 audit(0.0:858): avc: denied { create } for name="sda" scontext=u:r:kernel:s0 tcontext=u:object_r:device:s0 tclass=blk_file permissive=1 01-01 18:10:26.223 0 0 I sda : sda1 01-01 18:10:26.229 0 0 I ueventd : vendor_create_device_symlinks: device sda 01-01 18:10:26.236 0 0 I sd 0 : 0:0:0: [sda] Attached SCSI removable disk 01-01 18:10:26.239 0 0 I ueventd : vendor_create_device_symlinks: device sda1 01-01 18:10:26.249 0 0 E ueventd : Failed to symlink /dev/block/sda1 to /dev/block/by-name/boot, which already links to: /dev/block/mmcblk0p1: File exists The only error here seems to be the `Failed to symlink /dev/block/sda1` message. However when I add another one all seems to be working fine: 01-01 18:13:24.148 0 0 I usb 1-1.2.4: new high-speed USB device number 13 using dwc2 01-01 18:13:24.354 0 0 I usb 1-1.2.4: New USB device found, idVendor=0781, idProduct=5571, bcdDevice= 1.00 01-01 18:13:24.362 0 0 I usb 1-1.2.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3 01-01 18:13:24.370 0 0 I usb 1-1.2.4: Product: Cruzer Fit 01-01 18:13:24.376 0 0 I usb 1-1.2.4: Manufacturer: SanDisk 01-01 18:13:24.380 0 0 I usb 1-1.2.4: SerialNumber: 4C530010541126100030 01-01 18:13:24.388 0 0 I usb-storage 1-1.2.4: 1.0: USB Mass Storage device detected 01-01 18:13:24.395 0 0 I scsi host1: usb-storage 1-1.2.4:1.0 01-07 09:19:28.359 401 556 D UsbHostManager: USB device attached: vidpid 0781:5571 mfg/product/ver/serial SanDisk/Cruzer Fit/1.00/4C530010541126100030 hasAudio/HID/Storage: false/false/true 01-07 09:19:28.361 401 556 D UsbDeviceDescriptor: 1 configs 01-07 09:19:28.362 401 556 D UsbHostManager: Added device UsbDevice[mName=/dev/bus/usb/001/013,mVendorId=1921,mProductId=21873,mClass=0,mSubclass=0,mProtocol=0,mManufacturerName=SanDisk,mProductName=Cruzer Fit,mVersion=1.00,mSerialNumberReader=com.android.server.usb.UsbSerialReader@ec44085, mHasAudioPlayback=false, mHasAudioCapture=false, mHasMidi=false, mHasVideoCapture=false, mHasVideoPlayback=false, mConfigurations=[ 01-07 09:19:28.362 401 556 D UsbHostManager: UsbConfiguration[mId=1,mName=null,mAttributes=128,mMaxPower=112,mInterfaces=[ 01-07 09:19:28.362 401 556 D UsbHostManager: UsbInterface[mId=0,mAlternateSetting=0,mName=null,mClass=8,mSubclass=6,mProtocol=80,mEndpoints=[ 01-07 09:19:28.362 401 556 D UsbHostManager: UsbEndpoint[mAddress=129,mAttributes=2,mMaxPacketSize=512,mInterval=0] 01-07 09:19:28.362 401 556 D UsbHostManager: UsbEndpoint[mAddress=2,mAttributes=2,mMaxPacketSize=512,mInterval=0]]]] 01-07 09:19:28.368 6446 6446 D UsbIntentReceiver: New USB mass-storage device attached. 01-07 09:19:28.368 6446 6446 D UsbIntentReceiver: name: SanDisk Cruzer Fit 01-07 09:19:28.369 6446 6446 D UsbIntentReceiver: serialNumber: 4C530010541126100030 01-07 09:19:28.369 6446 6446 D UsbIntentReceiver: productId: 21873 01-07 09:19:28.369 6446 6446 D UsbIntentReceiver: vendorId: 1921 01-07 09:19:28.369 6446 6446 D UsbIntentReceiver: isMassStorage: true 01-07 09:19:28.370 6446 6446 D UsbIntentReceiver: Checking if this is the current backup drive. 01-01 18:13:25.406 0 0 I scsi 1 : 0:0:0: Direct-Access SanDisk Cruzer Fit 1.00 PQ: 0 ANSI: 6 01-07 09:19:29.379 401 422 W LocationManagerService: blocking 0,0 location from gps provider 01-01 18:13:25.417 0 0 I sd 1 : 0:0:0: [sdb] 124059648 512-byte logical blocks: (63.5 GB/59.2 GiB) 01-01 18:13:25.427 0 0 I sd 1 : 0:0:0: [sdb] Write Protect is off 01-01 18:13:25.432 0 0 D sd 1 : 0:0:0: [sdb] Mode Sense: 43 00 00 00 01-01 18:13:25.433 0 0 I sd 1 : 0:0:0: [sdb] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA 01-01 18:13:25.473 0 0 I sdb : sdb1 01-01 18:13:25.479 0 0 I ueventd : vendor_create_device_symlinks: device sdb 01-01 18:13:25.480 0 0 I sd 1 : 0:0:0: [sdb] Attached SCSI removable disk 01-01 18:13:25.490 0 0 I ueventd : vendor_create_device_symlinks: device sdb1 So I am not entirely sure if this is an issue. I can also see all partitions: cat /proc/partitions major minor #blocks name 1 0 8192 ram0 1 1 8192 ram1 1 2 8192 ram2 1 3 8192 ram3 1 4 8192 ram4 1 5 8192 ram5 1 6 8192 ram6 1 7 8192 ram7 1 8 8192 ram8 1 9 8192 ram9 1 10 8192 ram10 1 11 8192 ram11 1 12 8192 ram12 1 13 8192 ram13 1 14 8192 ram14 1 15 8192 ram15 179 0 30535680 mmcblk0 179 1 131072 mmcblk0p1 179 2 2097152 mmcblk0p2 179 3 262144 mmcblk0p3 179 4 28044288 mmcblk0p4 8 0 120176640 sda 8 1 120176624 sda1 8 16 62029824 sdb 8 17 62028800 sdb1 And I can mount these manually. But I'd expect it will be automatically mounted and visible in user space. I also know that it works for many people using Raspberry Pi and LineageOS. I also don't have any other issues with USB. I have keyboard, touchscreen, webcam and other things and all works fine. **Only storage not**. The only difference is that I am using Compute Module 4 instead of regular Raspberry Pi 4. But I cannot imagine it's a hardware issue. Any ideas what the issue might be? Alternatively: Is there a way to mount a storage that way that I can access it from GUI? As far I understand the user space is rather emulated. I tried to mount it to /sdcard/Storage but it doesn't work like that. I assume it has to be attached to the not emulated file system. **EDIT**: Additional infos as requested by Irfan. Thanks for the hint: cat /sys/block/sda/sda1/uevent MAJOR=8 MINOR=1 DEVNAME=sda1 DEVTYPE=partition PARTN=1 cat /sys/block/sdb/sdb1/uevent MAJOR=8 MINOR=17 DEVNAME=sdb1 DEVTYPE=partition PARTN=1
Asked by Radek Suski (131 rep)
Jan 7, 2022, 12:24 PM
Last activity: Jan 8, 2022, 12:35 PM