Mount DCIM from OTG? - Google Pixel 2 Questions & Answers

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].)

Related

[Q] fake a sdcard device with a loopback device

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 :-(

[App-Idea] Manage external NTFS drives with GUI

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

Cannot access internal or external storage...

Hi,
Did a search but could not find anything like this.
Problem with my new Gemei G9T Android 4 Tablet. Until 3 nights ago it functioned normally, but 2 days ago I switched on and there was a problem accessing storage. File Browser and ES File Explorer cannot access internal SD, nor can QuickPic, MoviePlayer, or Music. Icon continuously shows ‘preparing SD card’. Settings accesses most functions, except ‘storage’ and ‘developer options’ which cause it to freeze. Tried factory reset – did not work. Most apps work fine, but not Camera or Gallery. Cannot access external SD or USB storage, or connect to laptop. Entering sleep mode causes power off. Normal powering on and off now require two presses with time gap between. All of these functions were fine previously. Have you any suggestions, please?
Brian44 said:
Hi,
Did a search but could not find anything like this.
Problem with my new Gemei G9T Android 4 Tablet. Until 3 nights ago it functioned normally, but 2 days ago I switched on and there was a problem accessing storage. File Browser and ES File Explorer cannot access internal SD, nor can QuickPic, MoviePlayer, or Music. Icon continuously shows ‘preparing SD card’. Settings accesses most functions, except ‘storage’ and ‘developer options’ which cause it to freeze. Tried factory reset – did not work. Most apps work fine, but not Camera or Gallery. Cannot access external SD or USB storage, or connect to laptop. Entering sleep mode causes power off. Normal powering on and off now require two presses with time gap between. All of these functions were fine previously. Have you any suggestions, please?
Click to expand...
Click to collapse
Try to take out your SD card and put it in a Card reader, remember to do it while your device is off or unmount it from memory settings, try to swtich on your device later and connect it to your computer and check if it connect through USB or not.
Try some system tools?
Brian44 said:
Hi,
Did a search but could not find anything like this.
Problem with my new Gemei G9T Android 4 Tablet. Until 3 nights ago it functioned normally, but 2 days ago I switched on and there was a problem accessing storage. File Browser and ES File Explorer cannot access internal SD, nor can QuickPic, MoviePlayer, or Music. Icon continuously shows ‘preparing SD card’. Settings accesses most functions, except ‘storage’ and ‘developer options’ which cause it to freeze. Tried factory reset – did not work. Most apps work fine, but not Camera or Gallery. Cannot access external SD or USB storage, or connect to laptop. Entering sleep mode causes power off. Normal powering on and off now require two presses with time gap between. All of these functions were fine previously. Have you any suggestions, please?
Click to expand...
Click to collapse
I'm guessing databaiz's suggestion to take out the card isn't an option because it's the internal sd card, right? If so, for the one-in-a-million chance that the external card is screwing with the bus, I'd take the external card out and reboot anyway, just to make sure; if it works OK then, I would check the external card as databaiz suggests. But assuming it still doesn't work, next question is, do you have a terminal app installed? Please try the 'mount' command and let us know what you see. One other question, will it still go into fastboot mode? Can you see it from your computer when in fastboot mode (the details of how to do this depend on whether you have windows or linux/macOS - I can maybe help with the latter, but not the former).
It could be bad card
It could be bad card.... Remove and test in card reader...
cannot access internal or external storage
Thanks guys, I have been booting without external memory, with problems still the same. So, cannot be problem with external SD.
The internal SD card is not accessed properly. When I go to settings>Apps>All, the line at bottom shows Internal storage 4.1 MB used, 798MB free. (I have uninstalled most apps to see if that helped – it did not.) So, something is accessing the internal SD, also apps are running which must be off the internal SD.
I do not know what a terminal app is, Urilabob. I have downloaded it but what do I do with it?
At: [email protected]:/ $ I keyed in # mount [enter] , making:
[email protected]:/ $ # mount [enter]
But nothing happened, just another line of: [email protected]:/ $
Also, what is fast boot mode – this is not the same as sleep mode? This is all new to me. Appreciate your help.
My laptop is Windows 7.
Brian44 said:
Thanks guys, I have been booting without external memory, with problems still the same. So, cannot be problem with external SD.
The internal SD card is not accessed properly. When I go to settings>Apps>All, the line at bottom shows Internal storage 4.1 MB used, 798MB free. (I have uninstalled most apps to see if that helped – it did not.) So, something is accessing the internal SD, also apps are running which must be off the internal SD.
I do not know what a terminal app is, Urilabob. I have downloaded it but what do I do with it?
At: [email protected]:/ $ I keyed in # mount [enter] , making:
[email protected]:/ $ # mount [enter]
But nothing happened, just another line of: [email protected]:/ $
Also, what is fast boot mode – this is not the same as sleep mode? This is all new to me. Appreciate your help.
My laptop is Windows 7.
Click to expand...
Click to collapse
Sorry, I replied earlier but it seems I messed up so the reply didn't appear.
My problem is I know unix fairly well, and android is very similar, so I forget what is the same and what's different. Sorry, the command you need in the terminal is "df". That will show you a list of what partitions are mounted on your system. I'm guessing you're going to see /system, but not /mnt/sdcard. Why, I don't know. It's possible that the sdcard partition has got corrupted - but suspicious that the external card is also having problems. Is it possible that either the tablet or your pc crashed while you were copying files between them? Or that you disconnected the cable between them before telling the tablet to go out of connected mode? Either of those could explain corrupted partitions. Unfortunately fixing them may not be easy.
There are three different ways to connect your tablet to a computer. One is so it looks like external disks. I got the impression you already discovered this, and that it has now stopped working. The other two require you to install (parts of) the android development system on your computer. The simplest one is adb mode. Please google it to see how to use it. This might give you a chance to check the state of your partitions. The other is in fastboot mode. Fastboot mode is an alternative way of starting your computer, that goes into a fairly bulletproof, but very simple, mode that allows you to do various things on your tablet (it gives you very low level access to the tablet - powerful but dangerous). I'm pretty sure it will still be working. How you get into fastboot mode depends on your tablet; you'll need to google it. And how you access it in fastboot mode is fairly different on windows. So I'm not the best adviser. But please be careful - it's easy to brick the tablet in fastboot mode, you need to make sure you completely understand any steps you might take, especially any that might write to the tablet (of course, reading from it is safe). And of course the simplest alternative is simply to completely reinstall the tablet (sorry, I forget the android term for this). That should restore things OK, but it will mean you lose all your data and will have to reinstall all your applications.
cannot access internal or external storage
urilabob said:
Sorry, I replied earlier but it seems I messed up so the reply didn't appear.
My problem is I know unix fairly well, and android is very similar, so I forget what is the same and what's different. Sorry, the command you need in the terminal is "df". That will show you a list of what partitions are mounted on your system. I'm guessing you're going to see /system, but not /mnt/sdcard. Why, I don't know. It's possible that the sdcard partition has got corrupted - but suspicious that the external card is also having problems. Is it possible that either the tablet or your pc crashed while you were copying files between them? Or that you disconnected the cable between them before telling the tablet to go out of connected mode? Either of those could explain corrupted partitions. Unfortunately fixing them may not be easy.
There are three different ways to connect your tablet to a computer. One is so it looks like external disks. I got the impression you already discovered this, and that it has now stopped working. The other two require you to install (parts of) the android development system on your computer. The simplest one is adb mode. Please google it to see how to use it. This might give you a chance to check the state of your partitions. The other is in fastboot mode. Fastboot mode is an alternative way of starting your computer, that goes into a fairly bulletproof, but very simple, mode that allows you to do various things on your tablet (it gives you very low level access to the tablet - powerful but dangerous). I'm pretty sure it will still be working. How you get into fastboot mode depends on your tablet; you'll need to google it. And how you access it in fastboot mode is fairly different on windows. So I'm not the best adviser. But please be careful - it's easy to brick the tablet in fastboot mode, you need to make sure you completely understand any steps you might take, especially any that might write to the tablet (of course, reading from it is safe). And of course the simplest alternative is simply to completely reinstall the tablet (sorry, I forget the android term for this). That should restore things OK, but it will mean you lose all your data and will have to reinstall all your applications.
Click to expand...
Click to collapse
Thanks, Urilabob. The command df had an effect!
Shows Filesystem with figures for Size, Used, Free, and Blksize (4096), next to each of the following:
/dev, /mnt/asec, /mnt/obb, /system, /data, and /cache. The figures are all different except Blksize.
/mnt/sdcard is not shown.
Does this tell you anything useful?
I have never been able to access the tablet from my laptop with Windows 7. My son’s laptop has an earlier Windows, so I checked today and found that his Windows Explorer finds the tablet (as 2 disks, A and F) and asks “Please insert a disk into Removable Disk H:” (and same for F.
By the way, this problem started when I downloaded the (automatic) firmware update direct to the tablet, not via laptop. But the wifi signal was weak, and files may have been corrupted. I have since downloaded the complete, latest firmware to the laptop (with strong wifi signal), but do not know how to get it into the tablet!
Have not yet done anything on adb or fastboot modes. Will Google adb tonight.
Not worried about losing data or apps.
Thanks again, Brian.
I'm guessing that your tablet is rooted? If so, do you have an app like superuser? I remember having to go through some options to give my file explorers access to my SD card. You may have accidentally set you SD card to be off-limits or something. If you haven't already done it, see if giving an app like ES File Explorer superuser access will help.
Also see if you can enable USB debugging. For my nook color, I have to enable in order to access usb mass storage for one of my memory units. See if you can access your internal SD card content through USB debugging.
cannot access internal or external storage
SacTappingUni said:
I'm guessing that your tablet is rooted? If so, do you have an app like superuser? I remember having to go through some options to give my file explorers access to my SD card. You may have accidentally set you SD card to be off-limits or something. If you haven't already done it, see if giving an app like ES File Explorer superuser access will help.
Also see if you can enable USB debugging. For my nook color, I have to enable in order to access usb mass storage for one of my memory units. See if you can access your internal SD card content through USB debugging.
Click to expand...
Click to collapse
Thanks for your thoughts. My tablet is not rooted. And I cannot enable USB debugging, because Settings freezes when I tap Developer Options to get to USB debug. I am just learning about Android - seems to be 2 partitions on the internal storage, one about 2.6GB with apps and other things on (which is accessible), and the other partition must be about 13GB, but has not been accessible since the automatic firmware update.
Sounds like the update caused you issues. If you have everything backed up with your Google account I recommend that you do a factory data reset and see if that fixes your issue.
cannot access internal or external storage
MissionImprobable said:
Sounds like the update caused you issues. If you have everything backed up with your Google account I recommend that you do a factory data reset and see if that fixes your issue.
Click to expand...
Click to collapse
Factory reset would be great, if it worked, but it does not function.
Can you exchange the device?
Brian44 said:
Factory reset would be great, if it worked, but it does not function.
Click to expand...
Click to collapse
OK, so from your df listing, it's clear that sdcard is not getting mounted. That's a pretty low-level function that is failing. The fact that factory reset also doesn't work suggests (doesn't prove) that the sdcard partition at least has a corrupted filesystem, and quite possibly the partition itself has been corrupted. Could a spotty OTA update do that? I'm surprised - I would have thought they would use fairly high level functions for OTA updates, precisely because any drop-out could cause corruption if you use low-level disk access. But who knows - the mysteries of google? Another possibility is that the sdcard is physically bad, and maybe the update just caused you to get into the bad region (with the dynamic memory mapping in flash memory, once something goes wrong it's almost impossible to figure out what). At this point, I'd be going back to the distributor if possible (you said it was new, right)? I think even if you were an android guru, and knew exactly how to do a complete rebuild from scratch, you would be risking that the device itself is faulty - and that the rebuild would mean you couldn't prove that the device was at fault (rather than your rebuild)...
Best Wishes
Bob
cannot access internal or external storage
urilabob said:
OK, so from your df listing, it's clear that sdcard is not getting mounted. That's a pretty low-level function that is failing. The fact that factory reset also doesn't work suggests (doesn't prove) that the sdcard partition at least has a corrupted filesystem, and quite possibly the partition itself has been corrupted. Could a spotty OTA update do that? I'm surprised - I would have thought they would use fairly high level functions for OTA updates, precisely because any drop-out could cause corruption if you use low-level disk access. But who knows - the mysteries of google? Another possibility is that the sdcard is physically bad, and maybe the update just caused you to get into the bad region (with the dynamic memory mapping in flash memory, once something goes wrong it's almost impossible to figure out what). At this point, I'd be going back to the distributor if possible (you said it was new, right)? I think even if you were an android guru, and knew exactly how to do a complete rebuild from scratch, you would be risking that the device itself is faulty - and that the rebuild would mean you couldn't prove that the device was at fault (rather than your rebuild)...
Best Wishes
Bob
Click to expand...
Click to collapse
Thanks, Bob for all your help. This seems like the end of the line with this tablet. I expected this might be the case, and emailed DinoDirect two days ago for a refund, as I am heading overseas next week and want to resolve the matter before I go. They responded that "we will contact our related department to process your case priority". I have been aware that any actions I might take could invalidate the warranty, and this has inhibited me a bit. I will forward your latest comments in support of my refund claim.
I learned some basics of Android from all this!
Good wishes, great talking to you.
Brian
Just for a great justice :victory:
Got same bug on my Gemei G6, guess it hapens after i connect dc cabel to a fully charged pad that was charged in off mode and turn on. So i just download last firmware fro Gemeitech.com, unzip it on SD card and tnen turn on pad with pressed Home and Power buttons that must be pressed untill robot with green rotating belly appears what mean start of flashin` Thats it.
Got the same issue in Huawei Ascend P-7, I just switched off the mobile, removed the SD card and turned it back on after 5 minutes ....... and that was it, all issues resolved. Just the thing was that once SD card was re-inserted, problem came up again. So i have decided to copy SD card data to PC via Card Reader and format it or get new SD card

Binding Directory breaks Gallery & Mod Vold.fstab loses symlinks

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.

Filesystem is virtualized, I think. But not correctly.

I have an Alcatel One Touch Fierce 2, and it's not great. But it's working, mostly.
It sometimes reboots spontaneously. heh. A known problem with this one.
Android 4.42.
I migrated to it mostly using the google backup and with the SDCARD from the old phone.
One annoying problem I have is when I plug it into my computer, and the USB mounts.
My pictures do not mount.
I do get a pictures DCIM folder that mounts, but it's on the SDCARD and it contains pictures that predate this phone.
The pictures in the current phone do not mount, nor are they browsable from the computer.
So I can't get the pictures out of the phone without emailing them to myself.
If I start Gallery I have two camera items, one old and one new.
One has a camera icon and contains only old pictures. It's the one on the SDCARD.
The one that mounts when I connect it to a computer and enable USB storage.
The other has a folder icon and contains current pictures. It's the one in the internal memory.
That one does not mount when I connect to USB and enable USB storage.
It did mount and work fine on previous phones with previous android versions. But not anymore!
I think that is backward. And the problem.
The current camera app should be saving on the SDCARD, but it's not.
The funny thing is I don't have a camera APP in the APP list. And if I start the camera APP, and then press menu to go back to the home screen leaving the camera running and then start Advanced Task Killer Free no app named camera is in the list of killable tasks.
The camera app works with facebook, meetup, and gallery, but why doesn't it appear on the list?
Is the camera a kernal module now? Maybe.
Something has become scrambled in the file system on this phone, and I badly want to fix it.
It seems like it's a virtualized filesystem.
And something is just not exactly right.
I did get another SDCard and format it, and I transferred stuff from the old card to the new one as someone suggested before.
As I thought then, that was grasping at straws. None of that is the problem.
The problem here is the virtualized filesystem. And that the KitKat version does not seem to try to use the SDCard much, which is why lots of people run out of storage.
Any ideas?

Categories

Resources