SDHC card as ext3? - Dell Streak 7

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.

Related

Partition and A2SD setup

I have been trying to set up A2SD for a while now but i cant set up a partition on my sd card.
So far i have got adb to work, but when i connect my g1 to my computer (and mount it) it automatically disconnects when i go into the disk management section.
(my sd card is an 8 gig and trying to set it up on CyanogenMod)
shockaj said:
I have been trying to set up A2SD for a while now but i cant set up a partition on my sd card.
So far i have got adb to work, but when i connect my g1 to my computer (and mount it) it automatically disconnects when i go into the disk management section.
(my sd card is an 8 gig and trying to set it up on CyanogenMod)
Click to expand...
Click to collapse
you can't format your card by mounting it to windows....
if you don't have a card reader, read this tutorial
http://forum.xda-developers.com/showthread.php?t=534714
it has instructions for a swap setup as well but modify it to not have one if you dont want it
Or you can go to the link in my sig. Its a different way of setting up your partitions through a linux live cd.
recovery console (i assume you have 7948 mb, you can verify using "print" after typing "parted /dev/block/mmcblk0) don't type stuff in < >
parted /dev/block/mmcblk0
rm 1 <removes fat32 partition, might want to backup data on this>
rm 2 <removes ext partition, backup apps if you want to (adb pull)>
rm 3 <removes 3rd partition, if existent>
mkpartfs primary fat32 0 7436
mkpartfs primary ext2 7436 7948
quit
upgrade_fs <converts ext2 - ext3>
reboot recovery
flash ROM if you want to...
thanks everyone i was looking for a guide just like these!
your help is much apperciated!

Have A2SD, SD card fried but apps still work. I'm confused!

Okay so I'm pretty sure my SD card got fried (or damaged) last night.
The notification of "Damaged SD card" kept on showing up.
I tried running the repair file systems from CM recovery 1.4, all variations of rebooting, powering down, removing the SD card and all that to help 'fix' my problem.
I also went into settings to see if i have the option to mount and format the SD, but shows unavailable. Also SD secondary is unavailable as well.
So for sure my SD card is fried..... i think lol.
The thing that I am confused about is that I have apps2sd and try to use the apps that I know are installed on my SD card, I'm still able to access and use them, even though my SD card is damaged. I tried rebooting without the SD card inserted and I get FC's galore.
So does that mean my FAT32 partition is damaged and not my EXT partition?
How do I go about to remedy this?
Do I go ahead and click the on the notification to format my SD card?
Then it'll format my FAT32 partition and not my EXT partition?
Or is that totally wrong?
Confused and in need of some guidance. Thanks.
mrcrs said:
So does that mean my FAT32 partition is damaged and not my EXT partition?
.
Click to expand...
Click to collapse
Spot on
Format your card. If you use Linux, you can back up your apps, but you'll have to format and then re-install the EXT2 partition.
Basically, the FAT32 partition got corrupted. Anytime you actually see anything about the SD card on the phone itself, it's always the FAT32 partition.
hey there i had that same problem all i did was resize my fat32 partition
i used GNU parted so go to console and type
Code:
parted /dev/block/mmcblk0
now type
Code:
print
this displays the sd cards size in MB write down the max memory
now type
Code:
resize
it will ask what partition number type 1 it will the ask for a start size just type 0 if it errors saying couldnt write 0 but can write 8192B just say yes and for the end size type 1MB less than your max
Example for my 8gig card
Code:
resize
1
8192B
7965 - change to 7964
this will bring up a error saying the filesystem is damaged do you want to fix say yes
then type
Code:
quit
then
Code:
upgrade_fs
and that should do it
forgot to add your going to have to delete your ext partition FIRST! for that type
Code:
rm 2

How can I delete the EXT2 partition?

I got my N1 "Froyo" updated->rooted->Titanium apps restored.
EXT2 seems useless since official app2sd is now supported,my question is,how can i delete the EXT2 partition?
Might wanna hold off on that for a bit...
Looks like the official app2sd method requires developers to set a flag on each application so that it is allowed to be installed on SD card. Any attempts to manually move current apps to the SD card only seem to work until a reboot, at which point you'll have to reinstall everything to the internal storage.
where to? in pc or mobile?
in pc: http://gparted.sourceforge.net/livecd.php
Same question here. Currently have an Ext2 partition in sd card mobile however 8 gb San Disk class 2 card doesn't fully support Apps2Sd (especially large apps 15 mb+) as I often experienced force close and slow down. Any advice how to delete it?
Thanks in advance.
Boot into recovery and connect phone to computer. Open a command prompt and navigate to the "tools" folder of the SDK. Enter the following:
1. adb shell
2. parted /dev/block/mtdblock0
3. list
This will show you the list of partitions on your card. Partition 2 should be ext. You can straight up delete it using "rm 2" but that won't reclaim the empty space to the fat32 partition. You'll have to backup files from your fat partition, delete all partitions and make one new fat32 partition using the entire space.
This is, of course, the long way. Alternatively, you can use the SD Partition utility built into the AmonRa recovery. All that requires is that you enter the amount of space you wanna allocate. That still nukes your files so make backups.

[Q] Just an idea: repartitioning with some tools

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

[Q] vold.fstab appending an extra /devices/platform/s3c-sdhci.2(?)/mmc_host/mmc2

In short,
what should vold.fstab look like to link /sdcard/external_sd to the 2nd partition on the EMMC external sdcard? (/dev/block/mmcblk0p2 is a bad idea)
Background and why you might want to do this:
3 data partitions, how best to arrange? (/mnt/emmc /mnt/sdcard & 2nd emmc partition)
My internal memory has shrunk down from 8gb to about 4gb, which is annoying but natural for flash storage.
This is no longer enough space for apps such as Sygic to store it's maps in.
Sygic looks in /mnt/sdcard & /mnt/sdcard/external_sd. These older apps are always going to be a problem so I'm looking to make /mnt/sdcard/external_sd available somehow. But which way is best?
I have 2 partitions on the EMMC sdcard and the internal SDcard is just fat32:
Internal SD = ~4gb, /mnt/sdcard
External SD partition 1 = fat32, ~10gb, /mnt/emmc
External SD partition 2 = ext3, ~5gb, currently used by link2sd in /mnt/sec I think
Click to expand...
Click to collapse
/mnt/sdcard/external_sd is unused.
I would prefer to do:
Code:
ln -s /mnt/sec/external_sd_emulated /mnt/sdcard/external_sd
...but presumably because the /mnt/sdcard is only fat32 I have permission denied. I was hoping this would work since the source for the link is ext3 even if the destination is fat32.
I could edit fstab to change that but I'd rather not if possible because that's a bit too non standard for me. If I did though... what would that be?
I guess it would be adding to vold.fstab:
Code:
dev_mount emmc /mnt/sdcard/external_sd auto /devices/platform/s3c-sdhci.[B]3[/B]/mmc_host/mmc[B]2[/B]
^ but should it be a 3 or a 1 at this line? fstab -l with no output and nothing in /devices makes it hard to figure out
I would normally experiment but in this case I don't want to get it wrong. How do I find out what /mnt/asec is mounted to because df isn't showing it
Just to show I have searched, a related thread:
http://forum.xda-developers.com/showthread.php?t=941443
&
http://forum.xda-developers.com/showthread.php?t=1524831
Also a note to anyone reading this; obviously backup your vold.fstab file... but also put it somewhere that you can access easily via adb and CWM recovery if it doesn't work. I guess mounting /dev/block/mmc... might work but that would then fail if the sdcard isn't present... which would be I guess when USB mass storage mode is turned on.
Some documentation on /devices on Android would be good:
http://miuiandroid.com/community/threads/vold-fstab-modding-need-help.15576/
Same problem.
I used Galaxy S 8GB and found that it's too less space for install many game.
So I buy micro sdhc 32 GB.
I added it in vold.fstab too but it seem like does not work.
Now I used workaround by run command.
mount -o /mnt/sdcard/Android /mnt/emmc/Android/
But it's not convenient to use because if you want to plug computer via USB you must umount first unless it might have problem when mount.
So If you can find solution to add it automount external sd (micro sdcard ) at startup same as internal sd feature please guide me.
Thanks
frankind said:
I used Galaxy S 8GB and found that it's too less space for install many game.
So I buy micro sdhc 32 GB.
I added it in vold.fstab too but it seem like does not work.
Now I used workaround by run command.
mount -o /mnt/sdcard/Android /mnt/emmc/Android/
But it's not convenient to use because if you want to plug computer via USB you must umount first unless it might have problem when mount.
So If you can find solution to add it automount external sd (micro sdcard ) at startup same as internal sd feature please guide me.
Thanks
Click to expand...
Click to collapse
you're gonna need an entry to whatever the sdcard is but from /devices so it ejects properly. the thing is I I'm not 100% the syntax in my first post is correct.... the only way is to try it unless we can find a command that is equivalent to fdisk -l on linux?
An app called directorybind can do this bit running an app all the time isn't ideal and it crashes for me from time to time

Categories

Resources