yashsingh1/xdaforums huggingface dataset:
[Android Apps and Games] Kierrok:
The files stored in internal memory aren't recreated, just the ones that are linked to SD.
[Android Apps and Games] sberla54:
Thank you, but i've already done this too :)

This is my situation, said some posts ago:

So, i think i've prepared and configured everything ok, but the Galaxy Ace has only 25 Mb of internal memory free.

Ops. That's it! I didn't see it before. I'm sorry.

That's my problem. The Galaxy Ace has so few internal memory that it gets full even with Link2SD. Instead, for my DHD it works great.

Is there a workaround?

If i move the app to sd (i mean, sdcard, the storage sd) with app2sd or Titanium, will it move /data/data/ do sd?

And, what if i use S2E: http://www.appbrain.com/app/s2e-(simple2ext)/ru.krikun.s2e

It seems that it can do it:
[Android Apps and Games] azcv:
I am using titaniym backup for this purpose.But you have to create a simlink /data/sd-ext---->/data/sdext2,because titanium doesn't suport /data/sdext2 mount point.

Everyting is working fine.All the symlinks are ok after reboot.The only side effect is the more intensive read/write operations which sometimes corupts the ext2 filesystem.In this case i put my sd card in the card reader and under ubuntu(linux) i make a fsck whick cleans the filesystem.
[Android Apps and Games] Kierrok:
What, exactly, you do? I can't find an option in TB to link data.
[Android Apps and Games] azcv:
I told you:First you have to symlink /data/sd-ext----->/data/sdext2.After that in the summary screen of TB you will see this partition alongside others.Finaly you will be able to see this option.Titanium backup is not a good app,but it helps me automate this proccess(batch linking).It hasn't got a filter options for apps which only data is moved.You have to manualy create filters for easy differ apps with linked data.Thats all.

If you make the link and TB can't see the ext partition try to FC the TB and start it again.I wrote to TB developer to add /data/sdext2 to the list of recognized mount points but he didn't do this.
[Android Apps and Games] Kierrok:
I must be blind! And TB too. It can't see (the linked) /data/sd-ext. It doesn't show in the summary screen. I will try again tomorrow.
[Android Apps and Games] marky1124:
Hi Azcv,

Thank you for your posts. I'm trying to follow your instructions but I don't seem to see how to using Titanium Backup to link the private app data. Here's what I've done so far (HTC Wildfire S - stock rom from Vodafone - rooted). I used Terminal Editor to do the following:-

$ su
# cd /data
# ln -s sdext2 sd-ext

I then rebooted the phone and checked and the link was still there. Then in Titanium Backup v5.5.2 (free version) I see this on the main overview page:-

...

External Storage: /mnt/sdcard

Backup Directory: /mnt/sdcard/TitaniumBackup

and at the bottom

System Rom: 282MB (22.7MB free)

Internal: 157MB (20.5MB free)

SD card: 3.94GB (2.39GB free)

So I don't see any indication of /data/sd-ext or /data/sdext2

When I long press on the app whose private data I'd like to move out to the SD card I see the following options, none of which look like the right one to me:

Force close app

Assign labels...

Send latest backup...

Explore

View Android Market info...

Open system details...

Detach from Market

Move to SD card

Convert to system app

Enable "multiple profiles" for this app

I've read elsewhere that there should be a 'Move app data to SD card' option. Is that what you are describing?

Any ideas where I've gone wrong?

Cheers,

Mark
[Android Apps and Games] azcv:
It' my mistake.It must be /data/sd or /system/sd-ext not data/sd-ext.Soryy.:D

So the link should be /data/sd----->data/sdext2

If you succeed to move some data be carefull.First try with apps with big libs,because some apps with intensive read/write may damage the filesystem.As i said it can be easy repaired without data loss via linux terminal on pc and fsck command.And if you want to uninstall an application firs you have to move data back to phone and then uninstall.Otherwise you may have trouble installing this app again.
[Android Apps and Games] Kierrok:
Those 2 also didn't work. I googled and found this:

I already have a /sd-ext/ because I use CM 7.2 but it isn't mounted. I disabled the mount script to avoid any conflict with Link2SD.

The key is the "app" directory in the ext partition root. When I created it TB showed the partition (on /data/sd) and the "magic" option appeared.

I will try it now and will be back with comments.

UPDATE:

Yes, it works!

And I suspect why it didn't work when I tested it.

