yashsingh1/xdaforums huggingface dataset:
[Sony Tablet S] ps3taker:
Link2SD

If you want app data to be moved to external sd Link2Sd works but with a few extra steps only. Here is how I manage this on mine.

Installed Link2SD on tablet.

Formatted external card (in my case a 32GB microsd in an SD adapter) on my laptop using EASEUS to have to PRIMARY partitions 1st in FAT32 and second in EXT3 formats.

At first Link2SD does not recognise any ext partition present and if I try to recreate mounting script on it telling it EXT3 format it says something like could not do, directory does not exist or similar.

Then after a reboot Link2sd warning pops up saying the sd card was not mounted at boot and therefore the system did not load apps on it. You have an option to recreate a mounting script (which I did not need to do as did it already previously) and the quick reboot option (which is different from the regular reboot in the way that it only restarts the android interface not the whole hardware) - so I do this reboot and after everything starts you can see the extra partition and use it.

So currently quick reboot is needed after every total shutdown of the tablet - thankfully I almost never shut down the tablet completely unless run out of battery completely or some other rare reason or testing like this one.

Also note that quick reboot sometimes gives a close/wait warning just after it is done - I always chose wait and everything seemed ok after that.

Make sure you give Link2sd superuser permission. I decided to leave out Lib out of the app data I link because I noticed that if I move data back to internal storage link2SD shows that libs are unlinked already/ I know there is an option in link2sd to relink libs at boot but I was not able to confirm if it works and they tend to take little space internally anyway.

Regarding extra partition size I tried less than 1GB and ca 14Gb. With bigger than 1GB partition it seems to recognise its size in link2sd but once you move more than 1gb data to it does not reflect the increase above 1gb but still seems to make the apps I moved before and after that work still.

I wonder if multi mount widget could help when combined with link2SD somehow. My guess best solution would be to make android mount external card early in its boot.

Hope it helps
[Sony Tablet S] obicom:
I tried today several things ....

@ps3taker

that sound a little bit more complicated then my solution with app scripter and the mount command.

I tried today several things to get a "autostart" solution but unfortunately without success:

- App "autostart (root)" don't work on Tablet S

- Change in svold.fstab need sd card eject and insert to be mounted after rboot

- Change in vold.fstab need sd card eject and insert to be mounted after reboot

- Add mount command in init.goldfish.sh don't work

- Startup script tweaks can't work, no "/system/bin/playlogosnow" on Tablet S

(http://xdaforums.com/showthread.php?t=813309)

Someone additional ideas for a autostart option for the mount command? :confused:

-- Edit --

I did a little bit more investigations and find out, that after a reboot it needs a short time before the internal sd card is ready to use. Therefore it is senseless to search a solution during boot time. I guess this is the reason why the change in svold.fstab and vold.fstab didn't work.

That means we need a "autostart" App, as a Widget or a Virus scanner that mount the device and rescan the medias. Who is willing and to do that for us?
[Sony Tablet S] DooMLoRD:
just create an init.d script and symlink the ext_sd folder to the desired folder on sdcard...

check if this device has:

/system/etc/install-recovery.sh

if it doesnt then check if the /init.rc (or other init.*.rc) files contain the text "install-recovery.sh"

if the text exists then just create the file /system/etc/install-recovery.sh which has the following at the top:

#!/system/bin/sh

followed by the symlink/bind code

and save file and give it 777 permission (chmod 777 /system/etc/install-recovery.sh)

that should automatically run the desired commands at each boot...

if the above is not possible then just create a GScipt script and execute it at startup
[Sony Tablet S] condi:
Hi DooMLoRD,

symlink will not work - because of fat32 sdcard! We've got to use mount -o bind, it works without problem, about autorun thing - thanks - i've got to try it :)

br

condi
[Sony Tablet S] obicom:
@DooMLoRD & Condi

I did exactly this in my tests before, with the "install-recovery.sh".

The file "/system/etc/install-recovery.sh" don't exist but the the "init.rc" files contains the text "install-recovery.sh".

So I created the file "/system/etc/install-recovery.sh" with the commands:

and give it 777 permission but unfortunately it dosen't work. :(

I guess the reason is the timing problem, that sdcard mount is not ready in this moment. I will try tomorrow add first the mount command for "/mnt/sdcard" in this file and will see what will happen.

Keep you informed.
[Sony Tablet S] ps3taker:
thank you all for trying.

Could you please summarise what works currently please.

a) Do you manage to link apps to external sd as in rooted gingerbread?

