Post Reply Subscribe to Thread Email Thread

Link2SD on Amazon Fire TV

11th November 2014, 03:06 AM |#121  
Member
Thanks Meter: 5
 
31 posts
Join Date:Joined: Mar 2011
Both the FireTV Utility and adbFire can set this (expanding internal memory) up for you without much trouble as long as the pre-requires are met.
3rd February 2015, 12:55 AM |#122  
Senior Member
Thanks Meter: 155
 
1,207 posts
Join Date:Joined: Mar 2009
More
Quote:
Originally Posted by AQKhanTheOne

Both the FireTV Utility and adbFire can set this (expanding internal memory) up for you without much trouble as long as the pre-requires are met.

How do you do it via AdbFire on MAC? I don't see any options to do it...
28th February 2015, 02:52 PM |#123  
Senior Member
Thanks Meter: 110
 
287 posts
Join Date:Joined: Dec 2006
I just re-did my 3 Fire TVs after doing the full bootloader unlock, installing CWM and latest pre-rooted rom. Previously I was just rooted. Anyway this is my procedure that has worked for all 3. I don't mess with the adb key stuff... not sure why you would need it when the install-recovery.sh script is called at boot and not by adb. The mounts will work for both Link2SD (I use the Plus version) and FolderMount. The latest version of Link2SD Plus can now move the obb and external data from the internal fake sdcard to the mounted sdcard1 so you may not need FolderMount anymore unless you want to move a directory like Pictures, Movies, etc.

I have attached my install-recovery.sh file as install-recovery.sh.c (I had to add a .c to the end to get it to attach here).
Note that I use a flash drive with first partition fat32 and second partition ext4. You will need to modify if you don't
have the same partition setup. The umask is necessary to prevent sdcard1 from mounting read only.
Sleep is necessary or mounts don't occur. I am guessing have to wait for other operating system stuff to load.
My install-recovery.sh:
#!/system/bin/sh
#mount usb partitions
/system/bin/sleep 10 # necessary sleep before mounting
/system/bin/mount -t ext4 /dev/block/sda2 /data/sdext2
/system/bin/mount -t vfat -o umask=0000 /dev/block/sda1 /storage/sdcard1
/system/bin/vold