When I found out that data linking wasn't working I started looking for an alternative and found one: bind mounts. I'm using it since then with big lib files and a few whole data directories, the huge ones. But after a while I noticed some problems when updating those apps and I solved it changing the name of the directory where I was moving the data/libs. It was /data/ and I changed it to /mydata/ and all the problems were gone.

Now TB uses /data2/. It's a bit nonsense but the name of the directory could be causing the trouble.

Or CM behaves differently from the stock GB ROM I was using.

Which one do you have?
[Android Apps and Games] azcv:
I forgot about the app directory.I made this half a year ago.TB will ask you to create data2 directory so there will be no conflicts with data directory created by link2sd.I think you will succed with the data moving.I am on a lg optimus one stock 2.3.3 rom and everything is ok.My ext partition is 1,3GB and it has only around 200MB because everything is there:data,apk,dex.
[Android Apps and Games] Kierrok:
Sorry, I updated my previous post. But you answered to something I asked.

I have a LG P500 too. I will PM you with a hint.
[Android Apps and Games] azcv:
I don't know where can be the problem.Maybe you used "relink lib files at boot option" and this makes you trouble.It is very unconvinient when using two different apps for this.It is very easy to make a mistake.

With TB there is no problems with updates.Everything is ok.
[Android Apps and Games] marky1124:
Hi azcv, Kierrok,

I'm having difficultly following your posts. I don't understand this well enough. I hope you can help me understand a little further what I need to do. I'll explain first what I've got:-

HTC Wildfire S - rooted stock Vodafone ROM - Android v2.3.5

I have two partitions on my SD card (do I need more? I assume ext2/3/4 refers to filesytem type rather than partition number)

My mounted filesystems are:

/dev

/mnt/asec

/mnt/obb

/app-cache

/devlog

/system

/data

/cache

/data/sdext2

/mnt/sdcard

/mnt/secure/asec

I'm using link2sd which is successfully linking app, dex and lib files to /data/sdext2.

What directories, links or filesystems do I need to create/mount to get Titanium Backup to offer the 'move app data to sd card' option?

I've tried numerous variants of what I thought you'd explained earlier:

eg1

# mkdir /data/sdext2/data2

# mkdir /data/sdext2/data2/app

# ln -s /data/sdext2/data2 /data/sd

eg2

# mkdir /data/sdext2/data2

# mkdir /data/sdext2/data2/app

# ln -s /data/sdext2/data2 /system/sd

link failed: Read-only file system

BTW - I'm entering all these commands into the terminal emulator. Is that what you guys use? It's very tedious to type, perhaps because I've not discovered if there's a way to recall and edit a previous command.

I hope you can help me.

Cheers,

Mark
[Android Apps and Games] Kierrok:
marky1124, ext2/3/4 are filesystems like FAT or NTFS. Your 2nd SD partition must be formatted with one of these. FAT32 will not work.

Then you enter these commands:

su

ln -s /data/sdext2 /data/sd

mkdir /data/sdext2/app

Make sure you delete any link you tried before entering the commands.

---------- Post added at 03:58 PM ---------- Previous post was at 03:53 PM ----------

No, that option was turned off. The problems were gone when I changed the directory name.

But now I tried to create a manual link like I did a year ago and the link survived to a reboot too! :confused:
[Android Apps and Games] marky1124:
You did it! Thank you Kierrok. That's worked. Now I'm the one whose :confused: since I thought I'd tried that. Argh. I'm going to blame fat fingers and a rubbish typing interface. Perhaps I threw it off by also creating a data2 directory. After removing my previous directories and links and following your instructions above Titanium Backup immediately showed the extra 'drive' on it's overview page and offered the 'move app data to sd card' when looking at the 'special features' screen for an app. When I chose it TB then asked to create '/data/sd/data2'. I type all this so anyone following in my foot steps has some idea of what went on.

Initially I thought you'd found my issue by saying that the second partition must not be FAT32. However mine is, and that's worked just fine.

I've moved my first application data to the sd card, so I can now see:-

/data/data/com.myfitness.android -> /data/sd/data2/com.myfitness.android

So thank you very much for your help, much appreciated :good: :D

Of course, just when you think you've solved one of these annoying problems, you find there's another hurdle. I expected that the amount of 'internal memory' shown would go up, since that's a directory with 18MB worth of files in it that's been moved. After all this was the whole point for me in the first place. I'm using link2sd and it's enabled me to install almost 100 apps which is fabulous, but I was hoping that by pushing out some of the private app data to the SD card I'd see that 'internal memory' return. I've rebooted the phone and it's still not gone up. I've also double checked and the link above survived the reboot, and I can see from the busybox du -R command that it's about 18MB of data. Argh. What gives? Any ideas?

