yashsingh1/xdaforums huggingface dataset:
[Fire TV General] Y314K:
[MENTION=5957312]AFTVnews.com[/MENTION] [MENTION=2205195]jmandawg[/MENTION] - Any chance that you can get more precise on the guide about FW changes. Still a bit confuse how the script will work with upgrades or downgrades of FW. This is related to v2.5 of the script.

"Additionally, you will need to redo steps 7 thru 14 anytime you flash a new software update within ClockworkMod. More information can be found at this XDA post."

While running everything from the USBHDD. We would need to sideload or push the FW update to a partition that CWM could see. Then the FW would be flashed from CWM. Would we reboot after the FW upgrade/downgrade. Or Would we continue to steps 7-14 without reboot. Would things be installed to the correct places when most things are in the USB drive. Then your guide says to reflash the script zip. But won't going from step 7-14 send everything on the USBHDD back to the internal storage. And back out to the USBHDD in order to reset the USBHDD ?? What about if the space in the internal memory is not big enough to handle the space that was used up in he USBHDD ? Probably over/under thinking it but trying to understand it more.. Any help wold be appreciated.
[Fire TV General] jmandawg:
when you flash the updated firware update in CWM, flash my zip right after. Do not wipe or do anything it should work.
[Fire TV General] Y314K:
Cool.. So the Factory Reset & wipe & format is only needed at first install & everything should be updated correctly during the FW update & nothing gets moved from the USBHDD on the second install of the script. Thanks for the clarification. :good:
[Fire TV General] jmandawg:
technically you shouldn't even need to do a wipe the first time, but someone here reported problems. I think it was most likely due to stickmount & Link2SD links that were broken or left behind.
[Fire TV General] Y314K:
Even better... And the same should be thru when downgrading or upgrading right. Since it's all PreRooted FW anyways..
[Fire TV General] jmandawg:
yes
[Fire TV General] Y314K:
Just a heads up. Wondering if something in this script: http://xdaforums.com/fire-tv/development/busymount-v1-0-t2920146 can help with the single USB drive limit of your script.

Maybe using "the mntdrives2.sh script to mount the drives via their UUID, an internal label that is applied when the drive is manufactured. If you have more than one drive attached to your Fire TV this is very important." might be the ticket...

Update: Yeap.. Seems it should do the trick.... http://xdaforums.com/showpost.php?p=56374533&postcount=6
[Fire TV General] jocala:
Pretty sweet work jmandawg! I was able to get around the "one drive only and it's sda1" issue by busybox mounting my usb drives via UUID rather than device name. BTW, when does the init.bueller.sh script run? If it doesn't run does it break wifi?
[Fire TV General] Stevie G:
Any reason why a usb 3 to sata adaptor needs to be used instead of a usb3 2.5" casing. Does the same job me thinks. Anybody can confirm if I can get the usb3 casing for the ssd drive. Must it have 1 or 2usb connectors to plug it into a hub or will 1 usb work to boot up the ftv ok and will it provide enough power.

I have a 1.5tb go flex seagate usb3 2.5" drive and it does not boot ftv up when plugged in.
[Fire TV General] jmandawg:
That was a good idea with the uuid. The init.bueller.sh is the first init script to run. I'm suprised you were able to umount /data in the install-recovery.sh I think i had issues with that. I have no idea what happens if it fails but it looks like it will hose your wifi. Not sure how it could possibly fail since it should continue after the script is run.
[Fire TV General] jocala:
Mounting by label works too.

Edit: I was able to mount data from init.d, but your method of dealing with the data drive from init.bueller is cleaner. I think separating it out from mounting ancillary drives works better.
[Fire TV General] jmandawg:
Do you think we should unify the scripts or keep them separate? If we keep them separate i'll update mine with some of your code for getting the UUID. I was just trying to avoid the dependency on busybox, but you eventually get to a point where you have to have it.
[Fire TV General] rotor00ter:
I think it would be great if the scripts could work together and incorporate them into a new version of adbfire perhaps? That would make it easier for everyone to use them. Its nice and handy having the easy interface of adbfire to do pretty much everything I need to do on the FTV.
[Fire TV General] Y314K:
Should be on both Apps... This script is actually on the AFTV Utility v28 already. Should be a universal option... Can't wait for all the wrinkles to get iron out. Only plan to have one HDD plugged in at all time but this would mean we can connect USBSticks for media playback or other storage transfer etc. While still running from external USB device.
[Fire TV General] rotor00ter:
Yup, these developments are very good news for people who have rooted or rootable Fire TV's. This little box is getting better all the time.
[Fire TV General] jocala:
I discovered a problem where this code:

