yashsingh1/xdaforums huggingface dataset:
[Android Apps and Games] mrkallak:
bakpinar the only thing missing is... linking app immediately when it is installed or even just before that, when it checks free space (not after installation) so even when there is not enough space in internal memory (or when there is but app needs couple times more than it really takes) app installs on SDcard - installer sends files directly to SD. That would help those who would like to install applications that are too big to be installed (for example my LG Swift does not allow me to install applications bigger than 15MB, even when there is about 60MB free space).
[Android Apps and Games] rignfool:
I would love to see you add the ability to link the apk data... and i would love to see application cache linked as well...
[Android Apps and Games] fabricioemmerick:
Friends still have the same problem of not recognizing the second partition on the tablet COBY KYROS MID7015A the following message appears.

Except that I created two primary partitions both in FAT32. And now what I do.

Thanks
[Android Apps and Games] DJCrow_Br:
Great software, but instead automatic link, link2sd could ask after install if app will be linked or not.
[Android Apps and Games] fabricioemmerick:
Some commands that bakpinar had asked me, would someone help me. Thanks
[Android Apps and Games] enotar:
I succeed mounting internal /nand as sdext2 and have link2sd works perfectly.

Links are created and data are in /sdext2 freing space on /data/app I use this commands on terminal with adb:

umount /nand

mount -o rw -t vfat /dev/block/ndda1 /data/sdext2

But after reboot the shortcuts still exist in /data/app but not link anymore to /sdext2 as /nand is not mounted anymore as /data/sdext2

So I tried to put these 2 line alone in /etc/install-recovery.sh I created:

umount /nand

mount -o rw -t vfat /dev/block/ndda1 /data/sdext2

But that didnt work out after reboot.

Do I have to modify the install-recovery.sh or init.rc?

What should I put in to have the same result after reboot than I have doing it manually?

Thank you very much, I think I am close to have internal /nand works as needed
[Android Apps and Games] lakshesh:
hey admin plz contact me

plz help me man i cant have my apps install in my sd card

coz when i install apps it gets into my internal memory but shows message that it is install my sd card

im getting freak man help me guys help me!!!
[Android Apps and Games] durdur:
Works fine. It even recognized the manual symlink I did on some big lib files..

Many thanks.
[Android Apps and Games] sanmit:
Just update no need to unlink....also you can link lib.so files of already linked apps after update.
[Android Apps and Games] nikctsh:
Maybe the ability to link cache files ? Though i can clear cache , but i don't wish to clear the cache of some application such as online news .
[Android Apps and Games] rashkov:
restart issue

After restart, I had to relink all lib files. Is this supposed to happen or there is sth wrong with my tv. LG GT540 2.1 original rom rooted

EDIT: After a few more restarts, the problem did not occur. I don't know what cause the previous issue.
[Android Apps and Games] ltwvince:
+1 for the ability to link system applications.
[Android Apps and Games] MongooseHelix:
What type of filesystem is you 2nd partition? FAT32, ext2, ext3, ext4? Please post the output you get from these commands:

ls -l /dev/block/vold

mkdir /data/sdext2
mount -t vfat /dev/block//vold/179:2 /data/sdext2

mount

If your 2nd partition is not FAT32, change vfat in the mount command above to the appropriate type(ext2 or ext3 or ext4 or auto)

Could you attach or paste a logcat of the boot process? This could help figure out what is or isn't getting mounted and why. To do so with adb, use this command while the phone is booting up to get a dump of the log:

adb logcat -d V

It needs to be done during boot because otherwise, the boot init process is not shown in the log.

I assume you are talking about the dalvik cache file associated with each app. If that's the case, there's an option to link those files with or without linking the app itself. When you click on an app in Link2SD, and select "Create link", you will see three checkboxes to choose what to link for that app: "Link application file"(.apk in /data/app), "Link dalvik-cache file"(.dex file in /data/dalvik-cache), and "Link library files"(.so files in /data/data/*PKG_NAME*/lib)
[Android Apps and Games] MongooseHelix:
Unless I'm mistaken, it doesn't look like the first partition is getting mounted either as the output of the mount command should have a line like this:

/dev/block/vold/179:1 on /mnt/sdcard type vfat

Can you access the first partition of the sdcard and if not, have you been able to in the past? Could you also post the output of the command "df -h". And finally, let us know what happens if you try and mount the second partition like this:

mkdir /data/sdext2
mount -t vfat /dev/block//vold/179:2 /data/sdext2
[Android Apps and Games] trixie52:
omg! IT WORKED IN MY SAMSUNG GALAXY 5! THANK YOU VERY MUCH bakpinar!! You're so great! cheers!!!!! :D
[Android Apps and Games] fabricioemmerick:
Hi friend, thanks for reply.

This command df -h says: No such file or directory

I am having trouble even accessing the first or second partition
[Android Apps and Games] enotar:
Here is logcat

Thank you
[Android Apps and Games] nikctsh:
erm...actually i mean the cache files and not dalvik-cache . I think the cache file is not really possible to be linked because the file size will change from time to time . Anyway , now the link2sd is already perfect for me :)
[Android Apps and Games] garcia90:
I have the same problem with my milestone froyo oficial release, what i have to do to permantly link the lib files?
[Android Apps and Games] MongooseHelix:
Oh ok, I'm with you now :). There would be an issue with the frequent modification, deletion, and creation of the files inside of each /data/data/APP_PKG_NAME/cache directory along with whether the directory itself exists at any one moment or not. One way to possibly work around that, if feasible, would be for Link2SD to utilize a bind mount instead of symlinks to "link" a particular app's entire data directory. It would be a 3-step process to set-up when a user chose to link an app's data:

create a directory, NEW_DIR, on the 2nd partition, PART_2, to hold the app's data

move all the contents from /data/data/APP_PKG_NAME to NEW_DIR

mount --bind Part_2/NEW_DIR /data/data/APP_PKG_NAME

This way, Link2SD wouldn't have to monitor changes to an app's linked data since it would operate as if it were still located in /data/data/APP_PKG_NAME but is actually located at Part_2/NEW_DIR where Part_2=/data/sdext2 as far as Link2SD is concerned.

I use that basic method in a script I run at boot to effectively move /data/dalvik-cache to /cache/dalvik-cache as my /cache directory has more space and it let's the data and system dalvik-cache files all be in one place.
[Android Apps and Games] Almighty1:
bakpinar already added that in 1.6.0 as you can see in settings as one of the changes in 1.6.0 is:

added automatic linking option for the new installed apps
[Android Apps and Games] Almighty1:
Actually, I'm sure he is talking about the cache of the application since a app basically has a .apk, the dalvik-cache, data and then a cache of it's own which you can see in Settings -> Applications and then click on the application, there is a clear cache thing which is the cache he's talking about.
[Android Apps and Games] nikctsh:
So...you did this manually without using link2sd ? Erm...i don't really know how to do that . I'm really blur to such things , but after listen to your explanation , seem like there is an opportunity to link cache files using link2sd in the future :rolleyes:
[Android Apps and Games] korenya:
Same problem with N1 + CM6.1. After the first reboot, took a long time to start and all lib files where unlinked.
[Android Apps and Games] bakpinar:
Is it same for subsequent reboots?
[Android Apps and Games] MongooseHelix:
I haven't done anything with the app cache but I do use a script for the dalvik cache relocation as opposed to linking it to my ext2 partition through Link2SD. I'll put the code for the script I use below so whoever wants to can use it, modify it to suit them, or just look it over. It's basically a modified version of zach.xtr's cache2cache from over in the Eris forums.

The name I use is 08dalvik2cachepart so that's what I'll call it here. The simplest way to run the script at boot would be to use adb, root explorer, terminal or a combination to:

