[Q] Sync mount for usb connection - Barnes & Noble Nook Tablet

One of the questions that has arisen a lot with Team-B CM7 for NT is the query about why the internal storage no longer shows as a mount point when connect via USB to a computer.
This is a valid question and one that curently I am unsure how to answer and to correct with the system. In Our latest build that we are using within the team the internal media partition is mounted but it doesn't show when connected via USB.
Does anybody know where the settings to enable this are hidden?
When issuing a mount command in the stock rooted rom terminal it shows media as having 'dirsync' which I'm assuming is how it shows in usb sync but I'm unsure at the moment how and where this is set.
So rather than spend a long time looking I thought it may speed us the process if I just asked because chances are that somebody else already know the answer
Thanks in advance for you help and advice.
Celtic.

I don't know if this is of any use, but with my modified vold.fstab internal storage is showing up via USB on my computer. But my real SDcard is not showing up on my PC now. It is mounting to /sd-ext though so I copied the Android folder from /sd-ext to /mnt/sdcard to make my apps happy. Anyway here is my vold.fstab.
dev_mount sdcard /mnt/sdcard 10 002 /devices/platform/usb_mass_storage/lun0 /devices/platform/mmci-omap-hs.1/mmc_host/mmc0
dev_mount sd-ext /sd-ext auto auto /devices/platform/usb_mass_storage/lun1 /devices/platform/mmci-omap-hs.0/mmc_host/mmc1

tselling said:
I don't know if this is of any use, but with my modified vold.fstab internal storage is showing up via USB on my computer. But my real SDcard is not showing up on my PC now. It is mounting to /sd-ext though so I copied the Android folder from /sd-ext to /mnt/sdcard to make my apps happy. Anyway here is my vold.fstab.
dev_mount sdcard /mnt/sdcard 10 002 /devices/platform/usb_mass_storage/lun0 /devices/platform/mmci-omap-hs.1/mmc_host/mmc0
dev_mount sd-ext /sd-ext auto auto /devices/platform/usb_mass_storage/lun1 /devices/platform/mmci-omap-hs.0/mmc_host/mmc1
Click to expand...
Click to collapse
it seems that unless told otherwise the system only shows whichever partition is showing as sdcard, which your changes prove, it lost the real sd but is showing the internal which you mojnted as sdcard. We need to work out how to make it show the media partition and the sd card. In current build we have the internal is mounting the media to mnt/media and it's mounting sdcard to mnt/sdcard wbut it only shows sdcard on usb sync mount. It going to be something in ramdisk thast quite obvious once we realise I'm sure!

I just had an idea... what about mounting an internal partition as an sd card and mount the external as "sd_ext" or something similar? We had to do that with another device I worked on.
I'll hit you up on gtalk

Celtic i have been looking in the Nook Color forums and there i found:
[APP][02/26] Nook Color USB Mass Storage utility - Mount any partition to your PC so possibly it can be modified for the nook tablet? . I don't know how different they might be in this scenario, just posting what i've found.
~ Veronica

darthvince said:
I just had an idea... what about mounting an internal partition as an sd card and mount the external as "sd_ext" or something similar? We had to do that with another device I worked on.
I'll hit you up on gtalk
Click to expand...
Click to collapse
I'm wondering something similar, I was wondering if this could cure the market install problem .... you never know
I'm aroudn so grab me on Gtanl

lavero.burgos said:
Celtic i have been looking in the Nook Color forums and there i found:
[APP][02/26] Nook Color USB Mass Storage utility - Mount any partition to your PC so possibly it can be modified for the nook tablet? . I don't know how different they might be in this scenario, just posting what i've found.
~ Veronica
Click to expand...
Click to collapse
Thanks I'll look into it and see if it can help

CelticWebSolutions said:
Thanks I'll look into it and see if it can help
Click to expand...
Click to collapse
There is also a IMEI generator in development section too that it might help with some apps not working like the free version of XDA which looks for an IMEI when it starts .
~ V

lavero.burgos said:
Celtic i have been looking in the Nook Color forums and there i found:
[APP][02/26] Nook Color USB Mass Storage utility - Mount any partition to your PC so possibly it can be modified for the nook tablet? . I don't know how different they might be in this scenario, just posting what i've found.
~ Veronica
Click to expand...
Click to collapse
Thanks
I didn't use the app but it showed what I needed to know
I now have media mounting automatically and then you can choose to mount sd card
Thanks again

CelticWebSolutions said:
Thanks
I didn't use the app but it showed what I needed to know
I now have media mounting automatically and then you can choose to mount sd card
Thanks again
Click to expand...
Click to collapse
grrrrrrreat, you're very welcome pal!
~ V

CelticWebSolutions said:
Thanks
I didn't use the app but it showed what I needed to know
I now have media mounting automatically and then you can choose to mount sd card
Thanks again
Click to expand...
Click to collapse
Can it mount both automatically?

tselling said:
Can it mount both automatically?
Click to expand...
Click to collapse
Yes tahst currently how I have mine set. Just testing a few things with it

CelticWebSolutions said:
Yes tahst currently how I have mine set. Just testing a few things with it
Click to expand...
Click to collapse
excellent!

Unfortunately while it allowed us to manually mount drives to sync to computer it didn't work when we entered them into a script in boot, it would work once , then oif you disconnected the usb cable and tried again nothing would mount at all.
So if anybody has any further ideas that would be great
Thanks again!

CelticWebSolutions said:
Unfortunately while it allowed us to manually mount drives to sync to computer it didn't work when we entered them into a script in boot, it would work once , then oif you disconnected the usb cable and tried again nothing would mount at all.
So if anybody has any further ideas that would be great
Thanks again!
Click to expand...
Click to collapse
I hope you don't mind if I speculate; I'm no programmer but I have a crazy idea that may or may not work.
I also acknowledge that what I'm about to suggest might seem obvious and you may have already tried it, but I'm doing what I can here!
When you say script, do you mean something resembling a shell script? Because if so, it sounds like it's listening for a USB connection and then the script finishes once it's connected, so it doesn't loop back to the start of the script and listen for a USB connection to mount the other partitions after it's already done it once.
If it is indeed a script of that nature, you could create a separate mounting script that does the work and then infinite loops back to the beginning after all of the operations are complete. Then you would call this mounting script in boot (something resembling sh mounting-script.sh &) and voila - you have a script that will continue listening for a USB connection after disconnect like it should.
Once again, this is all speculative, but shell scripts are very powerful things. Here's a full, detailed page on looping in Bash, including infinite loops:
http://www.cyberciti.biz/faq/bash-for-loop/

lavero.burgos said:
There is also a IMEI generator in development section too that it might help with some apps not working like the free version of XDA which looks for an IMEI when it starts .
~ V
Click to expand...
Click to collapse
Eehm that's odd, the FREE version of xda installed and works fine for my on CM7, but the PAID version doesn't install at all. Not from titanium backup nor from the market..

CelticWebSolutions said:
Unfortunately while it allowed us to manually mount drives to sync to computer it didn't work when we entered them into a script in boot, it would work once , then oif you disconnected the usb cable and tried again nothing would mount at all.
So if anybody has any further ideas that would be great
Thanks again!
Click to expand...
Click to collapse
Firstly huge thanks to the CM7 team for this excellent release.
Here is a script I wrote to automount the internal storage to the PC.
1. rename 10mountmedia.zip to 10mountmedia (can't upload non zip file)
2. Use root explorer to copy it to /system/etc/init.d and set permission to 755 (all read, top write, all execute)
3. reboot

Working /media mount
lavero.burgos said:
Celtic i have been looking in the Nook Color forums and there i found:
[APP][02/26] Nook Color USB Mass Storage utility - Mount any partition to your PC so possibly it can be modified for the nook tablet? . I don't know how different they might be in this scenario, just posting what i've found.
~ Veronica
Click to expand...
Click to collapse
It Works
just did this :
1.)mounted /media using :
Code:
mount -w -t vfat /dev/block/vold/179:10 /mnt/media
ln -s /mnt/media /media
2.)used the trick by samuelhoff in his post .
In terminal :
[Edit:]
Code:
echo /dev/block/mmcblk0p10 > /sys/devices/platform/usb_mass_storage/lun1/file
Use of lun1 seems to allow both to mount . However this indicates a deeper pathology because the vold .fstab file has :
Code:
dev_mount sdcard /mnt/sdcard auto auto /devices/platform/usb_mass_storage/lun1 /devices/platform/mmci-omap-hs.0/mmc_host/mmc1
dev_mount media /mnt/media 10 002 /devices/platform/usb_mass_storage/lun0 /devices/platform/mmci-omap-hs.1/mmc_host/mmc0
The lun0 and lun1 are interchanged ??? I'm guessing this file has become redundant in CM7 ?
Anyways my updated batch file in attached zip file now works. only, It has to be done every time. Mayhap its possible to put this in autorun.inf script of the sdcard root ? (will try now)
@cobrato : maybe try using lun1 in your script

@daedricgeek
I've tried both but settled with lun0. Sdcard mount will take lun1 so both can be used at the same time.
Sent from my LT18i using Tapatalk

This doesn't solve the problem but may be of some help to diagnosing the problem. I found that when I plug in the USB cable and tell the tablet to turn on USB storage, the file /sys/devices/platform/usb_mass_storage/lun0/file gets populated with: /dev/block/vold/179:10
but the file /sys/devices/platform/usb_mass_storage/lun1/file is still empty.
Doing the mount command shows:
...
/dev/block/vold/179:10 /mnt/secure/asec vfat rw,dirsync,nosuid,nodev,noexec,relatime,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
/dev/block/vold/179:17 /sd-ext vfat rw,dirsync,nosuid,nodev,noexec,relatime,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
tmpfs /sd-ext/.android_secure tmpfs ro,relatime,size=0k,mode=000 0 0
So I figured the empty file should be populated with: /dev/block/vold/179:17
So I echoed that into the file with the USB cable connected and I got the popup on my PC for lun1 (in my case the external sd card since I swapped them in vold.fstab). And both lun0 and lun1 were mounted on my PC. **** Note that the dev/block/vold entry differs on my two nook tablets... its /dev/block/vold/179:17 on one and /dev/block/vold/179:16 on anoher.... not sure why ****
So it appears to me that whatever process triggers the lun0/file to be populated isn't setup to do it for lun1. (It also it not clearing the file when I turn off USB storage for lun1.) I don't know if this is just useless information or not but I thought I would share it just in case it helps.
I also have to eject and reinsert my SD-card before it gets mounted to the NT after every reboot. Don't if thats unrelated or not.

Related

[Q] Connecting camera with USB-OTG - what I have found so far

Evening all,
I bought a OTG/USB cable to see if it would connect a device with USB-OTG.
I plugged in my Canon EOS with one image on the camera.
The i9100 stated that a USB device was connected in the notification window, and one could tap the message to disconnect the USB storage.
I checked to see whether a device was there but it was unmounted so I presume that it would not auto mount the disc.
I looked for an autofs type file, but found vold. There is an entry for an OTG device:
Code:
# otg sdcard
{
ums_path = /dev/zero
asec = disable
}
usb_mount sdcard2 /mnt/sdcard/usbStorage auto /devices/platform/s3c_otghcd/usb
I checked with the camera plugged into the i9100 and /mnt/sdcard/usbStorage was empty.
Did anyone else try this?
Regards.
Tha same thing happened with my flash disk. After i repaired with scandisk, it worked.
mdalacu said:
Tha same thing happened with my flash disk. After i repaired with scandisk, it worked.
Click to expand...
Click to collapse
Hi mdalacu,
Thank-you for your reply, but I don not understand what you mean. How do you repair with sandisk? Sandisk make hardware. Its akin to saying that you formatted your PC with Sony Vaio.
Anyway: The CF card I have in the Camera is a Sandisk 8Gb extreme formatted with VFAT via the camera built-in format function. Its been formated a few times before with mkfs ext3 but that was years ago and since uses the camera to format it.
Scandisk, not sandisk. m8
Scandisk is a windows utility to verify drives, the table of contents and disk errors. It's pretty similar to the manufacturer name, so it's easy to mistake one for the other
Ahh. Apologies, my mistake.
I shall reformat the disc, but I cannot see this as the problem, although the camera mounts as a USB drive on Windows and Linux without a hitch.
forgetmyname said:
Ahh. Apologies, my mistake.
I shall reformat the disc, but I cannot see this as the problem, although the camera mounts as a USB drive on Windows and Linux without a hitch.
Click to expand...
Click to collapse
yes, and after mount : My Computer, right click on usb storage device - properties, tools - Error-checking - Check now!

[Q] Comprehensive NTFS Mounting Guide?

Can anyone please help with mounting an NTFS formatted flashdrive or USB harddrive on Galaxy Tab 10.1 HC 3.2 pershoot kernel??
I'm pretty sure there are people out there who copied ntfs.ko to /data/local/modules/ and then performed chmod 644 and insmod instructions. Only to find out that the NTFS device is NOT displayed under /dev/block/ and there's nothing to do about it.
What are we doing wrong? Why is it super easy for some to mount NTFS partitions and for some of us it's a complete pain in the rear end?
Please help with a comprehensive guide!
Don't just post a couple of lines assuming that we find our way out.
Treat us as newbies to mounting.
Thanks!
komorka said:
Can anyone please help with mounting an NTFS formatted flashdrive or USB harddrive on Galaxy Tab 10.1 HC 3.2 pershoot kernel??
Click to expand...
Click to collapse
Download Terminal Emulator and USB Mass Storage Watcher OTG from the market.
Run TE and enter the commands I've outlined in the attached image. When you type "su" at the "$" you should get the super user permissions pop-up. If you see "ntfs xxxxxxxxx Live" as a response to the lsmod, you are good to go.
Use the USB Mass Storage app to mount your drive. I'll be honest, I haven't used this app yet. I used something called NTFS Mount, but after I updated to the last round of Galaxy Task, I forgot to back it up. Doh...
I hope this is helpful.
Edit: I did a search of XDA and found the app I used here: http://forum.xda-developers.com/showpost.php?p=13337600. Give this one a try too.
RGardner said:
Download Terminal Emulator and USB Mass Storage Watcher OTG from the market.
Run TE and enter the commands I've outlined in the attached image. When you type "su" at the "$" you should get the super user permissions pop-up. If you see "ntfs xxxxxxxxx Live" as a response to the lsmod, you are good to go.
Use the USB Mass Storage app to mount your drive. I'll be honest, I haven't used this app yet. I used something called NTFS Mount, but after I updated to the last round of Galaxy Task, I forgot to back it up. Doh...
I hope this is helpful.
Edit: I did a search of XDA and found the app I used here: http://forum.xda-developers.com/showpost.php?p=13337600. Give this one a try too.
Click to expand...
Click to collapse
Thanks, RGardner, USB Mass Storage Watcher OTG did the trick! Thanks so much!
thanks,
that did the trick for me too.... for a 8gb usb flash.
but, when i try to connect a 300gb western digital portable hard drive, it gives me a message << high speed usb flash connected>> and it cannot be mounted...
it might be that it is over 32 gb?
it might be that it needs more power than the cable can provide?
any suggestions?
nikosnt74 said:
thanks,
that did the trick for me too.... for a 8gb usb flash.
but, when i try to connect a 300gb western digital portable hard drive, it gives me a message << high speed usb flash connected>> and it cannot be mounted...
it might be that it is over 32 gb?
it might be that it needs more power than the cable can provide?
any suggestions?
Click to expand...
Click to collapse
busybox modprobe ntfs
busybox mount -t ntfs /dev/block/sda /mnt/usbdrive
1133431 said:
busybox modprobe ntfs
busybox mount -t ntfs /dev/block/sda /mnt/usbdrive
Click to expand...
Click to collapse
Thanks for the quick answer. I quess these are comands for a terminal emulator?
nikosnt74 said:
Thanks for the quick answer. I quess these are comands for a terminal emulator?
Click to expand...
Click to collapse
Or ADB Shell.
1133431 said:
Or ADB Shell.
Click to expand...
Click to collapse
Well, i installed busybox sucessfully, then terminal emulator is saying...
what am i doing wrong??

[Q] ICS - SDCARD on computer not visible - only internal appears (MAC OSX)

I am under ICS 4.03 on Acer Gallant Duo (E350) (MT6575)
/sdcard = internal storage
/sdcard2 = removable storage
I change build.prop parameter to ersist.sys.usb.config=mass_storage,adb
My device switched fro MTD to UMS correctly but only internal sdcard in visible and mount on my computer.
/sdcard2 (external sdcard) is not visible and not mounted on computer.
The strange part of the process is that /sdcard2 is unmount from the device (ACER) but not presented to the computer.
I tried to reformat the external sdcard2 without success.
any idea
jaarvin said:
I am under ICS 4.03 on Acer Gallant Duo (E350) (MT6575)
/sdcard = internal storage
/sdcard2 = removable storage
I change build.prop parameter to ersist.sys.usb.config=mass_storage,adb
My device switched fro MTD to UMS correctly but only internal sdcard in visible and mount on my computer.
/sdcard2 (external sdcard) is not visible and not mounted on computer.
The strange part of the process is that /sdcard2 is unmount from the device (ACER) but not presented to the computer.
I tried to reformat the external sdcard2 without success.
any idea
Click to expand...
Click to collapse
Have you tried using partition manager at all bud? It can format partitions not seen by Windows
Sent from my HTC One X with Beats Audio using Tapatalk 2
rawdaddymagraden said:
Have you tried using partition manager at all bud? It can format partitions not seen by Windows
Sent from my HTC One X with Beats Audio using Tapatalk 2
Click to expand...
Click to collapse
Hi,
I am under mac osx !
My problem is not related to formating but to make my external sdcard being presended to the computer in UMS mode
At this time it does not even present the volume corresponding to the external sdcard
It seems there is s.t wrong with sysfs contents
I found an intersting information here: (i could not post outside link according ti XDA rules)
In my cellphone sysfs there is only one declaration corresponding to /sdcard (internal one)
/sys/devices/platform/mt_usb/gadget/lun0
but not lun1
There is also some symlink errors in sysfs which could have some impact on init setup !
Playing with vold.fstab and fstab.nand do not solve
I am stuck at this point !
jaarvin said:
It seems there is s.t wrong with sysfs contents
I found an intersting information here: (i could not post outside link according ti XDA rules)
In my cellphone sysfs there is only one declaration corresponding to /sdcard (internal one)
/sys/devices/platform/mt_usb/gadget/lun0
but not lun1
There is also some symlink errors in sysfs which could have some impact on init setup !
Playing with vold.fstab and fstab.nand do not solve
I am stuck at this point !
Click to expand...
Click to collapse
Maybe it is under Removable Devices.
In my Asus tablet it is referenced under /Removabledevice or /removable something. Why don't you check it out??
Disclaimer: I am not a developer, just a normal user/flasher, got no knowledge about hacking.
k1chy said:
Maybe it is under Removable Devices.
In my Asus tablet it is referenced under /Removabledevice or /removable something. Why don't you check it out??
Disclaimer: I am not a developer, just a normal user/flasher, got no knowledge about hacking.
Click to expand...
Click to collapse
Under Android everything is OK I can see both sdcard monuted under /sdcard ans sdcard2 in /mnt.
Problem occurs when I connect my Acer E350, active UMS sharing in order to make both /sdcard ans /sdcard2 visible from my computer ( like a usb key in fact).
Under Mac it is /Volumes !
There is only a NO NAME volume corresponding to the internal /sdcard and it is visible under the Finder.
Both /sdcard and and sdcard2 are unmount from Android device (usual behavior) and i can confirm that under Setting/storage App but something in the process goes wrong and only internal sdcard is presented to the computer

