yashsingh1/xdaforums huggingface dataset:
[Verizon Samsung Galaxy S III] HMkX2:
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.
[Verizon Samsung Galaxy S III] lordazoroth:
Thank you so much! :D
[Verizon Samsung Galaxy S III] Captain_Throwback:
Re: [MOD] 1-Click Flashable exFAT + NTFS + EXT4 support for CM10.1 / AOSP (external S

This is an interesting mod. I'm trying the script on my EVO 4G LTE, running CM10.1, Android 4.2.2. The script doesn't detect that I'm running as root, as my Terminal simply identifies me as user 0 (still root). But the script won't continue. Does it matter that I use SuperSU to gain root? Maybe I should try adjusting the script to allow for identifying user 0 as root (how would I do that?)

I only decided to try this because TWRP recovery recently enabled support for exFAT, and the card reads fine there after reformatting. I know the block is set properly, so that's not it. Just the root user recognition appears to be the issue. Can you help?
[Verizon Samsung Galaxy S III] HMkX2:
I did a pretty basic check for root - it runs "whoami" and looks for the string "root". I have tested my script against Chainfire's SU 1.3 and SuperUser 3.3 - the only difference I noted was Chainfire was a bit slower/laggier due to the popups, and didn't allow ADB shell root access by default - I had to click "ok". Also, the command parameters for an internal command I use (adb shell su -c "blah") were a bit glitchy, and didn't handle escaped strings well.

Could you please run ("whoami" and "id") command and tell me what string it reports? I'll edit the checking in for you and so others can use it. I will look into the proper method to detect root -- but busybox has limited utilities to do so.
[Verizon Samsung Galaxy S III] Captain_Throwback:
Re: [MOD] 1-Click Flashable exFAT + NTFS + EXT4 support for CM10.1 / AOSP (external S

Turns out your script is fine. I had a poorly compiled version of CM10.1. I used a more reliable version, and now everything works as intended.

So I'm able to use MTP to view the files in Windows (or mount as Mass Storage in recovery), and now the device is able to read from the external SD with no issues.

The only thing I can't do (this being an HTC device) is use the external SD card to update firmware via the bootloader, because the HTC bootloader can't read the card. However there are ways around that, and I'd rather have the card formatted as it was intended.

Thanks for your work on this! You can add the HTC EVO 4G LTE to your list of working devices (at least on CM10.1/Android 4.2.2).
[Verizon Samsung Galaxy S III] HMkX2:
You'll be happy with my 5.0 release. I'm currently coding multiple-partition support, and user-customizable dynamic mountpoints. :)
[Verizon Samsung Galaxy S III] spearoid:
Re: [MOD] 1-Click Flashable exFAT + NTFS + EXT4 support for CM10.1 / AOSP (external S

I have a long question I want to ask you that is related to this thread but sort of off topic still. I tried to PM you but got a message that either you can't receive PM's yet or you've chosen not to receive them. Shall I post it here?
[Verizon Samsung Galaxy S III] HMkX2:
PM enabled.

For future reference, I do not check PMs... ever. Please do not consider it an insult if I pretend like I never read it. Chances are I haven't. :eek:
[Verizon Samsung Galaxy S III] HMkX2:
Major Update: Version 5.0 is out.

Multiple partitions are supported. Also no more probing back and forth for Block Device, it's all automatic. (Word of warning: it blacklists mmcblk0, but does "explore" a little bit. Please inform me if it lists any inappropriate mounts. I may switch it back to manually specifying device.)
[Verizon Samsung Galaxy S III] Captain_Throwback:
Wow. My head a-splode.

Okay, so in order for my bootloader to have a partition to read, I'm going to need to create a FAT32 partition on my SD card in addition to the current EXT4 & exFAT partitions. If I do it that way, will they all mount automatically? I'm wondering how/if TWRP will be able to see all of them, since it can read the external storage as exFAT with no issues, as well as the EXT4 partition. I assume the .mounthere files will only affect the OS while booted, so it can't really affect what the bootloader sees, forcing me to create multiple partitions. What about when mounting to PC via MTP? Will both the FAT32 and exFAT partitions be mounted (in addition to my internal storage)? Currently I get internal storage and SD card. I would expect a third entry there for the FAT32 partition?

This might be getting more complicated than I can handle :eek:.

EDIT: Okay, upon re-reading the OP, I think I get it. I need to add a FAT32 partition at the beginning of the card for the bootloader to read. Then, on my exFAT partition, I need to add a .mounthere file that tells the OS to mount my large storage partition at /storage/sdcard1. My FAT32 partition will automatically be mounted at /storage/mmcblk1 (or I can create a folder somewhere and a .mounthere file to have it mounted elsewhere). That part I think I now understand.

What I don't know is how/if TWRP will handle the additional partition. I may have to specify the block location of the new partition in the recovery.fstab and compile a custom version myself to get it to mount. Which is fine, if I can get my buildbox running again. But I don't know if TWRP can handle all those partitions by default, and if it can, how/where they would be mounted.
[Verizon Samsung Galaxy S III] HMkX2:
So... I was digging through the Android SDK and I found out it is apparently possible to have multiple MTP connections. (i.e.have custom partitions show).

https://android.googlesource.com/platform/docs/source.android.com/+/master/src/tech/storage/index.md

Docs are above. Need to recompile framework-res.apk and add a couple lines to an XML. I have no way to do that or test.
[Verizon Samsung Galaxy S III] Captain_Throwback:
So . . . I have my 3 partitions set up:

FAT32

exFAT

ext4

And the .mounthere file is working marvelously on the second two . . . but the FAT32 partition (@ /dev/block/mmcblk1p3 according to /proc/partitions) isn't getting mounted by default under /storage. Any idea why?

And for the record, it seems TWRP overlooks the initial FAT32 partition and just reads the exFAT, which is perfect. I haven't tested bootloader yet, as I only have access to all 3 partitions in Ubuntu currently.
[Verizon Samsung Galaxy S III] HMkX2:
Can you please post a debug.txt using the command posted in the OP? I have a suspicion it will say "device busy", since Vold auto-mounts fat32. (Although, it would be the first time I've heard of it mounting partition #3!).

fuse-mountsd.sh > /sdcard/debug.txt 2>&1​

I coded in something to try to unmount it if it did that, but it seems that isn't working. I need to find out why.
[Verizon Samsung Galaxy S III] Captain_Throwback:
Looks like the script isn't recognizing the partition type as FAT32 for blk3. Attaching log momentarily.
[Verizon Samsung Galaxy S III] Captain_Throwback:
And now, after mounting my internal storage to my computer in Mass Storage mode, I get a "Damaged SD card" error, and it seems my exFAT partition is corrupted (again). Looks like I'll be reformatting and restoring data again.

I do still like this idea, even though I've ended up reformatting my card several times already (once by forgetting to install the script after a system wipe). I can give you the log from the failed repair attempt too, if you'd like.
[Verizon Samsung Galaxy S III] HMkX2:
Ah, cripes. There's an even bigger problem than that. You see that giant error at the top saying to report it, that it couldn't determine the NO-GO zone? Those DM- devices shouldn't be mounting! I may pull 5.0 until I can fix that problem.

I can give you the log from the failed repair attempt too, if you'd like.​

And yes, the more logs the merrier. I only have 1 Android device to test on -- I need to see what is wigging out on other devices.

Wait.... what? You formatted your

*internal*

storage as exFAT?? (Not your SD card/external storage?) My script was

never intended

to mount anything on the INTERNAL memory!

(Technical explanation:) I explicitly blacklisted anything on mmcblk0 to forestall the possibility of people mounting their modems/system/whatever by accident. I could add that support IN, but to me the risks would be too great without knowing EXACTLY how each+every person's partition table is set up.

Request:

Can you run these commands and give me the outputs?

dd if=/dev/block/mmcblk1p3 bs=512 count=1 of=/sdcard/dd_mmcblk1p3.bin.rar
-- Will create dd_mmcblk1p3.bin.rar in your SD card, please upload that.
-- This will tell me what the header signature looks like, I'll have to check it

cat /proc/mounts > /sdcard/mounts.txt
cat /proc/partitions > /sdcard/partitions.txt
-- Will create 2 .txt files on your SD card, I can use those to find out what is mounted where on your phone

I need to know more before specifying anything further.
[Verizon Samsung Galaxy S III] Captain_Throwback:
I did notice that. Good thing I reported it, then (kind of :eek:). And here's my other log, from the partition that couldn't be repaired.

Is it possible, on the first successful mount, to take a snapshot of the partition information, and then use that to restore the damage later, if necessary? I'm not sure how you're doing it now, but I assume it tries to replace the damaged portions with some standard information, and I was wondering if taking the info from the actual device somehow would be better (if it's even possible). Just spitballin' here, of course. I won't purport to know how this works ;).
[Verizon Samsung Galaxy S III] HMkX2:
Not spitballin', that's exactly what I thought at one point. I even mention around Page 2 that I had an option of that and another way, and I chose the other way.

There are a couple problems with "saving" the header from the first time it works. (1) There are large chunks of hex of dubious function (2) Where would I store the header? The card? The phone itself? Chicken and the egg. (3) What would happen if you plugged in a DIFFERENT card? It would overwrite it's header with the wrong one!

May I ask what you are using to format the card exFAT? If you get it to the point exFAT is working can you run this command to dump the header of the exFAT partition? OR flash version 5.2 of my script and give another debug.txt, I turned on full logging -- much, much less legible output for the user, but easier for me to find specific problems.

dd if=/dev/block/mmcblk1p1 bs=512 count=1 of=/sdcard/exfat_header.bin.rar​

PS: You do not need to reformat your SD Card and restore data every time. Simply plug the card into Windows and run Chkdsk /f on the partition. You can toggle which partition is visible using BOOTICE.exe. Run the program, click "Parts Manage", click "ReFormat USB Disk" (ignore its name, it is a poor choice of words), and see if "USB-HDD mode" is selected. (It should be.)

Then use the dropdown box, select which partition you want visible, and click "Set Accessible". Click Cancel button to quit. Windows should see that partition for Chkdsk /f now.
[Verizon Samsung Galaxy S III] HMkX2:
And if I didn't say it already,

thank you

for the logs and testing! This is what I need to try to make the script work for everyone, even the people who lurk and don't comment.
[Verizon Samsung Galaxy S III] Captain_Throwback:
Oh, no - sorry for the confusion. It just so happens that after mounting my internal card to the computer, that the EXTERNAL card showed as damaged. I wouldn't dream of formatting my phone's internal memory to a non-native format.

I'll pull this information for you as soon as I can. I'm at work right now, so my options are limited. Oh yeah, and the card is at home.

I won't be able to finish formatting the card until I get home, but when I do, I'll dump the header for you.

I'm using the plain old Windows Disk Management tool to format as exFAT. None of my other programs will do it (MiniTool or Paragon).

Great tip on the reformatting thing. Since I have a FAT32 partition at the beginning of the card, Windows wasn't giving me any options to do anything with it. I'd prefer to not have to reformat the card anymore, so hopefully chkdsk /f works (or we find a way to avoid the corruption at all, which would be ideal).

On the header thing - I understand the issues there. Isn't there any check that can be run to confirm the identity of the card inserted into the device? That would be a way of ensuring that the wrong card's header doesn't overwrite a different card. When I insert the card in Ubuntu it seems to have some number by which it mounts the partition as /media, and it seems to be different for every card. But I have no idea where it's getting that from. It's an 8-digit code I think with a dash in the middle, comprised of letters and numbers.

And in the case of where - how about the root of internal storage, or providing an option to the user on where to store it? I know some devices have limited space, so that would be the most flexible option, I suppose.
[Verizon Samsung Galaxy S III] david279:
This is working great on my evo as well. See team plastic and team Metal can coexist...

BTW Am I the only one who realized exFAT can't be shrinked? Come on Microsoft...
[Verizon Samsung Galaxy S III] Captain_Throwback:
Requested files attached :).
[Verizon Samsung Galaxy S III] Captain_Throwback:
Tried this. Did not work. Windows sees only the FAT32 partition, even though BOOTICE has the exFAT set as Accessible. So looks like another reformat is in order. As soon as I plug in the device, Windows tells me it's not formatted and it needs to be.

Any time I mount my internal storage to the computer in Mass Storage mode, as soon as I unmount, I get the "Damaged SD Card" message, and my External card exFAT partition is no longer accessible/corrupted. And the exercise starts over again.

Once I get back up and running, I'll pull the header info for the exFAT partition.
[Verizon Samsung Galaxy S III] spearoid:
I just wanted to chime in and say that I've used adb script in the OP to successfully mount two different directories, data/media/0Android/data/nfs.game and data/media/0/gameloft on AOSP 4.2.

I learned that these directories are case-sensitive. Something most people already know. :)

And I'm currently having some difficulty using this approach with a directory within data/media/0/Android/obb

This location seems to be a bit of a bear to deal with. Toying with symbolic links in place of that folder actually rendered my phone unbootable into Android, so I'm thinking maybe there are different rules for that directory....or maybe there's something active that is preventing the script from doing its thing. I don't really care, it's just one folder. The script has worked in every other attempt I've made which I think is simply awesome.

Before HMkX2 started this thread I was depressed, resigned to the fact that I would have to stay on TouchWiz to be able to take full advantage of my SD Card. Now with the initial script giving me exFAT capabilities on AOSP and this new script to mount directories I am fat, dumb, and happy!
[Verizon Samsung Galaxy S III] Captain_Throwback:
Version 5.2 doesn't mount my exFAT partition. So I don't know if a debug log from that one will help you.

But I do have the header info for you. Attaching momentarily.
[Verizon Samsung Galaxy S III] Captain_Throwback:
I AM using Ubuntu (GParted) to partition the card :). Once again, glad to be of service.

And I did initially connect using MTP, but the log files didn't show as visible. Only in mass storage mode did they. I don't think I tried re-running the script after remounting the internal SD. I just restarted the phone, since I figured that would do it. But I guess not.

And here's my output from that last command:

root@android:/ # mountpoint -n /system

/dev/block/vold/179:35 /system

I guess that's not good? In the meantime I'll try your latest and see if it mounts this time.
[Verizon Samsung Galaxy S III] HMkX2:
If that "mountpoint -n /system" command is acting differently on your phone, then my 5.2 update (with "Hard Exit if NOGO not found") would obviously NOT work for you. :)

NOGO would not be found, and the script would quit immediately when run. It would act as if you ran without root, and do nothing. If you were running it from the terminal like I suggest, you'd see a giant error message saying just that.

I will have 5.3 uploaded shortly, once I test it thoroughly on my device.

I mentioned this to spearoid earlier in this thread. MTP is like the Index Card system at the Library. You go in, there's a list of what they have, then you go to the shelf to actually get it. If the INDEX isn't updated when someone adds a book (snuck in the back maybe?), the MTP can't tell people it's there!

Anytime you create files ON the device using MTP, you need to do a "Media Rescan". There are free apps in the Play Store just for this, "SD Rescan" is a free one. Mine causes a scan to happen when the card is REMOUNTED, not when people create their own files (like the logfiles). It has no way to know.

Get ANY ONE OF THESE APPS ON THE STORE and run it to make the new files visible in MTP.
[Verizon Samsung Galaxy S III] HMkX2:
5.4 is up -- it should support any/all recognized vFAT partitions.

I will work on UMS issues when I can get it working on my phone. For now, stick to MTP or be prepared to use BOOTICE to chkdsk /f the partition in windows if you do something funny.

Captain_Throwback, I found why it said your card was "corrupt" even though the header was correct. There was a flaw in my fixmyexfat.sh code. Rolling out 5.4 in a second, it should your UMS problems if I am correct.

