Hello everyone!
There was an urgent need to read the connected USB flash drive on a device with the Android 12 operating system.
We can read the contents of the folder using the OpenRawFolder() command, but there is a problem:
We can read the contents of the flash drive only if we know the volume label (folder name XXXX-XXXX)
"/storage/XXXX-XXXX"
"/mnt/media_rw/XXXX-XXXX"
"/mnt/user/0/XXXX-XXXX"
But we cannot know the volume label in advance, because different flash drives will be connected to the device.
There is no access to the "/storage/", "/mnt/media_rw/", "/mnt/user/0/" directory.
The "WriteExternal" permission does not help on Android 12.
I tried editing the application manifest file and adding different permissions like MANAGE_EXTERNAL_STORAGE and READ_EXTERNAL_STORAGE, but it does not work

((
Is there any way to find out the flash drive volume label using standard Tier 1 methods?