FORUMS
Remove All Ads from XDA

Android 6.0 and USB OTG devices

144 posts
Thanks Meter: 25
 
By kent1146, Senior Member on 4th January 2016, 09:10 PM
Post Reply Email Thread
28th October 2016, 05:28 PM |#11  
Senior Member
Thanks Meter: 127
 
More
OTG drive support via Android SAF
Quote:
Originally Posted by bleu8888

From Android 6, OTG drive is officially supported by Android but in completely different way.
In fact, OTG drive is not mounted in file system but can only be access via Android's unique Storage Access Framework(SAF).
Unfortunately, listing files on SAF is not yet supported, but will be supported in the future.

@bleu8888, first off, awesome app! This is a really robust media player, and is super helpful to have!
I'm just curious if OTG drive support via Android SAF is still on your roadmap? Or has it been implemented in a recent version and I just haven't figured out how to use it?
Thanks!
 
 
29th October 2016, 12:15 AM |#12  
Member
Flag Porto
Thanks Meter: 11
 
More
MY guess is that the pen's filesystem is FAT32 which doesn't support linux permissions so MX Player tries to check if it has permissions and it can't so it freezes.
Which could be fixed if you tried to format the pendrive as ext4 or something like that.
Good luck
You could also try a bind or remount command from the pen to a certain folder. But there are so many filesystems on android so i can't help on that part either.
30th October 2016, 05:57 PM |#13  
Recognized Contributor
Thanks Meter: 4,089
 