b) or is it just for showing external sd media in the native player in a separate subfolder or something similar

c) do you manage to swap around external and internal sds, i.e. mnt\sdcard is now external as on gingebread and mnt\sdcard2 is the built-in/internal one

I think all of the above is useful but would like to know what's the initial plan.
[Sony Tablet S] haenraets:
Most of us would like to use it for our media I think.

If that is allready fixed I'm happy :)
[Sony Tablet S] obicom:
Today I played a little bit with the install-recovery.sh ...

tried a simple "mkdir -p /mnt/sdcard/test" but the folder was not created from the script so that I must believe that the script didn't start .... :(

@diddy64

Could you tell me, where the most of your games store there datas?

In my case it is "/mnt/sdcard/Android/data"

If you would mount /mnt/sdcard2 to this folder, it should solve your problem.

Please try with a adb or a terminal emulator:

Let us know if it works for you. :cool:
[Sony Tablet S] CypherWolf:
Please make it happen, we all really need the extra space on this thing.
[Sony Tablet S] diddy64:
@ All my game data is located in the same place. /mnt/sdcard/Android/data
[Sony Tablet S] obicom:
Ok, and did you try what I proposed?

http://xdaforums.com/showpost.php?p=22496773&postcount=23

What happened? I would guess the free memory space should increase, after mounting the external card to the data folder. (Check with Root explorer or something else)
[Sony Tablet S] haenraets:
Tried this but had download the data again.

Noticed it had copied files to my external sd but not everything. I'll try if it will copy one folder completely to it.
[Sony Tablet S] ps3taker:
Link2SD

I didn't have this problem with link2sd approach and it allows app by app and so on options. Tried it with fat32 format instead of ext formats for the second partition and it works perfectly too. While setting up needed to reboot twice after that one soft reboot from within Link2sd and all works. Hope link2sd developer will implement the soft reboot into the next release to be automatic.
[Sony Tablet S] diddy64:
Sorry but I must be missing something here. Could you give me the step by step procedure as I seem to be getting something wrong.

Cheers,

D.
[Sony Tablet S] ps3taker:
Do you need step by step for link2sd? I posted the steps i remember on my first couple of posts here and the same in the link2sd apps section for tablet s. I thought first it did not work, rebooted, got a warning, clicked soft reboot and it works ever since. Soft reboot is still required after full reboot but as reboot rarely i can live with this. Hope this helps. If you have a problem please let know where, what you did so far, etc.
[Sony Tablet S] obicom:
Hi diddy,

what exactly do you missing here? Please let us know who we can help.
[Sony Tablet S] diddy64:
Hi,

Ok here is what i did and the outcome;

Made new folder in mnt/sdcard and named it external_sd.

Used scripter to mount

Formated 32gb sd to 1gb fat32 and the remaining to ext3

Installed link2sd and su giving permission

Ran link2sd giving exact error as you reported. reboot

Soft reboot

Tried to see if any data copied over when i installed app

BUT

external_sd still empty

downloaded Tintin for an example only to be told that insufficient space

I am sure that i have missed some procedure or incorrectly followed a section.

I feel like a right NOOB, for which Im not but all Im doing now is rechecking and unable to find an error.

Cheers.

D.
[Sony Tablet S] obicom:
Hi diddy,

I hope my part with scripter and mounting of the fat32 partition works fine.

I can't say anything regarding Link2SD because I do not use it.

A other idea could be to format the whole 32gb of the sdcard in fat32, transfer the whole folder /data/ from internal sd to the external sd, delete the /data/ folder on internal sd and now mount external sd card directly to /mnt/sdcard/.

Will out try it by my self I would guess that now the /sdcard/data/ folder is located on the external sdcard.
[Sony Tablet S] diddy64:
Hi again,

Yeah the script went according to plan with your idea, i guess ive nothing to loose by formatting the sd card with all fat32 but not sure if that will make a difference as the system does not see it, neither does any app moving software. What i have noticed is that the internal 8gb just transfers to the other section of the internal storage( the one with 3.8gb).

I need to start again, maybe this routine is ok for music and the like but for coping game data it might be looking for something else.

The joys eh.:D

D.
[Sony Tablet S] ps3taker:
Ok. After the soft reboot you need to choose the apps you want moved to external 2nd partition. So open link2sd app. Menu into storage info and check you have the partition recognized first just in case - it will show the size too. Then you can link the apps to it one by one or multi-select from menu. Hope it helps