Procedure to install:
First download install-recovery.sh.c and modify if necessary for your partitions.
Next: adb connect <your firetv ipaddress>
Next: adb push install-recovery.sh.c /sdcard/install-recovery.sh
Next: adb shell
Next: su (not needed if fully unlocked bootloader and already have the # promt)
Next: mkdir /data/sdext2
Next: mount -o rw,remount /system
Next: cp /sdcard/install-recovery.sh /etc
Next: chmod 777 /etc/install-recovery.sh
Next reboot the FireTV. '

After reboot you can adb shell into the box and use "df" command to see that they are mounted correctly.

I believe I included all my steps... but always possible I forgot one thing. Let me know if you have any problems.

*** Standard disclaimers apply. Not responsible for any harm to your Fire TV, life, etc. ***
Attached Files
File Type: c install-recovery.sh.c - [Click for QR Code] (240 Bytes, 4 views)
Last edited by tselling; 28th February 2015 at 04:10 PM.
2nd March 2015, 02:15 AM |#124  
Senior Member
Thanks Meter: 110
 
287 posts
Join Date:Joined: Dec 2006
Just found an even better way to mount external usb stick. It allows link2sd to work and changes /sdcard to mount on the same stick all on one ext4 partition. This means that all the obb's and external data files will automatically be installed on the usb stick. FolderMount not needed. I still use Link2sd Plus to install internal data to the usb stick (automatically) for new apps.
===
my install-recovery.sh is now changed to:
#!/system/bin/sh
# mount usb partitions
/system/bin/sleep 10 # necessary sleep before mounting
/system/bin/mount -o rw -t ext4 /dev/block/sda1 /storage/usb
/system/bin/mount -o bind /storage/usb/link2sd /data/sdext2
/system/bin/mount -o bind /storage/usb/sdcard /storage/emulated
/system/bin/mount -o bind /storage/usb/sdcard/0 /storage/sdcard1
/system/bin/mount -o bind /storage/usb/sdcard/0 /storage/usb/sdcard/legacy
/system/bin/vold
===
Note that I mount the whole usb stick to /storage/usb then I mount the other directories to make data/sdext2 for link2sd and /storage/emulated/legacy for /sdcard. I also mount so that both /storage/sdcard0 and /storage/sdcard1 point to the same place.

I do not mount /mnt/shell/emulated to the usb stick ... because that causes headaches and I had boot to CWM to fix it.

Procedure to install:
First: create usb stick with one big ext4 partition.
Next: download install-recovery.sh.c
Next: adb connect <your firetv ipaddress>
Next: mount -o rw,remount /system
Next: adb push install-recovery.sh.c /etc/install-recovery.sh
Next: adb shell
Next: su (not needed if fully unlocked bootloader and already have the # promt)
Next: chmod 777 /etc/install-recovery.sh
Next: mkdir /data/sdext2
Next: mount -t ext4 /dev/block/sda1 /storage/usb
Next: mkdir /storage/usb/sdcard
Next: mkdir /storage/usb/sdcard/legacy
Next: mkdir /storage/usb/link2sd
Next: cp /sdcard/* /storage/sdcard/
Next: cp /sdcard/.* /storage/sdcard/
Next: cp /data/media/* /storage/sdcard/
Next reboot the FireTV.
*** Standard disclaimers apply. Not responsible for any harm to your Fire TV, life, etc. ***
Attached Files
File Type: c install-recovery.sh.c - [Click for QR Code] (438 Bytes, 0 views)
2nd March 2015, 10:09 AM |#125  
Senior Member
Thanks Meter: 2
 
171 posts
Join Date:Joined: Jun 2008
Quote:
Originally Posted by tselling

Just found an even better way to mount external usb stick. It allows link2sd to work and changes /sdcard to mount on the same stick all on one ext4 partition. This means that all the obb's and external data files will automatically be installed on the usb stick. FolderMount not needed. I still use Link2sd Plus to install internal data to the usb stick (automatically) for new apps.
===
my install-recovery.sh is now changed to:
#!/system/bin/sh
# mount usb partitions
/system/bin/sleep 10 # necessary sleep before mounting
/system/bin/mount -o rw -t ext4 /dev/block/sda1 /storage/usb
/system/bin/mount -o bind /storage/usb/link2sd /data/sdext2
/system/bin/mount -o bind /storage/usb/sdcard /storage/emulated
/system/bin/mount -o bind /storage/usb/sdcard/0 /storage/sdcard1
/system/bin/mount -o bind /storage/usb/sdcard/0 /storage/usb/sdcard/legacy
/system/bin/vold
===
Note that I mount the whole usb stick to /storage/usb then I mount the other directories to make data/sdext2 for link2sd and /storage/emulated/legacy for /sdcard. I also mount so that both /storage/sdcard0 and /storage/sdcard1 point to the same place.

I do not mount /mnt/shell/emulated to the usb stick ... because that causes headaches and I had boot to CWM to fix it.

Procedure to install:
First: create usb stick with one big ext4 partition.
Next: download install-recovery.sh.c
Next: adb connect <your firetv ipaddress>
Next: mount -o rw,remount /system
Next: adb push install-recovery.sh.c /etc/install-recovery.sh
Next: adb shell
Next: su (not needed if fully unlocked bootloader and already have the # promt)
Next: chmod 777 /etc/install-recovery.sh
Next: mkdir /data/sdext2
Next: mount -t ext4 /dev/block/sda1 /storage/usb
Next: mkdir /storage/usb/sdcard
Next: mkdir /storage/usb/sdcard/legacy
Next: mkdir /storage/usb/link2sd
Next: cp /sdcard/* /storage/sdcard/
Next: cp /sdcard/.* /storage/sdcard/
Next: cp /data/media/* /storage/sdcard/
Next reboot the FireTV.
*** Standard disclaimers apply. Not responsible for any harm to your Fire TV, life, etc. ***

I installed the first version of your apk with a 32GB flash drive I partitioned with the first partition of just over 22GB and FAT32, and an ext4 partition of just over 7GB. Both are set to primary and I can link and move apps to the ext4 partition in Link2SD. When I click on Recreate mount scripts, it says Device not found, Make sure you have two partitions and both are set to primary. I formatted my flash drive to be similar to the setup I have on my Tab 3 8.0 and it works fine. I'd prefer to not have to redo the whole thing, since I've already linked a few apps to my ext4. Any thoughts would be appreciated. Thanks.
2nd March 2015, 11:56 AM |#126  
Senior Member
Thanks Meter: 110
 
287 posts
Join Date:Joined: Dec 2006
You cannot use recreate mount scripts in link2sd. It is meant for sdcards and never finds the usb drive that is why we create our own mount scripts. I am not sure why you are doing that?
2nd March 2015, 05:30 PM |#127  
Senior Member
Thanks Meter: 2
 
171 posts
Join Date:Joined: Jun 2008
Quote:
Originally Posted by tselling

You cannot use recreate mount scripts in link2sd. It is meant for sdcards and never finds the usb drive that is why we create our own mount scripts. I am not sure why you are doing that?

Like I said, I was trying to set it up like my Tab 3 I have a thing about trying to make my Android devices reflect what's on the other one. My Tab 3 has the same theme and live wallpaper my S4 does. I guess I like symmetry
2nd March 2015, 06:08 PM |#128  
Senior Member
Thanks Meter: 110
 
287 posts
Join Date:Joined: Dec 2006
Quote:
Originally Posted by will4958

Like I said, I was trying to set it up like my Tab 3 I have a thing about trying to make my Android devices reflect what's on the other one. My Tab 3 has the same theme and live wallpaper my S4 does. I guess I like symmetry

You will need to do the mount script outside of link2sd and reboot. Make sure you have install-recovery.sh in /etc and make sure you chmod it to 777 or it will not run on boot. After a reboot, if you do a "df" command in adb, you should see that /data/sdext2 listed. If not then you have a problem with the script.

If you do see /data/ext2 in the "df" command, link2sd it should also see the partition. Then install and link what you want (I have link2sd set to automatically link new apps). When you reboot stuff should still be linked. Don't mess with creating mount script in link2sd... it will just error as you saw.

Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes