yashsingh1/xdaforums huggingface dataset:
[Galaxy S III General] gfreeman86:
You will lose data contained in the partition you are formatting. If you leave the other partitions untouched, you won't lose their data.
[Galaxy S III General] JustArchi:
Just don't use (o), as it will destroy everything. Use an option to delete selected partitions (d, if I remember correctly) and create them through n.
[Galaxy S III General] vazio:
System Data

Hi, thanks for te help, but now a have a 1 gb lost by system data or 0.8gb if i disable the journaling, that is right??? Thanks
[Galaxy S III General] JustArchi:
It depends on your rom and also if you created ext4 properly. I've formatted my 2 GB SD Card to EXT4 and I got 1,80 GB free (yes with journaling). This is because 5%-10% is reserved for "super blocks". Read more -> http://en.wikipedia.org/wiki/Ext4
[Galaxy S III General] Hottot2:
problem using expert method

Hi Guys,

I am new fairly new to rooting and using terminal emulators.

I have a rooted samsung galaxy note 2 with superSU, busybox and shell terminal emulator. I verified fdisk and mke2fs

(fdisk --help and mke2fs --help) but then when I tried the command

"umount /storage/extSdCard"

I get the error message "Operation not permitted"

Can anyone tell me why this might be?

Thanks

/storage/extSdCard is the path to the external sdcard on my device.
[Galaxy S III General] JustArchi:
Did you login as root before? (su)
[Galaxy S III General] Hottot2:
I did not.

However, I did try again and got the sane result. I used these commands in shell terminal emulator:

su -

mount

umount /storage/extSdCard

result: "Failed: Operation not permitted"

I have verified root with root checker...and after typing the command "su -" I was prompted by supersu to "allow"

I believe this issue will likely be something simple that I am not aware of.

I have tried this on my galaxy note 2 and my tab3 8.0 with the same results.

I really appreciate any help offered.
[Galaxy S III General] JustArchi:
Try to execute su -c "umount /storage/extSdCard"

It worked flawlessly in my case.
[Galaxy S III General] krha23:
Thanks Archi. I was wandering around looking for a solution to the problem with my sd(I'm nooo0b if it goes about Linux/Android :D). My Archidroid 2.3.3 did not recognized/mount my external card, so after following your instructions (using the terminal in android) now I can enjoy my 64gb sd card.. Great job!
[Galaxy S III General] Hottot2:
Ok. That worked. Thanks.

I then tried (su -c "fdisk /dev/block/mmcblk1")

Then...press m for help...or pressing "o" gets me a syntax error.

I have attached a screenshot.

Thanks again

Ryan
[Galaxy S III General] JustArchi:
Okay, you're user, not root. This is a weird android shell, that's why.

Try to use "su -i" to get root shell, then use fdisk (without su).
[Galaxy S III General] Hottot2:
Still didnt work. After typing "su -I" the next line still says "user@android:/$"

I was thinking I could try a reinstall of shell terminal emulator...or perhaps you could recommend a different one to use.

I will try again later tonight.

Thanks

Ryan
[Galaxy S III General] JustArchi:
Try android terminal emulator, you must gain root shell. Typically "su" command does that, "su -l" should as well.
[Galaxy S III General] Hottot2:
Alright...typed su and gained root....got through ttothe last step.

I typed "mke2fs -t ext4 /dev/block/mmcblk1p1"

and the result was: "mke2fs: invalid option -- t"

I have trying to read about mke2fs and the -t option but no luck so far.

Thanks

Ryan
[Galaxy S III General] Tom-Tom07:
Hello Archi and thanx for the tutorial :)

I followed all the steps, done it to the end, but after reboot I couldn't make any folder on SD card.

Card is recognized, formated as EXT4, but for some reason there is no way to put anything to it :(

Tried again with gparted, ended with same result.

Tried to change ownership, but that also didn't work out...

Now i reverted card to fat32...

Any idea what could be wrong?

btw, using NeatROM 4.4.2 with boeffla kernel and Philz 6.00.8

thanx in advance :)
[Galaxy S III General] JustArchi:
Ext4 support is broken in your rom.