NTFS Read/Write DOES work

Just for the heck of it I tried the Paragon NTFS/HFS download in the Play Store today to see if NTFS read/write would work. The app needs root, and of course we thankfully have that. I had a Seagate USB 3.0 drive formatted NTFS and connected it. Since Android auto mounts on the Mojo, it auto mounted as NTFS read only. I had to unmount it, and then re-mount it with the Paragon app and choose an alternate mount point (just created a folder called "NTFS" and mounted it) and I can confirm that I can read and write to the drive. Moving files, deleting files, and copying files all worked just fine. Just a heads up. I am sure there will be a better, more translucent way of doing this down the road, but for now there does exist the possibility. I wonder if anyone knows how to stop Android from auto mounting drives when plugged in?
I confirm that your method works, thanks!
Although I could have lived without the writing option enabled, it sure is nice being able to delete files I don't need on the fly.
I found that stock rom sucks in regards RW for external drives and doesnt allow it in exfat or NTFS the solution for me and others was installing CM12 rom instead of stock, now my drive has normal RW funtion without having to use an app to mount it
not I can use my 5TB drive

Mount USB and SDcard drives

I have a lenovo A10 Tab 2 upgraded to MM. I have su installed.
When I plug in an external usb drive, programs like vlc cannot find it as they do not seem to have access to /mnt or simply do not bother looking in it. I have a USB with music that I Would like to create playlists for and do other things(since I have multiple USB drives with various uses).
What I'd like to is is be able to create a permanent mount to the usb port to a useful place that I can easily access as well as other programs. I'd like to do this for the sdcard too.
One thing I hate is these "random" hex string representing the devices. I never know what is what.
I have tried to use mount -t /mnt/1DVE-4323 /drives/USBDrive
and get operation not permitted
I've tried to go in to /dev/block/vold/public:8,1 and mount that but same issue or other issues.
I've tried creating a symlink using ln -s but same issues.
executing mount by itself lists quite a bit of stuff and it does show the mount point to the 1DVE-4323 which I guess android creates internally when the usb drive is inserted but I can't mount that put.
I'm using terminal emulator and call su from the start.
All I want is to be able to access these damn devices in a convenient way but it's damn near impossible It really shouldn't be that difficult(in fact, I shouldn't have to go to the terminal). While I can use explorers to explore the disk I tend to have to bookmark things because stuff is just not organized in a natural way. (either hex values for drive names or things like emulated or usbtg, etc... most of which tend to be empty and I never remember what is what).
What would be awesome is if I had 3 directories like
/root which took me to the system root
/usbdrive which took me to the usb drive
/sdcard which too me to the sd card
and that these could easily be found by every other program.
or possibly
/drives/root
/drives/sd_internal
/drives/usb
/drives/sd_external
Any ideas how to achieve nirvana?

Categories

Resources