[Tweak] Vold - NTFS support - v0.2

Search This thread

weeds2000

Senior Member
Oct 30, 2009
73
64
Giebelstadt
twitter.com
This patch allows mounting of NTFS volumes through vold (i.e the disk is automatically mounted when pluged into the device).

Mountpoint is:
/mnt/sdcard/usb<disk-number>-disk0

Known issues:
- NTFS volumes are mounted read-only, this has been explicitly added to the vold to prevent data loss or filesystem corruption until we know that the patch is stable.

Tested on FolioMod v1.3c

Installation:
copy zip file to your sdcard, rename to update.zip and flash using recovery.

vold-update-0.2.zip - this is the patch for vold containing ntfs support
vold-rollback.zip - rollback to default FolioMod 1.3 vold
source-0.2.zip - source code for updated vold

v0.1
- Initial release
- Ntfs support, multiple disks working

v0.1.1
- make sure that the mount point directory exists, create if necessary

v0.2
- multiple partitions are working
- fixed asec handling as discussed
- mount point directories are removed, when unmounting disk (if empty)
 

Attachments

  • vold-rollback.zip
    487.5 KB · Views: 1,250
  • vold-update-0.2.zip
    486.9 KB · Views: 2,315
  • source-0.2.zip
    53.4 KB · Views: 994
Last edited:

Dexter_nlb

Senior Member
Feb 12, 2009
5,459
4,550
Copenhagen
I know vold also handles sdcard + multiple usb stick is that part still included?
and the strange vold.fstab with wildcards? otherwise it will be hard to use for a toshiba rom, i think.
 

weeds2000

Senior Member
Oct 30, 2009
73
64
Giebelstadt
twitter.com
Yes this should all be still included, until now I had no issues with my sdcard.
What the patch does is try to mount everythin with FAT like before, if that fails, it tries NTFS.

The vold.fstab is still included, only change is what partitions should be mounted, this was 'all' before and has been changed to 'auto' (as the 'all' seems to be a toshiba addition)

Still need to figure out how to use this, hope to get a new disk on Monday, so I can test that.
 

Nemo0815

Senior Member
May 19, 2008
281
4
The vold.fstab is still included, only change is what partitions should be mounted, this was 'all' before and has been changed to 'auto' (as the 'all' seems to be a toshiba addition)

Could that also help recognizing some strange formatted SD cards? E.g. I have a digicam (Panasonic) that modifies the FAT32 somehow that the folio tells me the card is defective (but still works perfectly fine in Windows or the Digicam)?
 

viaper

Member
Jul 23, 2005
19
0
Tested with FolioTNT 4.0a and 2 usb sticks (16 and 8 gigs) and working perfectly on both

Great job
 

metuskale

Senior Member
Aug 3, 2010
209
24
Is write supported already or is only for read?
Can large files be read?!?! (i mean no laggy?)

Thanks
 

weeds2000

Senior Member
Oct 30, 2009
73
64
Giebelstadt
twitter.com
OK partition support is somehow working now, but not really a solution I like to release.
Looks like vold was not intended to handle that.

The main reason for this post is, that the handling of /mnt/asec and /mnt/asec_secure is somewhat bad (again vold was not intended to even handle multiple external storage devices at the same time)
Just to make sure anyone know what that is: Apps2SD stores the packages in that folder.

At the moment vold will create (and mount) an asec container for every storage device attached to the folio. So if I insall an app (or move it manually) with SDCard inserted it will use the asec dir of the SDCard. If I install an app without SDCard it will use the asset directory of the internal storage.
The problem is it seems I cannot change on the fly between those two directories. If I unmount SDCard /mnt/asec does not contain the package if put there. So I need to take out the SDCard and reboot the device.

Fixing this behaviour would be quite simple. The question rather is where to put it?
Internal storage or SDCard?
The same question goes for what should be the default SDCard (i.e. the one mounted under /sdcard, the one where apps download their resources). Internal Storage or external SDCard.

The one thing I can think of is creating a selection setting within the settings app where I can select which device should be mounted as primary SDCard.
If that is switched the systrem may copy contens from asec to the new device.

So the layout of /mnt may look like that
/mnt/sdcard (linked to /sdcard) - the primary sdcard device as selected by the user (defaults to internal storage)
/mnt/sdcard2 - well, the other one (either internal or sdcard depending on what the first device is)
/mnt/usb-storage/usb<disk-number>-disk<partition-number> - hdd's mounted over USB

Just waiting for anyone to come up wither other/better ideas...
 

Dexter_nlb

Senior Member
Feb 12, 2009
5,459
4,550
Copenhagen
Fixing this behaviour would be quite simple. The question rather is where to put it?
Internal storage or SDCard?
The same question goes for what should be the default SDCard (i.e. the one mounted under /sdcard, the one where apps download their resources). Internal Storage or external SDCard.


Just waiting for anyone to come up wither other/better ideas...

proper behaviour would be internal storage for apps.. as its not nice that the apps you install disappear if you remove the sdcard or usbsticks.

i noticed this problem early on..but no one mentioned it as a problem.

do you see why the .android_secure mountpoint does not happen?
i think somehow this relate to the problem of downloading paid apps.
 

weeds2000

Senior Member
Oct 30, 2009
73
64
Giebelstadt
twitter.com
If this is OK for everyone, then this would be a much simpler approach, so /sdcard and /mnt/sdcard always point to internal storage.
If someone needs more storage (i.e. for downloaded resources) we may simply create a tool wich does some linking (e.g. link /sdcard/gameloft to /sdcard2/gameloft)

The mount point for asec_secure exists as well, 2 times with the same issues as asec. I don't know if this is related to paid apps. According to the logs I get a 403 response from the google servers.

Is there any specific reason, why SDCard is put under /sdcard/sdvcard-disk0?
I'd like to move that to /mnt/sdcard where usb-storage will go as well.
Using that approach it might be unessesary to unmount the external storage when a USB-connection is made.
 

Dexter_nlb

Senior Member
Feb 12, 2009
5,459
4,550
Copenhagen
Is there any specific reason, why SDCard is put under /sdcard/sdvcard-disk0?
I'd like to move that to /mnt/sdcard where usb-storage will go as well.
Using that approach it might be unessesary to unmount the external storage when a USB-connection is made.
normally its a good reason.. the Toshiba filemanager looks at a location where all users got access..
no regular user would look into a /mnt/sdcard2 unless the toshiba pointed to the location.

so /mnt/sdcard offers both internal storage + sdcard + usbstick here which i think works well and all users easily find it as its within the sdcard default location.

i dont think that logic should change..
 

weeds2000

Senior Member
Oct 30, 2009
73
64
Giebelstadt
twitter.com
updated to 0.2 write support is still disabled.

As I always used NTFS-3G I cannot tell if the driver implementation is reliable and complete. However I think it is, as my knowledge from incomplete write support is 3 or 4 years old...
 

denver-tempor

Member
Dec 3, 2010
17
2
From weeds2000:
"This patch allows mounting of NTFS volumes through vold (i.e the disk is automatically mounted when pluged into the device)...."
------------------
This patch was tested by me on FolioMod v1.3c.
It readed well one HD NTFS, and recognized all of SD cards that were not recognized before.

Many thanks.
 

Dexter_nlb

Senior Member
Feb 12, 2009
5,459
4,550
Copenhagen
updated to 0.2 write support is still disabled.

As I always used NTFS-3G I cannot tell if the driver implementation is reliable and complete. However I think it is, as my knowledge from incomplete write support is 3 or 4 years old...

do you consider this ok to be included in a new update?
I of course let you approve if its ok for regular use..
 

Nemo0815

Senior Member
May 19, 2008
281
4
From weeds2000:
"This patch allows mounting of NTFS volumes through vold (i.e the disk is automatically mounted when pluged into the device)...."
------------------
This patch was tested by me on FolioMod v1.3c.
It readed well one HD NTFS, and recognized all of SD cards that were not recognized before.

