Full NTFS Read Write support for Android (ARM)

Search This thread

rcreation33

Senior Member
Aug 21, 2012
62
1
I am having Xperia Pro CM12 rom with kernel 3.4.0-LX+ and USB OTG Helper app installed it detects the USB but does not show in File Manager.
I am able to connect FAT formatted USB but not able to connect NTFS formatted.
Do I have to copy files also along with the app?
I am attaching debug.txt.
Please have a look at this and let me know how can I connect NTFS formatted USB.
Thanks in ADV...
 

Attachments

  • debug.txt
    16.4 KB · Views: 32
Last edited:

AaylaSecura

Member
Aug 6, 2010
24
0
I apologize if this issue has been answered, I did not read through the whole topic. I have a Samsung Galaxy S6, rooted, stock ROM, kernel version is 3.10.61. fuse is built into this kernel, I transfered the ntfs-3g binary and connected my NTFS flash drive (Transcend 32GB) to the phone: ES File Explorer mounted it (read-only), I unmounted it and remounted it using ntfs-3g (as root). It reports no errors and mount lists it as being mounted rw, but when I try to create a file (touch) it exits with status 255 and no error.. Any ideas?
 

AaylaSecura

Member
Aug 6, 2010
24
0
Try:-
Remove flash
Reboot
Wait 30 seconds
Replace flash
Mount with ntfs-3g

Going between drivers like that is likely to cause confusion
Thank you for replying! That did not help, though - same error. mkdir (as root) fails with 'permission denied'. Just to check: I am logged in as root, have rw permission to the mount point and am using ntfs-3g -o rw /dev/block/sdd1 /storage/UsbDriveA - that should work, correct (ntfs-3g exits with no error and status 0)?
 

alanthehat

Senior Member
Jan 5, 2013
56
11
HTC Wildfire S
Samsung Galaxy J5
Not necessarily, but it looks possible. On mine it's something like /dev/block/vold/179:6 Where you mount to has to exist with reasonable permissions as well. I like to use the shell's tab-completion to be sure.
Run 'mount' before & after ES File Explorer mounts it to find the exact names then go through the reboot rigmarole.
 

AaylaSecura

Member
Aug 6, 2010
24
0
Not necessarily, but it looks possible. On mine it's something like /dev/block/vold/179:6 Where you mount to has to exist with reasonable permissions as well. I like to use the shell's tab-completion to be sure.
Run 'mount' before & after ES File Explorer mounts it to find the exact names then go through the reboot rigmarole.
Thanks for replying. I do have rw permission for the mount point (only root does, i.e. it is 600, but I am logged in as root, so no problem). The locations are correct and I can confirm using 'mount' that the device is mounted properly. I also don't need to automount it with ES Explorer to find the device - I can look in /dev/block and see which device file gets added when I plug in the flash drive (which is what I did). Any ideas?
 

alanthehat

Senior Member
Jan 5, 2013
56
11
HTC Wildfire S
Samsung Galaxy J5
I presume that you have a Windows machine you can plug it into? I've forgotten the name of it, but there's a command-line utility that spells out very clearly the full permissions on a file system object which may give some clues. NTFS permissions are very complicated & can be inherited. Removing permissions completely for one user or group will sometimes fix things. Do you have another NTFS device to compare?
Beyond that I think you've hit the limit of my expertise, sorry
 

AaylaSecura

Member
Aug 6, 2010
24
0
I presume that you have a Windows machine you can plug it into? I've forgotten the name of it, but there's a command-line utility that spells out very clearly the full permissions on a file system object which may give some clues. NTFS permissions are very complicated & can be inherited. Removing permissions completely for one user or group will sometimes fix things. Do you have another NTFS device to compare?
Beyond that I think you've hit the limit of my expertise, sorry
Hi, I normally only have Linux on my computer but recently I had to install Windows for something particular so I have that too. Although the flash drive in question (as well as a second one I tried) was formatted in NTFS under Linux with the ntfs3g package. I just tried reformatting the driver under Windows (did a quick format) but the issue remains... Thank you for helping, I'm open to more suggestions if anyone has an idea.
 

sysctl

Senior Member
Oct 19, 2016
79
3
I am trying to use it on galaxy s7 Edge

I have copied fuse.ko to /system/xbin/fuse.ko

when I run insmod /system/xbin/fuse.ko, it says
Code:
insmod: failed to load /system/xbin/fuse.ko: Function not implemented

When I am trying to mount NTFS with ntfs-3g

I have root terminal open.
I write:
ntfs-3g /dev/block/sde1 /sdcard/ntfs

The path /sdcard/ntfs exists

