[SCRIPT] Mount Samba/CIFS shares - Fire TV Themes and Apps

I hacked up a script to mount a single Samba/CIFS share using adb shell directly on the firetv. This can be executed using any script manager (I use Rom Toolbox Pro's scripter) and if configured by your script manager it will in fact execute and mount the share on boot. If you have more than one share just use more than one copy of this script or feel free to hack it up yourself to extend it I am pretty much done with it at the moment but wanted to share.
Requires root and a script manager that can run scripts as root - also I have busybox installed on my firetv so that may be helpful as well.
https://github.com/mattgyver83/pyro

mattgyver83 said:
I hacked up a script to mount a single Samba/CIFS share using adb shell directly on the firetv. This can be executed using any script manager (I use Rom Toolbox Pro's scripter) and if configured by your script manager it will in fact execute and mount the share on boot.
Click to expand...
Click to collapse
Awesome! Any chance that games/apps could be run off of the mounted SMB share?

What is the purpose of this? Can you not just use an app like ES File Explorer or another SMB app to browse to a shared LAN folder?
Thanks.

tdfsu said:
What is the purpose of this? Can you not just use an app like ES File Explorer or another SMB app to browse to a shared LAN folder?
Thanks.
Click to expand...
Click to collapse
Unfortunately no. ES File Explorer lets you browse network shares but it does not let you mount them and this means that only ES File Explorer can see the contents no other application can see those files and that problem is two fold, not only is that because its not a feature of ES File Explorer but its because of the security implementation of Android even if they tryed to implement it. The purpose of this script is to mount the network share to a local folder on the filesystem so that within any application you can browse to that directory and see those network files so they can be used, this is GREAT if you have a device that has a small storage footprint like the FireTV and you are already sharing out files on your network.

onlinespending said:
Awesome! Any chance that games/apps could be run off of the mounted SMB share?
Click to expand...
Click to collapse
Sorry I thought I had already replied to this a few days ago but apparently I didnt hit submit or something. Yes, that is exactly what this script is for and for that use case it works very well.
Edit: Sorry, I incorrectly answered your question. You can't run or install android applications over the network with this but you can perhaps store data on your network and load it within the application. An example would be like installing an emulator on your firetv and browsing to a ROM share on your network and loading the rom over the LAN. It would be pretty complicated to execute games or applications and likely troublesome.

I think I get the basic idea but I have questions...
1. Will this make it possible for aftv to be seen in workgroup by my other devices or at least show up if added as a network share?(remembered I don't think android can be in workgroup)
2. If your aftv's external drive is already mounted with adbFire mount samba drives script, are there any potential conflicts? Busybox is installed through adbFire.
This is the last piece for me. Every xbmc device can connect to the others, all connect to server, but my 2 aftvs can't share local files over smb with any other devices or each other.

KLit75 said:
I think I get the basic idea but I have questions...
1. Will this make it possible for aftv to be seen in workgroup by my other devices or at least show up if added as a network share?(remembered I don't think android can be in workgroup).
2. If your aftv's external drive is already mounted with adbFire mount samba drives script, are there any potential conflicts? Busybox is installed through adbFire.
This is the last piece for me. Every xbmc device can connect to the others, all connect to server, but my 2 aftvs can't share local files over smb with any other devices or each other.
Click to expand...
Click to collapse
To answer your questions;
1. No, this doesn't implement samba which is what would make it seen on your network. The way that I personally achieve this on my firetv is by sideloading and running "Samba FileSharing", that will do exactly what your trying todo there.
2. Until you said that I had no idea that adbFire even offered this kind of feature and have never used it. I would have to play with it but assuming its doing things the same way then unless your using the same mountpoint then no there should be no issues.
edit: The adbFire thing intrigued me so I took another look at it - please correct me if I am wrong though. From what I gather it does not actually mount a network share, what it does is start a samba server to share out your attached USB drive as a network share. This is very different than what my script does as it just connects network shares to your fireTV locally. My answers remain the same then, it shouldn't hurt anything. What I think you are looking for is probably more along the lines of a Samba Server running on the FireTV and you would only require my script if you need the other fireTVs to be able to see the shared out files as if they resided locally on it for apps to use.
Hope that helps

mattgyver83 said:
To answer your questions;
1. No, this doesn't implement samba which is what would make it seen on your network. The way that I personally achieve this on my firetv is by sideloading and running "Samba FileSharing", that will do exactly what your trying todo there.
2. Until you said that I had no idea that adbFire even offered this kind of feature and have never used it. I would have to play with it but assuming its doing things the same way then unless your using the same mountpoint then no there should be no issues.
edit: The adbFire thing intrigued me so I took another look at it - please correct me if I am wrong though. From what I gather it does not actually mount a network share, what it does is start a samba server to share out your attached USB drive as a network share. This is very different than what my script does as it just connects network shares to your fireTV locally. My answers remain the same then, it shouldn't hurt anything. What I think you are looking for is probably more along the lines of a Samba Server running on the FireTV and you would only require my script if you need the other fireTVs to be able to see the shared out files as if they resided locally on it for apps to use.
Hope that helps
Click to expand...
Click to collapse
Thanks. I wish I could speak a little more confidently about it it but at this time I've got more to learn.
Yes. That's exactly what I want--aftv to act as a server just like my computers do. I didn't fully understand that function on adbfire so I did install 3rd party smb software on aftv. There was a conflict. I needed to uninstall the software. Now I can transfer files over sftp, I can ssh to aftv but my Mac won't connect to the smb://adbfire/USB/ I tried cifs as well. Adbfire's script DOES support this but I can't get it working with Mac. Normally I'd say user error but I'm not the only one who can't do it. And it doesn't work on the new aftv I just bought so definetly not something I messed up.
I hesitate just because adbfire uses the same binaries as one of the popular smb softwares on play store. So I don't want to potentially break things trying to make it better. But this would be a great feature to get working. I know, as you said, your script doesn't do that. But if I get samba working as it should your script might be useful.
Sorry. I'm probably just filling this with words that don't all apply. Apparently I could benefit from what your offering but not until I get samba working correctly. And I'd be appreciative for any info to get that going but it MIGHT be a little off topic here. Thanks a lot for the quick detailed response!

Hey no problems glad I could help get you sorted out, I'll PM you with some more specific information that I think you are after that should get you where you want to be.

mattgyver83 said:
Sorry I thought I had already replied to this a few days ago but apparently I didnt hit submit or something. Yes, that is exactly what this script is for and for that use case it works very well.
Click to expand...
Click to collapse
Perfect. Any chance you can share how you actually install Fire TV apps to the SMB share? This would be great given the limited internal storage

Any chance you can share how you actually install Fire TV apps to the SMB share?
Click to expand...
Click to collapse
I don't use it in that way I just use it for accessing my current network shares from within applications on the fireTV, that is about all this script is intended for. To be honest I don't even think the way that the script is mounting the shares and in order for it to work would have to be implemented at the lower android levels so it could even properly boot that way. Its for the best though, networks generally are not as reliable as direct disk IO so I would suggest sticking to using internal storage, possibly checking out one of the external USB methods, and then just using your shares to house large data so you can basically make the most of all of your storage along the way. Hope this helps.
Edit: I just wanted to add that I looked back at our conversation and I see how I made it seem that might be possible. Sorry I clearly did not answer your question correctly for some reason what I read and what you said were two very different things, I was of the mindset that you were asking about loading ROMs persay over the network from within an emulation app and I have no idea why I thought thats what you were asking. That is not what your asking, no this wont load android applications over the network - Ill edit that post to make that distinction clearer.

mattgyver83 said:
I hacked up a script to mount a single Samba/CIFS share using adb shell directly on the firetv. This can be executed using any script manager (I use Rom Toolbox Pro's scripter) and if configured by your script manager it will in fact execute and mount the share on boot. If you have more than one share just use more than one copy of this script or feel free to hack it up yourself to extend it I am pretty much done with it at the moment but wanted to share.
Requires root and a script manager that can run scripts as root - also I have busybox installed on my firetv so that may be helpful as well.
https://github.com/mattgyver83/pyro
Click to expand...
Click to collapse
Works for me, thanks

Hi Mr Richard Dean Anderson
Magyver or O'neil?
..does this ciffs method depend on having fire tv i.e. a fire tv OS/kernel
What i mean is, can this script, potentially, be used, to work on "any" android, or does this only work for fire tv specifically?

banderos101 said:
Hi Mr Richard Dean Anderson
Magyver or O'neil?
..does this ciffs method depend on having fire tv i.e. a fire tv OS/kernel
What i mean is, can this script, potentially, be used, to work on "any" android, or does this only work for fire tv specifically?
Click to expand...
Click to collapse
Looks like it should work for android where you can enable adb, must have root and busybox.

Thank you for the script. Got it working using your example, but with one caveat I can't figure out.
So here's what I was trying to accomplish using this. I have a large library in Kodi so I was going to move all the data to my NAS and point Kodi to it. I had originally moved everything to a usb disk but just preferred the NAS route. The share mounts to /mnt/obb/myfiles and if I'm logged in as 'su' I can see the directory inside myfiles. Problem is anything stored inside myfiles isn't viewable outside of 'su'. How do I setup the share to be viewable by the shell acct?

Related

Linux (Ubuntu) on Android help

I found this albeit old video of it running without needing a unlocked bootloader or custom ROM ,but the img file is larger than 3.5GB.
It can even access Wi-Fi properly and use FireFox!
Can it run the upcoming Linux port of Goat Simulator? (I doubt it,but it might on more modern Androids)
https://www.youtube.com/watch?v=4d_diU7i7Z0
I want to put the img file on my 32GB mass media storage and use it from there.
Mayber there is a newer version of Linux (ubuntu) that runs way faster in comparison with that old 2011 version.
Can someone please help me with this?
Please respond.
I just found out that there is a later version that can be used.
The 13.10 version of Ubuntu Linux.
Page for installing.
www.opensourcegangster.com/run-ubuntu-13-10-on-android/
I always hate it when they tell you to do stuff that is only accessible normally through official stock android!
It is probably easy to do using SQLite on settings provider for Fire TV.
I still need to know if I can use the .img file on my 32GB USB Mass Storage stick via stickmount instead of deleting everything to make room for the file on my internal storage.
I would assume that it works if I simply change the img directory to the stickmount provided USB directory.
While nobody replied to my thread,I have got ubuntu to run on my Fire TV!
The big issue is that I can't get the more important applications like "Web Browser" to open.
I can open the image viewer and access my images and various other applications work as well,just not the web browser.
I also need to know how to properly install apps so I can get other things running.
I can also confirm the large 4GB ubuntu running with the image in usbStorage/sda1/ubuntu.img via stickmount on my 32GB storage.
Small could be good too
If you could do the same with smaller linux distros - like DamnSmallLinux - could that be useful to fix some bricked devices?
[email protected] said:
If you could do the same with smaller linux distros - like DamnSmallLinux - could that be useful to fix some bricked devices?
Click to expand...
Click to collapse
From reading the guide it seems like all it is is Ubuntu in a chroot. So the fire TV needs to be booting properly.
I'm not owning a fire tv at the moment, but i'm looking into buying one.
My goal is to replace my old Rpi which is running a little bit slow for me as I run on it a couple of software:
- XBMC/Kodi
- samba
-Nginx as web server
- VPN server
- FTP, SMB, NFS
- Deluge, Sickrage, couchpotato... and more can not remember all of them right now.
in few words I use it as media center, file server and torrent server..
So I understood that is possible to install Kodi on the fire TV by doing a side loading of the apk file and install it.
That will solve the media center part, but what about the rest?
chroot could be a solution to run the other linux services that I need, basically I don't need GUI in chroot, is enough if I can connect via SSH and run my services there.
And in addition I would need to have a USB HDD plugged in to store the media content which get's downloaded automatically.
Could this setup run on a fire tv in conjunction with chroot ? Any ideas why wouldn't ?

[Q] Sharing hard-drive plugged into fire TV USB?

Is there an app that will allow me to share whatever drive is plugged into the fire TV?
I'd like to be able to transfer files to it over the network but I can't seem find a way?
Thanks all. :good:
Searched a little deeper and I came up with SambaDroid.... sorry all
Working very nicely.
forestrat said:
Searched a little deeper and I came up with SambaDroid.... sorry all
Working very nicely.
Click to expand...
Click to collapse
Well, I spoke too soon.
It works well enough for transferring files through windows, but it doesn't appear to allow me to download via uTorrent directly to the fire.
Comes back with "Error: A device attached to the system is not functioning. (WriteToDisk)"
forestrat said:
Well, I spoke too soon.
It works well enough for transferring files through windows, but it doesn't appear to allow me to download via uTorrent directly to the fire.
Comes back with "Error: A device attached to the system is not functioning. (WriteToDisk)"
Click to expand...
Click to collapse
see post #17
http://www.xbmchub.com/forums/threa...Storage-Device-to-Amazon-Fire-TV-(ROOT)/page2
Tried this out tonight with great results. My whole network can now see my attached usb hardrive. I can also download direct to in from XBMC via addon like Genesis.
HenryFord33 said:
see post #17
Tried this out tonight with great results. My whole network can now see my attached usb hardrive. I can also download direct to in from XBMC via addon like Genesis.
Click to expand...
Click to collapse
Trying this out right now.... hope to have the same success.
Thank you.
HenryFord33 said:
see post #17
Tried this out tonight with great results. My whole network can now see my attached usb hardrive. I can also download direct to in from XBMC via addon like Genesis.
Click to expand...
Click to collapse
Well... I got most of it accomplished, but I'm not able to access my external storage.
I'm able to access \\192.168.1.77\sdcard .....
but I can't figure out how to access the flash drive @ \\192.168.1.77\storage\usb\sda1\
Yeah I guess I'm just missing how to do the most important part here.... access the external drive??
lol ... okay ... so I was using Busybox to auto mount my USB drive and it had a path outside of the sdcard.
now that i'm using stickmount i can access it fine....
I'm no longer getting the errors in uTorrent and the failed downloads, but I'm getting a lot of "Disk Cache overloaded 100%"
Anyone else with this problem?
Also, is it possible to setup stickmount and samba fileshare to start automatically without popping open?
forestrat said:
lol ... okay ... so I was using Busybox to auto mount my USB drive and it had a path outside of the sdcard.
now that i'm using stickmount i can access it fine....
I'm no longer getting the errors in uTorrent and the failed downloads, but I'm getting a lot of "Disk Cache overloaded 100%"
Anyone else with this problem?
Also, is it possible to setup stickmount and samba fileshare to start automatically without popping open?
Click to expand...
Click to collapse
Never had that problem with Cache, mind you I only downloaded a few things from within XBMC.
I think it stickmount and samba fileshare will always start automatically, if you dont want to see the notification on the screen, you just need to turn that off from with stickmount and fileshare.

[Q] How to free up space on amazon fire tv?

Hi all,
I rooted my fire tv. i downgrade firmware and installed CWM, install rbox bootloader, then upgrade pre-rooted firmware by rbox. Now when i check under setting --> system -> about i see 3.61gb free space from 5.49gb available space. I don't have a lot app installed in my rooted fire tv so i didnt think what i have installed would taken up 2gb. Here is what i have installed.
Google play store, kodi, llama, es file explore, busybee box, supersu, chrome, firefox and the whatever was required to gain root access, upgrade and downgrading firmware and whatever app is pre-installed from pre-rooted firmware.
Is there way to check which apps and files are taking up the most space and how do you free up space?
Also, does this sound right that only 3.59gb is left. At one point during my root process when i was pushing update.zip file thru adb to downgrade firmware, it took a very long so i exit out of adb (i simply click on "x" bar to close the connection) and started again but i am not sure maybe i installed update.zip file 2x. How do i check? How do ensure i don't have any unnecessary file on fire tv internal drive.
Thank you
I have 3 FireTVs, all rooted and they have between 3.0G to 3.4G free space so I say your free space is within reasonable range
lowbee said:
I have 3 FireTVs, all rooted and they have between 3.0G to 3.4G free space so I say your free space is within reasonable range
Click to expand...
Click to collapse
hi thanks for posting back. Makes me feel better but still out of 8gb user only has 3.5gb, not ideal. i wonder where did the 5gb go.
I am curious to hear from others to see how they cleaned up space, if there are any methods.
I'd have to say kodi might be the culprit taking a lot of space with excessive data storage.
Anything similar to xbmc can be a resource hog for storage.
ashsha7877 said:
hi thanks for posting back. Makes me feel better but still out of 8gb user only has 3.5gb, not ideal. i wonder where did the 5gb go.
I am curious to hear from others to see how they cleaned up space, if there are any methods.
Click to expand...
Click to collapse
You don't get 8GB of usable space. I think it is only about 5GB. So you are using about 1.5 GB for apps. Not too bad if you are running Kodi.
An easy way to check where files are taking up space is to use the "sdcard analyze" function in esfile explorer. Its under the tools section. Also, with esfile explorer, you can push files from your phone to the firetv pretty easy too. Select whatever file you want to send on your phone, under options choose send, and make sure esfile explorer is open on the firetv too. The firetv prompts you for where you want to save the file.
ashsha7877 said:
Hi all,
I rooted my fire tv. i downgrade firmware and installed CWM, install rbox bootloader, then upgrade pre-rooted firmware by rbox. Now when i check under setting --> system -> about i see 3.61gb free space from 5.49gb available space. I don't have a lot app installed in my rooted fire tv so i didnt think what i have installed would taken up 2gb. Here is what i have installed.
Google play store, kodi, llama, es file explore, busybee box, supersu, chrome, firefox and the whatever was required to gain root access, upgrade and downgrading firmware and whatever app is pre-installed from pre-rooted firmware.
Is there way to check which apps and files are taking up the most space and how do you free up space?
Also, does this sound right that only 3.59gb is left. At one point during my root process when i was pushing update.zip file thru adb to downgrade firmware, it took a very long so i exit out of adb (i simply click on "x" bar to close the connection) and started again but i am not sure maybe i installed update.zip file 2x. How do i check? How do ensure i don't have any unnecessary file on fire tv internal drive.
Thank you
Click to expand...
Click to collapse
You can free up quite a bit by pushing these advanced settings to
<advancedsettings>
<pathsubstitution>
<substitute>
<from>/storage/emulated/0/Android/data/org.xbmc.xbmc/files/.xbmc/userdata/Thumbnails/</from>
<to>/storage/usb/drive1/xbmcthumbnails/</to>
</substitute>
</pathsubstitution>
</advancedsettings>
You need to amend to kodi instread of xbmc if you're running 14.0 or higher AND my external is mounted by adbFire mount drives persistent. If you're using stickmount it would be sda (forget exact path?)
Once pushed and confirmed working, all your thumbnails will dissapear. Just go into userdata/database and delete textures13. Then restart xbmc.
Afterwards I also delete the thumbnails folder on internal. Oh yes...make sure you have a folder on external named xbmcthumbnails.
This should immediately clear about 600 mb and keep in mind you typically add more to your library so the amount it saves long term could be huge.
KLit75 said:
You can free up quite a bit by pushing these advanced settings to
<advancedsettings>
<pathsubstitution>
<substitute>
<from>/storage/emulated/0/Android/data/org.xbmc.xbmc/files/.xbmc/userdata/Thumbnails/</from>
<to>/storage/usb/drive1/xbmcthumbnails/</to>
</substitute>
</pathsubstitution>
</advancedsettings>
You need to amend to kodi instread of xbmc if you're running 14.0 or higher AND my external is mounted by adbFire mount drives persistent. If you're using stickmount it would be sda (forget exact path?)
Once pushed and confirmed working, all your thumbnails will dissapear. Just go into userdata/database and delete textures13. Then restart xbmc.
Afterwards I also delete the thumbnails folder on internal. Oh yes...make sure you have a folder on external named xbmcthumbnails.
This should immediately clear about 600 mb and keep in mind you typically add more to your library so the amount it saves long term could be huge.
Click to expand...
Click to collapse
Is that going to make loading thumbnails A LOT SLOWER??
Neo3D said:
Is that going to make loading thumbnails A LOT SLOWER??
Click to expand...
Click to collapse
That's actually a good question. I've been using these so long I don't have a memory of exactly how fast they loaded before. I'll say this--they populate fast enough for me to keep using them. I use usb 3.0. I think it's essential based on how big my library is and the fact I use aeon nox with additional fanart.
But, I'd be very interested in seeing if you or someone else sees a significant lag in load times. You can always delete the xml if you find it slow.
Just an fyi I got these from an xda member awhile back. Since then lots of people have tried them and so far I haven't hear complaints, but I'd still like feedback from someone who can compare.
Another suggestion is to pre-scrape all the necessary support files with a media manager of your choice (e.g. fanart, icon, content info, etc.) and switch to local info only on the scraper for the collection. It depends also on how you have your collection organized from a folder perspective.
I found this to be fastest and lightest on local storage (obviously because the "library" is already built) especially when you have a household of streamers. You have all the content centralized on your NAS already. It's silly for streaming box to build the library and re-download the content each time from the Internet (especially if your like me as a perpetual media player tinkerer).
Edit: For clarity, I mean a "Library manager." Look on the Kodi wiki for links to various clients on your preferred OS.
t3ch42 said:
An easy way to check where files are taking up space is to use the "sdcard analyze" function in esfile explorer. Its under the tools section. Also, with esfile explorer, you can push files from your phone to the firetv pretty easy too. Select whatever file you want to send on your phone, under options choose send, and make sure esfile explorer is open on the firetv too. The firetv prompts you for where you want to save the file.
Click to expand...
Click to collapse
Good to know this. Are there any other setup steps required to be able to do this? Or do you just have es file explorer installed and opened on both phone and FTV?
RuKuS4Life said:
Good to know this. Are there any other setup steps required to be able to do this? Or do you just have es file explorer installed and opened on both phone and FTV?
Click to expand...
Click to collapse
That's it. As long as the two are on the aame network, it should pick up the firetv as a target.
To clarify, on the phone, long click the file to send, and select send. The firetv ip adress will show up and allow you to send the file. When the prompt shows up on the firetv(provided that esfile explorer is the active and open app), accept the transfer and select tge location to store the transferred file.
t3ch42 said:
That's it. As long as the two are on the aame network, it should pick up the firetv as a target.
To clarify, on the phone, long click the file to send, and select send. The firetv ip adress will show up and allow you to send the file. When the prompt shows up on the firetv(provided that esfile explorer is the active and open app), accept the transfer and select tge location to store the transferred file.
Click to expand...
Click to collapse
I got sdmaid. It recovered about 1.5gb. Get the pro version from google play.

[Q] Connecting Kodi on Fire TV to Mac on the Same Network

How do I go about connecting Kodi on my FireTV to my Mac on the same network? I'd like to back up Kodi and save the backups externally on my Mac, but I'm not sure how to access my Mac from the Fire TV. For example, when I go to the "Install from Zip File" window, I don't see any references to my Mac's hard drive listed in the sources there.
Raymondo17 said:
How do I go about connecting Kodi on my FireTV to my Mac on the same network? I'd like to back up Kodi and save the backups externally on my Mac, but I'm not sure how to access my Mac from the Fire TV. For example, when I go to the "Install from Zip File" window, I don't see any references to my Mac's hard drive listed in the sources there.
Click to expand...
Click to collapse
You can try NFS or FTP (however ftp makes your password visible in Kodi's sources list). SMB and AFP shares never seem to work right for me on OSX with Kodi. Actually NFS can be a pain too.
You may just what to push the file to the SDcard with adbfire
http://forum.xda-developers.com/showthread.php?t=2786505
To add the sdcard to the Install from zip file source selection list in Kodi:
System>File Manager>Add source>Browse>select root filesystem>select sdcard
click ok
give it a name like #sdcard, the Hash tag is only to put it at the top of the source list alphabetically.
You can delete the zip file when you are done with ADBfire too.
I appreciate the reply. Yes, I've been using the SDcard as my connection point, but I was hoping to be able to connect my Fire TV to my Mac so I could schedule Backup to automatically store backups off of the Fire TV. In lieu of my Mac, I attempted to use my Dropbox account, but ran into difficulties there as well, which I'll post in a new thread.
Create an smb (windows) share on your Mac. If you want to use a password for the share create a user for network shares or use your own (gives a warning about not secure password storage). Otherwise enable the guest account on your Mac for network shares and add your destination folder to the list of shares in system settings.
Sent from my GT-I9195 using XDA Free mobile app
Success! Thank you, superkoal, for pointing the way. I was able to finally connect my Mac to my Fire TV.
The only bummer is the Backup program add-on still throws an error when I try and do a backup to my Mac. (I thought it might be a problem with using Dropbox as a backup location). But at least I'm finally connected, and that will certainly come in handy elsewhere.
Many thanks!
Could someone please post this method with more details for us newbs? The only method I have been able to figure out (and I've tried LOTS of guides and a parade of programs) is using SSHDroid and Yummy FTP on my Mac. Something is lacking here as if you send a large file it seems to hang at 2.14 GB and never complete. Don't know if that's a SSHDroid issue or not.
Wound up moving to es file explorer and have a more stable connection with no issues sending that large file. Guide is on my site as it's loaded with pictures. I can't post links so go to hackthatphone.com, click tutorials, click the fire tv icon and you'll see the short guide list I have.
My next goal: learning how to unmount and remount an external hard drive through a powered hub, if it's even possible....

[GUIDE] How to install Plex Media Server on external storage (Micro SD or USB Flash)

If you use Plex and Plex Media Server on your Nvidia Shield Android TV, as your library grows, you'll soon learn that Plex Media Server can eat up a lot of that fast, precious internal storage.
Please note the current limitation of Plex Media Server for Android:
Note: The server's data directory will always be placed on the original internal storage, even if you expand it with a USB drive or microSD card.
Click to expand...
Click to collapse
I ran into this problem and spent days trying to figure out how to set the location of the metadata database to the external (adopted) storage. Unfortunately, Plex doesn't give Android users this option like they do for Windows users. Maybe in the future? Maybe if enough of us make a stink on the interwebs?
If you can't wait that long, here's a guide on how to install Plex Media Server directly to your external storage, be it Micro SD or USB Flash Drive. Just make sure your storage media is SUPER FAST. So, it's probably best to go with the fastest USB 3.0 Flash or SSD drive you can find.
IT IS CRITICAL TO DO THESE STEPS IN ORDER:
Root the Nvidia Shield 16GB Nougat (2015)
Insert Micro SD card or USB Flash drive (make sure it's fast) and adopt the storage.
Install ES File Explorer and use its Root Explorer or use ADB command line:
Code:
adb uninstall <package_name>
to remove the Plex Media Server app. Reboot and verify that it's truly removed.
Enable Developer Options
Install Plex Media Server from Google Play. Yes, this will install it in the Internal Shared Storage, but it won't be in the /System/ folder.
Go to: Settings > Developer options > Force allow apps on external (4th from the bottom)
Go to: Settings > Apps > Storage Used and move Plex Media Server to the external storage.
Reboot the Shield
*Start Plex, initiate Plex Media Server, do not build default libraries, and it should work
Reboot the Shield
Use the Plex web client to create your libraries
Enjoy!!
*Whenever you restart the Nvidia Shield, launch Plex using the Plex Media Server shortcut in SETTINGS > APPS because you have to wait 1-3 seconds for your Micro SD or USB 3.0 Flash Drive to initialize, so this makes sure the PMS is running before Plex is opened.
Thank you so much for this guide.
Damn son, You literally just did the impossible!!! People have been trying to achieve this since Plex came to Shield Tv. Over 9000 thanks to you for getting this done & for posting a guide!!!
I got this to work, But had massive trouble trying to remove PMS with both ES File Explorer & ADB. After a hour or 2, I was finally able to remove PMS with Titanium Backup Pro successfully. I've got as far as setting my libraries up now & it all apiers to be on my 3.0 SSD
I can't find the folder to place the channel bundles. Did the folder structure change from the plex server that is installed as a system app?
liqianghua said:
I can't find the folder to place the channel bundles. Did the folder structure change from the plex server that is installed as a system app?
Click to expand...
Click to collapse
Im looking to install a few plugins & it seems the folder has been moved from "/data/data/com.plexapp.mediaserver.smb". Did you happen to find the new location of the appdata location?
EDIT: I have just managed to find it. Its located at.. "mnt/expand/RANDOM CODE/user/0/com.plexapp.mediaserver.smb"
RANDOM CODE Seems to be the adoptive storage ID. I didnt include mine because chances are is that mine would be different & it is around 35 characters long.
BIFFTAZ said:
Im looking to install a few plugins & it seems the folder has been moved from "/data/data/com.plexapp.mediaserver.smb". Did you happen to find the new location of the appdata location?
EDIT: I have just managed to find it. Its located at.. "mnt/expand/RANDOM CODE/user/0/com.plexapp.mediaserver.smb"
RANDOM CODE Seems to be the adoptive storage ID. I didnt include mine because chances are is that mine would be different & it is around 35 characters long.
Click to expand...
Click to collapse
Thank you BIFFTAZ. I appreciate your reply. It was driving me crazy not finding it. I ended up resetting my device in frustration and will let you know once I get my Shield back up and running.
Thanks muchly, Neo3D!
It's been working fine for me for the last 10 days or so on my 2015 16GB. Netflix is still working too - I'd read somewhere that they'd made it stop working on rooted devices but that doesn't seem to be the case here.
Hopefully the setup will survive the next Plex Media Server update !
BTW, after much unsuccessful faffing around with ES File Explorer etc, in the end I removed the existing PlexMediaServer via:
Code:
adb shell # on your PC
su # you will have to grant superuser access when asked by the SU app
mount -o rw,remount -t ext4 /system # mount /system as read-writeable
cd /system/app
rm -rf PlexMediaServer
Does this method work for the latest version of Shield with the latest software (just got one last week) ?
If yes, do any of the steps above change for it, or can I follow them to the dot?
TIA for the help... and Thank you OP for the awesome work!
@Neo3D, tank you so mutch, your trick worked like a charm (on my Nvidia Shield TV 2017, 16GB, Nvidia Experience 6.2)!
I've been spent a lot of time searching a solution to the Plex server and 16GB Shield limitation, and finally I got Plex working on the adopted storage!
(I suggest to @snickler or others moderators, to post this solution as a sticky post)
I also made some R/W performance tests:
1) insternal Shield storage: 210/40
2) KingFast SSD, 30GB, 1,8 inch, mSATA III, MLC (adopted storage) + Inateck USB 3.0 SSD mSATA, USB 3.0: 210/97
3) SanDisk Ultra Fit, 32GB, usb 3.0 (adopted storage) : 80/30
BIFFTAZ said:
Im looking to install a few plugins & it seems the folder has been moved from "/data/data/com.plexapp.mediaserver.smb". Did you happen to find the new location of the appdata location?
EDIT: I have just managed to find it. Its located at.. "mnt/expand/RANDOM CODE/user/0/com.plexapp.mediaserver.smb"
Click to expand...
Click to collapse
Hi, I have a question: did you managed to manually install plugins like Trakt or WebTools?
coolpal said:
Does this method work for the latest version of Shield with the latest software (just got one last week) ?
If yes, do any of the steps above change for it, or can I follow them to the dot?
TIA for the help... and Thank you OP for the awesome work!
Click to expand...
Click to collapse
Yeah, it works!
You can follow the step-by-step from the OP, in case of troubles uninstalling Plex server you can follow the steps provided by @Xaph0d.
When starting Plex server for the first time, pay attention to the pop-up asking for w/r permission.
Then profit it!
goose2600 said:
I also made some R/W performance tests:
1) insternal Shield storage: 210/40
2) KingFast SSD, 30GB, 1,8 inch, mSATA III, MLC (adopted storage) + Inateck USB 3.0 SSD mSATA, USB 3.0: 210/97
3) SanDisk Ultra Fit, 32GB, usb 3.0 (adopted storage) : 80/30
Click to expand...
Click to collapse
How did you do this performance tests?
goose2600 said:
Yeah, it works!
You can follow the step-by-step from the OP, in case of troubles uninstalling Plex server you can follow the steps provided by @Xaph0d.
When starting Plex server for the first time, pay attention to the pop-up asking for w/r permission.
Then profit it!
Click to expand...
Click to collapse
Thanks.. was able to root it.
Had to splice two usb cables to make A to A cable.
Now stuck on deleting PlexMediaServer. Using the method suggested by @Xaph0d, and get a prompt from superuser which i granted, but still see "Read-only file system". Any ideas what could be wrong?
GrandStar said:
How did you do this performance tests?
Click to expand...
Click to collapse
Just using A1 SD Bench android app.
It is not science, but crearly demonstrate as adopted storage can be fast.
coolpal said:
Now stuck on deleting PlexMediaServer. Using the method suggested by @Xaph0d, and get a prompt from superuser which i granted, but still see "Read-only file system". Any ideas what could be wrong?
Click to expand...
Click to collapse
Try this:
Code:
adb shell
su
mount -o rw,remount -t ext4 /system
Thanks @goose2600
I am able to get it all working!
Can I migrate my existing PMS library metadata from Windows 10 machine to Shield?
coolpal said:
Thanks @goose2600
I am able to get it all working!
Can I migrate my existing PMS library metadata from Windows 10 machine to Shield?
Click to expand...
Click to collapse
Probably you can, but as I am new to Plex (and also re-reading the steps 9 and 11 of this guide) I don't know how Plex create the library, so I preferred to start from the scratch.
Now I would like just to find a way to install any unsupported plugins. If you will ever know the way, let me know
EDIT: To get unsupported plugins to works, we have justs to symlink the Plug-ins folder located in the data folder present in the external adopted storage (which is no writable) to a new folder located on the /sdcdard, which is writable.
I just graded to higher external HD from smaller HD. My device is not rooted and stock. I don't how I managed use my original HD as my plex server for all my movies. Now trying to figure out update it where the shield would recognize the new HD
Thanks for this guide, got it all working! Apart from one thing....
For some reason Plex is not downloading all the metadata, movie posters etc. It will only download maybe a handful or two, but not my whole library.
I had no issues when Plex was on the internal storage, but a nightmare now on the external storage. What can I do to fix this please?
Be sure to follow the guide step by step, even steps 9, 10 and 11.
Pay also attention to give the r/w permission when Plex will ask for them (it is pretty easy to dismiss the request).
I moved Plex data on two devices following this guide, and always worked without any troubles.
goose2600 said:
Be sure to follow the guide step by step, even steps 9, 10 and 11.
Pay also attention to give the r/w permission when Plex will ask for them (it is pretty easy to dismiss the request).
I moved Plex data on two devices following this guide, and always worked without any troubles.
Click to expand...
Click to collapse
I've followed the guide exactly, especially those steps. Still don't get why it's only downloading some metadata and not all my library. Will have to post a screenshot later
Without root
I belive it shoud work also without root doing this:
1. Enable Developer mode
2. Enable ADB via usb in developer
3. run:
Code:
adb devices
4. Give permission on the screen
5. run:
Code:
adb shell
6. run:
Code:
pm uninstall -k --user 0 com.plexapp.mediaserver.smb
(this will uninstall the app from curent user 0)
7. Reinstall Plex Server form store

Categories

Resources