yashsingh1/xdaforums huggingface dataset:
[Fire TV General] nyder:
Okay, I have actually since then even updated to the update patch to the last updated that is rootable. Figure in for a penny, in for a dollar.

Even went as far as to reformat the ext4 partition.

Anyways, I can run the app after linking it, but when I reboot the app is no longer available, and not even seen in link2sd. If you go to the ext4 partition you'll see the files have been moved and if you checked link app, a copy of the app will be there. Generally if you click on the app there, it wants to reinstall and a bunch of times it just straight says there is no room (even though there is plenty of room). Also, i did this with a few apps, with different stuff being moved, etc to see how it affect them. None survived the reboot.

Either I did something wrong somewhere that effects every version of the firmwares, or I did something stupid to my filesystem that seems to keep between factory resets & firmware updates?

If you have some ideas cool, I'd like to get this working as it's great on my tablet, but at the very least, filemount is okay. So I'm open to any suggestions, don't mind reformatting, reinstalling, resetting, etc. I haven't gotten serious on my stuff yet because I wanted to get this resolved in some way.
[Fire TV General] SaltyCookie_OnLoan2FM_SVE:
nyder,

This is more of a link2sd problem than one related to the solution I'm providing in this thread.

However, did some googling for you. Please answer:

- Which Link2SD version are you using (about option in top right menu). I'm on 3.5.2, if you aren't on the latest one, please update to it. There are known issues (exactly as you see - no link on boot) with older versions.

- Besides seeing the apps copied to the flash drive, are you also seeing links to them (look under /data/app ) ?

- Are both your partitioned marked as primary ?

- Which options are you marking when you chose "Create link" - don't select "Link internal data" (to make sure this option is not causing an issue)
[Fire TV General] nyder:
Okay, first i want to thank you for taking the time to help me with this. I appreciate it greatly.

Link2SD is the latest version, 3.5.2. Free Version. I was using Lucky Patcher to "crack" it, but decided against that so I can make sure that isn't the problem.

Yes, I can see the apps under /data/app (though I don't see 1 of the apps I generally use as a test, but 4 other ones are there)

I tried all the options on various apps. Still the same problem.

Okay, just to test some thinks out, using the /data/apps, I reinstalled on the programs (Dungeon Quest). It then showed up in the menu and in Link2SD still linked, and played. But when I rebooted it was no longer in the menu or Link2SD. But in /data/app I now have 2 copies of the Dungeon Quest game.
[Fire TV General] SaltyCookie_OnLoan2FM_SVE:
Still missing your answers on :

- Have you seen the links to the apps ? use this

ll /data/app

- Are both your partitions marked as primary ?
[Fire TV General] nyder:
Sorry, my bad.

yes, both are marked primary.

When I do the ll /data/app I get permission denied, so I did su and ran it, i get the lists and the links listed. links are root, rest are system.
[Fire TV General] rotor00ter:
I had some major issues with trying to get this working. Everytime I rebooted link2sd wasn't connected to the external drive and because I had XBMC linked to it it was lost and not installed but seemed to still be taking up space on the FireTV. Then I tried to sideload XBMC again and it gave me some kind of error that there wasn't enough space on the drive even though there was. I couldn't even figure out how to get XBMC back on it again. I thought maybe the error might have been because I initially had installed the stickmount method for moving apps before I found the link2SD one.

Once I couldn't get XBMC installed because of the error I decided to factory reset the box and start over. Luckily it factory reset to the 70220 rootable firmware. If it happens again I think I'll ask for some help and try to fix it that way rather than factory reset and risk losing root. Once I factory reset and rooted I followed the instructions from post #33 and it is now working great and finds the drive after rebooting. I am pretty sure it was mainly user error because I tried to go the easy route and use the Amazon Fire TV Utility App and it didn't seem to do anything so I tried a couple times.

Anyways, its working fine now, maybe this will help someone else who is having trouble. Keep up the great work!
[Fire TV General] SaltyCookie_OnLoan2FM_SVE:
nyder,

It looks like you are not running stickmount - is that true ?

Also the mount is working on boot, it looks like for some reason, Link2Sd is not running on boot.

There could be many issues causing this, I can only speculate and guess since:

1) I don't know everything (The wife does but she isn't telling)