I get error:
ntfs-3g-mount: mount failed: Permission denied.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 52
    I had a hard time searching for full NTFS read-write support for android. This thread is the fruit of that search..

    I am posting it here with the hope that it will be useful for many more users of android.

    Warning: I will take no responsibility for data loss or corruption that may occur on NTFS drives, though ntfs-3g has been known to be safe.

    Q. Why would someone need this?
    1. To support NTFS formatted partition(s) of USB-OTG mounted drives
    2. To support NTFS partition(s) in microSD card

    Q. What are requirements?
    1. Fuse driver fuse.ko (compiled for the ROM kernel sources)
    2. Latest ntfs-3g binary (see download below)
    3. arm powered rooted android device (including SONY, Samsung, Motorola, HTC etc devices)

    Q. Steps to get it working?
    1. Push fuse.ko to /system or /data, chmod 644, and insmod
    2. Push ntfs-3g to /system/xbin/, chmod 755
    3. Mount USB OTG device (See script below)
    For sdcard, only minor changes required!
    4. Unmount as usual with "busybox umount /path/to/mount/"

    Download
    ntfs-3g
    mount script

    Update: My USB OTG Helper app has been updated to include this and more. Check it out!!


    All-in-one for Sony Xperia 2011 devices -> Here
    All-in-one for Samsung Galaxy SII -> Here
    Reported working on Samsung Galaxy Note - link - thanks globalthrasher


    Touble-shooting!:
    For debugging..
    1. Download this script and extract to sdcard
    2. Connect your drive (pen drive, flash disk, powered HDD)
    3. Run the script with script manager
    4. Copy the output file from /sdcard/usb_otg_debug.txt and post here


    Technical details
    ---------------------------------------------------------------------------------------------
    As the ntfs driver in linux 2.6 kernel does not have write support, the only feasible way was ntfs-3g

    Steps:
    1. Fuse support (fuse.ko) to be compiled for the respective device from kernel source.
    2. The ntfs-3g module was compiled with codesourcery toolchain (arm-none-linux-gnueabi)
    Code:
    ./configure --enable-really-static -host=arm-none-linux-gnueabi
    make

    ntfs-3g: Main site | More details | Release History
    11
    NTFS Utils

    NTFS Utils reference:
    NTFS UTILITIES
    ==============

    The ntfsprogs includes utilities for doing all required tasks to NTFS
    partitions. In general, just run a utility without any command line
    options to display the version number and usage syntax.

    ntfsfix - Attempt to fix an NTFS partition and force Windows to check NTFS.

    mkntfs - Format a partition with the NTFS filesystem.

    ntfslabel - Display/change the label of an NTFS partition.

    ntfsundelete - Recover deleted files from an NTFS volume.

    ntfsresize - Resize NTFS volumes.

    ntfsclone - Efficiently create/restore an image of an NTFS partition.

    ntfscluster - Locate the owner of any given sector or cluster on an NTFS partition.

    ntfsinfo - Show some information about an NTFS partition or one of the files or directories within it.

    ntfsls - List information about files in a directory residing on an NTFS partition.

    ntfscat - Concatenate files and print their contents on the standard output.

    ntfscp - Overwrite files on an NTFS partition.
    5
    Hey guys,

    Just to inform you that my app is now in the play store.. So you will get update notifications :cowboy:
    And NTFS support is inbuilt :)
    https://play.google.com/store/apps/details?id=net.shajul.usbotg
    3
    Yes SOLVED

    has anyone gotten WRITE access to NTFS drive on the nexus5? i can only READ from it, can't copy from my nexus5 to the drive

    tried everything!

    Yes, the following works on 4.4.2

    • Stickmount app, it actually does the sensing and mounting
    • Follow Stickmount's instructions for coppying ntfs-3g to /sdcard, it copies that file for you into the $PATH so then the kernel can mount NTFS
    • The reason you get read-only NTFS by default is the kernel is playing safe, the last trick to get NTfs read WRITE is to make SELinux go into permissive mode, the simplest way to do this is install SE linux mode changer app and set it to permissive.
    • Then when you plug in your NTFS drive, Stickmount will sense, mount as ntfs as read-write

    This is wonderful, I now got a large USB drive I can move files between every platform in my set of 14 devices (including Windows, Linux of various flavors and all my Android devices). NTFS is the only common denominator with large file support. Ext3 is common to Android and Linux. FAT is common but some of my files >4GB.
    2
    Sorry for double post, but I wanted to communicate that I finally got rid of Blank SD card notification. All I had to do is go to Settings / Storage / Mount SD card... And voila, I got 64GB microSDXC card, formatted as NTFS recognized. I can copy 4GB+ files to it over Samba file transfer app and play the file on the phone just fine.
    I already have one script to execute on boot ("ntfs-3g /dev/block/mmcblk1p1 /mnt/sdcard/external_sd"). Only drawback left to resolve is how to get rid of having to go to Settings / Storage every time the phone boots up... Any script for that that could automatically take care of this problem?

    Confirmed working on AT&T Samsung Galaxy Note with Sauron RC7.1 [2.3.6] by DAGr8 (OC Kernel by Da_G).

    I will check USB OTG functionality once I get the cable in a few days...

    Excellent. Thanks a lot! Donation made - Transaction ID # 0AB924075H6975517

    :good:

    Update: Just to clarify... Before going to Settings/Storage/Mount SD Card the card was actually usable for copying files to and from it using ES Explorer (the script I executed took care of that). But for example, I could not switch Camera storage from Phone to SD Card. The option was grayed out. As soon as I mounted SD in Settings/Storage, the "Blank SD Card" notification disappeared and I could use it in stock Camera app.