[MOD] 1-Click Flashable exFAT + NTFS + EXT4 support for CM10.1/AOSP + Partitioned SD!

HMkX2

Senior Member
Jan 31, 2010
98
135
0
I just posted an updated version that works 100% on 4.2.2. Tested on Masta's 2/22 CM10.1 afternoonly.

This is the first time a script has automated the process AFAIK. Do some tests, people!
 

spearoid

Senior Member
Feb 21, 2009
757
158
0
Re: [MOD] 1-Click Flashable exFAT + NTFS + EXT4 support for CM10.1 / AOSP (external S

I've been out all day and just had a chance to work through your post. I went ahead and flashed the 4.0 zip. Rebooted into the OS. Powered off the phone. Inserted my exFAT SD card. Powered on. No card visible. Choosing Mount SD card results in the damaged SD card message.

Here's the debug report

[fuse-mountsd v4.0] exFat+NTFS autorepair and mount script (HMkX2 CORE//XDA)
Automated mounting and repair of alternate SD fs on GS3 CM10.1 [+AOSP Roms!]
BREAK! /dev/block/mmcblk1p1 is not a block-special file/device, did you enter it correctly?
Resetting ADB loopback connection/root security to PRIOR...
/system/xbin/fuse-mountsd.sh: [: -ne: missing second argument
 
  • Like
Reactions: HMkX2

HMkX2

Senior Member
Jan 31, 2010
98
135
0
[fuse-mountsd v4.0] exFat+NTFS autorepair and mount script (HMkX2 CORE//XDA)
Automated mounting and repair of alternate SD fs on GS3 CM10.1 [+AOSP Roms!]
BREAK! /dev/block/mmcblk1p1 is not a block-special file/device, did you enter it correctly?
Resetting ADB loopback connection/root security to PRIOR...
/system/xbin/fuse-mountsd.sh: [: -ne: missing second argument
Your block device isn't /dev/block/mmcblk1p1. That's the one thing I ask people to find out before using the script - it is the "physical location" of the card, and I can't find out what it is without probing randomly -- so I don't.

The instructions are listed in the first post. Take a FAT32 card, put it in, type "blkid", take it out, type "blkid", the one that goes away is your block device. Edit that into the top of the script.

The second error ([: -ne: missing second argument) is more concerning... it means my code isn't portable. I have a good idea what it is though. Try typing "setprop" , "getprop" and "getprop | grep persist.sys.root_access". Let me know if it says "command not found". Cyanogen has an setting for what (ADB, Programs, or Both) to give Root access to. Other ROMs may not have that.
 
Last edited:

spearoid

Senior Member
Feb 21, 2009
757
158
0
Re: [MOD] 1-Click Flashable exFAT + NTFS + EXT4 support for CM10.1 / AOSP (external S

Those instructions in the OP follow a sentence that says it should work on other ROMs/phones. Since I have the same phone as you I didn't think they applied to me. Sorry about that.

I don't have an extra SD card. I'll have to transfer all my data off this, format it, and do your instructions. I'll see if I can do that and the other commands you requested asap.

---------- Post added at 05:24 PM ---------- Previous post was at 05:20 PM ----------

None of those three commands resulted in command not found or anything like that. The setprop command requested parameters but the last two commands seem to function as I'd imagine they should.
 
  • Like
Reactions: HMkX2

HMkX2

Senior Member
Jan 31, 2010
98
135
0
Sorry for the trouble, but that is the safest way. I'm glad to hear the commands are portable. (I went through the code anyway -- that second error was nothing major, just trying to clear an already empty string. Maybe you never used root before on that ROM?)

I will add an automatic search for block devices in the next version to avoid this issue in the future.

Some people format their entire card (uses the whole disk, /dev/block/mmcblk1), other people partition it normally (1 big partition with MBR, /dev/block/mmcblk1p1), and other people have MULTIPLE partitions (those APP2SD people, or those doing the internal <-> external hack).​

Other ROMs/Phones may even use different names entirely! (/emmc, /dev/block/byname/______)

I am VERY hesitant to probe devices randomly... this mod is written to do ZERO damage to your system if something goes wrong, unlike CM10.1 (apparently), and that's how I'd like to keep it. But if it is difficult to use, what's the point?
 
Last edited:
  • Like
Reactions: spearoid

spearoid

Senior Member
Feb 21, 2009
757
158
0
Re: [MOD] 1-Click Flashable exFAT + NTFS + EXT4 support for CM10.1 / AOSP (external S

It's no problem at all. I want to struggle through this if it helps you iron anything out. I'm terribly excited someone actually considered this a project worth undertaking. I'm shocked at how little interest there seems to be in file formats other than fat32 on what is one of the best phones on the market.

I'll get the block info shortly. Sounds like there's only one step left for success!

---------- Post added at 06:06 PM ---------- Previous post was at 05:49 PM ----------

Sorry to be such a dunce but the first piece of info I see missing is what you list as the hard coded string of text already. But I do see other text that doesn't appear when running blkid after removing the SD card.

Also, I can't even find the file to edit in your zip file that is mentioned in the OP. I see mount.exfat-fuse but not exfat-mountsd.sh

Of course I'm just unzipping and looking in the xbin folder. That may be wrong.

Here are the two blkid results before and after removing the FAT32 card.

[email protected]:/ $ su
[email protected]:/ # blkid
/dev/block/mmcblk1p1: UUID="3C77-6D7A" TYPE="vfat"
/dev/block/dm-1: UUID="57f8f4bc-abf4-655f-bf67-946fc0f9f25b" TYPE="ext4"
/dev/block/dm-0: UUID="57f8f4bc-abf4-655f-bf67-946fc0f9f25b" TYPE="ext4"
/dev/block/vold/179:97: UUID="3C77-6D7A" TYPE="vfat"
/dev/block/mmcblk0p17: UUID="57f8f4bc-abf4-655f-bf67-946fc0f9f25b" TYPE="ext4"
/dev/block/mmcblk0p16: UUID="57f8f4bc-abf4-655f-bf67-946fc0f9f25b" TYPE="ext4"
/dev/block/mmcblk0p15: UUID="57f8f4bc-abf4-655f-bf67-946fc0f9f25b" TYPE="ext4"
/dev/block/mmcblk0p14: UUID="57f8f4bc-abf4-655f-bf67-946fc0f9f25b" TYPE="ext4"
/dev/block/mmcblk0p11: UUID="57f8f4bc-abf4-655f-bf67-946fc0f9f25b" TYPE="ext4"
/dev/block/mmcblk0p1: UUID="00BC-614E" TYPE="vfat"
[email protected]:/ # blkid
/dev/block/dm-1: UUID="57f8f4bc-abf4-655f-bf67-946fc0f9f25b" TYPE="ext4"
/dev/block/dm-0: UUID="57f8f4bc-abf4-655f-bf67-946fc0f9f25b" TYPE="ext4"
/dev/block/mmcblk0p17: UUID="57f8f4bc-abf4-655f-bf67-946fc0f9f25b" TYPE="ext4"
/dev/block/mmcblk0p16: UUID="57f8f4bc-abf4-655f-bf67-946fc0f9f25b" TYPE="ext4"
/dev/block/mmcblk0p15: UUID="57f8f4bc-abf4-655f-bf67-946fc0f9f25b" TYPE="ext4"
/dev/block/mmcblk0p14: UUID="57f8f4bc-abf4-655f-bf67-946fc0f9f25b" TYPE="ext4"
/dev/block/mmcblk0p11: UUID="57f8f4bc-abf4-655f-bf67-946fc0f9f25b" TYPE="ext4"
/dev/block/mmcblk0p1: UUID="00BC-614E" TYPE="vfat"
[email protected]:/ #

---------- Post added at 06:28 PM ---------- Previous post was at 06:06 PM ----------

Actually after looking over the output more thoroughly I guess I don't see any other missing text in the second output other than mmcblk1p1
 
  • Like
Reactions: HMkX2

HMkX2

Senior Member
Jan 31, 2010
98
135
0
Sorry to be such a dunce but the first piece of info I see missing is what you list as the hard coded string of text already. But I do see other text that doesn't appear when running blkid after removing the SD card.

Also, I can't even find the file to edit in your zip file that is mentioned in the OP. I see mount.exfat-fuse but not exfat-mountsd.sh . Of course I'm just unzipping and looking in the xbin folder. That may be wrong.
Nobody is dunce, you just haven't learned everything yet. :) I changed name to fuse-mountsh.sh - my typo in the OP. (When I added EXT4/NTFS support it didn't make sense to call it exfat-mountsd anymore.)

I suggest editing it ON the device -- you don't need to flash the ZIP multiple times. Use "Rom Toolbox (Lite)" free program, click Explorer, navigate to "/system/xbin/" and open "fuse-mountsd.sh" in the builtin RB Text Editor. It's the first or second line.

[email protected]:/ $ su
[email protected]:/ # blkid
/dev/block/mmcblk1p1: UUID="3C77-6D7A" TYPE="vfat"
/dev/block/dm-1: UUID="57f8f4bc-abf4-655f-bf67-946fc0f9f25b" TYPE="ext4"
/dev/block/dm-0: UUID="57f8f4bc-abf4-655f-bf67-946fc0f9f25b" TYPE="ext4"
/dev/block/vold/179:97: UUID="3C77-6D7A" TYPE="vfat"
/dev/block/mmcblk0p17: UUID="57f8f4bc-abf4-655f-bf67-946fc0f9f25b" TYPE="ext4"
/dev/block/mmcblk0p16: UUID="57f8f4bc-abf4-655f-bf67-946fc0f9f25b" TYPE="ext4"
/dev/block/mmcblk0p15: UUID="57f8f4bc-abf4-655f-bf67-946fc0f9f25b" TYPE="ext4"
/dev/block/mmcblk0p14: UUID="57f8f4bc-abf4-655f-bf67-946fc0f9f25b" TYPE="ext4"
/dev/block/mmcblk0p11: UUID="57f8f4bc-abf4-655f-bf67-946fc0f9f25b" TYPE="ext4"
/dev/block/mmcblk0p1: UUID="00BC-614E" TYPE="vfat"
[email protected]:/ # blkid
/dev/block/dm-1: UUID="57f8f4bc-abf4-655f-bf67-946fc0f9f25b" TYPE="ext4"
/dev/block/dm-0: UUID="57f8f4bc-abf4-655f-bf67-946fc0f9f25b" TYPE="ext4"
/dev/block/mmcblk0p17: UUID="57f8f4bc-abf4-655f-bf67-946fc0f9f25b" TYPE="ext4"
/dev/block/mmcblk0p16: UUID="57f8f4bc-abf4-655f-bf67-946fc0f9f25b" TYPE="ext4"
/dev/block/mmcblk0p15: UUID="57f8f4bc-abf4-655f-bf67-946fc0f9f25b" TYPE="ext4"
/dev/block/mmcblk0p14: UUID="57f8f4bc-abf4-655f-bf67-946fc0f9f25b" TYPE="ext4"
/dev/block/mmcblk0p11: UUID="57f8f4bc-abf4-655f-bf67-946fc0f9f25b" TYPE="ext4"
/dev/block/mmcblk0p1: UUID="00BC-614E" TYPE="vfat"
[email protected]:/ #​
/dev/block/mmcblk1p1 is your block device. (vold is a mirror image.) Odd... this makes me wonder, what are you using to format your SD card to exFat?

I am now near 100% certain a wacky utility formatted your card as /dev/block/mmcblk1 -- no partitions (no p1). They are not supposed to do that, it's against standard! But good news for you, it means if you edit that line and delete two letters (p1) it should start working.

Blah. I'll edit the script to probe... against my better judgement.
 
Last edited:

spearoid

Senior Member
Feb 21, 2009
757
158
0
Re: [MOD] 1-Click Flashable exFAT + NTFS + EXT4 support for CM10.1 / AOSP (external S

Well this card came preformatted in exFAT. A Sandisk class 10 64 gb card. But your intuition is impressive. :). After the first few experiments with AOSP on this phone I thought it had borked my card. Formatted it to FAT32 and eventually went back to exFAT via Acronis Disk Director.

I've got ROM toolbox. I'll get on it.

---------- Post added at 06:42 PM ---------- Previous post was at 06:40 PM ----------

Though I think what I just wrote was wrong. I think I used disk director to format the card to FAT32. Windows 7 natively wants to format my card in exFAT and doesn't even provide a FAT32 option. So, actually I formatted through Windows native disk utility.

---------- Post added at 06:52 PM ---------- Previous post was at 06:42 PM ----------

Well, I opened the file in the editor and removed only the p1 that is in that first line of the script. Powered phone off. Inserted card (after running chkdsk /f) and still had an unmounted card upon rebooting...and got the Damaged SD card when pressing Mount SD.

I don't understand where you saw in that blkid output that I should remove the p1. But I trust you a lot more than me. :)
I'm thinking about using my wife's GS3 to format my card (on stock TouchWiz) and just reflashing your script.
 

HMkX2

Senior Member
Jan 31, 2010
98
135
0
If you reformatted the card, you no longer need to delete the p1!!! ;) This feels like Benny Hill. (You do not need my script for exFAT on TouchWiz, Samsung paid M$ for it!)

Do these in this exact order and I guarantee you will have a working card:
  1. Open Rom Toolbox. Edit the line to say "/dev/block/mmcblk1p1" and click the "Save" icon in the top right.
  2. Power off the phone. Eject the card.
  3. Stick the card in Windows. Open a command prompt and type "Chkdsk /f <your drive>"
  4. Stick the card back in the phone. Turn it on.
And the point is you can *eject* the card from System Volume Manager in Android, but to RE-MOUNT it and get rid of the error, you have to run the script! Clicking "Mount" will do nothing -- since the ROM handles that. You need to open a terminal and type "fuse-mountsd.sh <enter>".
 
Last edited:
  • Like
Reactions: spearoid

spearoid

Senior Member
Feb 21, 2009
757
158
0
If you reformatted the card, you no longer need to delete the p1!!! ;) This feels like Benny Hill. (You do not need my script for exFAT on TouchWiz, Samsung paid M$ for it!)

Do these in this exact order and I guarantee you will have a working card:
  1. Open Rom Toolbox. Edit the line to say "/dev/block/mmcblk1p1" and click the "Save" icon in the top right.
  2. Power off the phone. Eject the card.
  3. Stick the card in Windows. Open a command prompt and type "Chkdsk /f <your drive>"
  4. Stick the card back in the phone. Turn it on.
And the point is you can *eject* the card from System Volume Manager in Android, but to RE-MOUNT it and get rid of the error, you have to run the script! Clicking "Mount" will do nothing -- since the ROM handles that. You need to open a terminal and type "fuse-mountsd.sh <enter>".
This isn't Benny Hill. :) Thank goodness.
I HAD NOT reformatted the card yet when I made my last post. All I did was what you told me to do...opened the file from the xbin directory, edited it by removing p1, powered off phone, inserted card, powered on, same problem.

After making that post I did what I said I was going to do...and put the card in my wife's phone...in its "corrupt" state...let her phone format it....then put my phone in recovery, flashed your original zip again, rebooted, powered off, inserted card........and SUCCESS!!!!!

It is irrelevant now, but your step 1 instruction seem to tell me to edit the file to put it back how you had it in the first place. That's what it looked like before I edited anything. I removed the p1 because I thought you told me too :) and that didn't lead to success.

Bottom line is, it seems to work fine if you let the phone format the card instead of Windows.

Freaking excited now! Going to go try Directory Bind and symbolic links! Will post the results

And while I know something has gotten lost in translation and you have become convinced that I am in fact a dunce :p I know the whole Samsung licensing MS's exFAT thing, and AOSP having no native kernel support....that was the point of that thread you posted in that I started with the AOSP vs TW debate. I was simply using my wife's TW phone as a formatter, since it seemed you thought the problem might be how I had formatted my card to exFAT in Windows. :)

Thanks again for everything!
 
Last edited:

HMkX2

Senior Member
Jan 31, 2010
98
135
0
I'm glad it helped, and thank you for telling me that the phone formatting it fixed it! That helps a lot and makes it simpler for others to replicate. It was silly because this was the order:

Had stock "Sandisk" formatting (no partitions) <====> My script default was (partition 1)
Stuck it in the phone and didn't work :p

Reformatted FAT32 using Arconis (which saw the error and CREATED partition 1) <====> Showed /dev/block/mmcblk1p1 when you tested
Reformatted exFAT (partition 1) <=[:( same time! :(]==> Edited my script to GET RID of p1 (no partitions)
Stuck it in the phone and didn't work :p

Windows has always been bad about formatting and destroying partition tables -- anyone who has made a dual-boot Linux computer can verify that.

Rather than probe randomly, I am editing the script to try partitions in-order until it finds one it recognizes.
 
Last edited:

spearoid

Senior Member
Feb 21, 2009
757
158
0
Re: [MOD] 1-Click Flashable exFAT + NTFS + EXT4 support for CM10.1 / AOSP (external S

Yeah I thought about it afterwards that that might have hindered your troubleshooting process by just formatting it from the phone. We never actually found a resolution to the issue with the card formatted in Windows.

Maybe that just needs to be part of the OP instructions. "Make sure you've formatted the card from your phone or Linux, not Windows"

:)

Will report symbolic link test results shortly.
 

HMkX2

Senior Member
Jan 31, 2010
98
135
0
Maybe that just needs to be part of the OP instructions. "Make sure you've formatted the card from your phone or Linux, not Windows"
... but Linux doesn't support creating exFAT... yet. :laugh: :laugh: Maybe I'll just add /dev/block/mmcblk1 as a default option to expand coverage from the 70% of CM10.1 users to the 99% of regular users.

http://stackoverflow.com/questions/6537878/how-to-mount-a-exfat-partition-in-ubuntu-11-04
Note that this package doesn't (yet?) support formatting a new partition - you'll have to do that under Windows.
 
Last edited:

spearoid

Senior Member
Feb 21, 2009
757
158
0
Re: [MOD] 1-Click Flashable exFAT + NTFS + EXT4 support for CM10.1 / AOSP (external S

Oh. I barely mess with Linux. Just threw that I there in anticipation of a response from someone saying "or you could format it in Linux". :). Whoops!!
 

HMkX2

Senior Member
Jan 31, 2010
98
135
0
Posted an update in OP. Added a "Spearoid Procedure" to script v4.1 until I get a chance to code a more robust solution.

If you see a giant error flash on your screen yelling at you to partition your card correctly -- but the script still works -- remember to click "Thanks" by spearoid's name. :D
 
Last edited:
  • Like
Reactions: spearoid

spearoid

Senior Member
Feb 21, 2009
757
158
0
Re: [MOD] 1-Click Flashable exFAT + NTFS + EXT4 support for CM10.1 / AOSP (external S

Well that sounds special. :)

I just finished creating a symbolic link to redirect Google Music's files from the data\data folder to my exFAT SD card!! And I've successfully gotten Directory Bind to redirect game data like Gameloft's massive files to the SD card from the internal memory.

Absolutely fantastic! I really am shocked. Just two weeks ago I was resigned to never having anything but crappy fat32 on AOSP. Couldn't find anyone who seemed to think this would be possible. Then along comes our new scripting friend! I even posted several questions about it in certain AOSP ROM threads.

Your work is awesome and something that really needs to eventually get worked into AOSP ROMs if that doesn't create licensing problems.
I can't believe I tried Paragon and other apps and none of them worked. I was and still am totally willing to pay for this capability. I believe a donation is in order!
 

lordazoroth

Senior Member
Jul 21, 2012
176
80
0
Phoenix
Quick question, what happens if I flash the updated zip over my original which gave me exFAT. Would I be able to read NTFS afterwards and how would I go about updating safely?

I have 2 friends with the same phone and I'll be adding this functionality to theirs as well, just being careful.

thx, still working great on exFAT! :D
 

HMkX2

Senior Member
Jan 31, 2010
98
135
0
Quick question, what happens if I flash the updated zip over my original which gave me exFAT. Would I be able to read NTFS afterwards and how would I go about updating safely?
Just flash the zip. It handles everything and has the NTFS binaries included.

The update-script automatically removes "old" versions of my scripts and places the new ones in their place. It deletes the following extraneous files from the original release, since they don't work; if you actually want the exfat utils (even though they all fail saying "cannot get size"), you have to add them back in manually.
Code:
delete("/system/etc/init.d/50exfat-mountsd"); <- Replaced with  50fuse-mountsd
delete("/system/xbin/exfat-mountsd.sh"); <- Replaced with fuse-mountsd.sh

delete("/system/xbin/dumpexfat"); <- None of these work anyway
delete("/system/xbin/exfatlabel");
delete("/system/xbin/exfatfsck");
delete("/system/xbin/mkexfatfs");
 

HMkX2

Senior Member
Jan 31, 2010
98
135
0
Hi All, do you think i would be able to use this mod in conjunction with ExtSd2InternalSd that way i would be able use cm10 and and use my exfat 64gb sdxc as my internal card?
Looking at their script, I see no reason it should not work if you change some of the block devices around. (They used "/dev/block/vold/179:49" and "/dev/block/vold/179:17" for the Note2, which are inappropriate for the GS3.) From looking at it I can actually see a couple of problems with that script on a basic level. (For instance, they do no version checking and it is not coded for JB's per-user "/0/" storage.)

I will poke around this and make detailed instructions later. For now, I can just tell you the commands I'll use to figure it out. Type "cat /proc/partitions" and look for the mmcblk0p__ that is the size of your internal, or type "ls -al /dev/block/platform/msm_sdcc.1/by-name" to get the direct list -- look for an entry called "userdata".

Remember: exfat-fuse is still experimental at this point. Don't put your financial documents in there. (Ext4 and NTFS are stable as hell, though.)

Edit: No wonder it was coded so poorly! You linked the one for the wrong phone! You need to use his GS3 version (here)!! He didn't know how to make it AOSP compatible -- I'll work on this later, after I get my code more robust.
 
Last edited: