Yesterday I decided to fix the internal front speakers of my "HTC Desire Z" (aka. G2). While I was able to fix them, I broke the connector for the microSD slot (tjworld.net/attachment/blog/htc-desire-z-tear-down/IMG_0244-small.jpg, the left one). After trying to fix it for several hours, I gave up. It isn't in the scope of my hardwareskills :-(
Well, since I have like 600mb left on /data and my device is rooted, I tried to find a software solution i.e. "emulate" a SDcard device (because many applications require one to work properly, e.g. the camera app). I found here android-x86.org/documents/sdcardhowto a description how to create a vfat image and mount it as loopback.
While this is exactly what I want, I don't get it to work:
I don't know how to modifiy /proc/cmdline, or
how the entry in /etc/vold.fstab should look like.
dev_mount sdcard /mnt/sdcard auto /data/sdcard.img didn't work for me. according to logcat, I have this version: I/Vold ( 2368): Vold 2.1 (the revenge) firing up
btw, just mounting the loopback device to /mnt/sdcard didn't work too. For example, the camera app still claims there isn't a SD card inserted.
I also posted this question to stackoverflow: stackoverflow.com/questions/8476282/fake-a-sdcard-device-with-a-loopback-device-on-android
PS: unfortunately, I'm not allowed to post URLs :-(
Related
Hi
I am getting an error mounting sdcard2. Is there some setup needed for it to be mounted or is it automatic after insert?
thanks
odd...I'm having the same issue but in status, its showing No SD Card. I popped in two working microSD that was used on my rooted G1 and both show up fine when I plug it and turn on my old G1 phone....any suggestions or did i get a bad G Tablet
Assuming you are using TnT (Lite), it should be automatic. I have a 32GB microSD and it is seen on boot, and I can remove and reinsert with no issues.
We know that VOLD mounts the device, and that there's something in the framework that controls this. gojimi managed to replicate this in the VEGAn build, for example.
As to why your cards aren't working, the only things I can think of that either the GTab is finicky with certain cards, or that it's not formatted as FAT32. I'm going on the assumption that the former is more likely.
If you have access to ADB, you might want to look into the logcat logs to see if there are any errors when the device is inserted.
hmm wierd. i was using zpad and did not see an option to mount the card. i changed to tntlite now i can mount and see it.
Hey,
Since we still don't have any good tool to use to mount NTFS external drives 'like a boss', so i think someone with proper skills could do it. It actually doesnt requires alot - it could work similar to MTP app.
Application would work as serivce (etc. dunno how it exacly would work becouse i in fact have never programmed for android) and when it would see that some external device is pluged in (and it's described as 'clean/to wipe' (NTFS)) it could pop up in notification bar just like MTP app does. When clicked on it - a real app would appear with some options.
There should be select box with /dev/block/sda1 (if found) as default and others /dev/block/sda* if also found, becose as some1 stated not every device will appear as sda1 (dunno if true, but still)). and under it a button. If it would not be mounted yet, it would be "Mount ext drive now" and it would just use
Code:
ntfs-3g [selected_above] /mnt/sdcard/usbStorage/
and if it would be already mounted, there would be button "Unmount ext drive now" which would do
Code:
umount -f /mnt/sdcard/usbStorage/
Of course app would have to aquire 1-time root to place ntfs-3g/fuse.ko that is needed (dunno which way is better, thats for u to decide).
And in options there could be option to change default folder to mount drive to and some others. Also the app while there is something pluged in would appear in notification bar as 'current runing' just like e.g. Kies Air/MTP with possible status of mounter drive.
I would have done it by now myself but I, as stated before, have never code any android app and it would take me some time for even an GUI of it, and it would be propably couple of minutes for you to do it, as it just executes some commands and install/starts ntfs-3g/fuse.ko
I think many people would be appreciate such app
I have been playing about with Directory Bind, Link2SD, Vold.fstab and init.d scripts for the last week and have observed a few issues. I have noticed every time I swap partitions using a modified Vold.fstab file, Link2SD loses link every now and then. It could happen up to 3 times a day which gets extremely frustrating as I lose all home page settings and widgets and have to redo it all each time. I have noticed that what seems to happen is it automatically unmount the second partition intermittently. When I revert back to the original Vold.fstab, Link2SD works fine.
Next issue is directory bind. I bind /mnt/sdcard/external_sd to /mnt/sdcard and the gallery image viewer does not show images. So I uninstalled directory bind and load a init.d script with sleep 50 and mount -o bind /mnt/sdcard/external_sd /mnt/sdcard and have the same problem. Remove the script and the gallery viewer is fine again.
Now before someone says why not bind just the Android/Data folder, it is simple, I would rather not have the measly 1gb internal storage and have the internal sd/external SD rubbish and just have one big Sdcard mount/storage to make things easier and simpler for me, not to mention the fact that little things like that bothers me.
Now I refuse to believe that I am the only one experiencing this issue and would like to hear if others are having similar issues or what they did to resolve it. I would prefer to use the script method rather than Vold.fstab or DirectoryBind method because at least that seems to resolve the loss of symlink issue with link2SD. Any help or suggestions welcome.
Problem still remains and I now have the additonal problem of losing the bind automatically. Same happened when I was using ditectory bind app. There seems no way without problems to increase useable storage on this phone.
So I was wondering for a while why I couldn't do symbolic links and how in the world the fs was case insensitive. I looked in the mount list for something else and noticed that the "sdcard" was being mounted as vfat, not EXT4. I thought that even stock was supposed to have switched over amd that this was part of the whole point of the swtich to the MTP USB connection rather than UMS? Is there any particular reason it is on vfat? Is there any way I can switch without reinstalling from scratch? Even if it's not any faster, there are times when I want symbolic links, journalized writes, and etc that EXT4 does. Or am I just completely missing something?
On my original pixel phone I was able to bind DCIM to my sdcard OTG adapter which was really useful when recording video as 4K content will fill up storage quick. I would set this up from running the following command after connecting the adapter.
Code:
mount -o bind /mnt/media_rw/*adapter name*/DCIM /data/media/0/DCIM
This no longer seems to work with the Pixel 2. Now if I run the above command I can see the mount working in /data/media but the /storage/emulated directory still shows the old DCIM setup and recording with the Google Camera app still writes to the phone's internal storage.
I have also tried the command pointing to
Code:
/storage/emulated/0/DCIM
and
Code:
/sdcard/DCIM
as well remounting /data, /data/media, /storage, /storage/emulated (which throws the error "mount: '/data/media'->'/storage/emulated': Invalid argument").
None of these things have worked. I figure something has changed with the way the Pixel 2 handles the filesystem.
Is there anything I'm missing or has anyone had any luck trying this?
Hoping there is still a way to achieve this since Google seems to vehemently hate sdcards now and as nice as the unlimited Photos backup is, it's useless if I run out of space before I can do a backup (which has happened to me quite a few times at concerts). I would like to not have to use another camera app to use the sdcard as none of them seem to keep the stabilization of the Google camera app, but I am aware that it is an option.
Thanks.
Have you tried (in English, not Linuxese) mounting the OTG adapter's picture directory to /data/media/0/DCIM? If /data/media/0/DCIM is mounted, maybe you can't change it, but maybe you can mount a directory on it - like Camera or Stick? Then point the camera at that directory? (I'm guessing a bit here, because my 2 doesn't arrive for another 2 days, and I'll be busy TWRPing it, rooting it and backing it up before I play with Terminal [which probably won't even be installed until the day after - I have "a few" apps to install, and a Bluetooth car audio to get the phone working on first].)