When I did the upgrade from Single -> Multi partition, I didn't update the fixmyexfat.sh code to do its test mount at the "staging" location. It was assumed you were mounting the exFat card at the /storage/sdcard1 location. The card was perfectly fine, but it couldn't tell that since it was trying to mount into a nonempty directory and getting an error.
[Verizon Samsung Galaxy S III] birdr:
The script 5.4 is working on a Samsung galaxy note 10.1 with cm10.1, (android 4.2.2) and an ext4 formatted 64gb SD card.

Only issue is the permissions bug referred to in the first post - look forward to v6!

Great work. Thx.
[Verizon Samsung Galaxy S III] Captain_Throwback:
Thanks for all your hard work on this!

exFAT is working, and my FAT32 partition is recognized and mounted. Bootloader recognizes it and can read from it, and TWRP sees exFAT as well. I haven't checked the UMS corruption issue yet, but I can do that later, and I'll let you know what happens. So do I need to re-run the script after unmounting, or will that be taken care of automatically now?

My next project (for later today) is to adjust the recovery.fstab for TWRP to get it to mount the FAT partition. Then I'll look into mounting it via MTP from the info in that link you posted earlier. If I can get those things worked out, then this would be perfect. I'm very glad to be able to use my SD card with the formatting it was intended for, to gain my read/write speed back.

---------- Post added at 08:15 AM ---------- Previous post was at 08:08 AM ----------

P.S. I know in Developer Options there is an option to rescan media. I'll try that and see if it fixes my issue with the files not being seen. If not, I'll try one of the apps you mentioned.

It also might be time to move this thread to a more "General" section, since it definitely supports multiple devices. That type of visibility would also give you additional feedback on the script. Perhaps I'll suggest this go to the front page as a news story . . . ;).
[Verizon Samsung Galaxy S III] Captain_Throwback:
Ok, so it appears that using media scanner in dev options worked to refresh the files that show when mounting via MTP.

I was also able to mount my internal storage via UMS without getting the "Damaged SD card" message. It just took running the script again via Terminal, the my exFAT partition was back where it's supposed to be.

Again, great work. I sent a "tip" for this post to get noticed. Maybe a news writer will find it newsworthy? I know I do :).
[Verizon Samsung Galaxy S III] renokim:
..

just bought sandisk microsd 64GB...

i want exFAT for my movies but this looks difficult

i wish CM support exFAT from its own ROM
[Verizon Samsung Galaxy S III] HMkX2:
I am fairly certain you'd have to re-run the script. What program are you using it to set it into UMS? I'd have to look at the code to see what it is doing -- blindly mounting a partition, or using "mountpoint" on/scrubbing the mount table for "/storage/sdcard1".

