[Q] Unable to symlink - Galaxy S I9000 Q&A, Help & Troubleshooting

For weeks now, I have been trying to symlink /mnt/sdcard/external_sd/eBooks to /mnt/sdcard/eBooks by entering this command at the Android Terminal Emulator:
Code:
ln -s /mnt/sdcard/external_sd/eBooks /mnt/sdcard/eBooks
I always get a "link failed Operation not permitted" error. I've tried to got 'su' with the same result. Can anyone help me?

Help needed
Bumpty-bump... Anyone? Please?

RFS is a FAT based filesystem.. FAT32/NTFS doesn't support symlinks.
You could try one of the fancy lagfixes which convert the filesystem to EXT2/3/4, however, keep in mind, there is the risk that doing so may cause IMEI corruption or other problems.

Thanks, mate. I get it now. This was driving me crazy...

andrewluecke said:
RFS is a FAT based filesystem.. FAT32/NTFS doesn't support symlinks.
Click to expand...
Click to collapse
I have the issue that after moving from Eclair to Froyo, the "folder" link to the external SD card has changed which means my restored apps do not work.
Before the link was /sdcard/sd and now it's sdcard/external_sd. I still have an "sd" folder in the internal sd but now it's just a regular folder - how do I make it so it's a link/jump to the external card (which the external_sd folder is which again means it must mean symlinking or equivalent works.)

Related

Question - migrating memory cards