2) You may have some interfering app : Titanium backup ? The fact that you are using a hacked Link2SD? maybe you installed a settings.apk or a boot/task manager which change the boot behavior

3) It's because you don't have stickmount installed (If it's true that you haven't installed stickmount you can install it, and retry running the script and linking again before reading forward).

However, you mentioned you are game for running experiments

If you are let's do it my way.

I'd like for you to run this in the most virgin of manners (i.e. only the required stages I'll outline below, no additional fluf, writing every step you run so you can report back)

Erase your thumb drive (keeping the partition). Also run a check on it to verify it is error free.

On you fireTV:

Factory Reset

Root (not sure needed after factory reset)

Install SU

Install Stickmount

Install Terminal app

Do a firmware upgrade to any rootable firmware version.

Install Busy Box

Install Dungeon Quest as a sample app (good sample app - small, only tens of MBs)

Install Link2sd (make sure you give it SU permissions whenever asked)

Run script (don't link before first boot).

After boot - link only Dungeon Quest, wait a good amount of time (10 mins at least) after link2sd said it's done linking (your thumb drive maybe terribly slow and maybe caching the transfer and notifying to link2sd he is done. I'm not taking any chances).

Verify dungeon quest runs.

Reboot

Verify dungeon quest runs.

If still seeing issues, report back with every step you've done.
[Fire TV General] nyder:
I was running Stickmount before the last updates I did. I'm not currently running it because my partitions are getting mounted just fine with your script. Didn't see the reason to run it and I like the location you put my fat32 partition at over the stickmounts.

Settings or bootmanager being installed could be the problem. Never installed titanium backup though. But I never changed anything in the Bootmanager, i just installed in case i needed it.

So I am going to do what you suggest here: Just reformating and then checking the ext4 partition on the thumbdrive. No errors, did a surface test.

Factory Reset: Done

Root: Done

Install SU: Done & Ran

Install Stickmount: Done & Ran

