Shield TV (2017) with NVE 8.0.0 (Pie) and NFS mounting (and issues with enabled VLAN) - Shield Android TV General

Thanks to rootfan I've been able to finally root Shield TV 2017 16GB with NVIDIA Experience Upgrade 8.0.0. (Pie) hoping I'll be able to mount my LAN NAS media content on it. But to make things more complicated my LAN is VLAN segmented due to security reasons. I know KODI and PLEX have NFS mounting capabilities without rooting but all I could see were devices on the same VLAN and of course my media NAS is not part of it and they're primarily media oriented and you might want to expand this focus . Since I've acquired certain knowledge on how to do enable NFS mounting on Shield TV (on "regular" non-VLAN LAN) I'll share all my findings for all of you interested in making this work. Hopefully/Ultimately I'm seeking for any user experience mounting NFS with VLAN enabled LAN, since I'm not Android expert I don't know if it is currently even possible or not.
Anyway long story short here are my findings regarding mounting NFS shares on Android:
I came across this post https://forum.xda-developers.com/shield-tv/help/automount-cifs-nfs-share-write-access-t3783735 and patched Cifsmanager (https://forum.xda-developers.com/showpost.php?p=53760495&postcount=537).
The thing is it requires SuperSU which of course is not an option since Pie is rooted with Magisk. Luckily Magisk comes with su therefore SuperSU isn't needed.
You might come across info you also need SELinuxModeChanger (https://forum.xda-developers.com/showthread.php?t=2524485) - once again if you used rootfan's rooting image you don't need it as rootfan has already preset SELinux to Permissive. You can check it with issuing getselinux command in terminal (I use Termux app for this).
BusyBox needed - I'm also not quite sure it is needed for NFS mounting to work as Magisk BusyBox doesn't contain mount command but Magisk itself does. I've installed Magisk BusyBox module through rootfan's TWRP for Pie (https://drive.google.com/open?id=1934405D1S0lv52jZMqS-Zny62RIzGWSi - link is in the 1st post of https://forum.xda-developers.com/shield-tv/development/kernel-overclock-kernel-2-22-ghz-t3943079; Make sure you don't mix 7.2.3 and 8.0.0) but I'm not quite sure this was necessary as it does not include mount command which is included in Magisk (https://github.com/topjohnwu/Magisk/blob/master/docs/tools.md). I've also wanted to try sideloading BusyBox Pro from GP but didn't see how it would change anything so I haven't done it.
Regarding https://gist.github.com/aldur/4a3f90a111b71662f056 there seems to be an (root) ownership problem when mounting NFS shares. The solutions is to use su -mm -c "mount command". If you take a look at https://github.com/topjohnwu/Magisk/blob/master/docs/tools.md you'll see -mm stands for --mount-master. I personally haven't tried this as I don't have any non-VLAN shares I could mount.
So far this was all I managed to find about NFS mounting on Shield TV, but haven't found anything regarding mounting VLAN segmented NFS shares.
What makes me suspicious about Android's ability to mount/work with VLAN segmented NFS shares is a fact I can ping NFS server from Shield TV but when I try to mount it I get an error 'No such device'. Therefore I'm kindly asking anyone who has any ideas/knowledge to help me out. Thanks.
PS.
Please don't suggest to use CIFS - I want NFS as it is at least as twice as fast as SAMBA/CIFS.
UPDATE:
Caught some time to explore this thing in detail and found out two very important things:
NFS with VLAN(S) is working in KODI without any problems therefore problem is definitely on Android side;
Magisk BusyBox NDK doesn't have/support mount applet/command and seems like even though Magisk itself has it (mount) issuing lsmod | grep nfs returns nothing; Empty response could be cause by the following - When issued mount -t nfs ... the mount command is looking for the filesystem type of nfs. If it doesn't find it, it returns no such device error. If it does find it, it basically hands off the "mount" to the module; Accordingly I came to a conclusion that mounting nfs share on Shield TV via mount command isn't possible with just Magisk and Magisk BusyBox module installed. I'll try installing/sideloading BusyBox (Pro) from Play Store ...

Hey @allidea Thanks for all the information. Did you get anywhere with this? Just ordered a 2019 shield pro, and I was hoping to mount my NFS share on it as well.
Does Cifsmanager work on Android 8.0 with Magisk? (Assuming no Vlan segmentation)

I stopped digging further as I've stated using Kodi which fulfilled all my needs and is definitely a great and free player with lots of plugins. But from what I could tell problem with NFS on Shield TV originates from it's kernel - it simply wasn't compiled with full mount module / NFS support. Obviously Kodi has some custom built in NFS support independent from kernel but I really didn't go into details with it.
BusyBox (Pro) made no difference as it only added a few more commands not present within Magisk BusyBox module and it even skipped installing mount module as it already found it installed.
Therefore cifsmanager doesn't work on 8.0.0 but not because it's incompatible rather due to kernel missing full mount module.
Hope this helped a bit.

Related

[Q] mounting a windows shared folder to android fs

i looked at these forums and solutions for doing this and none of them worked for me so i'm posting this in case someone knows how to solve this:
I am using nexus 7 2013 with cyanogenmod 10.2.1. i tried both "cifsmanager" and "mount manager" applications to mount my shares (with the right credentials). i also used the following command:
busybox mount -t cifs -o username=[user],password=[password] //192.168.1.91/T /mnt/sdcard/users
all these produce the same error - "mount: invalid argument" when trying to connect to the shared folder.
Have you seen if smbfs rather than cifs works? ( I know smbfs is "old"). There is some relevant info here http://www.netzgewitter.com/2013/10/troubleshoot-cifs-on-android/ on the problems with cifs and Sony Xperia
peterk-1 said:
Have you seen if smbfs rather than cifs works? ( I know smbfs is "old"). There is some relevant info here http://www.netzgewitter.com/2013/10/troubleshoot-cifs-on-android/ on the problems with cifs and Sony Xperia
Click to expand...
Click to collapse
Thanks man!!!!! the "-o unc=" thing soved the issue!
liran corleone said:
Thanks man!!!!! the "-o unc=" thing soved the issue!
Click to expand...
Click to collapse
I guess i was happy too soon - the mount now does work, but i cannot access it with other users. this is how i did the mount:
mount -o unc=\\\\192.168.1.91\\d$,username=developer,password=pass -t cifs none /mnt/cifs/arcade/d
this is the "mount" command output afterwards:
none /mnt/cifs/arcade/d cifs rw,relatime,sec=ntlm,unc=\\192.168.1.91\d$,username=developer,uid=0,noforceuid,gid=0,noforcegid,addr=192.168.1.91,file_mode=0755,dir_mode=0755,nounix,serverino,rsize=61440,wsize=65536,actimeo=1 0 0
Any idea why/how to solve this?
I've had good luck using the cifs module in the ElementalX kernel along with cifsmanager. You don't need to configure anything other than your shares, and maybe set mount point prefix to /mnt/cifs
If you want to mount shares remotely through ssh port forwarding you can specify the port number that you are forwarding to using port= in options. I'm getting ready for work, so I don't have time right now to get the output showing the mount command that it generates, but I can when I get home.
spiked_mistborn said:
I've had good luck using the cifs module in the ElementalX kernel along with cifsmanager. You don't need to configure anything other than your shares, and maybe set mount point prefix to /mnt/cifs
If you want to mount shares remotely through ssh port forwarding you can specify the port number that you are forwarding to using port= in options. I'm getting ready for work, so I don't have time right now to get the output showing the mount command that it generates, but I can when I get home.
Click to expand...
Click to collapse
i cannot use this kernel since i am using cyanogenmod 10.2.1 (i need the wireless ad-hoc connection mode support) so i will need another solution for this...
Well, I checked in /system/lib/modules to see if cifs.ko was there, but it's not. I was thinking maybe extracting the cifs modules from the ElementalX kernel might be possible, but it must be part of the kernel source and not a separate file. Seems like more people would find cifs support useful, so maybe somebody with development skills will make a kernel module file that's compatible with the N7 2013.
Here's what shows up when I run mount:
//192.168.0.100/Music /mnt/cifs/Music cifs rw,relatime,sec=ntlm,unc=\\192.168.0.100\Music,username=username,uid=0,noforceuid,gid=0,noforcegid,addr=192.168.0.100,file_mode=0755,dir_mode=0755,nounix,serverino,rsize=16384,wsize=131007,actimeo=1 0 0
Nevermind.
mdamaged said:
Nevermind.
Click to expand...
Click to collapse
cifs seems to be supported well by cyanogenmod - the mount process is working fine, but the mounted folders are only visible with root priviledges - not to device's applications like poweramp, pdf reader etc.
liran corleone said:
cifs seems to be supported well by cyanogenmod - the mount process is working fine, but the mounted folders are only visible with root priviledges - not to device's applications like poweramp, pdf reader etc.
Click to expand...
Click to collapse
It's private namespaces that's the issue.

CIFS or NFS support?

I would like to connect my OUYA to either NFS or CIFS shares. It doesnt seem to handle this nativiely. I have tried busybox and it is no avail for nfs shares (preferred) and cifs manager i keep getting an invalid device.
Any howtos on how to do this? This would make my rom life a heck of a lot better
phin586 said:
I would like to connect my OUYA to either NFS or CIFS shares. It doesnt seem to handle this nativiely. I have tried busybox and it is no avail for nfs shares (preferred) and cifs manager i keep getting an invalid device.
Any howtos on how to do this? This would make my rom life a heck of a lot better
Click to expand...
Click to collapse
Hi friend. My english is not too good but i'll try to explain what i did.
At default ouya's kernel i was not able to use nfs version 3 or 4, only nfs version 2. the cifs didn't work
i compiled the ouya's kernel and enable the cifs and nfs on it because i use ouya as a media center running XBMC.
so i build a bzimage kernel and flash it to ouya using flashboot. i needed to unzip the newest ouya firmware and pick the ramdisk file to flash too.
if you only flash the bzimage you ouya will not work. so i flash the bzimage and the ramdisk files with the same command.
after flash i reboot my ouya and it works like a charm!
i was able to mount my nfs shares using nfs v3. not using xmbc but using the adb with shell...

[Q] Mounting network folder as a local directory

Hello all.
I'm running my FireTV as an entertainment system. It's rooted with Kodi, Mobdro, RetroArch, ePSXe w/ Sixaxis PS3 as controller etc.
Since the FTV only has 8GB of local storage, I was wondering if there's a way to mount a samba share into a local directory so I can load emulator games without transferring them. Majority of the emulators only scan ROMs / ISOs etc on local directories.
Unfortunately, apps like cifsmanager and mount manager are broken since android 4.3 I think.
Thanks in advance.
Maybe this might be helpful:
http://forum.xda-developers.com/fire-tv/general/run-script-firetv-boot-t2986158
This works for me:
Code:
busybox mount -t cifs //my.ip.address/my.share /sdcard/somedir -o username=guest
jocala said:
This works for me:
Code:
busybox mount -t cifs //my.ip.address/my.share /sdcard/somedir -o username=guest
Click to expand...
Click to collapse
Hello there.
Thanks for the help. But do you mind answering a couple of Qs because I'm a filthy nub when it comes to this.
1. Where do I run this command? Do I connect to my FTV using adb and just type this in?
2. How would this work if my Samba share has spaces on it?
3. Do I run this everytime I reboot my FTV?
Thanks again
Squalll13 said:
Hello there.
Thanks for the help. But do you mind answering a couple of Qs because I'm a filthy nub when it comes to this.
1. Where do I run this command? Do I connect to my FTV using adb and just type this in?
2. How would this work if my Samba share has spaces on it?
3. Do I run this everytime I reboot my FTV?
Thanks again
Click to expand...
Click to collapse
1. As posted, it would be run from the command line, from a root prompt. I use busybox, so you need that as well for my method.
2. I stay away from directories with spaces, but it may work with quotes, idk, haven't tested. It works with embedded spaces if they are inclosed in quotes: e.g:
Code:
busybox mount -t cifs "//192.168.1.200/media/my folder" /sdcard/cifs -o username=guest
3. Easiest thing to do would be to put it into a script that runs at boot. That's the approach I'm taking with my program adbFire. I'm testing this functionality now.
oops.... guess that was already answered. Anyhow, can't leave text field blank so; Yeah this works great. I got mine all set up with Advanced Launcher kodi addon. Tested with a few emulators and ISOs load near instantly
Thanks for the replies. Though I noticed something peculiar and I would like some insight.
I noticed that after I haven't used the FireTV for a while. Maybe 24 hours. The mounted folder kinda "disappears" for a bit but come back. For example, I use ES File Explorer and go to /mnt/obb/ and it will just keep "Loading" until I just press back. Same thing when I used adb shell, cd to /mnt/obb/ and use ls. It just stays there until I force exit. But after a waiting around a bit like 10 mins or so, the mounted folder shows up no problem.
It kinda feels like you need to ping /access it or something, fail, wait a bit then it shows up.
I hope what I said isn't too confusing. If it was I apologize.

Help with mounting windows shared drive for use by any app

Hi,
The goal is make my shared windows folder available on FireTV to be accessed by media applications. First attempt is for music
This is AFTV 1. It is rooted and has busybox. It has TWRP and 5.2.1.0_r1 pre-rooted stock image. I searched around and found couple of useful threads.
Run script on FireTV boot
mount cifs share from nas
Based on the first thread, I have created my script that I plan to run in /system/etc/install-recovery.sh
My current problem is that the script can be only run after I su (become root)
The script runs successfully, but the files are only available on adb shell or putty when I am root. They are not available to regular user or any apps.
Code:
#!/system/bin/sh
sleep 15
mkdir /mnt/obb/music
chmod 777 /mnt/obb/music
sleep 20
busybox mount -o noperm,unc=\\\\192.168.1.56\\music,username=xx,password=xx -t cifs none /mnt/obb/music
Second problem is that when I restart firetv, this does not seem to have done anything. But I have the fix the first problem first. I need any of the apps to be able to access the mounted shared drive.
Thanks
ETA: post #10 in thread [Q] mounting a windows shared folder to android fs seems to be the same problem, but I did not understand the suggested solution

Question trying to load cifs.ko to my device

I'd like to mount a SMB share on my device so that I can access ROMs on my network share through retroarch.
I've rooted my device, I have Magisk installed, and I was using ADB to try and push the module to places on my device (and having trouble). But I've been barking up the wrong tree since the cifs.ko I have isn't for this kernel. Probably why insmod failed.
This is turning out a lot more complicated than I'd anticipted. I can hook up the share and access via a file browser no problems. I'd anticipated setting up a symlink to an accessible directory, but I read that there was something in the way that android mounts the share that would prevent that from working.
Does anyone have any advice on where to look next? There's no Magisk module I can see that would help me. I'm at a dead end.

Categories

Resources