Your rom doesn't support mke2fs properly.
[Galaxy S III General] mhb92:
archi how can i see the sdcard's format..and internals?

and this can work for both storages??
[Galaxy S III General] JustArchi:
No, only ext sd card.

You can see how it's mounted through "mount" command.
[Galaxy S III General] spiked_mistborn:
Hi, thanks for this tutorial. I have a Samsung Galaxy Exhibit 4G (SGH-T679) and your instructions worked fine for me. I checked, and my external SD card is also mounted at /dev/block/mmcblk1. I'm running a recent build of CM11 4.4.2. My recovery is CWM 6.0.4.5 and it's recognized there also. I am having a problem with USB file transfers though. In MTP mode Windows 8.1 will see files on the drive, but it gives me a write error when I try to copy anything to it. In UMS mode it says the drive must be formatted, so phone seems to be directly presenting it as a hardware drive with partition and all. It's going to take a while to copy 25GB of data back over WiFi. I'm thinking it might be quicker for me to setup a Linux VM and use USB. It will still be fun trying to figure it out, and also to see if it makes any difference in how my phone works. I'll post an update if I figure anything out. Thanks again!

Update: In MTP mode I can copy files or folders only to the root directory of the SD card. It gives me an error if I try to copy anything into an already existing folder.
[Galaxy S III General] Hottot2:
Thanks a lot. I will try with a different rom and let you know how I made out.
[Galaxy S III General] Dan_kwc2000:
I'm experiencing the same problem. I am missing around 3gb (55/58gb) on my 64gb card. I have followed exactly like the youtube video.
[Galaxy S III General] JustArchi:
Already told you that some space is reserved for superblocks, this is how journaling works.
[Galaxy S III General] GoodWiesKapot:
Hi,

Thnx for this great tutorial...

I'm having a issue with mounting the sdcard in ext4 format.

I followed your steps 1 to 9 without any problems other than a diffrent mountpoint. As you mentioned in the OP, android should auto detect and mount the new formatted sdcard which in my case isn't working.

I have no idea where to start to fix this...

Any advice would be helpfull

THNX

little info that might help:

I'm running Archidroid 2.3.4 Stable.

mountpoint --> /mnt/media_rw/sdcard1

umount didnt work, i had to dismount the sdcard in Settings --> Storage --> dismount SDcard at the second try
[Galaxy S III General] JustArchi:
Afaik ext4 doesn't work on AD 2.3.4 right now. Try 2.3.5.
[Galaxy S III General] GoodWiesKapot:
Bump:eek: thanx for quick response
[Galaxy S III General] Hottot2:
Hi JustArchi, it took me awhile to find the time...but I am now running a new rom and still the same problem.

mke2fs -t ---> invalid option

I am currently running Jedi X20 (4.1.2) on my Note2 (sgh-I317m)

Did I choose another rom that doesnt support mke2fs properly?

Any thoughts?

Thanks Ryan
[Galaxy S III General] JustArchi:
Try busybox mke2fs.

Eventually mke2fs --help and check syntax. Maybe you have also mke2fs.ext4 and you can use it.
[Galaxy S III General] janres155:
Hi Archi

I just want to ask if my external sdcard would still work with UMS Mode after formatting to EXT4?

Sorry, I just got curious.

Regards,

Janres
[Galaxy S III General] JustArchi:
It will if your OS will be able to read it, f.e. if you're using linux or windows with proper ext4 module.
[Galaxy S III General] mhb92:
what format should sdcard0 should be?
[Galaxy S III General] mhb92:
also arch...i did the expert way on terminal and all done nice..but i am not able to write on sdcard1 ?!? :S
[Galaxy S III General] mhb92:
ok... i changed forst storage/sdcard1 permussions with chmod..didnt work..and after that i chmod on /mnt/media_rw/sdcard1 and now i can write on sdcard1...

