[question] cannot read the part of disk when set external SD as ums

#9 · open · 5 comments

View on GitHub ↗

Freed-Wu

[ums_log.tar.gz](https://github.com/outofmemo/UMS-Interface/files/5758649/ums_log.tar.gz) when set disk image file as ums, it can work normally. when i try to set an external sd as ums, the disk can be listed by `lsblk` in linux or `diskmgmt.msc` in windows, but the part of the disk cannot be read. i have formatted the external sd and try again, but nothing changed. and i make sure that the mount namespace is global and the software coming from github is latest. thanks!

Comments

outofmemo

Do you mean the part of the disk can't be read in Windows or in Android?

Freed-Wu

![0](https://user-images.githubusercontent.com/32936898/103472377-bd053d80-4dc7-11eb-8767-54dd206e5bba.jpg) In android, `/mnt/media_rw/B81B-711D` ![1](https://user-images.githubusercontent.com/32936898/103472384-c5f60f00-4dc7-11eb-97b9-68a831257816.jpg) In linux ```shell > lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 465.8G 0 disk ├─sda1 8:1 0 128M 0 part /boot └─sda2 8:2 0 465.7G 0 part / sdb 8:16 1 15.4G 0 disk ``` `/dev/sdb` is the disk, but the part of it cannot be read. In windows ``` > diskmgmt.msc ``` ![2](https://user-images.githubusercontent.com/32936898/103472387-d27a6780-4dc7-11eb-8fb7-320490ac0b7e.jpg) `H:` is the disk, but the part of it cannot be read.

outofmemo

Maybe there's some thing wrong with the file system. You can try to plug the USB into a Linux PC to see whether it can be recognized. You can also use tools like `parted` or `DiskGenius` to check whether the file system is normal.

Freed-Wu

Reproduce Procedure ------------------- insert a sdcard to a phone. ![0_1](https://user-images.githubusercontent.com/32936898/104460378-ff5d2480-55e8-11eb-8a90-6ea1975cff72.jpg) ``` ums_interface -> quick start -> start ``` ![3](https://user-images.githubusercontent.com/32936898/104460406-084df600-55e9-11eb-82f5-cc97bc81ae00.jpg) or ``` ums_interface -> u disk -> select /dev/block/vold/disk:179:64 -> config usb gadget ``` ![1](https://user-images.githubusercontent.com/32936898/104460461-1865d580-55e9-11eb-9759-8eb8aceb253a.jpg) or ``` ums_interface -> u disk -> select /dev/block/vold/public:179:65 -> config usb gadget ``` ![2](https://user-images.githubusercontent.com/32936898/104460474-1c91f300-55e9-11eb-8f76-80e2b68dc7cc.jpg) in linux, `lsblk` ``` NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 465.8G 0 disk ├─sda1 8:1 0 128M 0 part /boot └─sda2 8:2 0 465.7G 0 part / sdb 8:16 1 58.2G 0 disk ``` in windows, `diskmgmt.msc`, the part also cannot be read. Effort to Solve --------------- i use a microsd-to-sd or microsd-to-usb to insert the sdcard to computer. in linux and windows, it also can be read. so the sdcard should be normal. i buy a new sdcard. now i have 2 sdcard -- 64GB and 16GB, and both of them can reproduce the issue. i format the sdcard to fat32 and exfat many times and use different softwares. it still doesn't change. Environment ----------- ### Sdcard - FS: vfat (fat32) or exfat ### Mobile - Device: Oppo R15x/PBCM10 - OS: color OS v7.1/Android 10

Freed-Wu

i try to select `/dev/block/mmcblk0` to config usb gadget, and the disk can display but the part of disk cannot be read. `/dev/block/mmcblk0p*` `/dev/block/loop*` `/dev/loop*` is same as `/dev/block/mmcblk0` and `/dev/block/vold/public*` ![Screenshot_2021-01-17-16-02-07-51](https://user-images.githubusercontent.com/32936898/104835675-223a5200-58e3-11eb-9069-e3f97bb0b678.jpg) ![Screenshot_2021-01-17-16-06-57-64](https://user-images.githubusercontent.com/32936898/104835672-20708e80-58e3-11eb-9faf-52b0ba6d92cc.jpg) and i try to mount an image file and get failure. ![Screenshot_2021-01-17-16-19-33-28](https://user-images.githubusercontent.com/32936898/104835669-19e21700-58e3-11eb-9cf5-ec82fe529c7a.jpg) perhaps i should change a mobile to try again?