for i in misc;
do
if [ -e /data/$i ]
then
mount -o bind /olddata/$i /data/$i;
fi;
done;

failed when called from init.d, but it executes cleanly every time when the script is called from init.bueller.sh. I like your method and it seems that it has less chance of screwing up since it's called earlier in the boot sequence. I've attached my script...it loops through /dev/block/sd* and grabs the drive by label or uuid. If it's not ext4 it bails. Please feel free to use it in any way. Just thanks for the /data swap :)
[Fire TV General] jmandawg:
My version of busybox ( the one from the play store) doesn't output the type or label. Is yours a special build?

root@android:/ # busybox blkid --help
BusyBox v1.22.1-Stericson (2014-01-25 17:27:18 CET) multi-call binary.

Usage: blkid [BLOCKDEV]...

Print UUIDs of all filesystems

root@android:/ # busybox blkid /dev/block/sda1
/dev/block/sda1: UUID="929a8d92-40ea-4c4a-bb58-b85beb1b4139"
[Fire TV General] jocala:
Help yourself to mine. It's not a special build, I just compiled it myself from source so I could select options like blkid/uuid/label/vi and other things that the Play Store versions leave out.
[Fire TV General] Y314K:
That sounds like a special +++ build... Link please or where can one keep up with your latest version...
[Fire TV General] jocala:
Busybox uses a linux kernel-like build system. You configure a build with the command "make menuconfig" to select your desired options, then type the command "make" to compile it with a cross-compiler. To me "special" means that I patched or modified the code, which I did not do. I just selected options then compiled it.

Here's my latest build busybox-1.22.1 current stable
[Fire TV General] Y314K:
Cool.. Do you know if BusyBox Pro comes with all the bells & whistles your compile includes... Or still two different related animals... ?
[Fire TV General] jocala:
BusyBox is a GPL project. BusyBox Pro is just GPL BusyBox with Stericson's Android GUI on top. None of the Google Play busybox distributions include all the options I need, so I compiled my own.
[Fire TV General] Y314K:
Got it... You use your compile one more broadly. I see it's not in .apk with gui form.
[Fire TV General] jmandawg:
Ok cool thanks I think i'll take you up on that offer. You may want to put a warning not to update busybox from the playstore or it will (kinda) break your script when you can't find the label or type.
[Fire TV General] Y314K:
Any changes coming to the scripts related to the unlock bootloader & EXT4 CWM support ??? How about related to BusyMount ??
[Fire TV General] Y314K:
[MENTION=2205195]jmandawg[/MENTION] Heads up: http://xdaforums.com/crossdevice-dev/sony/ntfs-mount-tool-android-t2920856

Did have one ? The EXT4 scrips survive hard reboot ?? Unplugging the FireTV for any period of time as long as the USB device is still plugged in at reboot ??
[Fire TV General] jmandawg:
Not sure what your asking, but this script will survive reboot.
[Fire TV General] barrist:
Hmmm anyone else find even the mount to media option slows down their Xbmc? Is that where it stores the user data folder ?
[Fire TV General] t3ch42:
I had the first script installed, but moved onto the partial data script when I installed the 10-30 rbox image. I've seen things slow down tremendously more with this version more so than with the earlier version which wasn't kind to USB sticks.

Thinking I might go back to that one even though it probably cuts the life of the flash drive down.
[Fire TV General] jmandawg:
Which partial data version are you using?
[Fire TV General] Stevie G:
So i took the plunge and tested the method with 2.5 version using a 90GB sata III ssd in a usb 3 enclosure. no lag at all. everything woks as normal and no slow downs so far. i do not have a usb3 powered hub to test. will probably test it as i need to plug my keyboard in.

if there is anything you want me to test for you, just let me know.

i am running on the latest pre rooted firmware and CWM
[Fire TV General] Y314K:
If you have a powered or non-powered 2..0 USB hub.. Try it anyways.. You might find there is still no lag at all..
[Fire TV General] t3ch42:
As far as i know, the MountPartialDataToUSB_v1.0.zip.

I started with a fresh install, and it is barely usable. The lag occurs with every few clicks down in xbmc and tries to catch up, but overshoots with the remote.

What is the best method right now for a usb stick? I know ssd or hard drive is better, but im using a micro sized usb for smallest footprint.