shouldnt i have permissions at first hand? :S
[Galaxy S III General] SeaFargo:
Any solution for freeup the super-user allocated space?

Still any solution for freeup the super-user allocated space?

In a 16GB MicroSD is something like 1GB!!

The comand tune2fs -m 0 seems do not work ... :(
[Galaxy S III General] SeaFargo:
Solved

Solved!! The correct way is:

tune2fs -l /dev/block/mmcblk1p1

than

tune2fs -m 0 /dev/block/mmcblk1p1
[Galaxy S III General] DienoX:
Better performance is ext4 or f2fs for card ?

Wysłane z mojego GT-I9300 przy użyciu Tapatalka
[Galaxy S III General] SeaFargo:
How to mount the device if it doesn't automount?

I've been using the EXT4 (thanks to this procedure) in my MicroSD on a Samsung I9505 bmarko AOSP based MIUI environment perfectly!!

I'm starting migrating from that very good but a little obsolete AOSP MIUI to a more recent Samsung based version, wich seems very complete and affrodable.

But ... this MIUI do not auto-mount my ext4 formatted external-sd.

It's strange because other OS, and other recovery also, do completely support external-sd ext4 filesystem.

MIUI says, from the notification bar, that the sd is not formatted and asks me if I want to procede with formatting.

I've obviously refuse that.

Do you have any suggests?
[Galaxy S III General] JustArchi:
It doesn't support EXT4, ask developers why.
[Galaxy S III General] SeaFargo:
Internal storage, system, and all other partitions are ext4. It's the Linux standard, as everybody knows..

How can't be supported for external sd? Impossible!

I just have to find the right way...
[Galaxy S III General] Kemby13:
A quick report. i tryed the 3rd option (the noob one :P) and it works just fine. It is quite fast too, finished in ~10s,

although i have a 32Gb class10 card (not sure it's worth a mention)... Just a small correction, in latest Philz recovery,

when you enter "mount & storage" the option for formating the external sd card is "sdcard_1".

Just so there won't be any missunderstandings... In short, mount & storage => format sdcard_1 => ext4

After formating i rebooted the system and wanted to copy back all of the files i saved on my pc, but i ran into a problem..

The card was invisible to the computer and to the phone, so i entered the system settings => storage. I noticed it was unmounted.

So i clicked mount, and it apeared. Out of 29.27Gb there was about 28Gb available... But the problem was i still coulden't see it on my pc...

Maybe i'll try the advanced method later, just wanted to report about my problem... Anyone else tryed this method, did it work?
[Galaxy S III General] JustArchi:
You're using AD 1.X as far as I can see, Samsung doesn't have proper EXT4 handling, this covers only AOSP roms.
[Galaxy S III General] quangbisu:
Does anyone have the problem that process.android.media search for the external card and use a lot of battery?
[Galaxy S III General] Kemby13:
ok, thx Archi...
[Galaxy S III General] mikkityk:
This will work with a 64 GB card in i9300 right? Can I pull files using adb as a workaround in window$?
[Galaxy S III General] JDC2389:
I have the same deal, did the expert command method and I can mount my sdcard fine but nothing can write to it. How did you chmod the directories?
[Galaxy S III General] JustArchi:
Again, this requires specific ROM support to be effective. FUSE.
[Galaxy S III General] JDC2389:
I have specific ROM support because I am running CM11 , it just started working suddenly, maybe it was the sdcard command I entered in terminal I dunno but it only works through /mnt/media_rw/sdcard1
[Galaxy S III General] nirav07:
Showing Blank sd card or filesystem not supported. Any idea ????

Runing neat rom 6.5
[Galaxy S III General] afineday2die:
edit : Problem solved.
[Galaxy S III General] myshu:
Formated my external sd card to ext4 and it was all good but the camera app simply won't save photos on it. Using your samsung version rom archidroid 1.7.11 with boeffla kernel.
[Galaxy S III General] impactor:
There is a problem with using the sdcard as ext4.

I changed format of my sdcard from fat32 to ext4 and my 4.3.1 android detects it and mounts it automatically like so:

/dev/block/vold/179:33 /mnt/fuse/sdcard1 ext4 rw,dirsync,seclabel,nosuid,nodev,noexec,noatime 0 0
/dev/fuse /storage/sdcard1 fuse rw,nosuid,nodev,relatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0

The card works fine - kind of. The problem is that it is no longer visible as an external SD card. Therefore, most of the programs (those that detect external cards automatically) do not see it as external and switch to the internal SD card as the only storage option.

This makes the ext4 external unusable if you are using programs line Sygic GPS, Bayondpod Podcast manager, DiskUsage etc, etc. Such programs just won't see it at all, because it is no longer mounted directly under /storage/sdcard1.

And that sucks so hard :(
[Galaxy S III General] k-semler:
Do only Samsung based ROM's recognize read/write to EXT4? I formatted my card in EXT4, and can read from it fine, but I can't write or modify the contents of it at all.
[Galaxy S III General] JustArchi:
You need to experiment - some ROMs work okay with ext4, others are not.
[Galaxy S III General] sarulprakash:
Thank you for the detailed steps.

I have a d2vzw and wanted to format my card to ext4. I use LiquidSmooth 3.0 ROM, and your instructions worked like a charm. I ran into the sdcard1 becoming read only issue and used the solution provided by mhb92 (chmod 777 on /mnt/media_rw/sdcard1) and everything started to work fine.

Thank you for this wonderful tutorial and keep up the good work!

Thanks

~Arul
[Galaxy S III General] SeaFargo:
How to solve the permission issue on MicroSD EXT4 filesystem?

Thanks to this and other threads, I've find a way to partition and format MicroSD with EXT4 filesystem, and also to mount it properly under this MIUI, wich is a TW based environment. :laugh: :good:

Just to let you know, AOSP based MIUI is MicroSD EXT4 compatibile out-of-the-box.

Unfortunately, after mounting my ext4 MicroSD, I have permission issue (that I do not have on AOSP):

default chmod is 077, which means that files created by apps on the ext4 formatted SD card will only be readable by the same apps, unless you manually update permissions.

Do you have any suggestion to solve definitively this issue, different than change permission manually or in a batch mode?

I mean, I can not run a script (for batch update chmod) every time I just take a picture ...

My mounting script are:

#making sure adbd is on port 5555:
setprop service.adb.tcp.port 5555
adb kill-server
stop adbd
start adbd
#starting server in a way where proper private key is used:
HOME=/sdcard adb start-server
# connecting server to localhost
adb connect localhost
sleep 2
#actually mounting sdcard and re-running vold :
adb -s localhost:5555 shell su -c /system/xbin/msd2.sh
#if we don't kill server it will drain power like crazy:
adb kill-server

than

mount -t ext4 /dev/block/mmcblk1p1 /storage/extSdCard && sleep 5 && /system/bin/vold

Thank you in advance for your kind support.

Regards.
[Galaxy S III General] JustArchi:
In ArchiDroid I've implemented something, which is called ARCHIDROID_CRON, in short this is the background daemon which listens to file events (such as create, modify etc.) and takes action.

https://github.com/JustArchi/ArchiD...hidroid/auto/system/xbin/ARCHIDROID_CRON#L143

You could borrow my inotify-tools (_archidroid/auto/system/bin/inotifywatch+inotifywait) and make similar script which listens for every file creation and chmods it to 0777.

This is the only thing which comes to my mind at the moment.
[Galaxy S III General] SeaFargo:
Thanks for reply, JustArchi, but unfortunately I'm absolutely not able to do so, even starting from an already developed script. I'm a graphic designer, and just an Android and MIUI fan. But ... it seems that someone else has already had your idea:

http://xdaforums.com/showpost.php?p=19349134&postcount=51

I just have to re-install that OS (I'm still using the old AOSP based MIUI everyday) and give in a try.

I let this thread know ... In any case I think the right solution is not a running daemon but an precise setting for file permission creation.

Thanks againg ;)
[Galaxy S III General] JustArchi:
You can always modify mount parameters for default chmod.
[Galaxy S III General] impactor:
[MENTION=5161352]JustArchi[/MENTION], could you comment on my problem?

Basically, the ext4 sdcard works with read/write and is mounted at /storage/sdcard1, BUT it is not being detected as external storage, so many apps don't even see it. For example - DiskUsage from Play store, or Sygic GPS.

Does it matter if the card is (re)mounted after the system boots, and not during the boot time?
[Galaxy S III General] JustArchi:
Yes it matters because when you mount it manually then it's not being detected by the system at all. If Android mounts it, then it's showed.
[Galaxy S III General] impactor:
So is there some way to make Android mount it properly? Cause even if it mounts it by itself as fuse, it is still not being detected.
[Galaxy S III General] JustArchi:
Unfortunately only a few ROMs support mounting ext4 card natively. Here I give you a tutorial how to do so - Android is being developed by Google, and Google doesn't care at all about external sd cards support due to the fact that noone of their flagships (nexus) has external sd slot.

So sorry, definitely it's possible to add decent ext4 support, but this WILL require AOSP-like ROM and some work put. As you can see on my vid - at the time of recording ext4 card is being mounted by the system, with fully-working read/write, without any init.d scripts or anything.
[Galaxy S III General] impactor:
What's special about AOSP rom? Would CM be also ok?

Do you know of some specific cross-device roms that would have this working? Perhaps PacMan (the mix of AOSP, CM and PA)?
[Galaxy S III General] JustArchi:
Definitely CM, as CM has AOSP + more. Other ROMs should also be OK, but I don't know them all so it all depends. CM is good start.
[Galaxy S III General] impactor:
Well, I am already using a CM-based rom and I also tried the PacMan and have that precise issue. I tried playing around with boot scripts but none worked properly. I begin to think it is not doable...
[Galaxy S III General] SeaFargo:
Your message was a replay to this and the following messages.

I am not able to modify mount parameters for default chmod, even if you have seen I've gone quite in deep in this problem. :crying: I'm not a programmer or a Linux expert, unfortunately.

Can you or somebody can write me down the right parameters for mounting ext4 sdcard with the 775 or 777 default chmod?

My mounting command is:

mount -t ext4 /dev/block/mmcblk1p1 /storage/extSdCard && sleep 5 && /system/bin/vold

Thank you in advance for for your kind reply. ;)
[Galaxy S III General] JustArchi:
Read about umask.
[Galaxy S III General] SeaFargo:
I've done it, afrer your kind suggestion, but seems doesn't work ...

mount -t ext4 -o umask=002 /dev/block/mmcblk1p1 /storage/extSdCard && sleep 5 && /system/bin/vold

mount: mounting /dev/block/mmcblk1p1 on /storage/extSdCard failed: Invalid argument

Seems that the option "-o umask=xxx" make this command fail :crying:

It's really that difficult to mount or to set umask 002 for the sdcard?? :rolleyes::crying::crying:
[Galaxy S III General] JustArchi:
try -o defaults,umask=002.
[Galaxy S III General] SeaFargo:
Nope :crying:

Seems that the mount umask option is not recognized at all ...

What a mess! It was difficult to mount the ext4 on Galaxy S4 TW, and now that I've done, I have this permission issue ...

Let me know if you have some other idea, and thank you the same for your kind help, Archi ;)
[Galaxy S III General] Whosat:
-o umask, uid, gid doesn't work for me either. Odd.

---------- Post added at 03:29 AM ---------- Previous post was at 03:22 AM ----------

Whaddup fellow I9195 user. I just got this working. I previously had the issue where it wasn't being detected as an external sd card and it couldn't be written to when I used the MiniTool partition wizard.

But then I came across this guide and did all the fdisk and mke2fs commands via adb but instead creating 2 partitions (I'm doing this for link2sd support). and after the reboot, everything works.

In between I've experimented with the sdcard binary (aosp allows you to specify destination mount) using -u and -g 1023 (sdcard_r).

Also try to use this command options:

mount -t ext4 -o rw,context=u:object_r:sdcard_external:s0,nosuid,nodev,noexec,noatime /dev/block/vold/179:33 /storage/sdcard1

Getting the context right allowed ES File Explorer to properly indentify my sdcard as external.

/dev/fuse was originally taking my /storage/sdcard1 so I wrote a init.d script to remove it and replace it with my mount line. Then I read somewhere that it was the wrong way to remove fuse because of some ppermissions thing but I'm not entirely sure (the guy he was posting to mounted /dev/block/mmcblk1p1 instead of /dev/block/vold/179:<partition num>)

Good luck my friend :)

EDIT: I probably should add that I did this on the latest nightly 20140402 of CM11 on the GT-I9195 using f4ktion's 1.3.6 kernel.
[Galaxy S III General] :
Thanks for this tutorial.

Device: LG Optimus G Pro E980 AT&T version

ROM: Vanir 4.3.1

Before finding this I formatted my 64GB SanDisk on Win7 with 'Minitool Partition Wizard' however, Vanir didn't recognize it, thus I booted into recovery and used Philz Touch to format the micro SD card — went fast and easy. Rebooted and Vanir auto-mounted the card without a problem, everything seems to work fine. Noticed 3.98GB used that isn't shown — upon reading this thread I'm assuming it is the superblocks for journaling — file structure of the area containing the 3.98GB:

/

/fuse/sdcard

/asec

/obb

/sdcard

/secure

/shell

. . . or close to that :)

