Tell me how the system determines whether the SD card is mounted or not?
I want to mount the SD card manually and without fuss. To do this, I first unmount wherever it is mounted.
umount /storage/0123-4567
umount /mnt/runtime/full/0123-4567
etc
And then everything mounts fine with system namespace.
The problem is that if you unmount the sd card through the phone settings. And then mount it through the terminal, then the system and file managers do not see it. Nevertheless, it is possible to enter it manually through file managers.
The same happens in case of mount errors. The system stops seeing the memory card even if it is actually mounted. How can I tell the phone that it is mounted?
Related
now sure what happened but today i can't write to my SD card. I noticed when one of my backup apps tried to do the backup and it failed because it wasn't able to write to the card. I'm running liquid smooth 3.2 and it was working fine that i noticed. i can read and open things on the card but i can't delete, move, or write on the card. any ideas?
You may want to try to unmount and remount your sdcard. You may also want to reboot just to get things to fall back into place. Do you have any apps that automatically mount or unmount the SD card?
stedrocklp said:
You may want to try to unmount and remount your sdcard. You may also want to reboot just to get things to fall back into place. Do you have any apps that automatically mount or unmount the SD card?
Click to expand...
Click to collapse
tried the restart and even reinstalled the rom with no luck... when i try to unmount sd card it just sits there saying unmounting but nothing happens
tried to just connect to comp for usb storage and seems i can't even do that anymore. maybe the problem is the mounting and unmounting of the sd card now i can't even change to another rom to see if its a rom problem.
Since I'm using a custom ROM that make the External (bigger: 14GB) SD mount as the default /sdcard, and internal (smaller) as /sdcard2 or something I don't really need it and would much rather like to mount it entirely as /data
.. something similar to this script : http://forum.xda-developers.com/showthread.php?t=1716124 except that it "Mounts **/sd-ext** to /data" but I want to mount /mnt/sdcard2 to /data
. How do I do that?
Problems: I've found that Android would neither let that internal partition be ext3 (it switches it back to FAT even if I somehow manage to format it as ext3). Nor would it mount /data to a FAT partition. What can/should I do?
iBrickYouNot said:
Since I'm using a custom ROM that make the External (bigger: 14GB) SD mount as the default /sdcard, and internal (smaller) as /sdcard2 or something I don't really need it and would much rather like to mount it entirely as /data
.. something similar to this script : http://forum.xda-developers.com/showthread.php?t=1716124 except that it "Mounts **/sd-ext** to /data" but I want to mount /mnt/sdcard2 to /data
. How do I do that?
Problems: I've found that Android would neither let that internal partition be ext3 (it switches it back to FAT even if I somehow manage to format it as ext3). Nor would it mount /data to a FAT partition. What can/should I do?
Click to expand...
Click to collapse
you can't
I made an ext3 partition on the SD card so I could move the apps to the SD card. But when I create the mount script, it works after a reboot. I reboot again to find that my ext3 partition hasn't mounted on boot. So I go to Link2SD and it asks to create the mount script again. So what I understand is that the mount script cannot be used during boot. What should I do?
So, I installed CM13 Alpha4 and Enabled Adoptable storage for my card. I downloaded Minion Rush to understand what data it stores on the actual sdcard (sdcard1) vs on the internal storage (sdcard0). The app instead of being on /data is on the external sdcard. All the data the game downloads goes to /sdcard/Android/data which is still about 200MB(Internal Storage). So, apps like WhatsApp, Instagram, etc will create their usual folders on the tiny 4GB Internal storage (sdcard0). On lollipop, I used Foldermount to keep all these folders on the actual sdcard and mount them to internal.
So, I tried the same with Adoptable Storage in the picture. (First I tried foldermount and set up the external card as portable but it failed).
Symlinking wouldn't work as they're different devices. (Or can it?)
The adoptable storage is mounted to /mnt/expand/blablabla/
Using this command to symlink
Code:
ln -s /mnt/expand/99d984f9-04df-445f-992d-abda2b2bcc6a/Mounted /sdcard/Mount
It returns "Function not Implemented".
Then I tried
Code:
mount -o bind /mnt/expand/99d984f9-04df-445f-992d-abda2b2bcc6a/Mounted /sdcard/Mount
and it sorta worked. When in adb shell, cd-ind to /sdcard/Mount, using ls displays all the contents of the folder "Mounted" in the adopted sdcard. However, using a file explorer on the device says the folder is empty. Tried Solid Explorer and ES. Moreover, the folder "Mounted" in adoptable has just one mp3 file and it isn't displayed in the Music app either, after mounting. Creating a file or folder in /sdcard/Mount using ES or Solid, fails. Can anyone help me figure this out, and is this even possible? (Tried foldermount here too. Toggle doesn't go green)
Another thought was to have a sdcard with two partitions. Tried that but when converting to adoptable, It formats to one partition. Is it possible to repartition without losing data after it's formatted as adoptable? It is somewhat possible to read write the card in Linux - Decrypting Android M adopted storage
This is just an idea to make better use of Adoptable storage.
Cheers!
AgentFabulous
Use following to have mixed storage from your external sd card both as adopted and portable storage. This can be done via android terminal app or through adb from your pc.
$ sm list-disks adoptable
disk:179_64
$ sm partition disk:179_64 mixed 75
$
gives me 75% as portable storage.
However I advise a reboot after setting
Hell-o m8s.
It's annoying that some TWRP recoveries (for specific phones) don't mount SD cards properly (actually always)(and for me it's showing both internal&external storage but with the same capacity/empty space and when I select my card it uses the internal storage instead, if you know how to fix it pls tell me).
Anyway here I found how to mount an SD card to a folder in TWRP:
- In recovery mode (TWRP) go to "Advanced --> File Manager" and find an empty folder (you can choose any empty folder you want even in your internal storage) get its name/directory (in my case I used "/sdcard1")
hit back and go to "Terminal" (which is "Advanced --> Terminal")
in Terminal type this command:
mount -rw /dev/block/mmcblk1p1 "/yourEmptyFolder'sDirectory"
example:
mount -rw /dev/block/mmcblk1p1 /sdcard1
if it doesn't work make sure you've entered the correct block of
your SD card (normally the block's name is "mmcblk1p1" but it could be different sometimes) or try mounting the system partition from "Mount"
The folder will be unmounted when you exit/restart TWRP so if you want to use your card in TWRP again type the command again.
(it's not as helpful as it looks, but there are some uses for it like:
copying files from a computer when MTP is not working for some reason or copying files from the internal storage directly to your SD card, and copying backups and ROMs, saving storage...etc.)
BTW you can't Backup your device directly to your card, you'll have to move it to your SD, and if you want to use the backup copy it to your internal storage (in the TWRP folder).
Hope it helped you.