Hi,
I decided to my hole external card as ext4 format, without journal.
I see that the phone mounts it through fuse, and not directly like internal ext4 partitions.
Does anybody know why? And eventually how to mount it more cleanly...
Tks.
I think it depends on your kernel and modules available...
Sent from my GT-I9300 using Tapatalk 4
/proc/filesystems shows that ext4 is supported. As in fstab sdcard mount mode is set to auto, it should choose fuse only if necessary.
And by definition ext4 is present in all jelly bean kernels as it's default internal file system format.
Self answer...
http://source.android.com/devices/tech/storage/
It seems that android uses fuse for external (= secondary) storage regardless the filesystem. If I understood correctly.
I tried to change auto to ext4 in fstab but no effect, during boot it was restored to auto.
Edit: manually unmount /storage/sdcard1 and /mnt/fuse/sdcard1 then mounting vold block with ext4 argument works flawlessly.
Should write a little script in init.d to do that...
Better, to avoid manipulation as I flash nearly every day, script manager with:
#!/system/bin/sh
su
umount /storage/sdcard1
umount /mnt/fuse/sdcard1
mount -rw -t ext4 -o noatime,nosuid,nodev /dev/block/vold/179:17 /storage/sdcard1
I do all my remounts via script manager so it survives rom upgrades but sometimes also, init.d happens to soon and mounting doesn't work well. I remount my sd card with a 90 second delay using script manager
Before you ask, im not mounting it to change file system. Im changing permissions
One thing I'll point out though. Although will survive upgrade of rom usually, but if you change to different rom, vold may change from 179:17... 179 always same. Not :17 though
Sent from my GT-I9300 using Tapatalk 4
---------- Post added at 07:04 PM ---------- Previous post was at 06:58 PM ----------
Re the vold changing issue, I get around it like this....
#!/system/bin/sh
VOLD="$(mount | grep -E -o -m 1 ".{0,0}179:.{0,2}")"
su
umount /storage/sdcard1
umount /mnt/fuse/sdcard1
mount -rw -t ext4 -o noatime,nosuid,nodev /dev/block/vold/$VOLD /storage/sdcard1
Sent from my GT-I9300 using Tapatalk 4
Guys, how do you get around the problem that although ext4 external sdcard mounts fine and is usable through file managers, some programs just won't see it at all because it is no longer recognised as an external filesystem?
Have a try with programs like DiskUsage, Sygic GPS, Beyondpod Podcast manager and many more - they become unusable if the cars is not fat32 due to this reason, and it is true for either if it is mounter through fuse, or directly as ext4.
Related
=================== GOOD NEWS ================
Thanks to GORO and Z we have a solution
tkymgr said:
Hi,
because link2sd rearranges install-recovery.sh
I made a patch for patch for using link2sd
for CM7-Z-MOD-002
for SE 2.3.3 sample
Z's work contributes to all.
Thanks for Z !!
Cheers,
tkymgr
Click to expand...
Click to collapse
Step by step guide
http://forum.xda-developers.com/showpost.php?p=16853029&postcount=39
thanks to waigsr
for those looking to see the technical aspects of it.
SE sample zip contains a vold replacement from cm7 which actually do the magic of making sure that first partition gets mounted.
Note : as Link2SD messes with install-recovery.sh its adviced that after flashing this zip port any specific tweak you have in install-recovery.sh over to install-recovery2.sh in the same folder.
and then run link2SD
Hope this helps.
-============== Keeping old study for later reference and memories only ==============
I have been messing around with Link2SD and its config here is a short writeup for those who want to help.
The basic problem
Link2SD looks for a partition no of /sdcard +1 partition
Android has a habbit of mounting the last partition as /sdcard
so link2sd is going to fail in all senses.
however if anything is mounting at /data/sdext2 Link2sd condsider it as a second partition
so we still have hope of using it however there are several limitations of it.
multiple ways in which link2sd could be used.
1) create 2 partitions on sdcard
a) ext2 partition as mmcblk0p1
b) vfat partition as mmcblk0p2
entry in install-recovery.sh
mount -t ext2 /dev/block/mmcblk0p1 /data/sdext2
Cons : xrecovery can't mount sdcard as its mmcblk0p1 that xrecovery mounts
2) create 2 vfat partitions
a) mmcblk0p1 mounting itself at /data/sdext2
b) mmcblk0p2 mounting itself as /sdcard
cons recovery related files will go in /data/sdext2
3) three partition layout
a) mmcblk0p1 -> reserverd for recovery related stuff
b) mmcblk0p2 -> link2sd
c) mmcblk0p3 -> SDCARD
or find an alternative to use mmcblk0p1 as /sdcard
or use a loop file as /data/sdext2
Do suggest what you all think and how should we proceed.
-=======reserved==========
and u sure this doesnt break recovery?
ok now that i read the post carefully i understand that it WILL BREAK recovery
DooMLoRD said:
and u sure this doesnt break recovery?
ok now that i read the post carefully i understand that it WILL BREAK recovery
Click to expand...
Click to collapse
cons highlighted to avoid confusion.
any idea how we can get this piece to work.
BTW why do we need it when we have app2sd ?
How's it better ?
anantshri said:
cons highlighted to avoid confusion.
any idea how we can get this piece to work.
Click to expand...
Click to collapse
keep only one FAT32 partition...
modify the recovery ramdisk to mount that partition to /sdcard
DooMLoRD said:
keep only one FAT32 partition...
modify the recovery ramdisk to mount that partition to /sdcard
Click to expand...
Click to collapse
that could be done
however there is one more issue which i found just now
SDCARD can't be mounted to PC till both partitions are umounted and that won't be done automatically so we need alternative for sdcard umounting also
something like a gscript code for umounting /data/sdext2 before attempting sdcard mount to pc
the new vold introduced in froyo causes this issue
Adolf1994 said:
the new vold introduced in froyo causes this issue
Click to expand...
Click to collapse
the default vold.fstab listing is
dev_mount sdcard /mnt/sdcard auto /devices/platform/msm_sdcc.1/mmc_host/mmc0 /devices/platform/goldfish_mmc.0 /devices/platform/msm_sdcc.4/mmc_host/mmc0 /devices/platform/msm_sdcc.4/mmc_host/mmc1
some stuff online suggests that i can specify a partition number manually.
however
Code:
dev_mount sdcard /mnt/sdcard [B]1[/B] /devices/platform/msm_sdcc.1/mmc_host/mmc0 /devices/platform/goldfish_mmc.0 /devices/platform/msm_sdcc.4/mmc_host/mmc0 /devices/platform/msm_sdcc.4/mmc_host/mmc1
when i am trying this it barks out and not even mounts sdcard.
With the sdcard parted in 3 partitions, I tried to make the third partition recognized by my pc, and I tried an application named multimount sd or something like that and it worked for me. You can found it in the market. With it, the pc can recognize the third partition not the first. Maybe that will help in your project.
Sent from my X10i
i meant the vold binary/system, not the fstab config
Adolf1994 said:
i meant the vold binary/system, not the fstab config
Click to expand...
Click to collapse
can you point me to the correct code for this.
fat32 is first partition
ext2 is second partition
vold.fstab
dev_mount sdcard /mnt/sdcard auto /devices/platform/msm_sdcc.1/mmc_host/mmc0 /devices/platform/goldfish_mmc.0 /devices/platform/msm_sdcc.4/mmc_host/mmc1
this will mount fat32 partition
dev_mount ext2 /mnt/sdcard 1 or 2 /devices/platform/msm_sdcc.1/mmc_host/mmc0 /devices/platform/goldfish_mmc.0 /devices/platform/msm_sdcc.4/mmc_host/mmc1
should mount ext2 for link2sd
the vold from 2.1 works well as you can see and if you'd have googled it, then you'd know there is a revised version of vold in 2.2+
How about instead bind mounting a folder on /system as /data/sdext2 did this for ages on 2.1 to get more space for apps without probs. Obviously /system has to be mounted rw which isn't a prob for me and at least on stock there's loads of free space there which is a shame to waste.
Code:
mount -o remount,rw -t yaffs2 /dev/block/mtdblock2 /system
mount -o bind /system/app2 /data/sdext2
Think the folders need to be created first.
patch for using link2sd
Hi,
because link2sd rearranges install-recovery.sh
I made a patch for patch for using link2sd
for CM7-Z-MOD-002
for SE 2.3.3 sample
Z's work contributes to all.
Thanks for Z !!
Cheers,
tkymgr
aZuZu said:
fat32 is first partition
ext2 is second partition
vold.fstab
dev_mount sdcard /mnt/sdcard auto /devices/platform/msm_sdcc.1/mmc_host/mmc0 /devices/platform/goldfish_mmc.0 /devices/platform/msm_sdcc.4/mmc_host/mmc1
this will mount fat32 partition
dev_mount ext2 /mnt/sdcard 1 or 2 /devices/platform/msm_sdcc.1/mmc_host/mmc0 /devices/platform/goldfish_mmc.0 /devices/platform/msm_sdcc.4/mmc_host/mmc1
should mount ext2 for link2sd
Click to expand...
Click to collapse
I also assumed something like this however android seems to be needing a last partition as vfat and that vfat is mounted as sdcard or nothing is mounted.
shaunbu said:
How about instead bind mounting a folder on /system as /data/sdext2 did this for ages on 2.1 to get more space for apps without probs. Obviously /system has to be mounted rw which isn't a prob for me and at least on stock there's loads of free space there which is a shame to waste.
Code:
mount -o remount,rw -t yaffs2 /dev/block/mtdblock2 /system
mount -o bind /system/app2 /data/sdext2
Think the folders need to be created first.
Click to expand...
Click to collapse
for you i recommand checking http://forum.xda-developers.com/showthread.php?t=1206149 and also system being rw all the time is not at all a good idea.
tkymgr said:
Hi,
because link2sd rearranges install-recovery.sh
I made a patch for patch for using link2sd
for CM7-Z-MOD-002
for SE 2.3.3 sample
Z's work contributes to all.
Thanks for Z !!
Cheers,
tkymgr
Click to expand...
Click to collapse
Thanks buddy will check it as soon as possible ...rightnow my sdcard is not mounting nomatter what setting i do thinking of flashing CM7 and will see how it goes from there.
Note : just checked the zip i think SE stock needed a relacement at vold. will just flash the vold and see if it works.
tkymgr said:
Hi,
because link2sd rearranges install-recovery.sh
I made a patch for patch for using link2sd
for CM7-Z-MOD-002
for SE 2.3.3 sample
Z's work contributes to all.
Thanks for Z !!
Cheers,
tkymgr
Click to expand...
Click to collapse
Thanks buddy. I can confirm the SE 2.3.3 sample zip worked. I flashed the zip, turned off my x10, partitioned the sd on my pc using fat32 & ext32, powered on and DID NOT get previous error of sd not recognized on startup. It mounted fat32 partition and link2sd recognized ext2 partition right away. Selected ext type, rebooted again and I've moved apps that I wanted to the sd card. Rebooted a couple more times and apps are still linked and running fine. Time will tell if any apps will have issues or any tweaks on this rom will be affected. Using WBs v3.9 custom GB and I'll report again later.
Again thank you to everyone's efforts and for not giving up on this old feature.
Edit: Forgot to mention I can still enter xrecovery manually and using the xperia reboot app.
tkymgr said:
Hi,
because link2sd rearranges install-recovery.sh
I made a patch for patch for using link2sd
for CM7-Z-MOD-002
for SE 2.3.3 sample
Z's work contributes to all.
Thanks for Z !!
Cheers,
tkymgr
Click to expand...
Click to collapse
confirmed working
Post updated with details......
Please, note, that everything you had previously added to install-recovery.sh, is now renamed into install-recovery.sh.ori. So, if you want it back, working, you need to rename/copy to install-recovery2.sh
Remember to fully backup your system first
do 1 -4 after streakmod 0.3.2.8
do 5 with newest mke2fs、e2fsck、busybox (or from the Attach Files )
1.mount data、sdcard
mkdir /datas
mount -t ext3 /dev/block/innersd0p6 /datas
mount -t vfat /dev/block/mmcblk1p1 /sdcard
2.backup
mkdir /sdcard/LOST.DIR/
tar -cpf /sdcard/LOST.DIR/data.tar /datas
3.del old partition ,add new partitions
umount /cache
umount /datas
fdisk /dev/block/innersd0
d
6
n
l
+1G
n
l
t
7
b
w
4.format new partitions
mke2fs -F -j -b4096 -m0 /dev/block/innersd0p6
e2fsck -yf /dev/block/innersd0p6
busybox mkfs.vfat /dev/block/innersd0p7
5.restore
mount -t ext3 /dev/block/innersd0p6 /datas
rm -r datas
tar -xpf /sdcard/LOST.DIR/data.tar
6.use new added partition
mkdir /sdcard/usbdisk
mount -t vfat /dev/block/innersd0p7 /sdcard/usbdisk
Remember to fully backup your system first
video
http://player.youku.com/player.php/sid/XMzQ4NjY2Mzg0/v.swf
the Attach Files can change partitions automaticly
View attachment 2to3.zip could add new partition
View attachment 3to2.zip could change it back to 2 partitions
View attachment 3to3.zip is used to change the partition size
(change “+1G” in part.sh of the zip packages )
View attachment AutoMount.zip could mount the new partition after boot
in DSC 0.71, it will be mounted to /mnt/usbdisk ,the real u-disk will be mounted to /sdcard/usbdisk
in other systems,it will be mounted to /sdcard/usbdisk ,then you cann't umount your sdcard before umount /sdcard/usbdisk
After added new partition , you must not do Factory Restart or fastboot userdata.img , otherwise it will change the partitions back
so when you have flashed a new ROM or if you want to do factory restart ,you may need to fastboot my View attachment userdata.zip the other way is to do "wipe data /factory reset" and "selective restore View attachment firstboot.zip" by StreakMod 0.3.2.8
full restore by SreakMod is safe,it won't change partitions
Remember to fully backup your system first
What is the advantage of this? Also, there appears to be some formatting problem with your post, with some lines of single letters. Makes it really confusing looking.
lordmorphous said:
What is the advantage of this? Also, there appears to be some formatting problem with your post, with some lines of single letters. Makes it really confusing looking.
Click to expand...
Click to collapse
Those are likely the commands to use fdisk itself. It's basically "what to press" so you could literally do it blind.
The innerSD is sometimes large enough to forgo using the outerSD completely, esp if you have a larger innerSD.
Given it's age, the S5 has an absolutely huge /data partition, it's nearly 2gb when comparable devices are 1gb tops (such as the venue)
Have you considered making your new partition and naming it /sdcard instead?
The correct way on HC and newer is to make /data/media a symlink to /sdcard and use MTP to mount it. The actual sdcard becomes /sdcard2
The S5 kernels do not support mtp so you cant do this.
But what if you took that new partition you made? innersd0p7 becomes /sdcard and the actual sdcard becomes /sdcard2. Then you could also use your partition for apps that refuse to work without an sdcard present (like titanium backup) Still you wouldnt be able to mount it.
The GNote does /sdcard/sdcard2 or something as a hack to support both without MTP, but it's hack and ultimately different from the standardized sdcard/sdcard2 in newer android.
ALso if you're repartitioning the innerSD, not only is a backup a good idea, but it's recommeneded to have access to the card itself. If for some reason the repartition goes wrong you might end up not being able to boot. Reformatting the sdcard externally will fix it.
OK, at first glance this line
fdisk /dev/block/innersd0
d
6
n
l
looked like it should have been fdisk /dev/block/innersd0p6
Like I said, first glance. Guess that is what I get for replying to posts this late at night....time for bed.
Hi all, greetings, this is the first time for me posting a thread in this session.
And sorry for my bad English, I am not native English speaker.
Here is the situation and would wish to seek help:-
Phone: Samsung Galaxy S Relay 4G (aka T699)
Rom: CM11 Official ApexTmo.
Scenario: Wishing to swap Internal Memory & Ext SD Card.
Problem: I used to solve this in ICS, by editing vold.fstab on my late SGH-I927.
This no longer worked on Jellybean (Stock Rom) on this phone,
I therefore managed to use Init.d script as follow:
Code:
sleep 2
mount -o remount,rw /
mkdir -p /data/internal_sd
mount -o bind /mnt/sdcard /data/internal_sd
mount -t vfat -o umask=0000 /dev/block/vold/179:33 /mnt/sdcard
mount -o bind /data/internal_sd /mnt/extSdCard
However when I upgraded to CM11, this script no longer works.
a. There has been work outs for other phones using a script called SwapCM11 in XDA,
however the mount point is different and I face difficulties in sorting out all mount points,
esp in CM11, besides ordinary /storage/sdcard, there is also a mount point for internal called /storage/emulated/0 or /storage/emulated/legacy
b. besides Init.d, I also tried an "Root External 2 Internal" but too not working on CM11.
Kindly please help., and best wishes
What I want to do is partition my sdcard into 2 parts, 1 fat32 and the second as ext3. Mount both partitions at startup so i get /sdcard (fat) and /sdcardext3 (ext). Then create 2 folders /sdcardext3/apps and /sdcardext3/apps-private then delete the /data/apps and /data/apps-private folders and replace them with links to the folders on the sdcard 2nd partition I just created. Is this possible? I guess I'll be having to muss around with fstab but I'm not too well versed on that. Anyone got any tips on how I can achieve this. I know there are apps like foldermount and link2sd but they only work on a per app basis, i want a full "do it and forget it" solution that doesn't rely on an app.
Cheers
EDIT:
I'm seeing these 3 lines in /init.rc
Code:
mount rfs /dev/stl11 /data nosuid nodev usedm check=no
chown system system /data
chmod 0771 /data
Is it possible to create and format an rtf partition on the sdcard, then extract, change and repack the ramdisk image with the following changes?
Code:
mount rfs /dev/block/vold/179:2 /data nosuid nodev usedm check=no
chown system system /data
chmod 0771 /data
To move the data folder completely off the phone internal memory. My phone only has 512MB and my external SD is 64GB so I won't cry at the wasted half a gig.
So far I've managed to:
extract the boot.img from the stock firmware I'm using. Using a linux box with abootimg installed (apt-get abootimg)
I split it up into the kernel (zImage) and the ramdisk (initrd.img) .
Unpacked and cpio-ed initrd.img to files.
Edited init.rc and found two instances of
Code:
mount rfs /dev/stl11 /data nosuid nodev usedm check=no
in the file
Replaced /dev/stl11 with /dev/block/mmcblk0p2 and replaced rfs with ext3.
Combined the kernel and ramdisk back together with gzip, cpio and abootimg (newboot.img) and dumped it onto the phone using adb along with the flash_image command (which wasn't on the phone as standard).
Had to copy flash_image (in fact I had to cat flash_image >/data/flash_image because there's no cp command as standard either) to /data as it needed executable privs, chmod 777 /data/flash_image to allow it to execute,
Then execute /data/flash_image boot /sdcard/newboot.img
Reboot phone
Phone;s stuck on the Samsung splash screen, pah. Was worth a try anyway.
Hi
my phone is lg k10 android 6.0 and rooted
for me only mounted fat32
when I formatted ext4 microsdcard and insert on phone show message "can't use sd card. tap to set up for use"
when click this message my microsdcard formatted fat32.
How to mount ext4 formatted MicroSD card on Android 6.0?
Thanks
So you need ext4 for symlinking purposes eh?
Anyway , if your device supports ext4 , depends on vendor , you can try to mount it manually
Root is required.
In adb ,
Code:
-adb shell
-su
-df
- cat /proc/partitions
when you know the partition for your external sd ,
Code:
mount -o bind "path to partition" /storage/sdcard1
If this works , you want to add this as a script to run at boot or create a init.d script by your own and give it 0755 permission.
Cheers
-Edit
If it didnt work , try this , it may be a little complicated
https://forum.xda-developers.com/showthread.php?t=2424900
akash14darshan said:
So you need ext4 for symlinking purposes eh?
Anyway , if your device supports ext4 , depends on vendor , you can try to mount it manually
Root is required.
In adb ,
Code:
-adb shell
-su
-df
- cat /proc/partitions
when you know the partition for your external sd ,
Code:
mount -o bind "path to partition" /storage/sdcard1
If this works , you want to add this as a script to run at boot or create a init.d script by your own and give it 0755 permission.
Cheers
-Edit
If it didnt work , try this , it may be a little complicated
https://forum.xda-developers.com/showthread.php?t=2424900
Click to expand...
Click to collapse
I want use exfat because for big files size 4g
but not mount exfat
I want use format exfat Instead fat32
can I or must use custom rom?
123xdagsm said:
I want use exfat because for big files size 4g
but not mount exfat
I want use format exfat Instead fat32
can I or must use custom rom?
Click to expand...
Click to collapse
I need you to be particular with your wordings ..
Do you need ext4 sdcard to be mounted or exfat?
PS:
For File Size larger than 4gb , you can try NTFS , It is supported natively by my device.
Try formatting sdcard as NTFS and then insert into device.
If it shows any problem or doesnt mount , try this
Code:
-su
-ntfs-3g /dev/block/mmcblk1p1 /mnt/sdcard/external_sd
-vold
If this works , try making an init.d script with the above code , to mount sdcard everytime at boot
Cheers
akash14darshan said:
I need you to be particular with your wordings ..
Do you need ext4 sdcard to be mounted or exfat?
PS:
For File Size larger than 4gb , you can try NTFS , It is supported natively by my device.
Try formatting sdcard as NTFS and then insert into device.
If it shows any problem or doesnt mount , try this
Code:
-su
-ntfs-3g /dev/block/mmcblk1p1 /mnt/sdcard/external_sd
-vold
If this works , try making an init.d script with the above code , to mount sdcard everytime at boot
Cheers
Click to expand...
Click to collapse
It does not matter, I just want to support big size file 4g
I format ntfs but not work and type commands show error "
sush: ntfs-3g: not found"
I format ext4 too and test. command
# mount -o bind /dev/block/mmcblk1p1 /storage/sdcard1
and make director /storage/sdcard1 but show error"
mount: Not a directory"
123xdagsm said:
It does not matter, I just want to support big size file 4g
I format ntfs but not work and type commands show error "
sush: ntfs-3g: not found"
I format ext4 too and test. command
# mount -o bind /dev/block/mmcblk1p1 /storage/sdcard1
and make director /storage/sdcard1 but show error"
mount: Not a directory"
Click to expand...
Click to collapse
try this
Code:
-su
-cd /storage/
-mkdir sdcard1
-cd /
-mount -o bind /dev/block/mmcblk1p1 /storage/sdcard1
akash14darshan said:
try this
Code:
-su
-cd /storage/
-mkdir sdcard1
-cd /
-mount -o bind /dev/block/mmcblk1p1 /storage/sdcard1
Click to expand...
Click to collapse
not work show message again
"mount: Not a directory"
I use terminal for commands
I guess due to marshmallow's strict policies , you are not being able to mount NTFS,
I will suggest you to format card as ext4 using EaseUS Partition Manager and then insert sdcard in your device.
Ext4 is natively supported by linux and I dont think it should cause you problems.
Cheers , Pressing that Thanks button wont harm you
I don't know lg k10 android 6.0 not support formats exfat,ntfs,ext4 for micro sdcard.
Does anyone else have a comment to fix the problem?
akash14darshan said:
I guess due to marshmallow's strict policies , you are not being able to mount NTFS,
I will suggest you to format card as ext4 using EaseUS Partition Manager and then insert sdcard in your device.
Ext4 is natively supported by linux and I dont think it should cause you problems.
Cheers , Pressing that Thanks button wont harm you
Click to expand...
Click to collapse
Gonna try this.
akash14darshan said:
So you need ext4 for symlinking purposes eh?
Anyway , if your device supports ext4 , depends on vendor , you can try to mount it manually
Root is required.
In adb ,
Code:
-adb shell
-su
-df
- cat /proc/partitions
when you know the partition for your external sd ,
Code:
mount -o bind "path to partition" /storage/sdcard1
If this works , you want to add this as a script to run at boot or create a init.d script by your own and give it 0755 permission.
Cheers
-Edit
If it didnt work , try this , it may be a little complicated
https://forum.xda-developers.com/showthread.php?t=2424900
Click to expand...
Click to collapse
Would you tell me how to access the adb?
Cheers