I take it that my assumption that these folders and used space *should* most definitely be there for superblock/journaling?

And if a person would like to remove this used space they should use

tune2fs -l /dev/block/mmcblk1p1

OR

tune2fs -m 0 /dev/block/mmcblk1p1

??? don't know which one does what. Should be used via command line in Android?

I don't plan on using the code to remove the extra space, asking more for clarification for the thread.

All in all I'm just checking to make sure all is OK with my card being the way it is.. . . :fingers-crossed:

Thanks again for the thread!
[Galaxy S III General] JustArchi:
Yes, you can use tune2fs to change size of superblocks.

Deleting them isn't a good idea, decreasing default 5% to 1% may be a good idea, as it's very rare situation that 1% of superblocks won't be enough for any modern memory.

tune2fs -m 1.0 /dev/block/mmcblk1p1 - will do the trick.
[Galaxy S III General] nostupidthing:
helps??

https://jira.cyanogenmod.org/browse/CYAN-332
[Galaxy S III General] rascal0pl:
Will it work on your Archiport v5?
[Galaxy S III General] JustArchi:
Probably not but you can try. EXT4 support is rom-dependent.
[Galaxy S III General] DienoX:
Will it work on your ArchiDroid 1.x ?

Wysłane z mojego GT-I9300 przy użyciu Tapatalka
[Galaxy S III General] JustArchi:
Same as above.
[Galaxy S III General] romelrc:
nice!

Gonna do this after i root my phone.

Quick question: Do i need to do a backup of the sd card beforing converting it to EXT4?
[Galaxy S III General] JustArchi:
Definitely, all data will be lost.
[Galaxy S III General] vkarma:
nice thanks for the tip!
[Galaxy S III General] marco2tiger8:
SDCard Damaged

:) Hi I have Android ICS phone, and I understand a little about terminal or linux because I have linux distro, I have repartitioned my harddisk so I have skill in partitioning.

The problem is my phone can't mount it and says the sdcard is damaged. then I googling and read in forums that vold.fstab in ICS (and up maybe?) doesn't support other file system. so, is there a way to mount it as SD Card.

My phone support Ext4 (tested with ext3/4 as sd-ext). My phone doesn't have Internal SD, so I just have 1 SD Storage, is there a way to make 1 partition (ext4) as Internal SD and 2nd partition (Fat) as External SD :confused:

Sorry for long question and bad English :)
[Galaxy S III General] JustArchi:
Sorry, no clue.