Thanks again, and i'm glad this thread is getting more attention now. :)
[Fire TV General] Tinwarble:
The problem with using a non-powered HUB is that the only reason to have a HUB is to be able to plug in multiple USB devices and the AFTV's port does not supply enough power for multiple devices.

Speed shouldn't be an issue either way, unless there is just something wrong with your HUB. However, from experience (just having a HDD, keyboard and mouse dongle plugged in), if you reboot the AFTV may not detect the HDD with a non-powered HUB, it may even cause issues during operation.
[Fire TV General] Y314K:
Right.. But in my case I plan to just have the USBHDD plugged in. And on very rare occasions I will also add a USB keyboard for CWM. Maybe I will add a Logitech Mouse if i can really help control things more then the remote. But most of the time I just plan to have a single USBHDD device connected. Was just wondering what where the experience for others..
[Fire TV General] jmandawg:
You are using the really old one. I think in that version i forgot to leave /data/system mounted to internal storage and the system reads/writes files there constantly..

Use this one MountPartialDataToUSB_v3.0.zip I'm using it with a USB 2.0 stick and barely notice any lag. You might have to do a wipe though because some of the files will be out of sync.
[Fire TV General] t3ch42:
Whew. Thats good to know theres a likely reason performance is poor. I'll check again because i didn't see any other version than what i used.

Will try and let you know.
[Fire TV General] Y314K:
How much space has it freed for you ?? Is it mostly a gaming FTV for you ?? Wow.. Didn't even know about the v3 update... Good surprise...!!!
[Fire TV General] jmandawg:
Make sure you have the drive plugged in when you flash the zip, because that is when it grabs the UUID of the drive.

And if you do a factory reset then make sure you erase everything off the usb stick as well.

It just added 16GB of extra space with my drive.
[Fire TV General] Y314K:
Right... But...

What I meant by how much space it freed. I mean what goes to the internal in /data/data vs what gets taken to the external side. Guess I am still just thinking of the old version of the script where only the odb stuff for games gets moved out. Is it more then just the odb stuff now... It seems to be the best mix of what gets move vs speed for a thumb drive. Now I'll have to figure out if using 16GB USBStick are fast enough since it would make things a lot easier then having to worry about USBHDD's.. You've made things very interesting again.... Thanks..

? Are we still not using parts of the internal in the overall memory amount like the original script ? Or is the script now splitting stuff from internal & external to use the all the possible memory on both internal & external ??
[Fire TV General] barrist:
What was the bug in the older Mounttomedia zip? I reverted because I found XBMC noticeably more laggy with a 64GB flash drive plugged into a powered hub. I wouldn't mind giving it another shot with the new v3.0 if it'll make a difference.
[Fire TV General] jmandawg:
What version were you running before? The bug was it would re copy over data every boot .
[Fire TV General] barrist:
I did it just yesterday, and downloaded the file from OP:	MountMediaToUSB_v1.0.zip
[Fire TV General] jmandawg:
It will perform the same then, probably not worth trying again. I'm suprised it was slow, i'm using a usb 2.0 stick and i can barely notice the difference. How much slower was it than normal?
[Fire TV General] barrist:
It was fairly apparent, but I have OCD about that kinda stuff. For example the images for artwork would take a noticable (to me) moment to load compared to before with just the stock internal storage where it was basically instant.

Maybe I didn't give it enough time to settle down or something. Could be my hub as well. If I have some time i may just try it out again just for the hell of it. It would be nice to free up some of that space if i want to download some games that store files in the data/media/ portion.
[Fire TV General] gerikss:
Should I remove everything from USB flash drive? After formatting into ext4, it got lost directory and I also copied zip archives with scripts on it.

Tried v1 and v3 partial data mounting and got no luck. v3 just loads as usual and available space is still below 4Gb. v1 is just not loading at all, sicks on amazon logo forever, i waited for like 40 minutes and had to unplug the power.
[Fire TV General] jmandawg:
Delete all the files off you usb stick and then reboot the firetv with the usb stick plugged in to it. After it is booted, post the output of of this command from adb:

adb shell cat /storage/usb/mountUSB.log
[Fire TV General] gerikss:
Thanks for quick reply. I'll do it as soon as I get home. I am also using stickmount app to mount my usb drive, should I disable it before I restart fireyv?
[Fire TV General] jmandawg:
Probably, There was someone else that tried while they were using stickmout and link2sd and they had issues.

