[Q] Use arbitrary image file for USB "mounting" instead of SDcard - Android Software/Hacking General [Developers Only]

I was wondering if anyone knew if there was a way (or, at least, if this'd be possible to implement) to expose via USB an arbitrary disk image file to be mounted by the host computer instead of the SD card itself.
Basically, my goal is to consolidate having to carry around a number of USB flash drives with different bootable OSes (such as Ubuntu, ntpasswd, knoppix, fedora's live usb versions), by storing a disk image for each on my Android phone, that, when connected to the computer (and set to be mounted), an arbitrary one could be exposed as if it was a different USB flash drive- instead of only having my sdcard mountable.

Related

SD"2" Mount Issue

My first thread that I can call my own.
Question for you all. Is there an easier way to transfer files over the the GTAB then having to pop out the SD Card and put it into an adapter and then into the computer and then out of the computer, out of the adapter and back in the GTAB?
Because every time I mount the USB, it only mounts the "internal" SD Card. Is there some sort of way to get it to mount both the internal and external SD Card?
I hate messing with the external SD Card. All the "popping in and out" makes me nervous.
I even tried mounting the internal SD Card and then copying the movies/music/etc.. over to the external SD Card via a file manager... but that is DAMNNNNN slow.
I haven't found a way (yet). Given that neither the zPad or TnT stock builds work, I'm thinking it's not that easy to do. Drives me nuts as well because I really don't want to keep taking the card out over and over and potentially damage it, over time.
That's exactly what I am worried about. LOL
I can just picture not paying 100% attention and snapping the card in half or, breaking the "locking" mechanism that holds the card in place.
roebeet said:
I haven't found a way (yet). Given that neither the zPad or TnT stock builds work, I'm thinking it's not that easy to do. Drives me nuts as well because I really don't want to keep taking the card out over and over and potentially damage it, over time.
Click to expand...
Click to collapse
If you have ADB, can you do adb pull or push?
Jim
My workaround has been to use the LAN tab in ES File Explorer to copy data wirelessly to sdcard2. Probably not the speediest method but it keeps the card in place.
The techie/hacker solution to easy file transfer is to use the Rsync for Android app in the market store. Once you have it setup, (not the easiest thing to do) it works great for moving files automated from your gtab back to an rsync server (my linux box to the rescue). I even have a secondary profile to get it to reverse rsync a specified directory FROM my linux box to my gtab. Presto -- easy file transfer via wifi!!!
Also, another idea might be to use Dropbox?
Jim
P0RT3R said:
My workaround has been to use the LAN tab in ES File Explorer to copy data wirelessly to sdcard2. Probably not the speediest method but it keeps the card in place.
Click to expand...
Click to collapse
I do the same thing. It's mighty slow, but it works.
roebeet - an idea that almost worked - maybe you know why?
roebeet said:
I haven't found a way (yet). Given that neither the zPad or TnT stock builds work, I'm thinking it's not that easy to do. Drives me nuts as well because I really don't want to keep taking the card out over and over and potentially damage it, over time.
Click to expand...
Click to collapse
Hi,
You all got me curious, so I just tried the following:
- Created a dir under /mnt/sdcard, /mnt/sdcard/mymnt
- Get temp root (z4root)
- Start terminal
- su
- mount -t vfat /dev/block/vold/179:17 /mnt/sdcard/mymnt
At this point, I can access the sdcard2 by using /mnt/sdcard/mymnt or simply /sdcard/mymnt.
So, I disabled USB debugging, and I get the popup asking if I want to activate USB transfer (I'm on 3452, on earlier TNT firmware, it use to say enable USB storage).
I click the button to Activate, and then another window pops up, and I click Activate.
Then, the popup just stays there, with the spinning thing. It never enables USB transfer, and, on my PC, I see the removable drive, but when I click on it, it says it's not ready.
I've also tried umounting /mnt/sdcard2, thinking that it might be confused because of the two mounts to /dev/block/vold/179:17, but it still does the same thing.
So:
- It looks like I can mount the /dev/block/vold/179:17 (the external microSD card) under /mnt/sdcard, and
- When I do that mount, I can see the contents of the external microSD card in terminal under /mnt/sdcard/mymnt and under /sdcard/mymnt, but
- For some reason, turning off USB debugging/activatiing USB transfer fails.
Maybe someone can figure out why activating the USB transfer fails. If we can figure that out, then that would allow seeing the external microSD card via the PC USB interface.
Jim
I think it would need to mount both volumes -- the internal SDcard and the external SDCARD2 -- separately...
Using a mount (reparse) works internally since they are on the same device -- but if you try to mount SDCARD externally it doesn't understand the reference to SDCARD2
My phone actually mounts to the computer as two drives -- one for internal (SDCARD) and the other for external (SDCARD2)
I'd assume there is a way to have something similar work on our gTablets...
I'll have to slap a spare microSD card into the tablet to try though...wondering if teh INF needs to be tweaked as well (??)
From what Ive seen or experienced, Cyanogen was the only rom that Had the Sd card and Sd card2 Thing fixed right (with exception of having to plug in the Power cord before mounting). Evrey other Rom seems to have problems. But Cyanogen has way too many other problems so I use Vegan since to me it seems the most stable :s
Yeah -- my phone is running a fork from Cyanogenmod 6...so the code is shared
TeutonicWolf said:
I think it would need to mount both volumes -- the internal SDcard and the external SDCARD2 -- separately...
Using a mount (reparse) works internally since they are on the same device -- but if you try to mount SDCARD externally it doesn't understand the reference to SDCARD2
My phone actually mounts to the computer as two drives -- one for internal (SDCARD) and the other for external (SDCARD2)
I'd assume there is a way to have something similar work on our gTablets...
I'll have to slap a spare microSD card into the tablet to try though...wondering if teh INF needs to be tweaked as well (??)
Click to expand...
Click to collapse
That's the problem... When the Gtab is plugged into the PC USB (while USB debug is disabled), only one new "drive" appears, corresponding to /sdcard on the Gtab. There is no 2nd drive appearing on the PC corresponding to /sdcard2 on the Gtab.
I've been looking at my Windows configuration, with the Gtab plugged in, and the one drive that appears shows up under "Portable Devices" branch in Device Manager. The properties show that it corresponds to "wpdfs.inf", and looking through that, it looks like a generic USB Mass Storage configuration, i.e., a USB drive.
I still think that something would need to be fixed on the Gtab end for the two drives to appear on the Windows end.
Jim
app fix
I have found a workaround for the issue with the installation of a single app:
http://forum.xda-developers.com/showpost.php?p=12299831&postcount=2
Depending on what you want to do, an FTP solution is also possible as discussed in this thread:
http://forum.xda-developers.com/showthread.php?t=869844
By using swiFTP, I am able to open a connection through a Win7 windows explorer, and I can drag-and-drop files to SDCARD2 (over a wireless connection). I put a 1Gig movie on the card and it took about 12 minutes.
Another option is to use Multi Mount SD-Card. This is link is for the lite version, there is also a paid version.
This app works outside the embedded SD Card Mounting scheme that comes with Froyo.
With this you dont have to press the "Mount USB" button that comes up in the notification bar when you attach the USB cable. Instead it will auto-mount the either the internal or the external SD Card when you plug in the cable.
(Having configured the setting of your choice before hand).
Unfortunately it can not mount both at the same time.
It works with my GTAB and I'm using VEGAn 5.1 Beta.
(Without the 5.1.1 Suppliment patch)
Folks are still struggling with this?
Use a USB flash drive, I do it all the time. Just a regular, boring, Windows FAT-formatted flash drive.
Wow it is amazing that this problem still exists.
I am a new owner of a Gtab and have had it for less than 2 days. Thank goodness for the many informative posts on this site, that have helped me make my new toy almost perfect.
I updated to 3588, installed cwm and titanbackup, vegan5.1.1 including the suppl patch and even learned how to tether it to my Samsung Captivate. The one thing that was annoying me was my device not seeing the 16 gb microsd card that I had inserted both in the gtab and on my pc.
After reading this thread, it looks like I am not going crazy, but it seems like my device is destined to not acknowledge this addtional storage in it's settings?
I really was hoping to use the external card for videos and my mp3 collection, so I am missing something or did I do something wrong to make this happen?
I would appreciate any comments or suggestions since this is the only thing that I need to get squared away before I install more apps(with the possibility and ever present threat of having to re-install something I may have already done)
I could not post this question in the dev section since I do not have enough posts to allow me to.
Thanks
Tina

[Q] Mounting multiple usb drives via hub

So, I have a USB hub and a couple flash drives. Everything "works" fine. I say it like that because the hub functions fine, and the first drive you plug in mounts to /usbdrive just fine. The issue is with the second. When you plug in the second drive, Android sees it in /dev/block as sdb1, and using the Terminal app I can manually mount the drive and use it.
Ideally though, it'd be nice if there was a way for Android to see the second drive and automatically (dis)mount it to something like /mnt/sdcard/external. Is this something that can be configured in the system?
What about the way Android detects and mounts an initial flash drive currently? Does anyone have any knowledge of how that's working currently? Perhaps that could just be duplicated to work with a second one?
This might help.
http://forum.xda-developers.com/showthread.php?t=952456
I'm not sure that's quite right. From what I'm seeing, that tool is designed to let you mount existing media on your device in a way that makes it available to a PC. I'm just wanting the tablet to mount a second USB drive so that it's available on the device itself.

[Q] File transfer USB <> Phone

Did anyone manage to hook the TF300 up with a SD card in another Android device (phone)? This should not be to hard right? What I've tried:
1. Connect phone’s USB cable to TF300 dock’s USB port
2. Choose Disk Drive mode on phone… FAIL!
The tablet won’t recognize the phone as a storage device. Presumably because it is not set as a storage device right away while you plug it in (like when connecting a SD-card reader first, and putting in the SD-card afterwards). Is there a solution to easily transfer files (music) between tablet and phone with the use of USB?

[Q] Obtaining Volume Labels from Block Devices?

Hey all, I have a quick query based on the following scenario:
My device is an OUYA with XBMC/SPMC installed. Connected to the device is a USB hub and connected to that Hub are two USB Vantec Nexstar dual-bay hard-drive docks. Each dock contains two NTFS formatted drives. My OUYA is rooted and I am using ParagonNTFS to mount the USB devices.
ParagonNTFS mounts the first drive to /sdcard/ParagonNTFS, the second to /sdcard/ParagonNTFS_1 and so forth. The problem is that which drive comes first, second and so forth sometimes changes, probably due to the order in which the OUYA and Linux detect each drive and assign it an entry in /dev/block
I would like to write script or application that mounts the devices using their associated volume label but I am having some trouble locating the tools to extract the volume label. It seems that the standard linux tools for doing so are not included with Android?
Does anyone have any experience or ideas about how I could obtain the volume labels from within a shell script? Ideally I would like to write a shell script that processes everything in /dev/block, determines if it is a volume and mounts it to something like /sdcard/<VOLUMELABEL>

Flash Support for Non-Supported USB OTG Devices

Noobie question here. Is there any way to transfer files to and from directly to flash if the phone you have DOES NOT have USB OTG support? No PC in the mix, just a flash, cable adaptor and phone itself. If so, is it possible to do it without rooting? I've tried the PNY Duo-Link as well, without success (r/w from the laptop, phone does nothing). See I prefer to have the flash as my main datastore, independent of internet transfer and local to the PC, laptop, phone, etc.
Recently purchased a Verizon LG Transpyre, Model Number: VS810PP. The closest solution I've found is WiFi File transfer. However, I want to take the PC out of the equation (don't run M$) for the driver:
http://androidxda.com/download-lg-usb-drivers
Any help would be appreciated, maybe I should have gone the Moto E?
Wifi File Transfer does require not only Mobile Hotspot, but Mobile data too ;( You get an ugly Verizon subscription message with Mobile data even though you want to tranfer from YOUR PC to YOUR flash. Still a lot of hassle to go through though all you want is a non USB OTG phone to flash.
I can use bidirectional transfers via a miniUSB to USB cable on the Transpyre, but the flash isnt there. Had a talk with Sandisk technical support about non USB OTG solutions they may have for file transfers. Basically with OTG (MTP) only Microsoft supported scenarios work to a PC, there are no flash options and to to try Amazon. Bottom-line is, according to them, is if you have a non USB OTG phone, your only option is a SD option.
I just like everything I have on one media i.e. not multiple, SD, CD, flash etc. On top of that I want a bootable media. What would fit the bill would be a male SDmini cable into the phones slot to a female USB adapter for the flash drive, I dont think thats possible. So, some sort of SD adapter for the non USB OTG device is all I can come up with. What do others use for their main bootable datastore media for the phone, PC, Stereo, etc. i.e. the flash drive, SD, SD to USB adapter, DVD, etc.? Or should I just throw the phone and get a USB OTG one
Now the question is bootable SDCard vs USB for all around bootable media for storage to any device. This is what I did, almost there...
Bought a neat little kit from Walmart, Mobile Junkie's 3-in-1 mobile Kit. Basically, I took it's miniSD stuck it in my phone. I can use a miniUSB toUSB cable to the PC and pull the miniSD when I want and slide it into the kit's USB for the PC or booting. Getting close to all the functionality I want other than it's a pain to open up the phone and the bootable USB image I have did not work on the miniSD. The kit also has a regular SD, i.e. miniSD > USB > SD. Not sure if this type of USB/miniSD connection is bootable. But I think all I need to do is create a bootable to the miniSD from the PC.
Any experiences out there between bootable USB's vs SD's?
Conclusion - I'll never buy a phone again without USB OTG support.

Categories

Resources