I've linked more apps and it's been over half an hour now and no change in the 'internal memory' size reported.

# df /data

/data: 153600K total, 104460K used, 49140K available (block size 4096)

# du -sk /data

548796 /data

NOTE: real amount of space used IMO

# du -Lsk /data

972652 /data

NOTE: with the -L counts in the size of files that are linked. This value seems closed to what df produces, but seems wrong to me.

Ultimately do you guys see a benefit from moving private app data to the sd card? The only reason I want to do it is to free up more internal memory.

Cheers,

Mark
[Android Apps and Games] Kierrok:
FAT32 doesn't support linux permissions. Even if it works your system will be insecure, so make sure you don't link any app with sensitive data.

du follows all the links, so it will count the linked files too. You can avoid that with the -x parameter. Like this:

# du -s /data/data

147564 data

# du -sx /data/data

51968 data

The last result is the real one. So, I'm saving 93MB of internal storage.

EDIT: Here a quick way to find the space used by data, sorted by size:

cd /data/data

du -x -d 1 | sort -n
[Android Apps and Games] GermainZ:
All tutorials/FAQs I've read say that the only way to resize the second partition is to use MiniTool and a microSD USB card reader, which I don't happen to have.

Is there any way to resize the second partition without a dedicated USB card reader (without loosing data, obviously)? I've searched this thread and some posts seem to be saying that you can simply mount the microSD via the phone, but they're not very clear, so I'd rather make sure.

Thanks a lot :)
[Android Apps and Games] Kierrok:
That wasn't possible in every phone I tried. Why don't you make a backup of both partitions, delete them and then recreate with new sizes?

Most custom recoveries can backup the ext partition. I even use it to create the partitions.
[Android Apps and Games] htrakr:
Would be perfect if this was automatically done in Link2SD (maybe when it first creates mount script this can be addded to that) or a "link app data" option while creating links along with apk,dex,lib so that minimizes chances of people (me!) messing up something.
[Android Apps and Games] d12unk13astard:
I have mounted my external sdcard thru phone plenty of times to partition it using minitool, give it a go!

Edit... definetly backup important folders first tho.
[Android Apps and Games] GermainZ:
That did the job, thanks.
[Android Apps and Games] marky1124:
Hi Kierrok,

Thanks for your reply. It's taken me a while to realise what the problem was, and it all goes back to what you said about the filesystem needing to be ext2/3/4 rather than vfat (FAT32). The problem is that the application I tried to link already had it's lib files linked to the SD card. When Titanium Backup tried to move it's data files to the sd card that must have failed because you can't create symbolic links on vfat filesystems. TB didn't report an error though, what it instead did was leave me with a confused setup:-

/data/data/com.myfitnesspal.android/databases (still in place - ~18MB)

/data/data/com.myfitnesspal.android/com.myfitnesspal.android -> /data/sd/data2/com.myfitnesspal.android

/data/sd/data2/com.myfitnesspal.android/databases (copy of private app data - ~18MB)

With Google Maps Titanium Backup works just fine:-

/data/data/com.google.android.apps.maps -> /data/sd/data2/com.google.android.apps.maps

It was only when I tried to move the files myself using "cp -a /data/data/com.myfitnesspal.com /data/sd/data2" and I got a load of 'Operation not permitted' errors that I realised the problem fully.

So you were right. I need to change my second partition filesystem type. Is that OK with link2sd? The reason I chose FAT32 was because I was following instructions for link2sd which told me to use FAT32.

Ultimately as htrakr just said, I wish this functionality where built into link2sd.

Cheers,

Mark
[Android Apps and Games] Kierrok:
Link2SD works with any file system your phone supports. If it supports ext2/3/4 you can change but you'll have to reformat the partition.

Why don't you unlink the lib files of the apps you want to link the data?
[Android Apps and Games] marky1124:
Great minds....

Yes tried that and it worked like a charm. Thank you.
[Android Apps and Games] nscxp2005:
Hi to all,

Does anybody here know what I should move out off App,Dex or Libs to SD to keep widgets and app shortcuts on the home screens fro disappearing?

Thank you for your time.

All the best,