More
Quote:
Originally Posted by DA6030;69350053 [MENTION=3850543

bleu8888, first off, awesome app! This is a really robust media player, and is super helpful to have!
I'm just curious if OTG drive support via Android SAF is still on your roadmap? Or has it been implemented in a recent version and I just haven't figured out how to use it?
Thanks!


Quote:
Originally Posted by gaferreira13

MY guess is that the pen's filesystem is FAT32 which doesn't support linux permissions so MX Player tries to check if it has permissions and it can't so it freezes.
Which could be fixed if you tried to format the pendrive as ext4 or something like that.
Good luck
You could also try a bind or remount command from the pen to a certain folder. But there are so many filesystems on android so i can't help on that part either.

In Fact SAF is required to rename/delete file on Lollipop and above. MX uses SAF implementation to rename/delete files & to write subs.

Even if it's implemented for OTG in future, What's the real challenge is is everytime you have to Grant access.

The Current OTG support purely depends on the mount point used in your ROM. For Example in most of the Samsung devices USB OTG is mounted under /Storage/<some ID>. In this case just refreshing the media list will bring the files in list.

What I am thinking is USB host implementation. The best part is that, It can support even NTFS partitions even if it's not supported by the device natively. I have already discussed about this with @bleu8888. But, it won't be a part of 1.9.0. He may implement in future after finishing 1.9.0 to everyone.

Sent from my Samsung Galaxy S5 using XDA Labs
30th October 2016, 08:24 PM |#14  
Senior Member
Thanks Meter: 127
 
More
Quote:
Originally Posted by ktsamy

The Current OTG support purely depends on the mount point used in your ROM. For Example in most of the Samsung devices USB OTG is mounted under /Storage/<some ID>. In this case just refreshing the media list will bring the files in list.

What I am thinking is USB host implementation. The best part is that, It can support even NTFS partitions even if it's not supported by the device natively. I have already discussed about this with @bleu8888. But, it won't be a part of 1.9.0. He may implement in future after finishing 1.9.0 to everyone.

Cool -- super helpful!
In my case it's mounted only at /mnt/media_rw/<some ID>, and media_rw doesn't show up in /mnt/ within the MX Player directory browser. Although passing URIs to MX Player from the native Android file browser (from within Settings->Storage) works fine, so maybe I can mess with the permissions to find a workaround.
30th October 2016, 09:10 PM |#15  
Member
Flag Porto
Thanks Meter: 11
 
More
Quote:
Originally Posted by DA6030

Cool -- super helpful!
In my case it's mounted only at /mnt/media_rw/<some ID>, and media_rw doesn't show up in /mnt/ within the MX Player directory browser. Although passing URIs to MX Player from the native Android file browser (from within Settings->Storage) works fine, so maybe I can mess with the permissions to find a workaround.

It's in the same path for me...
Quote:
Originally Posted by ktsamy

What I am thinking is USB host implementation. The best part is that, It can support even NTFS partitions even if it's not supported by the device natively. I have already discussed about this with @bleu8888. But, it won't be a part of 1.9.0. He may implement in future after finishing 1.9.0 to everyone.

I'd buy MX player if it supported using USB host natively... I have the pen on NTFS which seems to work fine through the Paragon NTFS mounter app.
30th October 2016, 09:37 PM |#16  
Senior Member
Thanks Meter: 127
 
More
Quote:
Originally Posted by gaferreira13

I'd buy MX player if it supported using USB host natively.

Definitely would buy as well.

I know Titanium Backup is a terrible comparison, because TB has root permissions, but just taking a look at their directory-selection implementation (that lets you choose your method), including DocumentProvider, I think is a very slick catch-all that will cover everyone. In my case I used DocumentProvider just to identify the right storage device, and then all further file management happens within the app.
Attached Thumbnails
Click image for larger version

Name:	Screenshot_20161030-133035.png
Views:	298
Size:	211.8 KB
ID:	3920947   Click image for larger version

Name:	Screenshot_20161030-133117.png
Views:	304
Size:	142.5 KB
ID:	3920948  
31st October 2016, 06:54 PM |#17  
Recognized Contributor
Thanks Meter: 4,089
 
More
Quote:
Originally Posted by DA6030

Cool -- super helpful!
In my case it's mounted only at /mnt/media_rw/<some ID>, and media_rw doesn't show up in /mnt/ within the MX Player directory browser. Although passing URIs to MX Player from the native Android file browser (from within Settings->Storage) works fine, so maybe I can mess with the permissions to find a workaround.


Quote:
Originally Posted by gaferreira13

It's in the same path for me...

I'd buy MX player if it supported using USB host natively... I have the pen on NTFS which seems to work fine through the Paragon NTFS mounter app.

Infact /mnt/media_rw/<some ID> is used for rw access to the storage. But, it's not accessible to the third party apps.
If you changed it's permissions it may be scanned by MX. By default it's excluded since it causes duplicate entries in some devices with improper implementation. In MX Player 1.8.9, Goto Settings > List > Folders. Select /mnt/media_rw & unhide it. Then back to the list screen and tap on refresh button or pull down the list to refresh.

Sent from my Samsung Galaxy S5 using XDA Labs
The Following User Says Thank You to Thirumalai.K For This Useful Post: [ View ] Gift Thirumalai.K Ad-Free
2nd November 2016, 02:24 AM |#18  
Member
Flag Porto
Thanks Meter: 11
 
More
Quote:
Originally Posted by ktsamy

Infact /mnt/media_rw/<some ID> is used for rw access to the storage. But, it's not accessible to the third party apps.
If you changed it's permissions it may be scanned by MX. By default it's excluded since it causes duplicate entries in some devices with improper implementation. In MX Player 1.8.9, Goto Settings > List > Folders. Select /mnt/media_rw & unhide it. Then back to the list screen and tap on refresh button or pull down the list to refresh.

Sent from my Samsung Galaxy S5 using XDA Labs

Please someone confirm this so that i don't format my pen for nothing
2nd November 2016, 02:57 AM |#19  
Recognized Contributor
Thanks Meter: 4,089
 
More
Quote:
Originally Posted by gaferreira13

Please someone confirm this so that i don't format my pen for nothing

It doesn't harm anything. You are just forcing MX Player to scan it. If you have root access & fixed the permissions, it will scan without any issues. Else, MX Player will not scan the mountpoints under media_rw.

Sent from my SM-G900H using Tapatalk
2nd November 2016, 08:34 PM |#20  
Member
Flag Porto
Thanks Meter: 11
 
More
Quote:
Originally Posted by ktsamy

It doesn't harm anything. You are just forcing MX Player to scan it. If you have root access & fixed the permissions, it will scan without any issues. Else, MX Player will not scan the mountpoints under media_rw.

Sent from my SM-G900H using Tapatalk

Oh sorry, I wanted to say "Please someone confirm this works", I'm not really 'afraid'.
4th November 2016, 05:13 AM |#21  
Senior Member
Thanks Meter: 127
 
More
Quote:
Originally Posted by gaferreira13

Oh sorry, I wanted to say "Please someone confirm this works", I'm not really 'afraid'.

Did you have any luck? For me, even rwxrwxrwx permissions won't let the media_rw folder show up in MX Player's folder-picker, although (root-priveleged) file managers see it. Although maybe setting the permissions didn't actually work, as they reset on reboot. :-/
Attached Thumbnails
Click image for larger version

Name:	Screenshot_20161102-174427.png
Views:	478
Size:	95.0 KB
ID:	3925617  
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes