[Q]Is it possible to have read/write access in a exFAT formatted sdcard using CM10.1? - Asus Transformer TF700

I have no problems reading from the exFAT formatted sdcard on my tablet running CM10.1. But write access is another matter. Just won't work. Is this normal or I need to format my sdcard as FAT32 for read/write access?
thanks!

mrjayviper said:
I have no problems reading from the exFAT formatted sdcard on my tablet running CM10.1. But write access is another matter. Just won't work. Is this normal or I need to format my sdcard as FAT32 for read/write access?
thanks!
Click to expand...
Click to collapse
CM10.1 has had some quirks with exFAT & NTFS r/w support but the good news is exFAT works just fine, you simply need to remount it read/write. There's a few ways to handle that depending on how comfortable you are with things like ADB. If you wish, you can do it from a root shell with:
Code:
mount -o remount,rw /dev/block/vold/179:48 /storage/sdcard1
You can also just use CMFileManager to do it:
Just change to the /storage/sdcard1 directory and hit the little lock icon in the upper left-hand corner beside the application icon. From there you can toggle the RW setting without even having to go into a shell.
Hope that helps fix your issue and let me know if it doesn't and I'll take a closer look with you.

tried cm file manager and it won't let it do it. was using march 17 nightly and have enabled root access for the app. I can toggle access to RW but it automatically goes back to RO.
I tried using ADB (enabled root access to apps/adb in developer options) but adb devices is not returning anything. tried the mount commands above using terminal but it says read-only file system.

anyone? thanks!

I've been struggling with the same issue. 64GB exFat MicroSD, CM File Explorer and Root Explorer would not mount it R/W...
Eventually I got it sorted - My primary OS is Linux, I opened a Win7 VM and formatted the card in there. Then copied everything to it and ran a fsck on it (from in Win7) before inserting it - then I was able to remount R/W.
Though overall support seems somewhat buggy, sometimes the laptop just loses the card altogether during large operations. But, an fsck in Win7 seems to make it all better...
HTH

fsck in win7? I think that's only a nix command?

Related

[CONCEPT] Single Partition No-Format Apps2SD