NSCXP2005
[Android Apps and Games] GermainZ:
You can move them all, they'll still load once startup is done (can take around a minute).
[Android Apps and Games] Fat_boy555:
Can I link keyboards to sd? I am getting fcs.
[Android Apps and Games] decmk:
Smart keyboard and swiftkey 3 work when linked
[Android Apps and Games] Fat_boy555:
TouchPal? I know SwiftKey works cause I am using it
[Android Apps and Games] GoThere@50:
GS3 / SCH-i535 ?

Bakpinar, I am really admiring your program and would like to use it, but I've seen a few post claiming it's not compatible with the Verizon based Samsung Galaxy S3 (Sch-i535). I've also seen post that contradict that. In these post there is little or no explanation as to why it didn't work. Seeing as how that device will probably have a very large user base, I was wondering if you have any plans to test Link2SD on the GS3 or if you can share any insight as to why there may be issues? If any users have successfully used Link2SD on a GS3 please share your experience. Thanks for all the hard work! :good:
[Android Apps and Games] d12unk13astard:
Its not compatible with the gs2 either, cuz of the way our phones are partitioned. With /sdcard being mounted as the phones internal 12GB memory and external sd being mounted as /sdcard/ext sdcard.
[Android Apps and Games] flippy12:
I'm using link2SD since some months, and I'm really happy of this app, thx. Most of my biggest apps are on the ext4 partition.

I often install ROM updates on my Arc S, but each time I'm doing it, these apps are not visible until I recreate the mount script.

Then all is ok, except that I lost these app shortcut from the folder on the Home.

Is there a way to prepare in advance and install this mount script by myself, for ex in a script to flash after the Rom install ?