Sent from my R800i
[Sony Tablet S] diddy64:
Thanks, using link2sd does indeed move apps but very confused about where they are going. Using link it says that on external sd there is 700 mb of data but when I use root explore it shows nothing in the folder. Furthermore, after downloading intensive data games, this extra data goes onto internal sd card and that is where the problem lies. On other tablets and phones ive had the game data automaticaly went to my external sd card but this is not the case this time round.

What I need now is for someone to confirm that GAME DATA does move across and not just the app as the game data is where the problem lies.

So, my two friends who have given me advice on this so far, can you confirm that the above will work and if so could you please advise me again with the precedure as upto now I am still having issues.
[Sony Tablet S] obicom:
@Diddy64

I didn't try it with my game data but with photo, video and music.

I moved all this stuff manually to comparable folders on my external sdcard.

After that, I mounted every folder from external to internal folder.

For example:

mount -o bind /mnt/sdcard2/music /mnt/sdcard/Music

mount -o bind /mnt/sdcard2/fotos /mnt/sdcard/Pictures

mount -o bind /mnt/sdcard2/Video /mnt/sdcard/VIDEO

If I now open the folder on my internal sd card with root explorer, I see the full free memory of my external sd card and it works well for my.

Try the same with your game datas and I am sure it will work fine for you too.

P.S.: I established init.d support on my tab and have now a autostart script with the stuff from above inside.
[Sony Tablet S] haenraets:
IF you can help us out with the init.d support that would be great!
[Sony Tablet S] obicom:
Could you read German? I did this few days before for the German community.

http://www.android-hilfe.de/root-ha...ablet-s/205375-how_to-use-init-d-support.html

Or use google for tanslation:

http://translate.google.de/translat...ablet-s/205375-how_to-use-init-d-support.html

If I find time today, I will create a new thread here, with a correct translation.
[Sony Tablet S] haenraets:
Trying it out! thanks
[Sony Tablet S] diddy64:
Hmm, ive re wrote the script so that sd card mounted, linkd2sd can see the extra space but when installing games the data still goes to internal and the game goes to external sd, which is the wrong way round.

Looks to me if this is not posible to do at the moment, unless some one can confirm with gameloft games then I will have to wait.:rolleyes:
[Sony Tablet S] obicom:
init.d support

Now I have made my first How_To an xda community for the init.d support on our Sony Tablet S. I hope it is replicable despite my weak English.

http://xdaforums.com/showthread.php?t=1505340

@diddy64:

If you followed my idea, why you need longer Lind2SD?

The "big part" of the gameloft stuff is on the sdcard under "Android/data/...."

Create a folder named "game_data" on your external sdcard (foramted fat32)

Move all stuff from internal 'sdcard/Android/data/....' into this new folder.

Now use adb shell or 'Terminal Emulator' app and type in:

mount -o bind /sdcard2/game_data /sdcard/Android/data

Thats all and should work in the same manner as in my case with music and video. try it out and keep me informed how it works.

-- Edit --

by the way, I edited the first post with my final solution and changed the thread title to [Solved].
[Sony Tablet S] haenraets:
So, you have to do the steps from init.d

then mount the location from your external sd to internal sd and that should solve it?

Because it's not working for me at the moment!
[Sony Tablet S] obicom:
For me all works fine. Where is your problem? Please let me know.

What did not work exactly? init.d is the second step ... first I try all of this stuff in a Terminal Emulator app to be sure that it works. (Brick prevention) After all is checked and works well, I move it into a script in init.d folder.
[Sony Tablet S] haenraets:
I don't seem to get the test init after a reboot.

And i'm not sure where I have to put the init.d file with all the info.
[Sony Tablet S] obicom:
Did I really explained it so bad and mistakable?

init.d is not a file, it is a folder.

You must create it first in 'system/etc' and must change the access rights to '777'

Then you can put scripts inside this folder and must change the rights, too.

Did you really read the How To?

http://xdaforums.com/showthread.php?t=1505340
[Sony Tablet S] haenraets:
I read everything yes.

Kinda getting there.

I'll try a bit more.
[Sony Tablet S] Maine_Coon:
Great job obicom, thanks.
[Sony Tablet S] diddy64:
hi obicom, ok here is my steps so

Made new folder in sdcard2 with android/data

mounted info with scripter with mount -o bind /sdcard2/android/data /sdcard/Android/data

What i get now is a duplication of sdcard/android/data and sdcard2/android/data

This would be fine if i were able to delete the info in sdcard/android/data but if i do then i get the same result in sdcard2/android/data folder as well. They both go.

phew. I just thought I would give a progress on this. I will try and copy and paste to see what happens( i did try before but was unable to do this)

I will report back in 20 mins when gta3 downloads its game data.

Same result. Sdcard/Android/data is a reflection of sdcard2/game_data. OMG,lol. If one is removed then both go.
[Sony Tablet S] obicom:
This is logical ... before you mount, you must move all data from internal to external.

After this android/data on internal card should be empty and only android/data on external card should contain the datas. Then you use scripter for mounting. Now you should find a duplicate of all datas from ext card on int card under android/data. If you change or delete something it happens now on BOTH sides.
[Sony Tablet S] diddy64:
Thanks obicom, maybe logical to you my friend but that was not to me.... How do i unmount?

Do i use unmount -o bind /sdcard2/android/data /sdcard/Android/data

One more question;

after mounting the sd scard2, what happens if i wish to install another game, will that data be duplicated on both sdcard and sdcard2?

If so then that will decrease the storage on the sdcard, thus defeating the purpose.

D.
[Sony Tablet S] obicom:
1. umount /mnt/sdcard/Android/data

2. No, no .. it is not really a duplication of data. It is more or less a 'link'. If you download new games it is really stored on the external sd. You will see after unmounting, the /mnt/sdcard/Android/data will be empty.
[Sony Tablet S] diddy64:
Lol,ok, this is becoming like hard work. Cheers.

D.

Is umount /mnt/sdcard/Android/data the correct info to place in scripter for it to work? I copied and pasted and got an error

WOW!!!! Just decided to delete the data in sdcard and started up a gameloft game.....WORKED. Thanks obicom, this has been a journey but Ive made it. (hopefully) A big thankyou click to you is on its way!
[Sony Tablet S] ps3taker:
I know what you meand about the explorer not seeing the extention. There three types of data link2sd moves - I thought data was part of it but please let me know if it is not the case - I did not know. Link2sd has option to autoling new installs but for now I leave it out and do linking manually. Hope it helps. The thread in apps folder suggests gscript use but I have not look into this yet - happy with link2sd the way it is for now.
[Sony Tablet S] zaynal:
sdcard2 mounting is applicable to external USB thumbdrive as well?
[Sony Tablet S] haenraets:
After trying alot of things with the gentle help from obicom we still didn't get it to work.

Mounting my external music folder to the internal music folder works.

But after reboot it's still gone.

#!/system/bin/sh

sleep 300

#mount -t vfat /dev/block/svold/179:17 /mnt/sdcard/external_sd

mount -o bind /mnt/sdcard2/Music /mnt/sdcard/Music

This is my automount file info. Is there something missing?

My tablet also takes a long time to boot that's why the sleep is this high.

Not really sure what the sleep time actually is. Is it the time to boot or something else?

Any help is welcome :)
[Sony Tablet S] obicom:
Yes, it should. It is only a regular mounting .... nothing else ...
[Sony Tablet S] haenraets:
At this moment my media has mounted after reboot onto the internal sd.

But only poweramp can see the files. The sony music player and Player Pro can't recognize the files.

I used the svold.fstab and vold.stab files from you (obicom).

Maybe I have to format the sd card again?
[Sony Tablet S] diddy64:
Hi everyone, I can confirm with obicom,s routine on the mounting but this confirmation is only for my gamedata that I have tried :)BUT in theory will work as descibed by obicom.
[Sony Tablet S] obicom:
@haenraets

Hi, if you use my new strategy to mount only the media folders from external to internal sdcard, you should use the original vold.fstab and svold.fstab, no need to mount from /mnt/sdcard2 to /mnt/sdcard/external_sd.

Thr problem with original android music player (not sony palyer) and PlayerPro was the reason why I changed my strategy.

Try to install the app from amrket -> Rescan SD