I'm currently using a 2GB MicroSD card with an apps2SD partition (Ext2) and a storage partition (FAT32)
I have a 4GB card that I'd like to move everything to. I could surely partition it the same way I did my 2GB card, but then it would be a blank, partitioned card. What's a good way to get all my apps and such moved over, as I'm running windows (which won't read the Ext2 partition)
Would Norton Ghost do it?
no try Ext2IFS_1_11a
can't remember where it is: if it doesnt work DL linux and boot into it from disc (no need to install) and copy onto disc from there...
Use linux.
plug in uSD card, do NOT mount. If it automounts, UNMOUNT it. Check device name "tail dmesg".
If device name is for example, sdb, then copy contents to hard disk;
"dd if=/dev/sdb of=~/sdbackup" -- this will create a file in your home directory called "sdbackup".
pull card, insert new card. If it mounts, unmount it. Again check device path.
"dd if=~/sdbackup of=/dev/sdb"
Now pull card, the data on the new card mirrors the old card. Plug back in. Note: we pull and then reinsert to make sure that the kernel reloads the partition table. There are other ways of forcing this, but this is the easiest and most fool-proof.
You have unpartitioned free space at the end of the card.
Use a combination of "parted" and "resize2fs" to resize/move partitions, or just use gparted to handle these operations graphically.
jook11 said:
I'm currently using a 2GB MicroSD card with an apps2SD partition (Ext2) and a storage partition (FAT32)
I have a 4GB card that I'd like to move everything to. I could surely partition it the same way I did my 2GB card, but then it would be a blank, partitioned card. What's a good way to get all my apps and such moved over, as I'm running windows (which won't read the Ext2 partition)
Would Norton Ghost do it?
Click to expand...
Click to collapse
Thanks for your help.
lbcoder said:
Use linux.
plug in uSD card, do NOT mount. If it automounts, UNMOUNT it. Check device name "tail dmesg".
If device name is for example, sdb, then copy contents to hard disk;
"dd if=/dev/sdb of=~/sdbackup" -- this will create a file in your home directory called "sdbackup".
pull card, insert new card. If it mounts, unmount it. Again check device path.
"dd if=~/sdbackup of=/dev/sdb"
Now pull card, the data on the new card mirrors the old card. Plug back in. Note: we pull and then reinsert to make sure that the kernel reloads the partition table. There are other ways of forcing this, but this is the easiest and most fool-proof.
You have unpartitioned free space at the end of the card.
Use a combination of "parted" and "resize2fs" to resize/move partitions, or just use gparted to handle these operations graphically.
Click to expand...
Click to collapse
Are these directions explicit/comprehensive? Will I need to partition first? I don't know very much at all about linux, but I've got an ubuntu cd downloading. I've poked at it a little before - I can at least get a terminal and follow your directions, if this is all there is to it.
edit
I'm trying copying things manually in ubuntu's file.. explorer.. thingy. Then I'll partition the new memory stick with gparted and copy the files there.
This seems more natural to me, since I'm not familiar with command-line operations much anyway. Personally, I don't see why it won't work.
edit again:
I don't have permission to copy the folders "app" "app-private" or "dalvik-cache"
How can I do this?
edit edit again
google found me a "sudo nautilus" command which seems to open a file browser window with more permissions. I still can't actually copy the folders I mentioned before, but I recreated them in my backup location and I can copy the contents. Maybe this will take care of it.
update:
nope, that worked for "app" and some (but not all) of "dalvik-cache" but not "app-private"
How do I gain permission to copy it?
I'm willing to go back to the terminal, but I get an error on the tail command. There's nothing found, or somesuch. Sorry, I meant to copy the message exactly but I forgot before I rebooted the computer I was doing it with.
Can anybody help me out a little more with this?
The error I get right off the bat is "tail: cannot open 'dmesg' for reading: no such file or directory"
The only access to linux I have is an ubuntu live CD
Code:
To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.
[email protected]:~$ tail dmesg
tail:cannot open `dmesg' for reading: No such file or directory
[email protected]:~$ _
MontAlbert said:
no try Ext2IFS_1_11a
can't remember where it is: if it doesnt work DL linux and boot into it from disc (no need to install) and copy onto disc from there...
Click to expand...
Click to collapse
How do I make use of this? It sounds like it should make Ext2 partitions appear in Windows Explorer just like anything else...
I installed it, but the Ext2 partition still doesn't show when I plug in the SD card. Do I need to do something particular?
I have rebooted.
Can anyone please give me more information on this, please? I've been poking at it different ways and still can't get it to work. Who knows something I don't?
jook11 said:
Can anyone please give me more information on this, please? I've been poking at it different ways and still can't get it to work. Who knows something I don't?
Click to expand...
Click to collapse
Code:
dmesg | tail
All the information to do this has been stated in this thread by now.

How Do I move a certain app back to internal memory?

I have partitioned sd card and I have the hello im apk on the sd and I want it on my phone because it wont let me change my buddy pic it says please make sure your sd card is in the phone so Im going to try to put it back on internal storage to see if it works. So how do I move it? I parted with apps2sd but the app wont work with cyan 4.0.1 so how Do I move it?
Apps2sd is really an all or nothing proposition. You can't have one app on internal memory and the rest on the SD card.
If you want to get rid of apps2sd altogether I can tell you how to move everything back.
OTOH, if an app is complaining about the sd card it's probably talking about the fat32 partition that it wants to store images on. Is your fat32 close to being full or something?
on a side note im on cyan 4.0.1 I was at 3.6.8.1 when I used the apps2d app and now when I try to open it it says Oops! Looks like you need to go through the tutorial to set up apps to sd. Please go to blah blah blah why is it doing this
what do I have to do to get this app running gain I already haves apps going to sd.
The top part of Cyanogen's stable thread says not to use any other method of apps to sd because his has a script built in.
So. Stop fiddling with whatever apps2sd app you have.
go to terminal and type:
Code:
su
ls /dev/block/mm*
Tell me what you see. (And please take a moment to make your posts a little more readable, I'm having a hard time deciphering what you're asking/saying. )
what Am I suppost to do? I dont want to do it without knowing
open the application 'terminal emulator' -- this is like the dos 'command prompt' in windows or a term window in Linux
type 'su' and press enter -- this Switches User to root, or the administrator of the machine (your phone)
type 'ls /dev/block/mm*' -- 'ls' is 'list' directories. /dev is where all the devices are, block is hard-drive like devices (your internal memory and the sd card) and mm* is every block device that starts with 'mm....' which should be mmcblk0 (the sdcard), mmcblk0p1 (the fat32 partition) and mmcblk0p2 (the ext partition)
If the last exists, the cyanogen automatic apps2sd will have already moved all your applications there. If only one exists, it means you either formatted the whole SD card to ext2 for apps2sd (and left nothing fat32) or formatted none of it and your apps are already on your phone.
if your 'ls /dev/block/mm*' says that you have a mmcblk0p2, than run "ls /system/sd/app/*" and you should see a bunch of files ending in .apk. If so, then you have to undo apps2sd to get the Hello IM app back to internal memory.
Report back on the outputs of the above and further instructions will be provided.
Ok Iv done all that so how do I undo them and if so how will I get them back?
Tell me what all that said back when you typed it in. THEN I can tell you what to do.
I see all my apk files now what? I want to move that 1 app onto the phone memory and every other apk on the sd. Im ready for the next step.
I see a bunch of files ending in .apk now what?
Hmm. I just looked up 'Hello IM!' and see that it's a paid app.
So, we can move just paid apps to the internal memory and leave the free ones on the sd card.
if yes run the following in terminal emulator:
su
rm /data/app-private
mkdir /data/app-private
cp /system/sd/app-private/* /data/app-private
Copying the apps may not work and you may have to uninstall/reinstall, but when you install them they'll be on the internal memory.
Oh, but cyanogenmod will put them back on the sd card when you reboot, so if having the app on the internal memory does fix the problem, you'll have to edit the a2sd script.
The problem isn't that your apps are on the sdcard. The app itself doesn't know. Your partions may be out of whack or the app itself may just need to be reinstalled.
When your apps are on the sdcard they are on a different partition then what every app uses your sdcard for. Not sure if I wrote that where you can comprehend it or not...
wat do u mean out of wack
PsychoI3oy said:
If you want to get rid of apps2sd altogether I can tell you how to move everything back.
Click to expand...
Click to collapse
I've done some searching, and haven't found any way to do this that has worked for me. Could you please pass some of this info along?
Thanks.
HowTo - un-apps2sd (on CyanogenMod)
Ok, this is based on the assumption that you are running a Cyanogen rom. I'm sure it could be adopted for use on another one, but Cyanogen 4.0.x is what I'm running. You'll probably have to re-install any paid apps (app-private) but normal apps should run fine after this.
Instructions for use with adb:
Code:
adb remount
adb push a2sd.txt /system/bin/a2sd
adb shell
# rm /data/app
# mkdir /data/app
# cp /system/sd/app/* /data/app/
# rm /data/app-private
# mkdir /data/app-private
# cp -r /system/sd/app-private/* /data/app-private
# reboot
for terminal emulator, assuming the new a2sd.txt is on your sdcard:
Code:
mount -o rw,remount /system
mount -o rw,remount /data
cp /sdcard/a2sd.txt /system/bin/a2sd
and then continue the adb instructions from after 'adb shell'
after reboot you can confirm that it worked by running:
ls -l /system
from terminal emulator (no need to remount/su) and you should see 'app' and 'app-private' as directories (and not app -> /system/sd/app).
If you're running some other a2sd method, you'll have to edit/remove the script that's doing the linking, then delete the symlinks and copy back (should be similar to above).
The modified a2sd.txt attached just takes away the apps-to-sd part. Dalvik-cache is still run from /system/sd/ as are whatever other magical juicy bits he's got in there.
If you upgrade to another Cyanogen rom, the new version of a2sd will get pushed and everything will be moved back. The only way to get rid of it permanently would be to delete the ext2/3/4 partition on your sd card.
If you decide you want apps2sd again and don't want to upgrade, just put the a2sd.orig.txt back as /system/bin/a2sd and reboot, it'll automagically move everything back to the /system/sd/app on your ext partition.
I just did the un-apps2sd then put the original back and everything's fine (and was fine with un-apps2sd).
That should cover most things....
Thank you so much for the step by step instructions.
One minor correction, maybe, shouldn't there be a '/' at the end of the second to last line?
Also, for me I didn't copy over the modified a2sd.txt file. After I copied everything to internal I shutdown the phone and deleted the ext partition. All seems to be working well!
Thanks again.
daveerickson said:
Thank you so much for the step by step instructions.
One minor correction, maybe, shouldn't there be a '/' at the end of the second to last line?
Also, for me I didn't copy over the modified a2sd.txt file. After I copied everything to internal I shutdown the phone and deleted the ext partition. All seems to be working well!
Thanks again.
Click to expand...
Click to collapse
Trailing slashes are optional in most shells, including this one.
Glad it worked for you.
these doesn't seem to be working for 4.2.1, no a2sd file exists in /system/bin, maybe he moved it somewhere else, i'm trying to find it but i'm not being lucky.
any help?
No, he broke up the bits that were in a2sd and spread them across several files in /system/etc/init.d/
http://wiki.cyanogenmod.com/index.php/Removing_Apps2SD has the instructions now.

Apps2sd - read only file system

Hey guys,
I'm new to rooting my G1 but definitally not new to modding my electronics. I'm trying to set up my apps2sd but i'm having a little trouble. Trust me, I searched, I'm not a forum noob. My sdcard is already formatted in FAT32. I check my sdcard in settings on my phone and it shows almost 8gigs of available space and another area that says "sd card secondary" - unavailable.
I've looked at some tutorials and the first steps usually include typing this into Terminal Emulator.
su
mkdir /system/sd/app
I do this and this is what I get.
mkdir failed for /system/sd/app, read-only file system.
What seems to be the issue? Can I just mount the SDcard on my laptop and get on it and make a folder "system", then inside that folder "sd", and in that one "app"? Is this the manual way of doing it? Any help is greatly appreciated. I know you guys probably deal with stupid questions all the time. Thanks in advance.
Please read the stickies before posting. This should be in the Q&A forum.
Sorry I will post in the Q & A forum. Thanks for the good info, cleveland.
paolovazquez said:
Hey guys,
I'm new to rooting my G1 but definitally not new to modding my electronics. I'm trying to set up my apps2sd but i'm having a little trouble. Trust me, I searched, I'm not a forum noob. My sdcard is already formatted in FAT32. I check my sdcard in settings on my phone and it shows almost 8gigs of available space and another area that says "sd card secondary" - unavailable.
I've looked at some tutorials and the first steps usually include typing this into Terminal Emulator.
su
mkdir /system/sd/app
I do this and this is what I get.
mkdir failed for /system/sd/app, read-only file system.
What seems to be the issue? Can I just mount the SDcard on my laptop and get on it and make a folder "system", then inside that folder "sd", and in that one "app"? Is this the manual way of doing it? Any help is greatly appreciated. I know you guys probably deal with stupid questions all the time. Thanks in advance.
Click to expand...
Click to collapse
You might want to search some more. If you only have a FAT32 parition you are never going to make Apps2sd work. You might get apps to vd working if that is the route you want to go. Seriously, there are 20 threads on this topic. I wouldn't say anything but you pulled the I know what I'm talking about card.
What ROM are you running? If it says "secondary card unavailable" you are probably using a modded ROM and not one of the copies of a carrier ROM. That means that apps 2 sd is most likely automated if you setup your SD card correctly.
paolovazquez said:
Hey guys,
I'm new to rooting my G1 but definitally not new to modding my electronics. I'm trying to set up my apps2sd but i'm having a little trouble. Trust me, I searched, I'm not a forum noob. My sdcard is already formatted in FAT32. I check my sdcard in settings on my phone and it shows almost 8gigs of available space and another area that says "sd card secondary" - unavailable.
I've looked at some tutorials and the first steps usually include typing this into Terminal Emulator.
su
mkdir /system/sd/app
I do this and this is what I get.
mkdir failed for /system/sd/app, read-only file system.
What seems to be the issue? Can I just mount the SDcard on my laptop and get on it and make a folder "system", then inside that folder "sd", and in that one "app"? Is this the manual way of doing it? Any help is greatly appreciated. I know you guys probably deal with stupid questions all the time. Thanks in advance.
Click to expand...
Click to collapse
go to: http://forum.xda-developers.com/showthread.php?t=533731
install cyanogens recovery image if you havent yet, then format your card into Fat32, ext3 and if you like linux swap.
then get cyanogen 4.0.4 it will do apps to SD automaticaly

Apps2sd - read-only file sytem

Hey guys,
I'm new to rooting my G1 but definitally not new to modding my electronics. I'm trying to set up my apps2sd but i'm having a little trouble. Trust me, I searched, I'm not a forum noob. My sdcard is already formatted in FAT32. I check my sdcard in settings on my phone and it shows almost 8gigs of available space and another area that says "sd card secondary" - unavailable.
I've looked at some tutorials and the first steps usually include typing this into Terminal Emulator.
su
mkdir /system/sd/app
I do this and this is what I get.
mkdir failed for /system/sd/app, read-only file system.
What seems to be the issue? Can I just mount the SDcard on my laptop and get on it and make a folder "system", then inside that folder "sd", and in that one "app"? Is this the manual way of doing it? Any help is greatly appreciated. I know you guys probably deal with stupid questions all the time. Thanks in advance.
the only way ur partition can be mounted to any coputer is in linux. other than that osx or windows r to dumb to see it. repartition your whole card or just look for the mount remount commands in the q&a forum
from what i understand he doesn't have any partitions. you need to partition your sdcard to fat32, ext2/3/4, linux-swap(optional). there are many guides on this site for doing that

[Q] how to install program in the streak 10 pro's SD card

I don't know if it's correct to ask this question here.I find all thread about streak 10 pro is here.I got a dell streak 10 pro.It has a 16G rom.I update it to 3.2. And flash it to Chimera Dorid r2 . I want to move some app to the sd card. but I failed. I follow the instruction I found in this forum. First make an two parartion in SD card. Then copy the sh.sh,mount_sd.sh,busybox,app2sd.sh. Last exec app2sd.sh. but I failed.
1.I found I can't exec the android shell again. In system/bin there is sh and sh_bak. sh size is 0.I think sh_bak is the sh's backup .rootexplorer,terminal also can't run.I use "adb pull /system/bin/sh_bak sh",but sh_bak is not an object of file or dictionary. how can I restore the the sh?
2.I install app2Sd but it said can't move any app to sd, for the sd is emulated. I found the sd I plug in ,his name is sdcard2.sdcard is the system disk. its size is 16G. so the 16G rom is mount as sdcard .This is why I can't move app to it .So how can I mount SD correct? and move app to it?
It's counterproductive to move it to sdcard, as sdcard/ is actually data/media.
You must move it to sdcard2 to get any real effect, as you've seen HC does not support moving to the sdcard.
SH isnt a file, it's a symlink to ash, the command processor used in HC. You need to repair the symlink between ash <-> sh.
thank you for reply
Yes,I know the sdcard is not the actual sd, sdcard2 is my aid, how can I do that .I am studying the app2sd.sh , I think with little modify I can do that.but it need time. I don't know android sh.
how can I repair the systemlink in this case , I can't use the adb sh,
TheManii said:
It's counterproductive to move it to sdcard, as sdcard/ is actually data/media.
You must move it to sdcard2 to get any real effect, as you've seen HC does not support moving to the sdcard.
SH isnt a file, it's a symlink to ash, the command processor used in HC. You need to repair the symlink between ash <-> sh.
Click to expand...
Click to collapse
I think I found the way I can do it like this:
adb pull /system/bin/ash sh
adb push sh /system/bin/sh
and would you think : remove the virtual sdcard , make the sdcard as the actual sdcard is an good idea for the next ver of rom
I try this way but I can't push the ash,for sh is read-only file system
How small is /data that you'd even need to use Apps2SD/Apps2Ext? My DS7 has a 2G /data partition and I have tons of stuff on it and it's only about 50% full.
you need to remount it first into R/W, its normally loaded in R/O

Categories

Resources