[Fire TV General] jmandawg:
The goal of this was to swap /data and /sdcard with usb storage so that i could install unlimited apps and games. Swapping them does come at the price of speed as the usb interface is not as fast as the internal storage. Bascially you could do the same thing with stickmount and link2SD, but then you have to deal with stickmount and link2SD....

This is based on croniccorey's "INT2EXT+" script located here: http://xdaforums.com/showthread.php?t=1716124

Thanks to rbox for recovery and jocala for UUID idea.

Warning: This will make your fireTV run slower. This works best on a clean install, but should work either way. You may see a pixelated screen on first boot and it will take a few minutes while files are copied to USB, just be patient.

There are now 3 versions of the scirpt pick your poison:

1. the original MountDataToUSB which mounts your USB drive to /data (except /data/misc). This is the total solution for external usb drive hard drives plugged into powered hub only. External Hard Drives only, DO NOT USE WITH USB THUMB DRIVE.

2.. MountPartialDataToUSB Same as #1 except it leaves /data/misc /data/system and /data/data mounted to internal storage. The downside is when you install new apps some stuff does get installed to /data/data which takes up internal storage space. Tested with USB 2.0 thumb drive and UI seems as fast as stock.

3. MountMediaToUSB which mounts your USB drive to ONLY /data/media (and the fuse mount point /sdcard) expanding where game OBB files are stored (similiar to sticking an SD Card in your phone). This should be about as fast as stock fireTV except when accessing data off /data/media but this doesn't expand /data/app

I've made this into a CWM flashable now to simplify things. You need to have the following pre-requisites:

Instructions:

1. Plug in ext4 formatted USB Drive

2. adb reboot recovery

3. Factory Reset (optional but recommended, some users have reported errors if they don't. Also first boot will take longer while it copies all files from data). If you factory reset make sure you are blocking updates.

4. Flash zip in CWM. MAKE SURE THAT ONLY YOUR DRIVE YOU WANT AS DATA IS PLUGGED IN WHEN YOU FLASH v3.0 and newer zips THAT IS WHEN THE UUID IS READ and stored.

4. Reboot (first boot may take a few mins while files are copied, pixelated screen may display for couple minutes be patient). May be very laggy while it is downloading everything from the cloud to your usb drive, but should speed up a bit after it's done.

5. a. If using full data mount - Check System about for available disk space .

b. if using Media Mount only - run this command from shell and view available storage on media:

root@android:/ # df
Filesystem Size Used Free Blksize
/dev 974M 48K 974M 4096
/mnt/secure 974M 0K 974M 4096
/mnt/asec 974M 0K 974M 4096
/mnt/obb 974M 0K 974M 4096
/storage/usb 974M 4K 974M 4096
/system 756M 723M 33M 4096
/data 5G 946M 4G 4096
/persist 7M 4M 3M 4096
/cache 756M 13M 742M 4096
/firmware 63M 7M 56M 16384
/data_fire 5G 946M 4G 4096
/data/media 15G 750M 14G 4096
/mnt/shell/emulated 15G 750M 14G 4096
/storage/emulated/legacy 15G 750M 14G 4096

Details: When the script first starts it waits up to 30 seconds for /dev/block/sda1 to come up. If it doesn't come up (or if the usb drive is not plugged in) then it boots from internal storage. It then checks for the folder "/data" on the usb drive, if it doesn't exists it copies the files from the internal storage to the USB drive. Everything under /data is mounted to usb storage with the following exceptions /data/dalvik-cache /data/misc and /data/resource-cache

IMPORTANT: The internal storage is mounted to /data_fire if you need to flash anything in CWM copy it to /data_fire/media/0/ as CWM does not see the ext4 usb storage

I've also included a revert script (REVERT_MountSDCARDtoUSB.zip) to undo the changes in case something doesn't work. Just flash with CWM.

If you have issues check/post the output of /storage/usb/moutUSB.log

Just be aware if you update the firetv image with one of rbox's pre-rooted roms you have to re-flash this zip after right after.