(https://market.android.com/details?id=com.uberullu.rescansd&feature=search_result)

The problem could be, that the system scan for media files is already done before the re-mounting is done regarding long sleep value.

Install the mentioned app and start it after complete boot. What happen now? Media files should be available now on the stock players.
[Sony Tablet S] haenraets:
still nothing :(

What are the permissions for the init.d folder and the automount file again?
[Sony Tablet S] obicom:
Where are the mp3 files are mounted on internal sdcard?

Should be under /mnt/sdcard/Music ..

You could try to delete data from Mediastorage on: Settings->App->All->Mediastorage

and rescan media.
[Sony Tablet S] haenraets:
That location yes.

Tried everything, also with the app, nothing works.

I'm about to give up on this :(
[Sony Tablet S] haenraets:
Finally, it works.

Dont know why or how but it works.

Thanks alot for the help obicom!
[Sony Tablet S] obicom:
That sounds good ...

Often it is first off all a timing problem ...

but it should works for all, why it should not work for you? :)

Feel free to press the "Thanks" Button" ;-)
[Sony Tablet S] Judah001:
I ran Condi's auto scrip for the init.d and it worked perfectly because I had the test99 which I deleted. For some reason I am unable to mount my external sd card. I tried following the instructions in thread but I have been unsuccessful. I really appreciate anybodies help. Thanks in advance. Here is the output I am receiving.

C:\Android-sdk\platform-tools>adb devices

List of devices attached

428918543dfe197 device

C:\Android-sdk\platform-tools>mount -o bind /mnt/sdcard2/Music /mnt/sdcard/Music

'mount' is not recognized as an internal or external command,

operable program or batch file.

C:\Android-sdk\platform-tools>adb shell

$ mount -o bind /mnt/sdcard2/Music /mnt/sdcard/Music

mount -o bind /mnt/sdcard2/Music /mnt/sdcard/Music

mount: Operation not permitted

$
[Sony Tablet S] obicom:
Hi Judah001,

please change the following (you need root rights to do this with adb):

C:\Android-sdk\platform-tools> adb shell "su -c 'mount -o bind /mnt/sdcard2/Music /mnt/sdcard/Music'"

last characters are a ' & " together.

You will not need the su command in a init.d script ...

only if you try it with adb shell.
[Sony Tablet S] haenraets:
Thanks is coming :)

I'm using sleep 120 with adw and s

alot of widgets.

Maybe helpfull for others.
[Sony Tablet S] Judah001:
I am so not the brightest with adb. So your saying is all I need to type into the command line once I open adb is

adb shell "su -c 'mount -o bind /mnt/sdcard2/Music /mnt/sdcard/Music

Then for video and pictures I would just change it to

adb shell "su -c 'mount -o bind /mnt/sdcard2/VIDEO/mnt/sdcard/VIDEO

adb shell "su -c 'mount -o bind /mnt/sdcard2/Pictures /mnt/sdcard/Pictures

Sorry for the noob questions but asking someone like you is the only way I will be able to figure it out and hopefully help others.
[Sony Tablet S] obicom:
this commands you can use, without starting the shell separately ..

adb shell "su -c 'mount -o bind /mnt/sdcard2/Music /mnt/sdcard/Music'"

adb shell "su -c 'mount -o bind /mnt/sdcard2/VIDEO /mnt/sdcard/VIDEO'"

adb shell "su -c 'mount -o bind /mnt/sdcard2/Pictures /mnt/sdcard/Pictures'"

but if you want to work in the shell, you can change it in this direction:

It should be clear that the folders must be exist on both sides .. ok?
[Sony Tablet S] Judah001:
Ok thank you. I think I have it now.

Edit...

Condi did a great job on auto int.d file. Have you talked to him about automating this scrip? Thanks again.
[Sony Tablet S] Bushmaster78FS:
Ditto, if you guys automated both, it would really be awesome.
[Sony Tablet S] zaynal:
If we takeout the SD card, and put it back in again, we have to remount?

Just now I tried to take it out, and when I put it back, no files found. Before I took it out, files inside my SD card can be detected.
[Sony Tablet S] obicom:
You are right, after an eject/insert of the external sdcard you need a re-mount of these folders. Therefore I use a script with the app "Scripter" and "Rescan SD" from the market.

After eject/insert I start first the script and then re-scan internal sdcard.

A other way could be to reboot the whole device.

But normally I have no more a need to eject the external sdcard.

I can reach the external sdcard via USB connection on the mount point "/mnt/sdcard/external_sd".
[Sony Tablet S] zaynal:
Thanks for the tip. Will try that out. :)

Regarding your question about my problem with automated mount script; yeah, I'm still having problem.

At the moment, I ran the script manually from adb shell to mount the folders, but obviously reboot will void the script.

I've changed the sleep to 75, 100, 120; still no go. Will try again with higher numbers.
[Sony Tablet S] obicom:
Could you first post your current script here, please?

Maybe the problem is in the script, themself.

Are you sure that the script is running during boot time?

Did you test it with the test script and all was fine?