I am trying to create symbolic links of /data/sdext2/app/*
on /data/app
.
This is what I did in adb shell
ln -sf /data/sdext2/app/* /data/app/
But it is telling "link failed No such file or directory".
Note that none of the partitions are of FAT32 format.
And without -f option it says "link failed File exists".
ln only takes 2 arguments at most (not counting options), the ../* wildcard however expands to all filenames in the folder. Just do place an echo before ln to see what happens.
Do it one by one this way:
cd /data/sdext2/app
for i in *; do ln -s /data/sdext2/app/"$i" /data/app/;done
or
for i in /data/sdext2/app/*; do ln -s "$i" /data/app/$(basename "$i");done
EDIT
Ok, this is how it works on my device:
me@workstation:~$ adb shell
shell@android:/ $ id
uid=2000(shell) gid=2000(shell) groups=1003(graphics),1004(input),1007(log),[...]
shell@android:/ $ su
shell@android:/ # id
uid=0(root) gid=0(root) groups=1003(graphics),1004(input),1007(log),[...]
shell@android:/ # cd /data/
shell@android:/data # ln -s /data/sdext2/app/banana.app /data/app/cucumber.app
shell@android:/data # ls -l /data/app/cucumber.app
lrwxrwxrwx root root 2012-11-06 22:30 /data/app/cucumber.app -> /data/sdext2/app/banana.app
-
-
Hehe :-) Of course not, but the original attempt wouldn't do that either (so I didn't bother). – ce4 Nov 6 '12 at 16:50
-
still same problem.. i can use other apps like root explorer and link2sd to create soft links.. wonder how it is done.. – 2991ambusher Nov 6 '12 at 20:00
-
-
I made it this way
cp -a /sdcard/olivetree /sdcard/sdcard-disk/olivetree
rm -rf /sdcard/olivetree
ln -sf /sdcard/sdcard-disk/olivetree /sdcard/olivetree
But for wired reasons it didn't work or me in android 'Terminal Emulator' but smoothly worked from my PC via Putty and android 'SSH Droid'.