My next project (for later today) is to adjust the recovery.fstab for TWRP to get it to mount the FAT partition. Then I'll look into mounting it via MTP from the info in that link you posted earlier. If I can get those things worked out, then this would be perfect. I'm very glad to be able to use my SD card with the formatting it was intended for, to gain my read/write speed back.​

Please share if you find a solution! It seems other people might try that. I'll poke around recompiling that APK -- but I have no idea how that works. Would I have to just modify the XML, or would I have to do crazy compiling stuff?

Honestly, with these cheap media, I am running ext4 -- r/w speeds are pretty darn high on that as-is (~9mb/s), and if I need faster, I can create a ramdisk (on the phone), vfat cache partition, or something like that. I can post how to do that if there's interest.

It also might be time to move this thread to a more "General" section, since it definitely supports multiple devices. That type of visibility would also give you additional feedback on the script. Perhaps I'll suggest this go to the front page as a news story.​

But, seriously, I doubt anyone would care beyond the exFAT support. (Paragon does NTFS, and "looks" more polished.) This is what I consider a "robust" hack with limited audience -- referring to the multi-partition support. I think that was more of a special request for you, and technical challenge for me, than anything else.

Although, I wonder, with how robust it is if it can find and mount USB-OTG drives. Anyone care to test?

In all honesty, I've taken this to its logical limit. Anything further than this is minor bells and whistles -- auto-permission fixing, a mini- (and working- !!) version of directory bind when it mounts, all that is easily possible but would be creature comforts for limited people.

I think at this point I'd get a lot more bang for my buck teaching myself GUI programming and making that NuVold program I proposed in the Directory Bind thread. (Learning how to compile CM10.1 and fixing it there is a bit of a stretch... Masta's already doing crazy good work on that front, and again, I'd be limiting my audience.)

Let me ask you guys: what do you need/would you like to see?
[Verizon Samsung Galaxy S III] rotaryheadrx7:
I've been following your work for a while now and am impressed and appreciate it.

Since you asked what to work on next I would like to vote for the NuVold program you mentioned. There is certainly a need, challenge and opportunity there. You have a guinea pig here if you need one.
[Verizon Samsung Galaxy S III] StephenC82:
+1