(maybe it's a script I can already find somewhere on the phone ?)

[Edit] Is it enough to flash a script with only the 11link2sd in folder init.d ?
[Android Apps and Games] Kierrok:
It is, IF your ROM supports init.d.
[Android Apps and Games] usui218:
help - can't create mount script

Hello everyone,

In the past two days I have tried to get Link2sd working but unfortunatly I have not succeeded.

I'm using the Sony Ericcson Xperia Pro (MK16i) with android 4.0.4 and the latest build (4.1.B.0.587).

I'm using the official ROM provided by Sony and I've rooted it succesfully by following this guide:

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

I have a 32GB micro SD and I followed this guide to set up Link2SD:

http://www.xperiablog.net/2011/12/12/link2sd-guide-never-worry-about-internal-memory-limits-again/

So everything works fine up to the point where I select the filesystem format (I use fat32 as recommended) but then I get the following

error:

Mount script error:

Mount script cannot be created.

mount: Invalid argument

And I keep getting this error no matter what.

I should mention however that the very first time I tried this it actually worked but the size of the partitions on the micro SD were the wrong

way around so I had to change that. Since I did that I don't seem to be able to get it going again.

I have formatted my entire cellphone hoping that it would work again like before but no such luck.

I have tried to overwrite the partition table with dd and afterwards I made the msdos label with parted and then I

continued the tutorial mentioned above. I have also tried to wipe the entire micro SD with zero's hoping that would help

but it doesn't change a thing.

Another important fact is that when I use a terminal and manually type "mount -t vfat /dev/block/vold/179:2 /data/sdext2"

I get "mount: Invalid argument" so perhaps the error in Link2SD is the result of another problem?

Does anyone know how to fix this?

Thanks in advance.

Regards,

Usui218
[Android Apps and Games] decmk:
@usui218

Try to install busybox

https://play.google.com/store/apps/details?id=stericson.busybox
[Android Apps and Games] usui218:
Thank you for your response.

However I already have the latest busybox installed so that doesn't appear to be the problem.

Regards,

Usui218
[Android Apps and Games] Kierrok:
Post the output of these commands:

su

mount

cat /proc/partitions
[Android Apps and Games] usui218:
Thank you for taking interest in my problem.

Here is the requested output:

app_133@android:/ # mount
rootfs / rootfs ro,relatime 0 0
tmpfs /dev tmpfs rw,nosuid,relatime,mode=755 0 0
devpts /dev/pts devpts rw,relatime,mode=600 0 0
proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,relatime 0 0
tmpfs /mnt/asec tmpfs rw,relatime,mode=755,gid=1000 0 0
tmpfs /mnt/obb tmpfs rw,relatime,mode=755,gid=1000 0 0
/dev/block/mtdblock0 /system yaffs2 ro,relatime 0 0
/dev/block/mtdblock3 /data yaffs2 rw,nosuid,nodev,relatime 0 0
/dev/block/mtdblock2 /cache yaffs2 rw,nosuid,nodev,relatime 0 0
/dev/block/mtdblock1 /data/idd yaffs2 rw,nosuid,nodev,relatime 0 0
/dev/block/vold/179:1 /mnt/sdcard vfat rw,dirsync,nosuid,nodev,noexec,relatime,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
/dev/block/vold/179:1 /mnt/secure/asec vfat rw,dirsync,nosuid,nodev,noexec,relatime,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
tmpfs /mnt/sdcard/.android_secure tmpfs ro,relatime,size=0k,mode=000 0 0

app_133@android:/ # cat /proc/partitions
major minor #blocks name

31 0 409600 mtdblock0
31 1 6144 mtdblock1
31 2 103936 mtdblock2
31 3 430080 mtdblock3
253 0 61440 zram0
179 0 32768000 mmcblk0
179 1 31765504 mmcblk0p1
179 2 997376 mmcblk0p2

Regards,

Usui218
[Android Apps and Games] Kierrok:
Link2SD correctly identified your SD card 2nd partition, so check if both partitions are primary (they have to be) and /data/sdext2 directory is created.

"Mount script cannot be created." error also suggest that Link2SD couldn't write to /system partition which is where it creates the mounting scripts. Does your phone have any sort of security mechanism protecting the system partition/files?
[Android Apps and Games] usui218:
Both partitions are definitely primary and the directory you speak of is present:

app_133@android:/ # ls -la /data/ | grep sdext2
drwxrwxr-x root app_130 2012-09-09 12:06 sdext2

I know of no program that "protects" my files ...

I can make a new directory and delete it afterwards in /data so I think the problem lies elsewhere.

Thank you.

Regards,

Usui218
[Android Apps and Games] flawedlegacy:
So when I click move to SD it gives me an error of not enough free space, but my 2nd partition has 10gb free. I created 2nd partition as primary. what did i do wrong? any ideas?
[Android Apps and Games] Kierrok:
I said /system! And it's not a program, HTC phones have such protection. Some NAND portions are protected so writing to /system is impossible until that security is overridden. Maybe yours have something like it. Many brands are adopting those nasty protections.

But that security shouldn't prevent a mount... Try formatting ext2/3/4 instead of fat32. Also change ownership of sdext2 to root:root and permissions to 755. That's what I have.
[Android Apps and Games] GermainZ:
Move to SD moves it to the first (FAT32) partition.

Create Link moves it to the second partition.

Also, the files are moved to your phone first if I'm not mistaken, so you need to have some free internal space too.
[Android Apps and Games] flawedlegacy:
I do have some internal space free. so Create Link does the same as Move to SD? -sorry i'm a moron about this. Or do I need to "Mode to SD" to get it moved properly?

TIA!
[Android Apps and Games] usui218:
Well I tried mkdir on /system and that didn't work because it is mounted read-only.

I tried formatting the second partition as you requested but I still get the same error + the suggestion to use fat32.

I changed the ownership with the following command: chown root /data/sdext2

I changed the permissions like so: chmod 755 /date/ext2

Unfortunately I'm still getting the same error :crying:

Thank you.

Regards,

Usui218
[Android Apps and Games] GermainZ:
Move 2 SD does it the native way, which doesn't move the library files and dalvik cache, and creates incompatibility with many apps. Plus, it breaks widgets.

You want to use Create Link.

Read the faq for more info: http://www.link2sd.info/faq
[Android Apps and Games] Fat_boy555:
Use ext2. And set partitions to primary.
[Android Apps and Games] usui218:
Thank you for your response.

Both partitions on the micro SD are primary and I have already tried every filesystem format

available but I keep getting the same error.

Regards,

Usui218
[Android Apps and Games] Remcotjuuh:
Hey, I'm new to this app. As my internal memory is small my main goal is to make some space. Will using Link2SD free more space than App2SD does? Thanks in advance!
[Android Apps and Games] GermainZ:
App2SD force moves apps the native way. Library files and dalvik cache isn't moved. So yes, Link2SD will free up more space if you're using a second partition to move the apps (using "Create Link")

Read the FAQ for more info: http://www.link2sd.info/faq
[Android Apps and Games] Remcotjuuh:
Thanks, I'll post later if it worked :)
[Android Apps and Games] Kierrok:
You just changed the owner, not the group. Use chown root:root /data/sdext2

Also, post the output of these commands:

which mount
cat /system/etc/init.d/11link2sd
cat /system/etc/install-recovery.sh
ls -al /system/bin/debug*