[GUIDE] How to mount USB external harddisk(support NTFS and multi disks)

hawk2k8

Senior Member
Jan 6, 2009
60
24
0
Comment @ 1st June 2011: In Android 3.1 stock kernel or Tiamat kernel, it has usb-hosting function enabled.So just install hellcat82’s apk and ignore this guide, you could get your NTFS disk mounted.

All Thanks to Roebeet who has enabled usb hosting on xoom.
see the detail at here.

But it didn't support NTFS partition at this time, so i write this guide for ntfs supporting.

( hellcat82 has written a tool to simplify mounting NTFS drives, no need to push any file to android anymore. By just installing one apk, you will get everything. Let's give cheers to hellcat82! )

1.preparing

1.1 hardware
one microUSB male to USB-A female OTG cable.
one powered USB hub with USB-A male connector.
usb external harddisk.

1.2 software
Kernel: root your xoom and enable USB hosting mode by Roebeet‘s hack. or update kernel to Tiamat Xoom 1.1.6 which integrated Roebeet‘s hack.
NTFS supporting: NTFS-3g compiled by farazite , the newest version is on page 2 of that post.
Script Tool:gscript lite, downloadable from market.

2. push ntfs-3g supporting files to xoom
comment: ntfsvolume.apk is not compatible with xoom, so we can just use ntfs-3g and umount_force. at this moment, there is a bug in umount_force which can only dismount one partition, if we mount more than one ntfs partition, then we can not dismount all partitions totally.

Code:
adb remount
adb push ntfs-3g /system/xbin
adb push umount_force /system/xbin
adb shell chmod 755 /system/xbin/ntfs-3g /system/xbin/umount_force
3. Connecting Xoom,USB hub and USB disk

4. Mounting USB disks
use gscript lite to mount disk(s), or you can test this script via adbwireless, because we have no room to connect xoom and PC now.
Code:
mount -o remount,rw /
mkdir /mnt/ntfsdisk
ln -s /mnt/ntfsdisk /ntfsdisk
ntfs-3g /dev/block/sda1  /mnt/ntfsdisk
sda1 is the first partition of the first disk,
sdb1 is the first partition of the second disk.
and so on.
if you want to mount the second disk, the reference script is
Code:
mkdir /mnt/ntfsdisk2
ln -s /mnt/ntfsdisk2 /ntfsdisk2
ntfs-3g /dev/block/sdb1  /mnt/ntfsdisk2
PS:if the partition of your disk is FAT16/32, then you needn't doing anything , it will be auto mounted by Roebeet's hack.

5. Dismounting USB disks
Code:
umount_force /mnt/ntfsdisk
example:
I mounted one USB flash disk(512MB), one 2.5 inch hard disk(120GB), one 3.5 inch hard disk(2TB)


the ntfs partition can be read and written without problem.

 

Attachments

Last edited:

myv6mustang

Senior Member
Jun 26, 2007
336
17
0
When u say hard disk are you talking spinning drive or flash drive with no moving parts? Can zoom USB port put out enough juice to power a drive.

Sent from my ADR6400L using Tapatalk
 

bwcorvus

Retired Forum Moderator
Jun 15, 2010
1,527
369
0
When u say hard disk are you talking spinning drive or flash drive with no moving parts? Can zoom USB port put out enough juice to power a drive.

Sent from my ADR6400L using Tapatalk
Xoom puts out enuff power. Puts out about 600ma. I was charging my evo from it last nite. I will be trying this tonite.

Sent From My Evo
 

hawk2k8

Senior Member
Jan 6, 2009
60
24
0
When u say hard disk are you talking spinning drive or flash drive with no moving parts? Can zoom USB port put out enough juice to power a drive.

Sent from my ADR6400L using Tapatalk
No, the usb port can not provide sufficient current to spin hard disk. so I used a powered USB hub to connect hard disk.
(I have tested it just a moment ago, xoom couldn't identify the 2.5 inch hard disk without powered USB hub.)

Does this work on the wifi only version also....
Just checking before I test this out...
I tested it on CDMA version, but think it should work on wifi versioon also, because it isn't network-related.

balls, I missed that. These cords are hard to find. Found one on amazon UK but $40 was a bit steep I think.
I spent less than 2 dollars to buy it at china.
I think it should be less than $5 in UK.
 
Last edited:
  • Like
Reactions: cavemanb

ericdabbs

Senior Member
Jun 28, 2007
1,137
323
0
Los Angeles
Is there a hard drive size limit that it can't support for this USB fix?

I have an 2TB external hard drive that I would like to use but I am not sure it will work. It is currently formatted in NTFS mode.
 

myv6mustang

Senior Member
Jun 26, 2007
336
17
0
No, the usb port can not provide sufficient current to spin hard disk. so I used a powered USB hub to connect hard disk.
(I have tested it just a moment ago, xoom couldn't identify the 2.5 inch hard disk without powered USB hub.)
Ok makes sense...will order the cable and give this a shot.
 

eaglecomm

Senior Member
May 24, 2007
103
0
0
I am a bit stuck at #4.
-------------------------
4. Mounting USB disks
use gscript lite to mount disk(s), or you can test this script via adbwireless, because we have no room to connect xoom and PC now.
Code:

mount -o remount,rw /
mkdir /mnt/ntfsdisk
ln -s /mnt/ntfsdisk /ntfsdisk
ntfs-3g /dev/block/sda1 /mnt/ntfsdisk
-------------------------
Sorry for the ignorance....
I tried running the mount commands from adb through adbwireless.
I get 'mount' not a recognized command.
I then use terminal directly on the xoom and make it through mount, mkdir and ln.
When I attempt to execute ntfs-3g I get 'Permission Denied'.
I am logged in with root permission through su.

Also wrote the script (minus the mkdir since I already created it) in gscript and it also ends in 'permission denied'.

Additional testing...
I can see the drive fine when I run fdisk -l /dev/block/sda1
I have the /ntfsdisk folder mounted as r/w

Thoughts? Thanks for writing this up...
 
Last edited:

hawk2k8

Senior Member
Jan 6, 2009
60
24
0
I am a bit stuck at #4.
-------------------------
4. Mounting USB disks
use gscript lite to mount disk(s), or you can test this script via adbwireless, because we have no room to connect xoom and PC now.
Code:

mount -o remount,rw /
mkdir /mnt/ntfsdisk
ln -s /mnt/ntfsdisk /ntfsdisk
ntfs-3g /dev/block/sda1 /mnt/ntfsdisk
-------------------------
Sorry for the ignorance....
I tried running the mount commands from adb through adbwireless.
I get 'mount' not a recognized command.
I then use terminal directly on the xoom and make it through mount, mkdir and ln.
When I attempt to execute ntfs-3g I get 'Permission Denied'.
I am logged in with root permission through su.

Also wrote the script (minus the mkdir since I already created it) in gscript and it also ends in 'permission denied'.

Thoughts? Thanks for writing this up...
sorry for the 'Permission Denied' of ntfs-3g.
It missed a chmod command in the first post.
we should run
Code:
adb shell chmod 755 /system/xbin/ntfs-3g /system/xbin/umount_force
to get the permission.
 

eaglecomm

Senior Member
May 24, 2007
103
0
0
That did it! Thanks...

Funny.. I got..
Couldn't set local environment, using default '(null)'.
The disk contains an unclean file system (0, 0).
The file system wasn't safely closed on Windows. Fixing.

:) I think I probably just pulled the usb device out of the laptop without closing it properly.. eager to see if it found my files.

So.. all is well. Thanks again!

1 more question. Is there a need to unmount before the USB drive is removed? Or can it now be plugged and removed at leisure without causing any issues?

Bummer... now it's gone. I went somewhere else, then went back in to Root Explorer and the ntfsdisk folder is empty. Nothing was disconnected. Maybe it times out after a minute or two?

And the only way I could get it to show up again was to run it as if it was the second partition. Does it hold a value that needs to be released? I ran the umount statement.
Here is what I had to execute: ntfs-3g /dev/block/sda2 /mnt/ntfsdisk
 
Last edited:

hawk2k8

Senior Member
Jan 6, 2009
60
24
0
That did it! Thanks...

Funny.. I got..
Couldn't set local environment, using default '(null)'.
The disk contains an unclean file system (0, 0).
The file system wasn't safely closed on Windows. Fixing.

:) I think I probably just pulled the usb device out of the laptop without closing it properly.. eager to see if it found my files.

So.. all is well. Thanks again!

1 more question. Is there a need to unmount before the USB drive is removed? Or can it now be plugged and removed at leisure without causing any issues?

Bummer... now it's gone. I went somewhere else, then went back in to Root Explorer and the ntfsdisk folder is empty. Nothing was disconnected. Maybe it times out after a minute or two?
If you haven't written data to the disk, I think it would be safe to unplug the cable directly.

for the issue of lost mounting, I have never met it, need some time to observe it.
 

eaglecomm

Senior Member
May 24, 2007
103
0
0
right, no worries..
And once I did a umount_force and then reconnected, it was seen as sda1 again. Maybe just a fluke.
Thanks.
 

eaglecomm

Senior Member
May 24, 2007
103
0
0
I am running Wifi.. worked for me. Don't know if it messed anything else up. ;) But so far I think the xoom is still truckin' along.