If you use v3 make sure the usb drive is plugged in when you flash the zip.
[Fire TV General] cd2022:
I tried MountDataToUSB v3 with an external USB HDD partitioned as Primary Ext4 and logical ntfs. In Amazon System "About" it doesn't show the expanded capacity of 46G of the ext4. A file manager app shows both drives in /usb which are mounted by jocala's Busymount. Revert to v2.5 and it shows again. Seems like it doesn't "fuse" the internal to external?
[Fire TV General] Stevie G:
My somehow cannot use a non powered and powered hub to connect my mouse or keyboard with the drive when booting AFTV. The Jon powered takes long and then just boot via the normal AFTV way and I cannot access the drive. The usb powered one does not even want to boot the fire tv. After this stage I can only use my ssd to boot the AFTV and cannot use any other usb device.

Do you guys know of any usb powered or non powered usb hub that I can boot up with the drive with keyboard plugged in.
[Fire TV General] jmandawg:
Did you have only the usb drive (and no other drives) plugged in when you flashed the v3 zip?

Post the out put of: cat /storage/usb/mountUSB.log
[Fire TV General] Stevie G:
which usb 3 hubs do you guys use that is working with a usb 3 external drive booting up.

is their any specific name brands
[Fire TV General] cd2022:
NVM, I forgot to remove the USB stick when flashing your script. All is well now.

---------- Post added at 12:37 AM ---------- Previous post was at 12:19 AM ----------

I use this one, works for me with a Logitech k400, portable USB HDD:

AmazonBasics 4-Port USB 2.0 Ultra-Mini Hub
[Fire TV General] gerikss:
Thank you man! Deleted all files from my USB flash, plugged it in before flashing and it worked, but had some lag in XBMC... So i took my old 1Tb external hard drive, formatted 250Gb into ext4 and remaining part into NTFS and speed is much better now even though my drive is usb 2.0 only.
[Fire TV General] Y314K:
Thinking of getting 3 Transcend TS-HUB3K Powered USB 3.0 - 4 Port Hub's for my FTV's... I think I can get the price down to under $13 each with coupon. But was wondering if anybody had any experience with that brand or that specific hub & FTV's...
[Fire TV General] Stevie G:
That is the the exact same nod that they sell locally in my home town.

Can you test it and give feedback if you can boot up a external drive with it

Thanks
[Fire TV General] Y314K:
Have not placed an online order for it yet. Not sure how soon I will. Hopefully someone is already using one & can let us know...
[Fire TV General] onlinespending:
This is a great thread, but I'm curious if anyone's done a similar thing with a network attached storage, so that an NFS or Samba share could be mounted as /data and /sdcard. Would be awesome to simply use the USB storage that I already have attached to my router for installing apps and games to. And this way, I could have multiple Fire TVs in my home access the same NAS files.
[Fire TV General] Stevie G:
Is it possible to boot the AFTV from the network storage drive perhaps. Maybe you guys can look into it perhaps. It will save us from struggling to get a usb hub to boot the AFTV up. If this can be done, it will be awesome.
[Fire TV General] rbox:
If you modify the ramdisk to either do a static ip early or dhcp early, and then modify the fstab to mount whatever over the network. Sure.
[Fire TV General] collindv:
I notice a small amount of lag using a USB 3.0 thumb drive. I assume over a lan connection it would be even worse.
[Fire TV General] t3ch42:
The lag depends on the USB thumb drive used. I noticed horrible lag when I tried a new pny 32gb drive for a test update. I finally realized what the problem was and went back to my 32gb cruzer fit. I have hardly any lag when using the partialusbmount 3.0 version. It is night and day between the two sticks.

Using NFS could go either way.

On another note, maybe we can start a list of USB hardware which works well and those that are junk.

So far, my Sandisk 32gb cruzer fit 0781:5571 works awesome, and my PNY 32gb 154b:007a drive is junk.
[Fire TV General] Y314K:
For NFS then the router will be what makes the difference...
[Fire TV General] KhoaTon:
Labeled Volume Won't Work Because setUUID.sh Fails to Get UUID. Fix Included

Thanks for a great package and thread, jmandawg and all.

I followed the directions, but my USB disk was never seen. Looked into it and it turns out that I had labeled the volume when I created the ext4 partition with gparted (on Linux). The current (v3.0) /system/etc/setUUID.sh script was unable to get the UUID entry for the USB drive (sda1) if it has a label.

The following fix to /system/etc/setUUID.sh in the packages will handle USB drives that have labels, as well as those with no labels. Change line:

UUID=$(/system/xbin/busybox-mountusb blkid | /system/xbin/busybox-mountusb grep 'sda1' | /system/xbin/busybox-mountusb awk -F ' ' '{print $2}')

