MaterialFiles icon indicating copy to clipboard operation
MaterialFiles copied to clipboard

Samsung Stock android 11/12 don't automatically add storage volumes

Open ZenerDeveloper opened this issue 2 years ago • 6 comments

Hello, I have a very simple feature request which is to automatically add external storages (USB, SD, Huawei's Nano Memory Card etc). So they would show either with the other manually added storage devices or in another subsection.

ZenerDeveloper avatar May 21 '22 22:05 ZenerDeveloper

This is already implemented on Android 11+.

zhanghai avatar May 22 '22 01:05 zhanghai

Well, something must not work properly on my device (Galaxy S21 Ultra OneUI 4.1 android 12) because, connecting an external hard drive does not show any new devices in the side menu.

ZenerDeveloper avatar May 22 '22 02:05 ZenerDeveloper

Connecting a USB OTG device may or may not be different from inserting an SD card when it comes to detecting the newly added storage. The app does have logic to handle both addition and removal of storage volumes (source), and I was able to confirm that removal of SD card works on emulators, but I couldn't test further.

So:

  1. Does a newly inserted SD card appear automatically on your system?
  2. If not, does rebooting the device make the app show the connected USB OTG device or inserted SD card?
  3. If it shows up after (2), does removing the device also remove the entry in this app?

zhanghai avatar May 22 '22 07:05 zhanghai

Okay, I tried many things: On my s21 with android 12: Usb card reader & 256GB card (w/ usb otg adapter) Usb drive (w/ usb otg adapter) Usb c hard drive (w/ and w/o usb otg adapter) None of them showed up when plugged in and none of them showed up when rebooted. On my s10+ with android 11: Internal SD card Also didn't show up when inserted or rebooted either. It appears to be a samsung issue, but I can't say as I don't have any other up to date devices to test with it. The only thing in logcat that I see is this message:05-22 10:52:31.207 D/UsbProfileGroupSettingsManager(1290): task.topActivity.getPackageName()=me.zhanghai.android.files whenever I insert a device.

ZenerDeveloper avatar May 22 '22 15:05 ZenerDeveloper

Well, I'm a bit surprised that none of them worked even after reboot, which means the system didn't report them as storage volumes, or they weren't considered mounted. I can try to debug this with simulated external SD card when I have time...

zhanghai avatar May 22 '22 22:05 zhanghai

I uninstalled and reinstalled the app and it still doesn't detect the devices. I also renamed the issue since it appears to be an issue exclusive to Samsung devices unless someone else comments that it happens on another rom. I assume it is a "security" feature from Samsung, but some apps on Google Play appear to work but, of course, we can't see their source to see what they do different. I'm willing to do any testing you may need if you want to publish a test apk (preferably with a different package name) if necessary since you don't have a device that seems to be affected.

ZenerDeveloper avatar May 23 '22 01:05 ZenerDeveloper