remount /system as read-write

move 08dalvik2cachepart to /etc/init.d

change owner:group to root:shell(chown 0:2000 /etc/init.d/08dalvik2cachepart)

change the permissions to rwxr-x---(chmod 750 /etc/init.d/08dalvik2cachepart)

remount system as read-only

You could alternatively run it as a userinit script if they are set up to run in your ROM. You can check by seeing if /etc/init.d/20userinit or something similar exists and if it looks to run scripts from a userinit.d directory on either your second partition or /data/local. I personally have it located in /MY_2PART/userinit.d/ along with some other scripts which get run at the end of the init process on boot.

#!/system/bin/sh
#
# Author: MongooseHelix
# Credits: zach.xtr - cache2cache script - used as basis
# Description: Moves /data/dalvik-cache files to /cache/dalvik-cache and then binds the directories

BB="logwrapper busybox"

#both dalvik-cache directories must exist
if [[ -d /cache/dalvik-cache && -d /data/dalvik-cache ]]; then

#move any exist on /data/dalvik-cache
if [ "$(ls -A /data/dalvik-cache)" ]; then
log -p i -t dalvik2cachepart "moving /data/dalvik-cache file(s) to /cache/dalvik-cache"
$BB mv -f /data/dalvik-cache/* /cache/dalvik-cache
fi

#bind dalvik directories to allow files to be "seen" both places
mount --bind /cache/dalvik-cache /data/dalvik-cache
if [ "$?" = 0 ]; then
log -p i -t dalvik2cachepart "bind successful on dalvik-cache directories "
else
log -p e -t dalvik2cachepart "failed to bind the dalvik-cache directories"
fi
else
log -p e -t dalvik2cachepart "aborted due to missing one or both of the dalvik-cache directories"
fi
[Android Apps and Games] ozonbg:
No unlinking of the .lib files after reboot on Hero 2.1 Eclair. Everything work how it suppose to do. Thanks again Bakpinar!
[Android Apps and Games] kenny wong:
this app support N1 2.3.3???

i follow the instructions to setup this app but why in storage info for SD Card 2nd Part. only show N/A??
[Android Apps and Games] MongooseHelix:
If you could put code tags around the log so we can scroll through it in your post that would be helpful. Just edit the post, highlight the log section, then click on the # icon to place the code tags.

As for the log itself, I'm still trying to understand what exactly is going on but my initial thoughts are it's remounting /nand, effectively overwriting how you want it mounted. It also seems to be having trouble getting the sd card mounted properly. Please post the output you get from the "mount" command.
[Android Apps and Games] enotar:
ll do that

Yes my sdcard is mounted but when I create a 2nd partition on it sdcard dont get mounted at all...That is why I tried to use /nand I even partition /nand with a second partition but only te first is mounted.Thanks a lot for the help

mount
rootfs / rootfs ro 0 0
tmpfs /dev tmpfs rw,mode=755 0 0
devpts /dev/pts devpts rw,mode=600 0 0
proc /proc proc rw 0 0
sysfs /sys sysfs rw 0 0
tmpfs /sqlite_stmt_journals tmpfs rw,size=4096k 0 0
tmpfs /broadcasting tmpfs rw,size=1024k 0 0
/dev/block/mtdblock2 /system yaffs2 rw 0 0
/dev/block/mtdblock5 /data yaffs2 rw,nosuid,nodev 0 0
/dev/block/mtdblock4 /cache yaffs2 rw,nosuid,nodev 0 0
/dev/block/ndda1 /nand vfat rw,dirsync,nosuid,nodev,noexec,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0

In case I post result on df and cat,ls if needed:

df
/dev: 76788K total, 12K used, 76776K available (block size 4096)
/sqlite_stmt_journals: 4096K total, 0K used, 4096K available (block size 4096)
/broadcasting: 1024K total, 0K used, 1024K available (block size 4096)
/system: 153600K total, 113228K used, 40372K available (block size 4096)
/data: 297984K total, 51492K used, 246492K available (block size 4096)
/cache: 40960K total, 6680K used, 34280K available (block size 4096)
/nand: 1422944K total, 704K used, 1422240K available (block size 32768)

# cat /proc/partitions
cat /proc/partitions
major minor #blocks name

31 0 10240 mtdblock0
31 1 5120 mtdblock1
31 2 153600 mtdblock2
31 3 4096 mtdblock3
31 4 40960 mtdblock4
31 5 297984 mtdblock5
31 6 10240 mtdblock6
31 7 1024 mtdblock7
31 8 1024 mtdblock8
179 0 15694336 mmcblk0
179 1 15133198 mmcblk0p1
240 0 1423360 ndda
240 1 1423344 ndda1

# ls -l /dev/block/vold
ls -l /dev/block/vold
brw-rw---- root root 179, 1 2011-04-09 17:34 179:1
brw-rw---- root root 179, 0 2011-04-09 17:33 179:0

# ls -l /dev/block/
ls -l /dev/block/
drwxr-xr-x root root 2011-04-09 17:33 vold
brw------- root root 240, 1 2011-04-09 17:33 ndda1
brw-rw-rw- root root 240, 0 2011-04-09 17:33 ndda
brw------- root root 31, 8 2011-04-09 17:33 mtdblock8
brw------- root root 31, 7 2011-04-09 17:33 mtdblock7
brw------- root root 31, 6 2011-04-09 17:33 mtdblock6
brw------- root root 31, 5 2011-04-09 17:33 mtdblock5
brw------- root root 31, 4 2011-04-09 17:33 mtdblock4
brw------- root root 31, 3 2011-04-09 17:33 mtdblock3
brw------- root root 31, 2 2011-04-09 17:33 mtdblock2
brw------- root root 31, 1 2011-04-09 17:33 mtdblock1
brw------- root root 31, 0 2011-04-09 17:33 mtdblock0
brw------- root root 7, 7 2011-04-09 17:33 loop7
brw------- root root 7, 6 2011-04-09 17:33 loop6
brw------- root root 7, 5 2011-04-09 17:33 loop5
brw------- root root 7, 4 2011-04-09 17:33 loop4
brw------- root root 7, 3 2011-04-09 17:33 loop3
brw------- root root 7, 2 2011-04-09 17:33 loop2
brw------- root root 7, 1 2011-04-09 17:33 loop1
brw------- root root 7, 0 2011-04-09 17:33 loop0
brw------- root root 1, 0 2011-04-09 17:33 ram0
brw------- root root 179, 1 2011-04-09 17:33 mmcblk0p1
brw------- root root 179, 0 2011-04-09 17:33 mmcblk0
[Android Apps and Games] danceswithbongs:
Bakpinar

Before doing anything, please put up a link for donations.

The amount of support you have given to the users would be reason enough. But add to that the fact that your app is amazing and constantly being improved. It sound like it's really helped out those with minimal internal space or small sd cards.

I mean people in the android os community now refer to the date in terms of BL and AL, Before Link2SD and After Link2SD...okay maybe not......not yet anyway.

Please give it a thought, you could even donate the money donated to you, if receiving donations of gratitude make you feel in the least bit uncomfortable.

Everyone feel free to post your agreement if you support the idea.

On less important matters:

I seem to be losing the link to the lib file after reboot. It rebuilds itself internally. Yet the files remain on the ext, taking up space but isn't recognized when selecting clean up partition so must be deleted manually.

Not a big deal.

The new auto link on install makes this truly perfect. As far as adding a pop up asking if you want to link it defeats the very purpose. Just choose not to auto link in settings.

As for those who are having apps crash or FC, it may be internal memory manager, especially with gingerbread.

With regards to your list of improvements, other than the multi select option only one other stands out as needed. There are many free apps that can accomplish all of the other tasks for the time being but one.

Localization! Everyone across the globe impeded from using this app, only due to language barriers, should no longer walk in the darkness of the BL eras.

If you need any help regarding translations please let me know.

Between myself and a friend we might be able to do Spanish, Italian, Hebrew and possibly Chinese. I'm pretty sure that even though there are many completely different dialects, they all share the same alphabet/characters.

As always continued happiness and successes for you Bakpinar.

Thanks for all that you have done, are doing and have yet to do.

walkin the walk while tappin the talk

danceswithbongs
[Android Apps and Games] DarenTx:
Read-Only File System

I had Link2SD working fine on my Nexus One. I have an 8 GB SD Card and I created a 1 GB EXT3 partition using MiniTool Partition Wizard Home Edition.

Then a few weeks ago I updated to the latest Cynamogen 7.0. After that Link2SD didn't work.

Under "Storage Info" in the Link2SD app it shows: Internal (24% Free), SD Card (74% Free), and SD Card 2nd Partition (63% Free). The SD Card 2nd Partition shows 1.00 GB Total space.

Whenever I try to move an app to the EXT3 partition I get this error: "Create link Failure : cannot create /data/sdext2/com.facebook.katana-1.apk: read-only file system"

I tried running "Fix Permissions" in ROM Manager but this didn't help. That may make perfect since...I have no idea what "Fix Permissions" is supposed to do.

My knowledge of Linux/Android/Link2SD/Terminal/Everything is pretty weak.

Any advice?
[Android Apps and Games] MongooseHelix:
One thing to try is using a bind mount instead of actually changing the mountpoint of /dev/block/ndda1. So don't run "umount /nand" and try binding /data/sdext2 by running "mount --bind /nand /data/sdext2". But I imagine you'll have the same problem since the log seems to show the boot process remounting /dev/block/ndda1 to /nand after your commands have already run. If that is the case, we'll need to figure out how to run a script later in the boot process. Does the directory /system/etc/init.d exist on your device? If it does, any script in there will be run during boot and it might work better. So make a script called something like 99mountnand that contains:

#!/system/bin/sh

mount --bind /nand /data/sdext2

With /system mounted as read-write, place this script inside /system/etc/init.d then change the permissions on the script:

chown 0:2000 /etc/init.d/99mountnand
chmod 750 /etc/init.d/99mountnand

Reboot and see if that works or not.
[Android Apps and Games] sanmit:
Try-boot into recovery and advanced and fix permissions.
[Android Apps and Games] enotar:
'll try when I get home and advise; I hope that works....

Thank you so much for the help
[Android Apps and Games] sanmit:
I totally agree! Internal space is the only grave problem for many devices . Keep up the good work.. ..
[Android Apps and Games] nikctsh:
Dear bakpinar ,

recently when i linked poweramp , everything goes fine . After i install then uninstall for several times , i was unable to link the lib file . I get this message :

Create link Failure

mkdir failed for /data/sdext2/data/com.maxmpz.audioplayer , Stale NFS file handle

Anything went wrong ?
[Android Apps and Games] enotar:
Dir ini.d dont exist so I tried to use /system/install-recovery.sh

The binding works only if done like that:

mount -o bind /nand /data/sdext2 but links doesnt appear in drawer so something is wrong.

for the binding of directory /nand ;it works manualy running script from SL4A and link2sd detect sdext2 but dont work at boot using the script in install-recovery.sh link2sd doesnt find the sdext2 !

I even tried tasker too to run the script but no luck

Any idea why?
[Android Apps and Games] webstudiolund:
Disappearing shortcuts - not a real problem!

The apps themselves do not disappear - it is the shortcut on the screen that disappears. You do not have to reinstall anything - just add the shortcut again by holding your finger on the spot where you want the shortcut, and then select program->choose the "missing" program! :p
[Android Apps and Games] bakpinar:
danceswithbongs,

Thank you very much for your kind support.

I added a link for donations to my avatar and to the first post.

I just wanted to thank all the people that contribute to this application.
[Android Apps and Games] bakpinar:
Your second partition may be corrupted. I think it is ext2.

You have two solutions to repair:

*) plug your card into a linux box and fix your partition with "fsck -p /dev/your_ext2_partition" command

*) reformat the partition.
[Android Apps and Games] enotar:
Ive made some progress!

I succeed mounting automaticaly /nand after reboot with a program call autostart and now link2sd works but still when I created link with it these doesnt appear so I am back at the begining. It works sometimes and sometimes not, starnge!

When I check /data/app the link exist and it is bind to the apk in the /nand

My binding is

mount -o /nand /data/sdext2

something should be missing?

thanks

Edtit: I change my binding line like below and that mount all the time so it is better but still link not appearing:

mount -o rw vfat /dev/block/ndda1 /data/sdext2

should be a permission issue?

permissions for /nand and /data/sdext2 are 075 and cannot change it........
[Android Apps and Games] nikctsh:
But i can link other files without problem?
[Android Apps and Games] MongooseHelix:
If the partition is ext2, try this and be sure to NOT have it mounted:

reboot into recovery

connect phone to computer with adb set up and run "adb shell"

if "which e2fsck" outputs a path, run "e2fsck -y /dev/block/YOUR_PART2"

e2fsck is used to check a Linux second extended file system. The -y option allows it to be used non-interactively by answering yes automatically to any questions about whether to fix a problem.
[Android Apps and Games] crzy_frg:
This App is a btter replacemnet of apps2sd.

Either move on to SwiftDroid or use tis App. It Rocks.
[Android Apps and Games] kenny wong:
hi bakpinar,

I am follow the instructions to setup the Ext3 on my SDcard, if i link all the app to sdcard the app will ask me not enough space to move, my detail as follow:

SDcard 32GB

1st - 31GB (Fat32)

2nd - 1GB (Ext3)

N1 Stock 2.3.3 ROM
[Android Apps and Games] bakpinar:
On Android 2.3, the links to the lib files are being lost after reboot because the PackageManager service unpack all native libraries from the apk files at boot time.

Android 2.3 links native library directories and it does not unpack libs for apps on the external card since they have their libraries in the ASEC container.

But it unpacks the lib files that are linked by Link2SD.

I am looking into a solution for this.

Logcat log shows what is going on...

...

I/PackageManager( 184): Unpacking native libraries for /data/app/com.aurorasoftworks.quadrant.ui.standard-1.apk

I/PackageManager( 184): Unpacking native libraries for /data/app/com.cerience.reader.app-1.apk

I/PackageManager( 184): Unpacking native libraries for /data/app/arity.calculator-1.apk

I/PackageManager( 184): Unpacking native libraries for /data/app/com.eclipsim.gpsstatus2-1.apk

...
[Android Apps and Games] bakpinar:
Can you post the output of "df" and "mount" commands?
[Android Apps and Games] tobylicious:
Hey guys,

i've been trying to get Link2SD working for several hours now. I tried ext2,ext3 and fat32 partitions as 2nd partition. Everytime set to primary.

But when i start link2sd and it asks me to select the sort of partition, i always get :

Mount script cannot be created.

: cannot create /system/etc/install-recovery.sh: not enough memory.

Im freaking out. Does somebody have an idea on how to fix this? Im begging you.
[Android Apps and Games] MongooseHelix:
The main problem seems to be finding a way to have your phone run a script early enough in the boot process. After looking at an init.rc which has support for the install-recovery.sh script(mine doesn't), it looks like it runs too late in the boot process for linked apps to be recognized. I know both the autostart app and tasker will run too late since they won't run anything until the phone is all the way booted up. You might have to end up modifying init.rc for things to work. Would you post your init.rc file here?