Many thanks.

You have NTFS formatted SD Cards? Or FAT cards which weren't recognized before?
 

weeds2000

Senior Member
Oct 30, 2009
73
64
Giebelstadt
twitter.com
As I always used NTFS-3G I cannot tell if the driver implementation is reliable and complete. However I think it is, as my knowledge from incomplete write support is 3 or 4 years old...

OK, so I was wrong, this is from the kernel documentation on NTFS Write support.

This enables the partial, but safe, write support in the NTFS driver.

The only supported operation is overwriting existing files, without
changing the file length. No file or directory creation, deletion or
renaming is possible. Note only non-resident files can be written to
so you may find that some very small files (<500 bytes or so) cannot
be written to.

While we cannot guarantee that it will not damage any data, we have
so far not received a single report where the driver would have
damaged someones data so we assume it is perfectly safe to use.

So it looks like ntfs-3g is the way to go, this will take some time however.

@dexter
I played around with various disks today, watched a movie, etc... Seems like everything is OK, so I would consider 0.2 be a candidate for regular use.
 
  • Like
Reactions: waii69

Dexter_nlb

Senior Member
Feb 12, 2009
5,459
4,550
Copenhagen
I will include this in the next update..

You seem to have many downloads, but not really any complaints :)
that should tell us something.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 4
    This patch allows mounting of NTFS volumes through vold (i.e the disk is automatically mounted when pluged into the device).

    Mountpoint is:
    /mnt/sdcard/usb<disk-number>-disk0

    Known issues:
    - NTFS volumes are mounted read-only, this has been explicitly added to the vold to prevent data loss or filesystem corruption until we know that the patch is stable.

    Tested on FolioMod v1.3c

    Installation:
    copy zip file to your sdcard, rename to update.zip and flash using recovery.

    vold-update-0.2.zip - this is the patch for vold containing ntfs support
    vold-rollback.zip - rollback to default FolioMod 1.3 vold
    source-0.2.zip - source code for updated vold

    v0.1
    - Initial release
    - Ntfs support, multiple disks working

    v0.1.1
    - make sure that the mount point directory exists, create if necessary

    v0.2
    - multiple partitions are working
    - fixed asec handling as discussed
    - mount point directories are removed, when unmounting disk (if empty)
    1
    As I always used NTFS-3G I cannot tell if the driver implementation is reliable and complete. However I think it is, as my knowledge from incomplete write support is 3 or 4 years old...

    OK, so I was wrong, this is from the kernel documentation on NTFS Write support.

    This enables the partial, but safe, write support in the NTFS driver.

    The only supported operation is overwriting existing files, without
    changing the file length. No file or directory creation, deletion or
    renaming is possible. Note only non-resident files can be written to
    so you may find that some very small files (<500 bytes or so) cannot
    be written to.

    While we cannot guarantee that it will not damage any data, we have
    so far not received a single report where the driver would have
    damaged someones data so we assume it is perfectly safe to use.

    So it looks like ntfs-3g is the way to go, this will take some time however.

    @dexter
    I played around with various disks today, watched a movie, etc... Seems like everything is OK, so I would consider 0.2 be a candidate for regular use.
    1
    ntfs-3g for android

    Hello,
    I have ntfs-3g up and running on my tablet with write only support :D.
    The next thing it will be to make it more functional and add vold support.
    I see that you already added support to vold for ntfs. ntfs-3g will wrap it up.
    In order to read and write ntfs volumes with arm Android the following files are required to be installed into Android device:
    vvv.megaupl0ad.c0m/?d=ZVFSI4HQ (please edit the download link)
    /system/fuse.ko
    /system/ntfs-3g
    /system/lib/libntfs-3g.so.80

    Mounting the ntfs volume is done by the following command on my tablet:
    /system/ntfs-3g /dev/block/vold/179:1 /sdcard

    Salutari.
    1
    NTFS support is broken with latest update.

    I'll try if I can compile a module but I guess we have to wait for Toshiba to send kernel sources.