Install Terminal app: Done (didn't run)

Reinstall update.zip: Done

Install BusyBox: Done (had to rerun towelroot & SU)

Install Dungeon Quest: Done

install Link2SD: Done

Run the script: Done

After reboot then Link2SD does not see the ext4 partition though stickmount is mounting it. Also I notice the MSD2.sh doesn't get ran after reboot.

Maybe 2 partitions are my problem. I'm going to redo the usb stick as 1 partition and see if this fairs better for me.
[Fire TV General] SaltyCookie_OnLoan2FM_SVE:
nyder,

I've updated my debug script and updated the link to it in the post below:

http://xdaforums.com/showpost.php?p=54621122&postcount=39

Please run it as described in that post and answer back with the file.
[Fire TV General] nyder:
Here you go.
[Fire TV General] SaltyCookie_OnLoan2FM_SVE:
nyder,

According to mount looks like neither Stickmount or my script are running on your system.

On boot you seeing the message SU is giving Stickmount and Link2SD permissions ? (I'm troubled by you mentioning you had to re-run SU for allowing busybox to run).

Did you run everything in the order I described above ?

Also, I've fixed the debug script. Please re-run as in my debug post:

http://xdaforums.com/showpost.php?p=54621122&postcount=39
[Fire TV General] nyder:
On boot I see both stickmount & link2sd getting permissions. even says stickmount mounted the partition /sdcard/usbstorage/sda1

What isn't getting run is the sd.sh file.

And yes, I did run everything as you described.

Yes, when I do the firmware update, the root isn't working anymore, so su isn't working, and after i run towelroot, SU needs to redownload the binary. But these are working after reboots.

Here's the file.

I am going to have to downgrade the firmware again since we can now put the clockwork recovery on the AFTV http://www.aftvnews.com/how-to-install-clockworkmod-custom-recovery-on-the-amazon-fire-tv/

If you don't turn up anything with my latest debug script, I can just try it again from that firmware, pretty sure that was the one that my system came with.

Also this is getting me pretty frustrated and I imagine you probably have better things to do. if you don't find anything from my log, maybe we should just cry uncle and I'll just use foldermount and have to be happy.
[Fire TV General] SaltyCookie_OnLoan2FM_SVE:
From the latest rbox my current suspect is the firmware version. I'm on 51.1.1.0_user_511069920.

You're the one who mentioned he's up for checking and testing, but you can have it as you wish.

I'm up for it. With both FolderMount and Link2SD I have many games/apps with barely any residue on my AFTV storage.
[Fire TV General] nyder:
I'll keep going, I'll start this over, going to put the recovery on, then I will put the same firmware version you have and give it a go again.
[Fire TV General] tirges:
I just I'd share my experience in this

Using the script I got my FireTV (currently still on 51.1.02) to mount the fat and ext4 partitions correctly. However, as many others, it did not load at boot for me.

Script manager worked, but I preferred the method someone suggested, adding the necessary commands to :

/system/etc/init.qcom.post_boot.sh

However Link2SD seems to load before the partitions get mounted or something, so the apps that are linked do not become available (but you can see they exist in /data/sdext2)

I noticed that after installing something Link2SD was getting root permissions again, maybe it got triggered to refresh or something, and indeed suddenly the missing linked apps where suddenly in the applications list.

In the ink2SD settings I tried to find something helpful like a boot-delay or something, but I did not find anything.

But I did notice the option for a SOFT-reboot, and that seems to always do the trick. The drive stays mounted, but the app-list etc. gets reloaded...

Annoyingly you need a mouse to do it in Link2SD, but a similar option exists in the framework menu of the Xposed Framework Settings app..

Maybe a soft-reboot can be scripted?

Hope this helps for some others too...
[Fire TV General] nyder:
Okay, I installed the CWM Recovery and installed the rooted 51.1.1.0_511070220 rom, as I can only install his custom roms with the CWMR.

Here is the problem, when running your script in the terminal, just after I click 1 for the Option of 1 partition, it says:

Link2SD not installed or not run at least once before this script. Exiting.

I uninstalled Link2Sd then reinstalled it. Same thing.

I did a factory reset, reinstall Link2SD (plus busybox, etc) and and thing.

I ran the debug script in case that might tell you anything.

Okay, a bit later. I can't sit still, so I did the manual install on the Link2SD, and had to use scriptmanager to get it to run the sd.sh script after booting. And of course, Link2SD seems to run before scriptmanager, so it's running before the ext's get loaded or something. Dungeon Quest wasn't listed anymore. tigres mention the soft reboot option, so I gave that a try and sure enough there is Dungeon Quest.

Now we are getting somewhere. Currently I can live with having to do a manual soft reboot until a way to do it automatically is found, or of course, Amazon decides to enable the usb for files.
[Fire TV General] rbox:
I believe this is dependent on having the /system/etc/install-recovery.sh? I do not install those as part of the rooted updates.
[Fire TV General] nyder:
Yes, i would say it's depend on that file. Okay, guess it doesn't get copied over with the manual install. NM, already have a copy of it.

Since I decided to go with the latest firmware, it wiped out the Link2SD stuff anyways, so I will manually do it and add that file this time.

And that was the reason why the script failed, ran fine when I added the file. But I still have to do the soft reboot to get my link stuff showing. =)
[Fire TV General] imtiajmeah:
Can you share the install-recovery.sh file please
[Fire TV General] nyder:
Yep, no problem. Had to add an .txt on to it because kept saying invalid file otherwise.

As for doing the soft reboot, I found this app: https://play.google.com/store/apps/details?id=nl.leonardsimonse.softreboot&hl=en

Which is easier then opening link2sd and using the mouse.
[Fire TV General] Stevie G:
Guys i cannot download the file. it does not download. any help with another link

2. Download the Allow_Link2SD.zip file from here to your PC :

https://mega.co.nz/#!dJ811YBD!e742eD...mBtLYW4Dj9ffQ0
[Fire TV General] rotor00ter:
Has anyone had an issue where they updated to a rooted firmware via recovery and Link2SD wouldn't work anymore? I ran into this a couple days ago and ended up factory resetting and then losing root privileges. I had Link2SD working with firmware 70220, then I downgraded to install recovery and then installed the newest version of the rooted firmware but Link2SD wouldn't work anymore. I probably should have troubleshooted more but I got lazy. If it happens again I won't be factory resetting because I know I'll lose root for sure. Anyone have any thought on this and how to avoid it happening again? Also, what are the steps if you have to swap out for a different usb stick as far as Link2SD is concerned? Thanks.
[Fire TV General] rbox:
The prerooted roms dont have /system/etc/install-recovery.sh, which this method needs. There are a few posts in here with what people have done to fix it.
[Fire TV General] rotor00ter:
I'll read through and see what the fixes are. Thanks for the clarification. Would it be possible to add those files to the pre-rooted roms or would that be an issue for people who don't have Link2SD installed? Having Link2SD working is quite important to me so I don't fill up the small Fire TV internal drive too quickly. Thanks for all your efforts.
[Fire TV General] rbox:
The OP needs to be updated with instructions for dealing with the prerooted roms. I think if you replace install-recovery-2.sh with just install-recovery.sh it should work.
[Fire TV General] Stevie G:
Rbox I have your latest pre rooted firmware installed, but just need some device how to install Link2SD on the AFTV nd get it to work.

I guess it's probably not possible to store the data over a shared network drive (external drive)
[Fire TV General] Stevie G:
Guys will still work with rbox latest pre rooted firmware xxxxx220. Let me know so I see if it's possible. If so, give me some directions or steps on how to do this.

Thanks in advance :o
[Fire TV General] AQKhanTheOne:
Link2SD works *almost* flawlessly with rbox's pre-rooted ROMs. I used Imtiaj Meah's Amazon FireTV Utility application to install Link2SD. It is pretty much foolproof.

The latest (paid) version of Link2SD is able to move application data files as well, and so I think there is no need for Foldermount anymore.

The only issue I have run into is that for some reason if I have to hard reboot the FireTV, it wipes out the Link2SD script. All the previously linked apps disappear, both from the FTV's application list, and also from Link2SD's list. I then have to re-install the script using the Amazon FireTv Utility and then soft reboot, using the "Soft Reboot" app referenced upthread and all the missing (linked) apps show up once again.

Perhaps someone would be kind enough to shed light on why this is happening. I think someone else has mentioned this problem above as well.
[Fire TV General] Stevie G:
Getting this error

* daemon not running. starting it now on port 5037 *

* daemon started successfully *

connected to 192.168.1.101:5555

cannot stat './Allow_Link2SD/install-recovery.sh': No such file or directory

cannot stat './Allow_Link2SD/sd.sh': No such file or directory

cannot stat './Allow_Link2SD/msd1.sh': No such file or directory

cannot stat './Allow_Link2SD/parted': No such file or directory

cp: /sdcard/Download/AllowLink2SD/sd.sh: No such file or directory

cp: /sdcard/Download/AllowLink2SD/msd1.sh: No such file or directory

cp: /sdcard/Download/AllowLink2SD/install-recovery.sh: No such file or directory

Unable to open /system/xbin/sd.sh: No such file or directory

Unable to open /system/xbin/msd1.sh: No such file or directory

Unable to open /system/etc/install-recovery.sh: No such file or directory

cp: /sdcard/Download/AllowLink2SD/parted: No such file or directory

Unable to open /system/bin/parted: No such file or directory

rm failed for /sdcard/Download/AllowLink2SD/sd.sh, No such file or directory

rm failed for /sdcard/Download/AllowLink2SD/msd1.sh, No such file or directory

rm failed for /sdcard/Download/AllowLink2SD/parted, No such file or directory

rm failed for /sdcard/Download/AllowLink2SD/install-recovery.sh, No such file or

directory

cannot stat './Allow_Link2SD/install-recovery-2.sh': No such file or directory

cannot stat './Allow_Link2SD/AL2SD.sh': No such file or directory

1. Run Shell Window

2. At the prompt type: su

3. Then type: source /sdcard/Download/AllowLink2SD/AL2SD.sh

4. Make your selection from the Menu

c:\FTV>

any reason why it's doing that guys
[Fire TV General] AQKhanTheOne:
No idea, but perhaps, you could check the following?

1. Your usb stick has two partitions, the 1st partition Fat32 and 2nd partition Ext4 and both set to be primary?

2. Have you installed Stickmount?

3. Have you run Stickmount and used the "mount" option? (Stickmount should show you the two partitions when you do this)

I followed the instructions in the first post of this thread to partition the usb stick and then used Imtiaj Meah's utility to install Link2SD. Also using a cheap passive 4 port hub to be able to use the usb stick, the Flirc receiver, and the dongle for the Logitech Kr400 keyboard at the same time. All works perfectly except for the issue noted above.

I have have moved all games, and all non-system type apps to the usb stick and have almost 4.5 gb free ram as opposed to less than 1.5gb without Link2SD.
[Fire TV General] Stevie G:
I formatted the flash drive as discussed withe 2 partitions and the both come up when the AFTV is rebooted. Stick mount shows them coming up. After doing this I tried the tool, but still get the same error message.

I have not done the mountext.zip method with the automatic script yet. Do you think that could be the problem.

I will try it today
[Fire TV General] Stevie G:
I cannot so this commands

cp sd.sh /system/xbin/

cp msd1.sh /system/xbin/

cp msd2.sh /system/xbin/

It says they the file or directory does not exist.

I tried to manually to it, but it says permission denied.

Any ideas guys

This is in step 1 though.
[Fire TV General] reixda:
Busybox installed after update?

Hello,

I tried something because link2sd didn´t work for me.

I downgraded to a "clean" pre-rooted 51.1.1.0_511070220 version.

(rooting, diasble updates ........)

I installed busybox by adbfire utility .!!!!!!

Then I sideloaded stickmount.

My two partitions were found by stickmount.

I copied adb_keys to /sdcard/.android/adbkey.pub

Then I started Amazon Firetv Utility App and used button "Install and mount Link2sd"

In a terminal (FIretv) I typed

su
source /sdcard/Download/AllowLink2SD/AL2SD.sh

My two partitions were found by this script.

At last I sideloaded link2sd and startet the app. No issue. All okay :D

I updated to pre-rooted 51.1.3.0_513011820 . (Thanks for rbox for clockword Mod - I need the german version

I saw that In the folder /system/xbin there are only a few files.

So I installed busybox again! The sh-scripts appeared in /system/xbin

So again these steps:

I copied adb_keys to /sdcard/.android/adbkey.pub

Then I started Amazon Firetv Utility App and used button "Install and mount Link2sd"

In a terminal (FIretv) I typed

su
source /sdcard/Download/AllowLink2SD/AL2SD.sh

I saw my ext4 and fat32 partitons

I started link2sd again. No issue. All is fine. No soft boot needed

Could it be that the missing busybox after upgrading is the problem?

Reiner
[Fire TV General] macmishka:
copied adb_keys to /sdcard/.android/adbkey.pub

Hi ! Sorry I'm new to this can you explain how you did adb_keys to /sdcard/.android/and key. pub ?

---------- Post added at 05:56 PM ---------- Previous post was at 05:50 PM ----------

Hi!How did you do adb_keys to sdcard ?
[Fire TV General] reixda:
PC cmd.exe

adb connect [IP-AdressFiretv]
adb shell
su
cp /sdcard/.android/adbkey.pub /data/misc/adb/adb_keys

Reiner
[Fire TV General] macmishka:
THANK YOU!!!!
[Fire TV General] stanleyopar2000:
im having problems with Link2SD. Using the FIre TV Utility and the script I push "1" at th menu and It gets me stuck at this message:

Current Connected devices Options:

==================================

Enter ext4 device option number for Link2sd mounting : 1

1

sh: /sdcard/Download/AllowLink2SD/AL2SD.sh[172]: [: -gt: missing second argument

sh: /sdcard/Download/AllowLink2SD/AL2SD.sh[172]: [: ext4: unexpected operator/op

erand

doesn't exist. Exiting

I have a Formattted EXT4 16gb PNY USB disk and I installed busybox using BusyBox X because the Stephen said BusyBox said it wasn't supported on my device..
[Fire TV General] stanleyopar2000:
well....this thread is dead.
[Fire TV General] 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.
[Fire TV General] patt2k:
How do you do it via AdbFire on MAC? I don't see any options to do it...