Hi all.
I use linux extensively, but am only recently immersed in android devel and understanding busybox etc.
Have had poor results symlinking via terminal in the past. As I vaguely recall, this is an issue with FAT filesystems (or perhaps phone sd card architecture, I can't remember).
Before I duplicate effort, has anyone found an effective means to symlink across internal/auxillary sd cards?
Thanks.
Sent from my MB860 using xda premium
Both SD Card and internal storage are formatted using vfat (aka fat32) so you can't symlink stuff inside them .You can, however, create symlinks on other filesystems (say, /data) pointing to files on them.
eventually you could partition your external sdcard into two partitions, one vfat and the other ext3/4 than make symlinks to the ext partition on the external sdcard
Related
I had an idea this minute
if we are using images with a size of 1,7GB or what else... why aren't we using some tools like resize_reiserfs and so on to repartition the Internal SD and creating a new partition with native yaffs2 or ext4 on it?
I dont't really know where our ext2 images are laying but if this could be possible it should be much faster right?
That's the thing - it won't be faster. The internal SD card is pretty slow. That's why the original lagfix used a repartitioned external SD card..
r3loaded2010 said:
That's the thing - it won't be faster. The internal SD card is pretty slow. That's why the original lagfix used a repartitioned external SD card..
Click to expand...
Click to collapse
Actually, it IS faster... That's why the newer lag fix uses an image on the internal SD card
I'm also wondering why nobody's trying to mount the internal SD with ext or yaffs2 instead of rfs...
EDIT : some answers : http://forum.xda-developers.com/showthread.php?t=750663
That's right !!!
We are using a mounted image with a filesystem laying on a native filesystem.
The reason why we aren't using the whole internal SD card with yaffs2 or ext4... is we cannot partition the whole internal SD card and copy our files afterwards.
BUT... we are able to compile some tools like "fdisk", "resize_[filesystem]" for ARM to use them direcly on the system for resizing (smaller) -> creating a new one -> and format it with yaffs2 for example.
After that we have the ability to use this partition like the ones in all other lagfixes mounting, symlinking...
That's the Idea
DasLeo said:
That's right !!!
We are using a mounted image with a filesystem laying on a native filesystem.
The reason why we aren't using the whole internal SD card with yaffs2 or ext4... is we cannot partition the whole internal SD card and copy our files afterwards.
BUT... we are able to compile some tools like "fdisk", "resize_[filesystem]" for ARM to use them direcly on the system for resizing (smaller) -> creating a new one -> and format it with yaffs2 for example.
After that we have the ability to use this partition like the ones in all other lagfixes mounting, symlinking...
That's the Idea
Click to expand...
Click to collapse
Did you read what's already been written in this thread: http://forum.xda-developers.com/showthread.php?p=7739573 ??
It's been tried by mimocan already, but didn't give a better result. Please do not start new threads on topics that's already been discussed elsewhere.
okay then close this
hi there,
just got my nc in the past few days and have hc v4 flashed to the emmc, runs great and love it. however, there is one quirk that bugs the hell out of me -- i have a samsung vibrant, which has an internal sd and a slot for an external. the internal is mounted as /sdcard and the external as /external_sd. this is great bc you dont need the external inserted to use apps that require sdcards.
is anyone aware of a way to get our /media mounted or symlinked as /sdcard instead? (or even as a subdirectory under /sdcard). i tried everything last night, from running mount commands under terminal emulator (kept telling me my syntax was wrong when it wasn't), trying symlink (told me operation not allowed), editing /etc/vold.fstab (no dice)... i think part of the issue is that the internal eMMC is mounted as /media in the actual /init.rc script.
is there anyway for me to preempt the init.rc or and trick the OS into seeing /media under /sdcard? I have a 256MB sdcard inserted to shut up the apps that require sdcards, but i would rather use my internal storage with those (since it's there for that reason...)
any ideas?
solution is here:
http://forum.xda-developers.com/showthread.php?t=966339
This really isn't Android development related but seems too technical for the general area. Please move it if there is a more correct place for this post to be.
I had the bright idea that I could get 'extra' storage by sym linking an internal application directory to the external SDHC card.
So I copied files and tried to link:
ln -s /sdcard/sdcard2/some_app_dir /sdcard/some_app_dir
This fails. After reading some here I figured out that its because the SDHC card is formatted in FAT32 and the internal /sdcard directory is a linux type format (ext2, ext3 or ext4, not sure which).
I figure no big deal, just format the SD card as ext3 (or 2 or 4 whatever matches, I just picked 3 for my attempts).
Now I can su in terminal and type:
mount -t ext3 -o rw /dev/block/mmcblk2p1 /sdcard/sdcard2
and its mounted and everything. Life seems good.
So I exit terminal and see what I can do with 'normal' apps. No go. Figure I had a permission problem. That can be fixed.
The bigger issue is the need to open a terminal session and manually mount the SDHC card.
So my questions are 2...
Is what I'm trying to do really do-able? As in will the whole sym link and ext3 formatted SDHC card idea work?
Secondly, how do I get the SDHC card to automagically mount?
bsoplinger said:
This really isn't Android development related but seems too technical for the general area. Please move it if there is a more correct place for this post to be.
I had the bright idea that I could get 'extra' storage by sym linking an internal application directory to the external SDHC card.
So I copied files and tried to link:
ln -s /sdcard/sdcard2/some_app_dir /sdcard/some_app_dir
This fails. After reading some here I figured out that its because the SDHC card is formatted in FAT32 and the internal /sdcard directory is a linux type format (ext2, ext3 or ext4, not sure which).
I figure no big deal, just format the SD card as ext3 (or 2 or 4 whatever matches, I just picked 3 for my attempts).
Now I can su in terminal and type:
mount -t ext3 -o rw /dev/block/mmcblk2p1 /sdcard/sdcard2
and its mounted and everything. Life seems good.
So I exit terminal and see what I can do with 'normal' apps. No go. Figure I had a permission problem. That can be fixed.
The bigger issue is the need to open a terminal session and manually mount the SDHC card.
So my questions are 2...
Is what I'm trying to do really do-able? As in will the whole sym link and ext3 formatted SDHC card idea work?
Secondly, how do I get the SDHC card to automagically mount?
Click to expand...
Click to collapse
Try this yet ? I used it on a test build on the kyocera zio and it worked.
https://market.android.com/details?id=com.a0soft.gphone.app2sd
Let us know
I didn't mean that I needed to save app space since I already use app2sd but that I wanted to save space from the files some particular app saves onto internal memory by moving them to the SDHC card.
If the app(s) in question were written with the idea that there could be multiple places to store files I wouldn't need to do this but they aren't. They write to a single, fixed location that's on the internal memory of the Streak. Which means if I move those files to the SDHC I need to make them appear in their internal memory location, hence the link command in my OP.
Hi guys.
I looked for other threads on this matter but found only dead threads with no answers.
Is it possible to format the whole internal SDCARD to say EXT2 (no journalling) so I can symlink /storage/sdcard1 on to /storage/sdcard0/external_SD
I would try to busybox and format the internal sdcard but then I would be left without a recovery. I already tried modifying /etc/vold.fstab but managed to break the mount points went into an endless bootloop and without a recovery. This happened due to my modifying of both the mount points in there
Now I was thinking of modifying just the line mounting emmc on to /storage/sdcard1 but then again this would probably break /emmc and /mnt/emmc symlinks so I decided I could ask you about changing the whole FStype.
I have a Gentoo running on my laptop and I could always start dual booting my desktop if needed.
Also since right now on JB I should have trouble mounting external SD on the PC via PTP and I haven't tried MTP yet this whole operation if sucessful might leave me out of direct USB connection to the PC if the phone is not in recovery.
I'm currently on HellyBean 0708.
So do you have any input on my thoughts? I could also try mount binding the external sdcard also to /storage/sdcard0/external_SD but it would lead to more duplicates for the media scanner and a need to further unmount the card prior to every PC connection.
And I could try to modify vold.fstab to mount it straight on to /storage/sdcard0/external_SD and revise and edit the /sdcard and /mnt/emmc symlinks manually but I'm not sure if this will work out ok after all and if the location /storage/sdcard1 is actually important for JellyBean.
Please give me an advice if somebody has already tried one of these approaches.
Cheers,
Deyan
I want to have ext4 formatted external sd card. My card is gpt formatted (tried with msdos too) to a ext4 partition, but im getting the 'this device doesnt support this sd card' warning, and asking to format the card. If i format it works fine, but as fat32. Any way I can fix this? This was the major point for me; to move to a fs with permissions.
There is a way to format it through TWRP, but I never try it except for cache and system. You can try it and tell me, because I don't have a spare external micro SD card to try.
But remember, I'm just telling you the way. You are responsible for your sd card.
Wipe - advanced wipe - check "micro SD card" checkbox then repair or change file system - change file system - choose EXT4
BTW, my external sd card format is shown as vfat.
Will try this once i back it up; but it shouldnt be much different than doing it on the pc with gparted.
Vfat is the same with fat32 from whata i understand. At least mkfs with fat32 makes a vfat partition from my linux knowledge.
On my main phone, i formatted to ext4 and it worked fine (LOS 15.1 pioneer) but permission wise i still can't grant permissions (chmod doesnt change anything; i still iont get this whole cluster**** about sd cards and permissions) so i guess it doesnt help me either way. I could possibly fix problems by symlinking, but that is not allowed on the sd card uven when its ext4 (cannot create symlink using adb shell, phone wont let me ?)