to:

UUID=$(/system/xbin/busybox-mountusb blkid | /system/xbin/busybox-mountusb grep sda1| /system/xbin/busybox-mountusb sed -e 's/^.*UUID=/UUID=/' -e 's/ .*$//')

IMPORTANT: Note that there is a SPACE between / and . in the -e 's/ .*$//' above.

I was able to get a 160GB Intel SSD drive using a powered 2.0 USB port (for keyboard use at same time as USB drive) and external USB 2.0 SATA enclosure installed for /data usage, with no noticeable slowdowns.
[Fire TV General] AQKhanTheOne:
I saw and bought a Monster branded 128gb external USB 3.0 SSD, as Sam's had them at $50. The tiny form factor and the idea of it being bus powered appealed and 128gb would be enough to hold plenty of apps and games. I also thought it would perform better with the FireTv than the Leef 32gb USB flash drive I've been using. Well after formatting it to ext4 and using jmandawg's full strength MountDataToUSB v3.0 script, I found that the lag was even worse than with the flash drive.

So for this particular brand SSD external, I would say not really any improvement. I'm not using a powered hub though, just a standard 4 port Amazon Basics usb 2.0 hub. I'm not sure if a powered hub would do anything to change the performance.

One other thing that's of note is that even when the FireTv is "sleeping" the drive activity led on the SSD flickers almost all the time. And too, the led on the USB hub stays lit while the FireTV is asleep.

Edited to add:

Actually, the more I've used this "SSD", the lag has become horrible. At this point I'm wondering if this is actually an SSD at all and not just a crappy USB flash drive shoehorned into an enclosure made to look like an SSD.
[Fire TV General] jmandawg:
Thanks I will update the scripts when I have a chance.

Edit: updated to v3.1
[Fire TV General] bula1ca:
prophecy italyja

I follow the directions and tried 3.0 and 3.1 packages and my drive is not being seen at all. Any idea what it may be? Thank you
[Fire TV General] jmandawg:
Is the drive formatted ext4? Is the drive plugged in when you flash the zip? is it external HD or usb stick? External drive need a powered hub.
[Fire TV General] bula1ca:
It is an external SSD HD in a USB2 enclosure formatted ext4, primary partition and active. So I will need a power hub then. Thank you for answering back. BTW great work.
[Fire TV General] Tinwarble:
You shouldn't need a power USB hub,.................................although I would recommend it.

You should make sure that your drive is getting mounted in recovery. Unplug your drive, then reboot into recovery, then plug your drive back in and make sure you're get the mounting message. Wait unit the drive is mounted, then install the script again.

If it still doesn't work after that (I ran into this problem recently), reboot back into recovery and reformat the drive to EX4 using CWM, then install the script again.

Also, for anyone wanting to use a non-spinning drive and not go the SSD route, because I was concerned about my 500GB HDD always spinning I just switched to a 32GB SD card.

I'm using this card reader: http://www.amazon.com/Targus-USB-2-...1416515831&sr=8-1&keywords=targus+card+reader

And this 32GB PNY [MENTION=4632091]50mb[/MENTION]/s SD card: http://www.amazon.com/32GB-High-Per...416515776&sr=8-3&keywords=pny+32gb+sd,+50mb/s

I'm also using MountDatatoUSB_v3.0 and it's working really well. I don't see any performance difference between using the SD card vs. my HDD, the bonus being that I don't have to worry about having a continuous spinning drive attached..
[Fire TV General] bula1ca:
Hi,

Problem is I am getting "ID not fund. Is your HD pugged in? Plug in ext4 drive and try again" when I install script no matter if I use a powered or not power hub. I must had formatted this HD 100 times so far using Paragon and minitool partition software. Tanks you.

BTW how do I format drive in CWM? I do not want to screw up something else.
[Fire TV General] Tinwarble:
Is the drive being mounted in CWM?

What version of CWM do have installed?

If your drive doesn't get mounted in CWM, then flashing the zip will not work. And I suggest you update to the latest CWM version 6.0.5.1.4a.

Check under "mounts and storage" in the CWM menu, you should see /storage/usbdisk If you don't see that then your drive isn't mounted.

If you don't see that, unplug your drive, then plug it back in, then you should see on the bottom left of the screen, something like "storage/usbdisk mounted". If you don't then there is something wrong with your drive.

If you do, then press "ESC" on you keyboard to get back to the main menu, then select "mounts and storage" again. You should then see "format /storage/usbdisk", select that and that will give you the option to format the drive as ext4.