So I was using Slax. Great LiveCD/USB linux, extremely customizable, modular, fast, and small, and has the capability of either:
- saving changes to its rootfs onto an AUFS mounted on a non-linux FS (FAT32, NTFS) using posixovl (POSIX Overlay FS) with metadata (permissions, etc.) being held in files
- saving changes to a fixed-size loop mount image.
This got me thinking.
If we could insert all the necessary modules, code, etc. for posixovl into the Android linux, and make a modified a2sd script that takes advantage of posixovl, we could effectively do away with the requirement for crazy partitioning.
It should be simple enough for ROM devs to implement, assuming it's ready and installed:
1. Create folder on main partition if it doesn't exist, something like /sdcard/system/[app, app-private, dalvik-cache, app_s]
2. In the init scripts, before the a2sd stuff, mount /sdcard/system with posixovl on /system/sd
3. Run a2sd as normal, it should automatically just work.
I'll hopefully test this once I get my phone to a stable development/testing stage, and I don't need to make phone calls for a while. Anyone else is welcome to try to implement this idea.
My current test environment:
- HTC Dream (T-mo G1) with the deadly SPL of doom
- Cyanogen Experimental, latest build
- Amon_RA's modded recovery
- Wipe /data, move all existing apps to backup, remove a2sd partition, Backup for Root Users to restore some settings and data
Anyone with ideas or improvements, please let me know.
To be tested:
- Feasibility (can it work?)
- Functionality (does it work?)
- Portability (Can it work on other ROMs and devices like Hero, Pulse, Blur etc.? If so, will likely be moved to XDA's new Android board)
- Stability (Will everything Force Close on boot? Does it run fast enough? Does anything get corrupted over time?)
Links:
- http://sourceforge.net/projects/posixovl - Sourceforge page for posixovl
In desktop linux you can create a file with the touch command, and mount the file to a mountpoint after formatting it to ext4 for example.
Maybe this is the easier way?
I have done this about 5 years ago, but I will try it today and report if it worked.
edit: ok done already:
1. create a file of the desired size, eg: dd if=/dev/zero of=filename bs=filesize count=1
2. use mke2fs to format the file
3. create a mountpoint and mount the file
thats all. Now I have a 128MB file on my PC, mountable and usable like a partition.
Archont said:
In desktop linux you can create a file with the touch command, and mount the file to a mountpoint after formatting it to ext4 for example.
Maybe this is the easier way?
I have done this about 5 years ago, but I will try it today and report if it worked.
Click to expand...
Click to collapse
As far as I know, you can do that on the mobile Android, too, and that does work in theory. This technique involves mounting a loop filesystem, and it too will allow one-partition apps2sd, but it's less flexible, and I would think slower, than the overlay method.
For a 512MB apps image:
Create empty 512MB file
# dd if=/dev/zero of=/sdcard/apps.img bs=1024k count=512
Format it to Ext2
# mke2fs -L Apps2SD /sdcard/apps.img
Unmount existing a2sd
# umount /system/sd
mount new a2sd image
# mount -t ext2 -o loop /sdcard/apps.img /system/sd
Make the usual directories, and a mountpoint for the old a2sd partition
# mkdir /system/sd/app; mkdir /system/sd/app-private; mkdir /system/sd/dalvik-cache; mkdir /system/sd/apps-tmp
Mount the old a2sd partition
# mount -t ext2 /dev/mmcblk0p2 /system/sd/apps-tmp/
Move all files from the old partition to the image file
# mv /system/sd/apps-tmp/* /system/sd/
Unmount and remove the mountpoint, we don't need it anymore
# umount /system/sd/apps-tmp
# rmdir /system/sd/apps-tmp
Finally, you add the following line to the init script where the a2sd auto mount happens, and comment out the old line.
Code:
[...]
mount -t ext2 -o loop /sdcard/apps.img /system/sd
#mount -t ext2 /dev/mmcblk0p2 /system/sd/
[...]
This should do what you described, in theory. I can't say whether it will work or not. I can't tell whether it will or won't screw up your phone, I can't be held responsible if you screw something up or overlook the details. Either of us might have made a typo somewhere; apply common sense before doing anything.
This sounds great! I think this would also be usefull for someone like me, who has a sd card that doesn't want to be partitioned anymore (cross-linked files??). Only thing possible is fat32 or ntfs.
Am I correct with my assumption?
This sounds a lot harder and more complicated then partioning. Your also talking about a lot of work needing to be done just so people can avoid doing a simple thing like partioning a sd card. I would say it would be very difficult alone to get the os to run a virtual mounting service especially since that will take up resources and slow down the phone. There is a reason they only use this technique on live cds is it works but its slow. most of the computers they are running on have 1gig of ram and 2ghz cpu's. i really dont think the g1 can push this.
I do not think that this is great, it definitely is slower than a ext4 partition on a good class 6 microSD card. And it is more vulnerable to data loss since 2 different filesystems including a 20 year old non-journaling fs at the base of this construct are involved.
Another problem that came to my mind: when you mount your SD card as external USB device to a PC, the file containing your apps will no longer be accessible, or Android will make using the phone as external data storage impossible.
Interesting.
There is, however, a major problem: What happens when you unmount the fat partition on the phone in order to connect with a computer using UMS? Answer: everything on the phone will crash and burn since the apps filesystem will suddenly disappear = BAD.
posixovl is a nice find though...
Note that aufs, loopmount linux filesystems, etc., wouldn't be needed with this since posixovl appears to be vfat with posix extensions, so you should be able to just use posixovl directly on the sdcard.
There are several problems with that though... i.e. how reliable is posixovl regarding users tampering with it?
In any case, a prerequisite for use of it would be certain other changes being planned...
You might want to contribute to this thread:
http://forum.xda-developers.com/showthread.php?t=577941
(note: the thread links to a thread at android-platform, the one here has, as expected, gone off on a tangent... just ignore the junk.)
TylTru said:
So I was using Slax. Great LiveCD/USB linux, extremely customizable, modular, fast, and small, and has the capability of either:
- saving changes to its rootfs onto an AUFS mounted on a non-linux FS (FAT32, NTFS) using posixovl (POSIX Overlay FS) with metadata (permissions, etc.) being held in files
- saving changes to a fixed-size loop mount image.
This got me thinking.
If we could insert all the necessary modules, code, etc. for posixovl into the Android linux, and make a modified a2sd script that takes advantage of posixovl, we could effectively do away with the requirement for crazy partitioning.
It should be simple enough for ROM devs to implement, assuming it's ready and installed:
1. Create folder on main partition if it doesn't exist, something like /sdcard/system/[app, app-private, dalvik-cache, app_s]
2. In the init scripts, before the a2sd stuff, mount /sdcard/system with posixovl on /system/sd
3. Run a2sd as normal, it should automatically just work.
I'll hopefully test this once I get my phone to a stable development/testing stage, and I don't need to make phone calls for a while. Anyone else is welcome to try to implement this idea.
My current test environment:
- HTC Dream (T-mo G1) with the deadly SPL of doom
- Cyanogen Experimental, latest build
- Amon_RA's modded recovery
- Wipe /data, move all existing apps to backup, remove a2sd partition, Backup for Root Users to restore some settings and data
Anyone with ideas or improvements, please let me know.
To be tested:
- Feasibility (can it work?)
- Functionality (does it work?)
- Portability (Can it work on other ROMs and devices like Hero, Pulse, Blur etc.? If so, will likely be moved to XDA's new Android board)
- Stability (Will everything Force Close on boot? Does it run fast enough? Does anything get corrupted over time?)
Links:
- http://sourceforge.net/projects/posixovl - Sourceforge page for posixovl
Click to expand...
Click to collapse
lbcoder said:
Interesting.
There is, however, a major problem: What happens when you unmount the fat partition on the phone in order to connect with a computer using UMS? Answer: everything on the phone will crash and burn since the apps filesystem will suddenly disappear = BAD.
Click to expand...
Click to collapse
I kinda overlooked that point. Oops.
Though this same problem does exist on regular apps2sd when you remove the card without dismounting it, killing all apps and their processes, and freezing Dalvik's method of autostarting some apps.
I do tend to swap cards every now and then, but only after a reboot. Dalvik re-enumerates and caches dex, which makes for a slow boot, but it seems to just work in most cases that the apk install doesn't drop the app's functional payload (helper Linux/shell utils, libraries, NDK .so's) in /data/data (like some emulators, the Android Scripting Environment)
lbcoder said:
There are several problems with that though... i.e. how reliable is posixovl regarding users tampering with it?
Click to expand...
Click to collapse
As far as I know, the metadata files are marked as hidden and system files, and begin with a '.'. And I haven't tried this, but I think modifying the actual files under Windows has no negative effects, but moving, deleting, or copying files would likely be a no-no.
Also, I don't think there's a 'fsck' for posixovl, meaning that if any metadata files were screwed with the wrong way, the entire overlay FS would be trashed.
lbcoder said:
In any case, a prerequisite for use of it would be certain other changes being planned...
You might want to contribute to this thread:
http://forum.xda-developers.com/showthread.php?t=577941
(note: the thread links to a thread at android-platform, the one here has, as expected, gone off on a tangent... just ignore the junk.)
Click to expand...
Click to collapse
I checked that out. It was actually a small inspiration for what I was thinking of.
In any case, Android's package management system needs an overhaul. The package storage needs to be de-Linuxified, as all it is is a bunch of .apk files and .dex/.odex files, the UIDs of apps are in the AndroidManifest.xml, right?
In a somewhat unrelated note, app data needs to be moved to a specified folder structure on the sdcard. My card is full of folders in the root directory with random names.
If I'm understanding you correctly, you're talking about storing an image file on the normal SD card partition(which has to be FAT32 as far as I've seen) and then mounting it, correct? This idea has been talked about at length before on at least 3 separate occasions(2 of which were on this very forum) and found to be a bad idea due primarily to massive security risks since FAT32 has no permissions.
Also, I believe cyanogen ended up dumping unionfs/aufs due to rampant memory issues.
If you are talking about mounting an image from the FAT32 partition, please don't endorse this. We don't want to be throwing in security bugs into android, especially ones such as this which can't be plugged up.
As a modification to what I said: If you're suggesting doing this(or something similar) on a separate filesystem, after that project to change the AOSP to support one with permissions is finished, then I'm in full support.
If you want to go for a single partition on the sd card, why don't you just make the entire card use ext4? Your linux desktop reads it anyway, it uses journaling and so on, I guess it would be faster compared to fat32 and it is definitely safer to use.
And i guess it is not too complicated to mount this partition and use it for pictures, music and so on.
I have not tried this (yet) and I go to bed in 20 minutes, but maybe I will start testing something in that direction tomorrow.
[email protected] said:
If I'm understanding you correctly, you're talking about storing an image file on the normal SD card partition(which has to be FAT32 as far as I've seen) and then mounting it, correct? This idea has been talked about at length before on at least 3 separate occasions(2 of which were on this very forum) and found to be a bad idea due primarily to massive security risks since FAT32 has no permissions.
Also, I believe cyanogen ended up dumping unionfs/aufs due to rampant memory issues.
If you are talking about mounting an image from the FAT32 partition, please don't endorse this. We don't want to be throwing in security bugs into android, especially ones such as this which can't be plugged up.
As a modification to what I said: If you're suggesting doing this(or something similar) on a separate filesystem, after that project to change the AOSP to support one with permissions is finished, then I'm in full support.
Click to expand...
Click to collapse
UNIX permissions don't do anything in the way of "security" unless you have no access to the actual storage device from another computer (as is the case with the unrooted Dream's internal memory), or unless encryption is used. The posixovl driver OVERLAYS Unix permissions over Fat32 filesystems. But even still, with Unix permissions, nothing's stopping someone else from mounting the Ext2 partition and using chown and chmod.
And the image file on the SD card's Fat32 partition is a complete Ext2 partition complete with Permissions. Nothing is lost.
Archont said:
If you want to go for a single partition on the sd card, why don't you just make the entire card use ext4? Your linux desktop reads it anyway, it uses journaling and so on, I guess it would be faster compared to fat32 and it is definitely safer to use.
And i guess it is not too complicated to mount this partition and use it for pictures, music and so on.
I have not tried this (yet) and I go to bed in 20 minutes, but maybe I will start testing something in that direction tomorrow.
Click to expand...
Click to collapse
We'd just have to find the part in the Android that mounts /sdcard/, and change 'vfat' to 'ext2'. The only reason I wouldn't do this, is because it would immediately make it incompatible with Windows and Mac's default FS drivers. As far as I know, the only FS's that are supported universally within Linux, Mac, and Windows, are FAT and NTFS. And NTFS can be made to have crude support for permissions through security descriptors. Although, the Dream SPL, the Recovery images, and most of Android only uses FAT32.
This is discussed in android-platform Group :
http://groups.google.com/group/andr...read/thread/bf0709c157451cd9/f6aee1830c84620f
The goal is to be able to integrate this in android.
And not having to partition the SDCard is one of the requirements so far...
Unix permissions are not stored using fat or vfat, and ntfs is not really supported in desktop linux and i guess it cannot be used in android linux.
I would not use windows anyway so this is no problem to me, and there are drivers around to mount ext systems in windows. As Mac OS is based on unix there will be a solution for this too.
Access usind adb push and pull, via ftp and so on is not touched by using ext4 on the entire sd card I guess.
And if you don't go the easy way using gparted on a live cd or usb device to create 2 partitions, you will have to live with some disadvantages anyway.
Finally I want to say that my ideas are far from being perfect or usable at all, I see this thread as a kind of brainstorming.
im not as linux or android savvy as probably any of you but before the current method of creating a swap partition became the "standard", people used a swap file on the sdcard and linked that. seems similar to what you are suggesting here.
ofcourse when mounting the fat partition elsewhere (ums in windows for example) that swap file could no longer be used within android. i dont see a way to get passed the same issue, but worse here, due to android not having crucial apps when the fat partition is mounted.
then again, i am pretty much over my head in this conversation and could be over looking something...
I'm kind of fascinated by the FUSE + posixovl method of doing this. In the long run I have a feeling that it's going to perform like ****, but I think it's worth testing.
I managed to get both libfuse and mount.posixovl built and running on Android.
posix-overlay(/sdcard/fuse) on /sdcard/fuse type fuse.posixovl (rw,nosuid,user_id=0,group_id=0,default_permissions)
Giving this a little testing now, it definitely works.
Code:
/sdcard/fuse # ls -l
drwxr-xr-x 2 1000 1000 4096 Nov 5 17:17 test
TylTru said:
UNIX permissions don't do anything in the way of "security" unless you have no access to the actual storage device from another computer (as is the case with the unrooted Dream's internal memory), or unless encryption is used. The posixovl driver OVERLAYS Unix permissions over Fat32 filesystems. But even still, with Unix permissions, nothing's stopping someone else from mounting the Ext2 partition and using chown and chmod.
And the image file on the SD card's Fat32 partition is a complete Ext2 partition complete with Permissions. Nothing is lost.
We'd just have to find the part in the Android that mounts /sdcard/, and change 'vfat' to 'ext2'. The only reason I wouldn't do this, is because it would immediately make it incompatible with Windows and Mac's default FS drivers. As far as I know, the only FS's that are supported universally within Linux, Mac, and Windows, are FAT and NTFS. And NTFS can be made to have crude support for permissions through security descriptors. Although, the Dream SPL, the Recovery images, and most of Android only uses FAT32.
Click to expand...
Click to collapse
Ya, I meant more from the standpoint of a rogue app. Since FAT32 has no permissions, what would prevent such an app from modifying the stored image file to, say, change a trusted app with superuser permissions to some new code of its own making to, for example, watch for credit card numbers and send them back to the person who made the original rogue app? I'm always hesitant with any ideas that suggest storing an image file on the sdcard for appstosd for this reason.
Forget it, it's useless.
An overlay filesystem prevents you from enabling USB storage.
If you want to play around with FUSE on Android, here's a repository for my port of libfuse..
http://github.com/cyanogen/android_external_fuse
Hi,
I have an idea. I used symbian S60 of Nokia, Symbian can install app to sdcard. I see that when I mount sdcard to PC, my phone immediately hold all activations of all applications on my phone. And they have a PC sync software that help us access sdcard but not mount sdcard (like that we copy file from computer to sdcard via debug mode on android).
I think we should find out how symbian can do it and we will use their way .
I'm not a developer, I'm just an user.
I talked to a few people about this, and some deep kernel voodoo is going to be needed for this to really happen without partitioning.
Another idea is to forge ahead with this, and ditch the "unmount fs for usb storage" and use RNDIS + Samba or something like that instead to access files on SD. I kind of like this idea.

[Q] 3.2 and the MicroSD Card Read-Only

So apparently I have to use my computer or root explorer to write to my SD card since the 3.2 update. Does anyone know how this might be fixed to allow general file managers or applications to take advantage of?
same here....
f'ing moto fail here....this is NOT sd support to me
i have been using file manager HD and it will copy files to & from the sd card and delete from the sd card. it just wont "move" to the sd card.
EDIT- was using root explorer...not the other one.
Did you do anything special since upgrading to #Version three point two? I use the same program and it won't move, copy, or delete.
jase33 said:
i have been using file manager HD and it will copy files to & from the sd card and delete from the sd card. it just wont "move" to the sd card.
Click to expand...
Click to collapse
I can copy from the SD card but not paste to using the same software...this mean its read only
To be clear, I updated using update.zip and now running tiamat kernel, but I'm sure it was read only before I flashed the new kernel
I updated to 3.2 with ota and manually rooted. using stock kernel. write to sd works fine. maybe the method you updated from or the kernel you use is causing an issue.
sdcard
heh i find it amusing:
Real SDCard = /mnt/external1
Same ole crap SDCard = /mnt/sdcard, /sdcard, /data/media, and i bet more if i care to look harder.
jase33 said:
I updated to 3.2 with ota and manually rooted. using stock kernel. write to sd works fine. maybe the method you updated from or the kernel you use is causing an issue.
Click to expand...
Click to collapse
Are u talking about the Sdcard folder or the external1 folder?
I updated via update.zip method
Edit: Attached screenshot of my external1 permission
jase33 said:
i have been using file manager HD and it will copy files to & from the sd card and delete from the sd card. it just wont "move" to the sd card.
Click to expand...
Click to collapse
Moving from one source to another isn't possible. It's a linux/android thing. So that's nothing to worry about.
Remount /mnt/external1 as read/write
Here's what I've done to make /mnt/external1 read/write accessible:
adb shell or any other terminal emulator to get to a shell on the xoom
su to get to the # prompt
umount /mnt/external1
mount -t vfat -o fmask=0000,dmask=0000,rw /dev/block/platform/sdhci-tegra.2/mmcblk0p1 /mnt/external1
That remounts the sdcard without using vold, which is enforcing a mask on the perms.
Now to get this to happen at boot...
Stealyourface said:
Moving from one source to another isn't possible. It's a linux/android thing. So that's nothing to worry about.
Click to expand...
Click to collapse
Yeah I know.....I was just responding simply
Sent from my HD2
Stealyourface said:
Moving from one source to another isn't possible. It's a linux/android thing. So that's nothing to worry about.
Click to expand...
Click to collapse
I move files all the time in Linux, via both command line and file manager. I don't know where you are getting this "Linux/Android can't move files" from.
Given up and revert back to Tiamat 1.1
I reflashed stock and upgraded to 3.1 then 3.2 only to learn that the SD card was not writable within the xoom. I have full confidence that one of the devs will release a mod for 3.2 to get us all the features that we are accustomed to. Until then I've flashed back to Tiamat 1.1.
ekarelis said:
Here's what I've done to make /mnt/external1 read/write accessible:
adb shell or any other terminal emulator to get to a shell on the xoom
su to get to the # prompt
umount /mnt/external1
mount -t vfat -o fmask=0000,dmask=0000,rw /dev/block/platform/sdhci-tegra.2/mmcblk0p1 /mnt/external1
That remounts the sdcard without using vold, which is enforcing a mask on the perms.
Now to get this to happen at boot...
Click to expand...
Click to collapse
This is exactly right. It appears vold is now placing special perms above standard media_rw perms. So, apps without this level of permission can not write to external storage. We will address this in the upcoming Tiamat Rom release.
looking forward to 3.2 cusrom rom
Thanks brd. Very much looking forward to the tiamat 3.2 based rom.
mambomta said:
I move files all the time in Linux, via both command line and file manager. I don't know where you are getting this "Linux/Android can't move files" from.
Click to expand...
Click to collapse
Move a file from your xoom (if you even have one) from internal storage to external. It either won't let you, or it'll get corrupted in the process.
Stealyourface said:
Move a file from your xoom (if you even have one) from internal storage to external. It either won't let you, or it'll get corrupted in the process.
Click to expand...
Click to collapse
My Xoom should arrive tomorrow. If the Xoom is not allowing a move, it is a bug, not a limitation in Linux.

[Q] i9000 - internal sdcard gone - problems with boot / external sdcard mounting

Hi,
I have an i9000 and unfortunately, the internal sdcard is not recognised at all.
I can only boot using voodoo 500hz kernel, to bypass this problem.
All other kernels will fail at boot screen (reboot loop).
After booting with voodoo kernel, I've rooted the phone and connected through ssh to it (adb shell)
Listing devices in /dev/block showing nothing like mmcblk (/dev/block/mmcblk0)
I thought it must be the card itself or the controller so I went and bought an external sd card (8gb).
After I insert it, the phone shows it has 0 (zero) capacity , tried to format it to fat32, ext2, etc, both on device (parted) and computer (windows, linux). Not a chance. Tested it using a i9100 I also own and the card was recognised correctly.
Next step was to check if the controller still works so again adb shell and checked for a mmcblk device in /dev/block.
This time, a /dev/block/mmcblk0 and /dev/block/mmcblk0p1 / /dev/block/mmcblk0p2 were listed.
Removed the external card, no device at all so the internal sd card is gone for good.
Next step was to use a hack to swap the internal/external sd cards in (/etc/vold.fstab), but even it is recognized in recovery mode (I can factory format/ wipe data), still 0 size in android interface and I can't use Camera and other apps.
I tried to mount it manually, directly on phone (adb shell), with mount comand and it works! I can create files on it, which are persistent.
So the controller actually works and the card is recognised low level.
BUT, why Android interface (java layer) won't recognize it? It says it's there but size is 0.
Please help, I can't use a lot of features on the phone, I don't know what to do.
Tried to mount it manually (to /mnt/sdcard), and even it get mounted and everything works on shell (creating files, etc), still 0 size in Android.
Running df in shell shows the correct size.
Checked the fstab / vold.fstab / vold.conf , everything seems to be ok.
Can anyone help me to fix this issue? Or at least, to give me some clues / ideas? I've lost several nights and I can't find a fix.
I'm good at linux but don't know very much about Android and it's java layer over linux.
It happenned to me too... not sure it can help you, but this is how i fixed my problem:
1. connect i9000 to the pc thru usb.
2. found a filename "no media" in the root directory.
3. erase the "no media' filename and everything is back to normal.
Did you fix it? I have the same problem and can't find a solution yet

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

August 4th 2013 - This script has not been maintained in a while. A big thank you to Captain_Throwback for providing continued support.
This is now minimally supported. Now that CM is adding native NTFS/exfat support, the only thing my script handles is multiple partitions.
July 21 2014 - Thank you n01ce! Please see n01ce's post for a "6.5 Alpha" that may solve some checksum problems with exFAT. I have changed devices, so this thread is for historical purposes/legacy support.
"HELP! I accidentally made my exFat card unreadable!!" -- or-- "I can't see more than 1 partition in windows!!"
Please read the instructions at the bottom of THIS POST HERE. No data will be lost!
"My card was working up until a moment ago but now the phone is showing "card damaged!!"
Re-run the script by typing "fuse-mountsd.sh" as root. The script will attempt to repair and re-mount.
If that fails, run "chkdsk /f" in Windows. Do not reformat until it is the last resort!​
TL;DR: (Flash this), put exFat/FAT32/NTFS/EXT4 sdcard in, reboot.​To remount, type "fuse-mountsd.sh" in a console (or) run using RomToolbox Lite (in /system/xbin/)
Needs to be run every time card is ejected + reinserted -- including when UMS is used
To unmount, type "fuse-mountsd.sh umount" (or if 1 partition) use Storage Manager
Non-customized multi-partitions mounted in /storage/<their name>
​
Uses init.d to fix/mount at boot
Scans for/mounts all useable block devices (with safety checks)
User-specifiable dynamic mount points
~~Create a ".mounthere" file in the partition with the first line "/location/to/mount/at"
~~Use the first line "skip" or "SKIP" to bypass that partition
Rescans for media when you re-mount
Repairs typical exFat damage caused by CM10.1 (with safety nets)
FAT32 support
NTFS-3g support (noatime set to reduce wear)
EXT4/3/2 support (*fuse built into JB/CM10.1) <- (MTP+EXT4 permissions need to be set to media_rw:media:rw 775!!))
Cleans up after itself: disables/enables ADB/root-security to what you set
BUGS:
All -- ntfsfix does not work. Binaries need to be recompiled. Not a major issue only dead weight.
exFAT may prevent deep-sleep. (NTFS on GS3 doesn't seem to have this issue.)
If you use EXT4/3/2, you need to run the following commands to allow the card to be accessed by the mobile-user:
Code:
find /storage/sdcard1/ -print0 | xargs -0 chown media_rw:media_rw
chmod -R 775 /storage/sdcard1/
(or)
find /storage/sdcard1/ -print0 | xargs -0 chown root:media_rw
Other phones -- Post a debug.txt if it works for you.
CM10 (4.1.x) -- Support is experimental. Use at your own risk.
CM 10.1 (4.2.x) -- Implemented RSA Key Signing Fix, works with BOOTICE.exe partitioned cards.
EXPERTS:
Everything is softcoded thanks to the $SECONDARY_STORAGE, $ANDROID_DATA, $ANDROID_STORAGE, $ANDROID_CACHE env variables and get/setprop command. Some locations are hardcoded in the script's "analyzePhone" function as fallbacks.
To custom-map mountpoints, create a ".mounthere" file in the root of each partition. "skip" or "SKIP" = ignore partition at mount, "/your/path/here" will use that path (or the default if bad). Defaults to "$ANDROID_STORAGE/device_id" if directory is invalid. Removes any temporary directories (in /storage/ only) at unmount. YOU HAVE TO CREATE ANY CUSTOM DIRECTORIES OUTSIDE "/storage" YOURSELF -- I set it like that as a security precaution.
To disable "Directory Creation Security", edit the line at the top of the script to say "dirSECURITY=0". This script will remount / and /storage as RW if needed.​
Here is a quick rundown of typical use-cases:
You want one large (exFat/NTFS/ext4) partition:
No customization needed, just flash and go
You want a small FAT32 partition (p1) at the beginning (for firmware/CWM/TWRP) with another big ext4 partition (p2) for your SD card mount. [ Your ROM's vold will mount (p1:fat32) as /storage/sdcard1 automatically. To get it to swap over: ]
Create a ".mounthere" file on (p2) "big" partition with the text "/storage/sdcard1"
This will override Vold and mount the (p2) as external storage. The FAT32 partition will be mounted in /storage/mmcblk1. If you want to mount it elsewhere (even /data/media/0/extSD ! ) simply add another ".mounthere" on the FAT32 partition. (The directory must already exist -- you must make it beforehand -- or disable Directory Security feature.) Be warned - Vold will mount the first partition as /storage/sdcard1 any chance it gets -- even in the background -- unless there is something mounted there already (by this script).
You have (1) partition for a game app you play (internal storage) that you want to rebind, (2) another part you want to rebind OVER an existing directory, and (3) your main storage.
Create a ".mounthere" on (1) with text "/location/of/your/game/app/data"
".mounthere" on (2) with text "/folder/you/want/substituted"
".mounthere" on (3) with text "/storage/sdcard1"
You are a long-hair-hippie Linux developer with 4 partitions, each in a different filesystem, and want them mounted hidden from apps and listed by block device so you know what partition you are on:
No customization needed, just flash and go
SUPPORT:
I can only provide support if you supply me with logs. Do so by typing "fuse-mountsd.sh > /sdcard/debug.txt 2>&1" and opening the Debug.txt in your phone's storage.
It's all automatic now - so if it mounts your modem as writeable and kicks your dog don't blame me. (It excludes dangerous block devices automatically [mmcblk0, /system, mtdblock, etc], but there is always a 1% chance it will miss something.) If it does, report it here so I can fix it.
If you intend to use this with a other ROMs/phones, IT SHOULD STILL WORK. Post any errors or weird behavior.
Code:
Changelog
[I]7.0 - TBA (Make GUI? Fix ext4 permissions automatically? Get paid?)[/I]
6.4 - No longer uses "mount" output (wasn't acting standard-ly. Using /proc/mounts instead)
- [COLOR="Red"]Got rid of conv=notrunc[/COLOR]. Be careful!
6.3 - Bugfix to scrubMount code
6.2 - No longer Experimental / final unstable
- added rough ext2/3 support
6.1 - mount command bugfix
6.0 - Added a bypass for Directory Security, fixed some bugs.
5.9 - Rewrote NOGO code from scratch -- UUIDs ignored
5.8 - (??)
5.7 - Support for Note2 formatted exFat cards + more (0xf4 bug)
5.6 - bug fixed: no longer detects zram/assumes multimount
5.5 - [COLOR="Red"]Experimental support for weird devices[/COLOR]
5.4 - [b]Major bugfix!![/b] Fix fixmyexfat.sh coding fail
5.3 - Fixed "vffat" support. Undid HARD QUIT on bad Nogo, made it a soft one.
5.2 - Increased logging of tables, HARD QUIT if Nogo not found
5.1 - Quick patch to fix dm-* device blacklist
5.0 - [b]SUPPORTS MULTI-PARTITIONED CARDS! Autoscans for block devs! Complete rewrite![/b]
4.1 - Quick patch to check mmcblk1
4.0 - [B]WORKS 100% ON 4.2.2!![/B] My script is the first to achieve this AFAIK
3.3 - fixed a bug detecting existing mounts (related to "non-persistent mount points" issue)
3.1 - added dynamic exFAT repair code
3.0 - added NTFS/ext4 support
1.0 -> 2.0 <Removed>
Attribution credits:
Original thanks go to originator of the method, smitna in the Galaxy S2 forum. Additional thanks go to shardul_seth (Post 23) for compiling the latest version of the fuse-exfat and ntfs-3g binaries for ARM, and of course Andrew Nayenko for his efforts in creating GPL'd exFat code (fuse-exfat on google code).
[HOWTO][exFAT][WORK IN PROGRESS] Mount exFAT formatted drives and cards - smitna
Full NTFS Read Write support for Android (ARM) - shardul_seth
[HOWTO][exFAT][CM10.1] Working 64GB ext sdcard with fuse-exfat (1.0.1) + FIX broken (my original Dev thread)
I believe the term is I "kanged" their binaries. The rest is mine. This is a "mod"/"hack" until CM adds native support. (If ever: exFat)​
DONATIONS:
https://supporters.eff.org/donate , or help a noob by linking to a solution in their thread. :good:
https://plus.google.com/+CyanogenMod/posts/ib5wz8jk1JyOne of the CM Team has flesh eating bacteria! Keep CM alive! (Literally)​
I'm a noob, this looks scary to me. Either way, I needs me some exfat cuz my movies are too large for fat32.
My only question is: Even though this is written for CM10.1 on Verizon s3, might this also work on T-mobile s3 with an AOSP (Android 4.2.2) ROM?
Here's what I'm running:
SGH-T999 (d2tmo)
Android 4.2.2
Kernel: 3.0.62-cyanogenmod-g137df31
ROM: Liquid-JB-v2.1-RC1
Build:liquid-d2tmo-userdebug 4.2.2 JDQ39
I've spent the last 2 days searching and testing to no avail. My sdcard is running hot trying to get files larger than 4gb on it. I've tried formatting to exfat, ntfs, ext4, even hfs+, no success. Paragon and ntfssd apps couldn't mount it either.
Any help on this matter would be greatly appreciated!
Even though this might not work on T-mobile, thank you either way, I'm glad there are people like you developing for 64gb cards.
I wouldn't say I'm a developer, just a scripter with a lot of time on her hands.
lordazoroth said:
My only question is: Even though this is written for CM10.1 on Verizon s3, might this also work on T-mobile s3 with an AOSP (Android 4.2.2) ROM?
Click to expand...
Click to collapse
MAKE A NANDROID. This mod should do nothing permanently harmful anyway: it looks for EXFAT before writing anything.
Carrier doesn't matter. It only depends (1) if your kernel has FUSE support, (2) if it has init.d support and (3) what your Block device is.
I think Google added FUSE by default in JB, and anything based off CM10.1 will have it
Type "echo $SECONDARY_STORAGE" in a terminal emulator. If it displays ANYTHING other than blank it should work.
The Block device is trickier. Type "blkid" as root with with your FAT32 card in and out. The one that disappears is your Card's Block device, and should be /dev/block/mmcblk1p1.
If you have any doubts, don't do it.
HMkX2 said:
I wouldn't say I'm a developer, just a scripter with a lot of time on her hands.
MAKE A NANDROID. This mod should do nothing permanently harmful anyway: it looks for EXFAT before writing anything.
Carrier doesn't matter. It only depends (1) if your kernel has FUSE support, (2) if it has init.d support and (3) what your Block device is.
I think Google added FUSE by default in JB, and anything based off CM10.1 will have it
Type "echo $SECONDARY_STORAGE" in a terminal emulator. If it displays ANYTHING other than blank it should work.
The Block device is trickier. Type "blkid" as root with with your FAT32 card in and out. The one that disappears is your Card's Block device, and should be /dev/block/mmcblk1p1.
If you have any doubts, don't do it.
Click to expand...
Click to collapse
Awesome instructions, very much appreciate it. Looks like it's time to get to work. I checked the zip file thoroughly and cross-checked it with my root directories to see if it overwrites anything and it looks like it just adds stuff. From what I've seen, this is the only game in town so I'll post back once I'm done.
If this does work, this is a godlike zip file and it does something nothing else can do right now
Ok still not mounting properly.
Here's what I did:
Typed "echo $SECONDARY_STORAGE" in a terminal emulator, showed "/storage/sdcard1"
Typed "blkid", showed "/dev/block/mmcblk1p1" only when sd card was inserted under fat32 file format
Formatted sd card to exFAT on PC, inserted back into s3
Flashed CM10.1_exFAT-mountsd_2.0_HMkX2.zip
Ran terminal emulator, typed su >> exfat-mountsd.sh got this:
[email protected]:/ $ su
[email protected]:/ # exfat-mountsd.sh
[exfat-mountsd v2.0] exFat autorepair and mount script for CM10.1 (HMkX2 CORE//XDA)
Automated mounting script for exFat on GS3
/storage/sdcard1 is not mounted. (OK)
Calling [fixmyexfat] on /dev/block/mmcblk1p1 (if needed)
Broadcasting: Intent { act=android.intent.action.MEDIA_CHECKING dat=file:///storage/sdcard1 }
Broadcast completed: result=0
[fixmyexfat v2.0] exFat header repair tool (HMkX2 CORE//XDA)
More robust than before!
Usage: /system/xbin/fixmyexfat.sh <block device, eg /dev/block/mmcblk1p1>
[fixmyexfat] Manual target is /dev/block/mmcblk1p1
1+0 records in
1+0 records out
512 bytes transferred in 0.166 secs (3084 bytes/sec)
Segment 1 (0:4) (BAD)
4+0 records in
4+0 records out
4 bytes transferred in 0.012 secs (333 bytes/sec)
Segment 2 (484:4) (BAD)
4+0 records in
4+0 records out
4 bytes transferred in 0.007 secs (571 bytes/sec)
Segment 3 (508:4) (BAD)
4+0 records in
4+0 records out
4 bytes transferred in 0.005 secs (800 bytes/sec)
Check complete!
Check complete, mounting and initializing...
########################## ATTEMPTING COMMAND ##########################
mount.exfat-fuse -o rw,dirsync,umask=0 /dev/block/mmcblk1p1 /storage/sdcard1
Attempting bypass...
* daemon not running. starting it now on port 5038 *
* daemon started successfully *
connected to localhost:5556
List of devices attached
localhost:5556 device
Running ADB commands
FUSE exfat 1.0.1
ERROR: invalid VBR checksum 0xa04b8eb5 (expected 0x804d6ce4).
Broadcasting: Intent { act=android.intent.action.MEDIA_MOUNTED dat=file:///storage/sdcard1 }
Broadcast completed: result=0
Process complete!
[email protected]:/ #
Not sure how to read this...
Afterwards my notification panel says: "Damaged SD card : SD card is damaged. Try reformatting it."
Tried restarting s3, mounting in storage settings, reformatting in PC. Ran script 4 times on a fresh exFAT format with the same notification error (format was unrecognizable by s3 and PC after running terminal command "exfat-mountsd.sh" [don't worry didn't lose any data ]).
After each format to exFAT on my PC I placed a few images on the card to ensure it was functioning properly, /storage/sdcard1 directory is always empty.
Mounting in settings >> storage generates the same notification error: "Damaged SD card : SD card is damaged. Try reformatting it."
Any ideas?... it is detecting an SD there after mount attempts (despite exFAT format) interestingly enough. Though nothing is detected after a reboot unless another script or settings >> storage mount attempt is performed.
I should mention that I ran a "quick" format when formatting the SD card from Fat32 to exFAT, not sure if that might be relevant.
Hm... well, I can tell you what it means. Quick formatting is fine, I actually prefer it since flash memory has a limited life. Second, "chkdsk /f" in windows will repair your card + data -- the card isn't "damaged", it's just that 4 letters at the beginning were changed. (See: Segment1, Segment2, Segment 3 messages.) My scripts change those 4 letters back, in a safe-ish way.
Unfortunately, without having a hex-dump of your working exFat header I can't say what those four letters should be. I got mine using a program called Hex Editor Neo on what I had available, a Sandisk 64gb class-10, and are what I included in the script. When the letters don't line up like it expects, you get a checksum error.
Without that, there is one single thing you can try - but has a high likelyhood of success.
Use RootBox explorer, navigate to /system/xbin/ and DELETE the file called "fixmyfat.sh".
Turn your phone OFF. Eject the SD card
chkdsk /f the card or quick format it to fix it, put a test file on it from Windows
Put the card in your phone, turn on.The card must be in the phone before it is turned on.
If that works for you, and the card works, you can give me a hex dump pretty easily so I can edit the script. IF it works, and I highly suspect it will, get a hex dump by typing EXACTLY:
dd if=/dev/block/mmcblk1p1 bs=1 count=512 of=/sdcard/working_sd.bin​ <- corrected
That will place a text file in your internal sd card than you can post/send me. Again, thanks for bearing with me, this started out as something for myself then made better in the hopes other people could use it. If you could re-corrupt the card (by unplugging/replugging it while the phone is on) and send me a hex dump of the "Card Damaged" state, even better.
O.O... you are awesome!
I'll get on this right away, and I'd be happy to help any way i can
---------- Post added at 09:19 PM ---------- Previous post was at 08:52 PM ----------
OMG IT WORKS!!! the card mounted
I tried the line of code and it gave me an error:
[email protected]:/ $ su
[email protected]:/ # dd if=/dev/blk/mmcblk1p1 bs=1 count=512 of=/sdcard/working_sd.bin
/dev/blk/mmcblk1p1: cannot open for read: No such file or directory
1|[email protected]:/ #
My /sdcard directory seems to be a redirect to /storage/sdcard0 (i think), i have a lot of these (what appear to be redirects) on my phone now after upgrading from android 4.0.4 to 4.2.2. If I changed the end of that line of code to something like "of=/storage/sdcard0/0//working_sd.bin" (or any similar working directory), might that solve the problem or am I reading that wrong?
Thank you so much, this is... very powerful!
Great work on this!
Double post.
Please check my post for the correct DD command - I typed /blk instead of /block due to habit.
I'm glad it works. As long as you don't re-plug the card while it is on, you will have no problems. If you accidentally DO "corrupt" the card, just "chkdsk /f" in Windows, turn the phone off, put the card in, and turn it on.
And the biggest help you can give would be those headers. (I was looking at the exfat.fsck-fuse code, apparently even THAT can't fix it!) For the time being, I will re-do the scripts to display more information so I can troubleshoot more easily.
HMkX2 said:
Please check my post for the correct DD command - I typed /blk instead of /block due to habit.
I'm glad it works. As long as you don't re-plug the card while it is on, you will have no problems. If you accidentally DO "corrupt" the card, just "chkdsk /f" in Windows, turn the phone off, put the card in, and turn it on.
And the biggest help you can give would be those headers. (I was looking at the exfat.fsck-fuse code, apparently even THAT can't fix it!) For the time being, I will re-do the scripts to display more information so I can troubleshoot more easily.
Click to expand...
Click to collapse
Sounds bad, I don't know why all these companies are sticking with Fat32 after all these years. Fat32 has been obsolete since like 2000, don't we have open source formats like ext4 now? - that's my rant lol. Either way, it works and I got the file. Btw, this file acts strangely on my device, I couldn't see it in windows explorer during plugin and It wouldn't copy to my sd card even though other files seem to be copying fine. Had to email it to myself from my phone. Thank you so much for all your help, let me know if you need anything else
Rename the file and remove .rar extension before use, xda doesn't allow .bin extensions to be uploaded.
Quick question: If I shut the phone down and pull the SD, can I turn the phone back on and use it without the SD while I load the SD up with files, then power off, re-insert the SD and power on again? (like will it automount again?)
Yay!
HMkX2 said:
Please check my post for the correct DD command - I typed /blk instead of /block due to habit.
I'm glad it works. As long as you don't re-plug the card while it is on, you will have no problems. If you accidentally DO "corrupt" the card, just "chkdsk /f" in Windows, turn the phone off, put the card in, and turn it on.
And the biggest help you can give would be those headers. (I was looking at the exfat.fsck-fuse code, apparently even THAT can't fix it!) For the time being, I will re-do the scripts to display more information so I can troubleshoot more easily.
Click to expand...
Click to collapse
Very interesting. I can go on the hunt for headers if you like. I have loads of sd cards.
Oddly enough, I switched to FAT32 even though I'm on a TouchWiz ROM, cause exFAT does not use alternating file allocation tables. When exFAT gets borked, it gets super borked and you have to use chkdsk (or some other brutish method) to retrieve files. When FAT32 gets borked, you can load the last table that was working and elegantly pull your files off the card (no need to muddle through a pile of chkdsk files and find the correct extensions).
Any possibility that this method could be used to mount a more robust file system like ext[2,3,4]? Journaling would be nice. Or some transaction safe file system.
Ta very much,
ALQI
Re: [MOD] Flashable exFAT support for CM10.1 / AOSP roms (external SD)
Great.I'll try it.
Sent from my SCH-I535 using xda premium
lordazoroth said:
Sounds bad, I don't know why all these companies are sticking with Fat32 after all these years. Fat32 has been obsolete since like 2000, don't we have open source formats like ext4 now?
Click to expand...
Click to collapse
Why we have 15 competing standards... "Never attribute to malice that which is adequately explained by stupidity."
Btw, this file acts strangely on my device, I couldn't see it in windows explorer during plugin and It wouldn't copy to my sd card even though other files seem to be copying fine.​Any files you create on the device without "Rescanning for media" will not be visible in the MTP (Mass Tranfer Protocol) "MP3 player-like" abstracted FUSE filesystem. (One reason why people want UMS (USB Mass Storage) "hard drive-like" support, you see things immediately/it's faster.) Get a free program called SDrescan from Google Play, or run the command below(?), to update the MTP index and see files you create ON the device.
Code:
am broadcast -a android.intent.action.MEDIA_MOUNTED -d file://$SECONDARY_STORAGE
am broadcast -a android.intent.action.MEDIA_MOUNTED -d file:///storage/sdcard0
...let me know if you need anything else Quick question: If I shut the phone down and pull the SD, can I turn the phone back on and use it without the SD while I load the SD up with files, then power off, re-insert the SD and power on again? (like will it automount again?)​Yes, the mount script will simply fail and there will be a silent error. (I need to code some error checking if you insert a non-exfat card...)
Like I said, if you could intentionally re-corrupt the header by using Storage Manager to "Unmount SD" then "Mount SD", then the DD command, (and rescanning media to copy the file off!) I'd appreciate it. Although, I have a second idea of how to get around that problem in mind.....
alquimista said:
Very interesting. I can go on the hunt for headers if you like. I have loads of sd cards.
Click to expand...
Click to collapse
Thanks but I think the bottom line is (1) there is no working open source exfat.fsck anyway and (2) headers are unique per-device. The proper fix is re-coding vold to not run fsck.msdos on a fsck.exfat card.
Oddly enough, I switched to FAT32 even though I'm on a TouchWiz ROM, cause exFAT does not use alternating file allocation tables. When exFAT gets borked, it getse that wa super borked and you have to use chkdsk (or some other brutish method) to retrieve files. When FAT32 gets borked, you can load the last tabls working and elegantly pull your files off the card (no need to muddle through a pile of chkdsk files and find the correct extensions).
Any possibility that this method could be used to mount a more robust file system like ext[2,3,4]? Journaling would be nice. Or some transaction safe file system.​Yep, that is all 100% true. But I've lost files on fat32 drives as well - and I'd hardly call multiple file tables elegant, especially when they become desynced. NTFS would be a better fix, except for the fact it is a magnetic-media filesystem with journaling/timestamps/excessive writes, and exFAT was designed for flash media in the first place!! Even EXT4 writes too much, EXT2 or EXT4 with journaling disabled is a better solution for integrity, but much worse for flash-life. Nowadays, the value of error-recovery outweighs the limited media life. (This discussion comes up a lot in custom Linux firmwares for routers: DD-WRT NVRAM/Flashdrives)
Shardul_seth, the gentleman that compiled these binaries, has made a package for full NTFS support already using ntfs-fuse3g. (<- link) NTFS-3g is very mature/stable at this point, and installation for our devices is even simpler since we already have FUSE support in the kernel. However, his scripts are to mount USB, not the SD card. Mine does the SD card - all those ADB workarounds - so absolutely could be adapted for mounting NTFS cards. I will work on that when I have some time -- I'd need to figure out how to identify a NTFS card on header alone.
Again, all these methods are HACKS, proper support should be added in the kernel at some point. Someone actually has, and I've been cheering for him. He added EXT4 support to CM10.1, his post and code are here. However, he says it "stalled in code review". For the time being, you have to do all this manually.
Why we have 15 competing standards... "Never attribute to malice that which is adequately explained by stupidity."
Click to expand...
Click to collapse
Nice post lol, I only meant why FAT32 of all choices, these companies must know we're gonna be packing large files at some point, why knee cap us at 4gb when so many formats don't? Universal would be nice but of course it's entirely impractical
Any files you create on the device without "Rescanning for media" will not be visible in the MTP (Mass Tranfer Protocol) "MP3 player-like" abstracted FUSE filesystem. (One reason why people want UMS (USB Mass Storage) "hard drive-like" support, you see things immediately/it's faster.) Get a free program called SDrescan from Google Play, or run the command below(?), to update the MTP index and see files you create ON the device.
Click to expand...
Click to collapse
Thanks for the media scan info, that'll help a lot, I'll try out your suggestions tonight
Yes, the mount script will simply fail and there will be a silent error. (I need to code some error checking if you insert a non-exfat card...)
Like I said, if you could intentionally re-corrupt the header by using Storage Manager to "Unmount SD" then "Mount SD", then the DD command, (and rescanning media to copy the file off!) I'd appreciate it. Although, I have a second idea of how to get around that problem in mind.....
Click to expand...
Click to collapse
Will do, sounds interesting, will there be data loss or just header corruption? second idea in mind?
Also, each time I take the card out of my phone (properly after shutdown of phone) and place it in my computer (vista 64bit ultimate) It asks to check for errors, i'll click continue (confirmation to check), takes 3-5 seconds, finishes with no errors found. If I don't do this the card is write protected. I've made sure only to disconnect from PC after "safely removing hardware" so it appears that usage in the phone is generating the confusion. This doesn't seem to be an issue but I thought it might be worth mentioning
do you enter it correctly?
I get this when running the script:
Code:
BREAK! /dev/block/mmcblk1p1 is not a block-special file/device, do you enter it correctly?
How do I find what block file I need to change to script to?
Thanks for your work
boricua1213 said:
How do I find what block file I need to change to script to?
Click to expand...
Click to collapse
Safest (not easiest) way is to insert your FAT32 card, type "mount|grep vfat". The one you are looking for says "/dev/block/vold___:__" . (Shortcut: "mount|grep vold");
Then type "blkid". The one that's listed twice (UUID or Label) as "vold" is your block device's other name. (/mnt/block/mmc_somethingorother) Both names lead to the same spot.
(or)
Type "blkid" with your card in. Make a list. Remove your card. Type "blkid" again. The one that dissapears is your block device.
Ok got the file, I created 2 files, 1 before and 1 after the force unplug, just in case.
Remember to rename the files without the .rar extension before use
Re: [MOD] 1-Click Flashable exFAT + NTFS + EXT4 support for CM10.1 / AOSP (external S
I am about to embark on this journey and make another attempt at ditching TouchWiz. Does this script make it as if everything is normal as far as apps accessing the SD card go? I assume so, but I'm specifically wondering if I'll still be able to use Directory Bind and if I'll be able to create symbolic links to redirect Google Music to the external SD.
Getting ready to flash and try anyway but figured I'd ask to see if someone knows the answer all ready.
I'll be the first to admit the problem is almost certainly user error on my part but I have been wholly unsuccessful with this mod. I have tried it on Carbon Rom and Paranoid Rom. I guess they both have FUSE support, I couldn't find any confirmation of that on the Rom threads....particularly Carbon.
I flashed the zip in the OP in CWM after installing both Roms clean. I tried installing the zip as soon as I installed the Rom and I tried installing it after doing a full boot up first. Ran the chkdks /f command probably 12 times after each successive failed attempt to get my 64 exFAT card recognized. Said Damaged SD no matter what I tried. I saw the post on Page 1 about deleting the fixmyfat file....tried that too and no go. That tip may no longer be relevant since you've updated the script.
Is there something I am missing? There are lots of posts in this thread about mount commands and adb, but it seems from the OP none of those things are supposed to be necessary.
spearoid said:
Does this script make it as if everything is normal as far as apps accessing the SD card go? I assume so, but I'm specifically wondering if I'll still be able to use Directory Bind and if I'll be able to create symbolic links to redirect Google Music to the external SD.
Click to expand...
Click to collapse
In short, it should. However, exFAT/FAT32 don't support permissions/softlinks like ext4 does. So if you use ext4, just remember to set permissions appropriately! When in doubt, set permissions to 755 root:sdcard_rw or root:media_rw on the external sd.
I have tried it on Carbon Rom and Paranoid Rom. I guess they both have FUSE support, I couldn't find any confirmation of that on the Rom threads....particularly Carbon​Type "mount | grep fuse" in console. If you see "fuse" listed anywhere in the text, you have it. Google added it to JellyBean.
I flashed the zip in the OP in CWM after installing both Roms clean. I tried installing the zip as soon as I installed the Rom and I tried installing it after doing a full boot up first. Ran the chkdks /f command probably 12 times after each successive failed attempt to get my 64 exFAT card recognized. Said Damaged SD no matter what I tried. I saw the post on Page 1 about deleting the fixmyfat file....tried that too and no go. That tip may no longer be relevant since you've updated the script.
Is there something I am missing? There are lots of posts in this thread about mount commands and adb, but it seems from the OP none of those things are supposed to be necessary.​Do me a favor... open a terminal, type "su", then type "fuse-mountsd.sh > /sdcard/debug.txt 2>&1" (no spaces in 2>&1). It will make a "debug.txt" file in the root of your internal storage. Paste the output here. I am 90% certain you have the wrong block device set. 9% certain it is the 4.2.2 ADB thing.
You do not need to delete "fixmyfat.sh" -- those instructions are very old. Was the phone *physically off* when you plugged the SDcard in? Ignore the mount commands/ADB - you should not have to deal with them if you only plug in/unplug the card when the phone is off.
I am nigh certain it has to do with 4.2.2 messing with ADB. Like I said, for now, put in a *working* sd card *before* the phone is turned on and you won't run into that issue.

SDCard and SDCard-ext wrong location

I just installed a new ROM and the SDCARD and SDCard-ext are in the wrong location. They are listed under the root director ( / ) and /storage instead of under /mnt/sdcard
Does it work? You could create a symlink. If that fixed it, put it in a script on bootup.
post-mortem said:
Does it work? You could create a symlink. If that fixed it, put it in a script on bootup.
Click to expand...
Click to collapse
Does it work is a relative question. (wasn't meant to sound wise-a$$). I can access them, but apps do not see them at all. They are looking for the cards in /mnt therefor not finding them.
I changed them in /system/etc/vold.fstab but now it won't boot. The not booting is not an issue, I can fix that, but I don't know how to fix these incorrect paths/
No one else who's using this ROM is having these problems? I say either reflash, create symlinks, or choose another ROM.
post-mortem said:
No one else who's using this ROM is having these problems? I say either reflash, create symlinks, or choose another ROM.
Click to expand...
Click to collapse
Not sure if anyone else is running it. Haven't been able to find a thread on here for it. How do you do symlinks?
mikemikemikexxx said:
Not sure if anyone else is running it. Haven't been able to find a thread on here for it. How do you do symlinks?
Click to expand...
Click to collapse
ln -s target shortcut
See a bit more here.
Make a script in your /system/etc/init.d directory, so these links will be created on every boot.
post-mortem said:
ln -s target shortcut
See a bit more here.
Make a script in your /system/etc/init.d directory, so these links will be created on every boot.
Click to expand...
Click to collapse
From what I have read you cannot use them on FAT.
Why does editing this file not work? I fail to see how Android could do anything other than read the file, provided permissions are the same.
mikemikemikexxx said:
From what I have read you cannot use them on FAT.
Why does editing this file not work? I fail to see how Android could do anything other than read the file, provided permissions are the same.
Click to expand...
Click to collapse
The internal memory is not FAT; typically, only the 1st partition on the SD card is FAT, everything else should be EXT. So, executing ln -s /storage /sd-ext should work (or wherever it's currently being mounted).
post-mortem said:
The internal memory is not FAT; typically, only the 1st partition on the SD card is FAT, everything else should be EXT. So, executing ln -s /storage /sd-ext should work (or wherever it's currently being mounted).
Click to expand...
Click to collapse
I meant the card but ln is not working.
One more thing I am going to try is an ADB pull and push. If that doesn't work I really need some community support.
bump to the front.
Are my questions that complex or that dumb that I get so few replays? /bump
Sent from my XT875 using xda app-developers app
Is there a good reason that you don't want to use another ROM?
Mainly speed and compatibility. I need the offline commands only available in JB. Stock ROM is dead slow and is only ICS. Other custom ROMs were also on the slow side and/or battery hogs.
Sent from my XT875 using xda app-developers app
So, is this right?
FAT partition is currently being mounted as /storage
EXT partition is currently being mounted as /mnt/sdcard
post-mortem said:
So, is this right?
FAT partition is currently being mounted as /storage
EXT partition is currently being mounted as /mnt/sdcard
Click to expand...
Click to collapse
Well the way my phone is laid out is
System (I assume too large so they split it in two which resulted in the below SD-Card)
SD-Card
SD-Card EXT (The actual SD Card) - FAT32
I assume the System and SD-Card are standard Android partition format.
Do you use a file manager on the phone, such as ES File Explorer? Are you familiar with using adb?
Edit: Basically, I'm trying to figure out the exact path of the mounted partitions, and where they're supposed to be mounted.
post-mortem said:
Do you use a file manager on the phone, such as ES File Explorer? Are you familiar with using adb?
Edit: Basically, I'm trying to figure out the exact path of the mounted partitions, and where they're supposed to be mounted.
Click to expand...
Click to collapse
They are 100% supposed to be mounted under: /mnt/sdcard and /mnt/sdcard-ext
Right now they are mounting to: /storage/sdcard and /storage/sdcard-ext
There is also an entry in under root ( /sdcard and /sdcard-ext --- For these two I am booting into stock ROM to see if they are suppose to be directly in root as well, will post up when I know)
Check the scripts in your init.d to see if one of them is mounting the sd partitions under /storage.
I suppose you could also try booting without the sd card in place, and see if those /storage directories still exist. Not sure how much that will tell you, though.
post-mortem said:
Check the scripts in your init.d to see if one of them is mounting the sd partitions under /storage.
I suppose you could also try booting without the sd card in place, and see if those /storage directories still exist. Not sure how much that will tell you, though.
Click to expand...
Click to collapse
The init.d for sure says to load sdcards to /storage . (on this particular ROM only)
I will try without the sdcard as you suggested and let you know. Battery died on me, phone won't boot even when plugged in until at least 10%.
Which script is mounting the sd card to /storage? Is it part of the ROM, or is it something which the dev included in this ROM? I ask in case the ROM expects the sd card to be mounted there.
Regardless, try changing the script to link to /sdcard.

Categories

Resources