pantz.org banner
Playing video from an Android app from a Chromebook network share
Posted on 07-28-2020 00:25:10 UTC | Updated on 07-28-2020 00:31:18 UTC
Section: /hardware/chromebook/ | Permanent Link

I wanted to play some video files from a Linux machine I have on the network, and wanted the ease of just opening Chrome OS's file manager, mounting a network file system, and playing the video file of my choosing with any of the installed apps from preferably from Android, but possibly from the Linux VM as well. You can do this easily with files mounted from a USB thumb drive or local storage.

First try

Try to use the Chrome OS file manager, and install a service (3 dot menu -> add new service) for sftp or smb. Mount a network share, then try to play a video file. You will not be able to select any video player installed via a Linux container (Crostini) or Android app. Just the internal player is available, and will happily play any file it supports. The internal video player is garbage for features and codecs supported.

Second try

Let's get sneaky. Let's mount an sshfs mount in a Linux container, mounted to my home dir (available via "My Files -> "Linux Files"), that is auto shared to Chrome OS files app. Then it will think these files are local, and allow applications to access them when right clicking on video files via the share in the files app. Now when we right click on the newly mounted files, and use "open with" we see all installed video apps available. Selecting the Android app mxplayer results in the file not being allowed to be read, and gives a error of "can't play this link". Android VLC just opens and closes quickly when trying to play the file. If I right click "open with", then select a Linux container video app I installed (mpv, fantastic Linux video player), the video starts playing. The internal Chrome OS video player can access and play the file as well. While this is nice and I love mpv, running that out of the Linux container, really heats up the system likely because there is no special acceleration at all. Playing things with mxplayer from Android seems to perform better.

What is going on?

After thinking about this, what I think is going on is the Chrome OS security model at work. The Linux container can not access any files in Chrome OS. Yes, you can right click and select "Share with Linux" on regular directories, but that only shares files into the Linux container. I need to share files directly out of the Linux container. The Android apps can not directly access the files shared from the Linux container. Chrome OS is sitting in the middle of both of these contained areas, and it has very few decent apps that do anything useful natively. It relies on Android containers (ARC++) or Linux containers (via crosvm) to provide apps that are useful. Which means you get stuck in either one of their containers to do your work, or you end up copying files back and forth between containers. So how do we make this work?

Using a Linux VM

If you installed the Chrome OS Linux VM via the "Linux (beta)" in the settings are then you have access to a fairly full featured Linux OS (Debian). You can use the Linux tools of your choice, like sshfs (fuse) or samba, to access files over a network. Put that mount in your home dir and access it via the "My Files -> Linux Files" in the file browser. Then install a Linux video player like vlc or mpv, and select one of those from the 'open with' menu and the file will happily play. This is due to both the mount and the video player app being in the same container. You could also just play the file via the command line in the container via the mount you just made. Using the file manager is just a GUI way of doing it. This does not solve my original problem of wanting to use and Android app to play the video.

Using an Android App for the mount

If you don't want to get into using an Linux VM on Chrome OS, then you can play videos using a Android app that can mount smb, ssh, nfs or whatever. I choose to use FX File Explorer Pro. It supports sftp, smb, webdav, and ftp. You can make a mount from within this program, and after mounting find your video file and choose "open with" and choose your favorite Android video player you have installed. I like MxPlayer Pro or VLC. This works without issue as we are staying in the Android container with the apps we use to play our video.

Conclusion

I really wanted the convenience of using the native Chrome OS file manager to navigate using Android apps or Linux apps on a network file share. I guess the security model won't allow it for now. I did happen upon something promising via a chrome flag called "arc-file-picker-experiment" which might allow Android access to network shares. I turned it on, and it broke access the the Linux containers "Linux Files" area in the file manager. It also did not give me access to any Android apps via the "open with" menu on the sftp file service share.

Reddit!

Related stories


RSS Feed RSS feed logo

About


3com

3ware

alsa

alsactl

alsamixer

amd

android

apache

areca

arm

ati

auditd

awk

badblocks

bash

bind

bios

bonnie

cable

carp

cat5

cdrom

cellphone

centos

chart

chrome

chromebook

cifs

cisco

cloudera

comcast

commands

comodo

compiz-fusion

corsair

cpufreq

cpufrequtils

cpuspeed

cron

crontab

crossover

cu

cups

cvs

database

dbus

dd

dd_rescue

ddclient

debian

decimal

dhclient

dhcp

diagnostic

diskexplorer

disks

dkim

dns

dos

dovecot

drac

dsniff

dvdauthor

e-mail

echo

editor

emerald

ethernet

expect

ext3

ext4

fat32

fedora

fetchmail

fiber

filesystems

firefox

firewall

flac

flexlm

floppy

flowtools

fonts

format

freebsd

ftp

gdm

gmail

gnome

google

greasemonkey

greylisting

growisofs

grub

hacking

hadoop

harddrive

hba

hex

hfsc

html

html5

http

https

hulu

idl

ie

ilo

intel

ios

iperf

ipmi

iptables

ipv6

irix

javascript

kde

kernel

kickstart

kmail

kprinter

krecord

kubuntu

kvm

lame

ldap

linux

logfile

lp

lpq

lpr

maradns

matlab

memory

mencoder

mhdd

mkinitrd

mkisofs

moinmoin

motherboard

mouse

movemail

mplayer

multitail

mutt

myodbc

mysql

mythtv

nagios

nameserver

netflix

netflow

nginx

nic

ntfs

ntp

nvidia

odbc

openbsd

openntpd

openoffice

openssh

openssl

openvpn

opteron

parted

partimage

patch

perl

pf

pfflowd

pfsync

photorec

php

pop3

pop3s

ports

postfix

power

procmail

proftpd

proxy

pulseaudio

putty

pxe

python

qemu

r-studio

raid

recovery

redhat

router

rpc

rsync

ruby

saltstack

samba

schedule

screen

scsi

seagate

seatools

sed

sendmail

sgi

shell

siw

smtp

snort

solaris

soundcard

sox

spam

spamd

spf

spotify

sql

sqlite

squid

srs

ssh

ssh.com

ssl

su

subnet

subversion

sudo

sun

supermicro

switches

symbols

syslinux

syslog

systemrescuecd

t1

tcpip

tcpwrappers

telnet

terminal

testdisk

tftp

thttpd

thunderbird

timezone

ting

tls

tools

tr

trac

tuning

tunnel

ubuntu

unbound

vi

vpn

wget

wiki

windows

windowsxp

wireless

wpa_supplicant

x

xauth

xfree86

xfs

xinearama

xmms

youtube

zdump

zeromq

zic

zlib