Currently, the /sdcard folder is pointing to the phone memory. My external card is mounted as /sdcard/external_sd
The problem with the above structure is that all the stuff that should be stored in the actual sdcard is stored in the memory.
I am sure there is a way to mount the external sdcard as /sdcard in the system through shell commands. Can someone help me with this?
Thanks.
1. I believe you need root in order to manipulate mounting points...
2. Be careful manipulating mount points as this may break aps looking for data in the /sdcard mount point...
YMMV
Chinook Pilot said:
1. I believe you need root in order to manipulate mounting points...
2. Be careful manipulating mount points as this may break aps looking for data in the /sdcard mount point...
YMMV
Click to expand...
Click to collapse
1. I am rooted.
2. Well, I want to change the /sdcard mountpoint to the actual sdcard. I don't think this should break anything. I am not sure about the syntax, that is why I am asking.
Mount
Here's a link to the man pages for the mount command. I'm not running a stock kernel so my mount points and fstab aren't generic to the stock e4gt... Basically you need to umount both and the mount where you wish them to point... Good luck...
http://linux.die.net/man/8/mount
Related
I'm having trouble getting the mount command to work on my desire.
Everytime I try I get this.
# mount image.img abc
mount: can't setup loop device: No such file or directory
#
Any one had any luck getting this to work?
Thanks.
what are you trying to mount?
I was trying to mount a Debian image, but then I had another idea.
If I mount a folder from sdcard onto a read only folder, ie system, I then have write access to that location (kind of), trouble is all the files have gone and everything goes tits up, so I backed up contents of system to sdcard then mounted the backup to /system, but because its a different filesystem all the permissions are lost and things go tits up again. I think what I need to do is make an image of dev/block/mtdblock3 aka system on sdcard and mount it to /system. Then I can rw in system...
Or have I got the wrong end of the stick, gone in way beyond my understanding and made myself look stupid?
Hi.. how i can mount/remount sdcard in console? because something is wrong.. in every roms when i goes to sdcard in setting its show unavailable.. once time ago i wrote something in console as remount and it was okey.. but i forgot it how i can do that.. i tried many combination of command mount but nothing. maybe i can find in google with keyword "mount/remount in linux" can be possible?
but through astro i can explore sdcard.. its strange..
please help. And thanks for answers
Code:
mount /dev/block/mmcblk0pN /sdcard -t FSTYPE
N is number of partition (usually 1) and FSTYPE is vfat or ext2 (usually vfat)
Google is a good help so please use it!
i look on mount and sdcard is mounted.. but still i cannot explore it with anything except astro.. i think maybe is problem in kernel.. i have last kernel version... working sdcard full for everyone? maybe is problem only in my phone.. or its global error
Sd card works in latest kernel, probably is your problem, reformat the card.
Try this:
vdc volume mount /sdcard
I am having problems with clockwork recovery.
When I open I get:
E:Can't mount /dev/block/mmcb1k0p2
(File exists)
E:Can't mount CACHE:recovery/command
E:Can't mount /dev/block/mmcb1k0p2
(File exists)
E:Can't mount CACHE:recovery/log
E:Can't mount /dev/block/mmcb1k0p2
(File exists)
I am running stock un-rooted, s-off. I ran OTA.
I know exactly what the problem is. My internal storage of my phone wont mount.
I have read a lot of things on how to mount your internal storage. A lot of people say you just have to reboot your phone.
That didn't work.
I know the problem is defiantly not the SD card. I tried 5 different ones.
I read somewhere to remount internal storage you have to take phone apart and put internal storage chip back in.
I can't format internal storage, because it is grayed out in the option under SD card setting.
What can I do. I think I have tried everything?
Please help.
cubusmybro said:
I am having problems with clockwork recovery.
When I open I get:
E:Can't mount /dev/block/mmcb1k0p2
(File exists)
E:Can't mount CACHE:recovery/command
E:Can't mount /dev/block/mmcb1k0p2
(File exists)
E:Can't mount CACHE:recovery/log/block/mmcb1k0p2
E:Can't mount /dev/block/mmcb1k0p2
(File exists)
I am running stock un-rooted, s-off. I ran OTA.
I know exactly what the problem is. My internal storage of my phone wont mount.
I have read a lot of things on how to mount your internal storage. A lot of people say you just have to reboot your phone.
That didn't work.
I know the problem is defiantly not the SD card. I tried 5 different ones.
I read somewhere to remount internal storage you have to take phone apart and put internal storage chip back in.
I can't format internal storage, because it is grayed out in the option under SD card setting.
What can I do. I think I have tried everything?
Please help.
Click to expand...
Click to collapse
Hi,
I don't understand how you can be running unrooted but using cwm?
But I'll guess you are rooted and having problems mounting /cache (dev: /dev/block/mmcb1k0p2) which is an ext3 fs.
I had same messages for the /emmc fs, but that is msdos/fat32, so a slightly different 'cure'.
I used adb shell (or you could use term emulator) to do something like this:
su ; fsck /dev/block/mmcb1k0p2 // look up the correct qualifiers, but I think it'll default to something acceptable. Tell it to repair as needed. Reboot.
For my case I used "fsck_msdos /dev/{whateverThePathWas} and it repaired it and it mounted.
Note: Replacing , replugging the internal storage sounds iffy because all of it is on a single chip which is soldered onto the board. /dev/block/mtd* are only offsets into flash, not anything separate. It seems like more of a format issue or bad blocks.
Good luck
Hashi
PS: Depending on ROMs (I baked my own) , you might not have fsck* but I think you will. Also, some ROMs may use init.d to force an fsck already and this won't work if it did that. Worth a shot.
hachamacha said:
Hi,
I don't understand how you can be running unrooted but using cwm?
But I'll guess you are rooted and having problems mounting /cache (dev: /dev/block/mmcb1k0p2) which is an ext3 fs.
I had same messages for the /emmc fs, but that is msdos/fat32, so a slightly different 'cure'.
I used adb shell (or you could use term emulator) to do something like this:
su ; fsck /dev/block/mmcb1k0p2 // look up the correct qualifiers, but I think it'll default to something acceptable. Tell it to repair as needed. Reboot.
For my case I used "fsck_msdos /dev/{whateverThePathWas} and it repaired it and it mounted.
Note: Replacing , replugging the internal storage sounds iffy because all of it is on a single chip which is soldered onto the board. /dev/block/mtd* are only offsets into flash, not anything separate. It seems like more of a format issue or bad blocks.
Good luck
Hashi
PS: Depending on ROMs (I baked my own) , you might not have fsck* but I think you will. Also, some ROMs may use init.d to force an fsck already and this won't work if it did that. Worth a shot.
Click to expand...
Click to collapse
I kind of have an idea what you mean, but I am just rooted on stock ROM, and I don't think that has fsck, but I don't even know what that is.
I punched in that command into terminal emulator as follows:
#su ; fsck /dev/block/mmcb1k0p2 //
#
All I got in return was a hash, I rebooted, and problem wasn't fixed yet.
I am also not sure what you mean by, "look up the correct qualifiers."
fsck: permission denied is what I get when I just type that in.
Thank you. I think that I am on the right track.
So I found a million threads asking about why they can't ln -s or mount the /mnt/extSdCard to /mnt/sdcard or various forms of that. The motivation here is to allow certain apps that can't get about /sdcard/ to be able to see the additional 64GB of SDHC.
What helped was this realization that the android mount command supports bind and one of a few dozen other threads, mostly this one:
http://forum.xda-developers.com/showthread.php?t=1825494
So it appears there are a half dozen ways to make mounts, from using /dev/block/vold/179:97 to using the vold.fstab which mentions a serial or parallel sdcard scheme, which they chose parallel, to all these init.rc monitoring scripts that have to unmount on USB mode, and crazy stuff and a million Directory Bind apps, and int2SD binder / linker apps. It appears this app might do what I am suggesting but I don't think /emmc/ works anymore and I haven't looked into the .apk.
Ok....
1) ODIN over a root injected stock ROM, or otherwise get root.
2) (A) Get yourself any Terminal program like Terminal Emulator and if you are smart you will also get Hacker's Keyboard.
or
2) (B) From any of the programs that will run scripts, you can just make a script.
3)
Code:
$ su -
# mkdir /mnt/sdcard/external
# mount -o bind /mnt/extSdCard /mnt/sdcard/external
Now you can name it whatever you want but since the home is /sdcard/ it has to be under that.
Or, instead of mounting the whole thing, just mount Movies and Music directory
Code:
# mkdir /mnt/sdcard/Music/extMusic
# mount -o bind /mnt/extSdCard/Music /mnt/sdcard/Music/extMusic
Etc.
Now for those wanting to make a script or app to sell for $1.99... There may be real problems depending on where a backup program chooses to backup and it could be recursive.
And just FYI, this ends up inheriting all the same properties from the extSdCard mount params,
ie. /dev/block/vold/179:97 /mnt/sdcard/Music/extMusic vfat rw,dirsync,nosuid,nodev,noexec,relatime,uid=1000,gid=1023,fmask=0002,dmask=0002,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
Any mounted directory all look identical in mount and the vold must map them out.
Anyways you can write a simple script and hopefully you are mindful of any backups you do if you save backups to the external sdcard and you mount the entire thing. The safest way would be to mount one directory to transfer files or only mount the large media.
It also means you could copy everything from /sdcard/Music to the external and then mount /sdcard/Music to be a directory on the external card. You could remove the ext SDHC and copy files that way and have everything in one place and not worry about wiping it out.
However, I have benchmarked the internal SD appears to be faster on bandwidth benchmarks versus an external Class 10/UHS. On the stock rom the internal is also fuse versus fat32 for the external SDHC (or exFAT for a SDXC card). There is also something in the SD2.0 spec about the 2nd SD only one can have a higher clock bandwidth.
Types in step 3 exactly. But nothing happened
Sent from my SGH-T999 using xda app-developers app
fateownzyou3 said:
Types in step 3 exactly. But nothing happened
Click to expand...
Click to collapse
Did you get an error? There is no output of mount unless there is an error.. Did you look in a file browser to see if that folder is now mounted? This only works until reboot, until someone makes an app or script.
Hi,
@joederp thank you very much ! Your tip in so usefull to me with my galaxy note on CM10 ParanoidAndroid ROM.
The only thing I try now to get work is : automaticaly run the script at phone boot. I'm pretty sure I can get it with Tasker, but did not find the trick.
Just use the directory bind app... It works fine on my galaxy tab 2 7.0
Sent from my SGH-T999 using xda premium
Directory bind is a whole different thing that uses CPU and monitors the system and does who knows what.
You can just use any scripting program or I think edit init.rc and add the extra mount commands. copy init.rc to a .bak and edit it.
Thank to all of you !
I found something more appropriate to my needs in this thread : http://forum.xda-developers.com/showthread.php?t=1593615
Anyway thanks
While in Kids Mode, my four-year old outsmarted the security software (not hard to do - kid's security sucks. I'm constantly finding him going where he shouldn't) and reformatted the SD card in his SM-T2105 . I managed to restore the files using PhotoRec, but it dumped the files into directories of like file types - i.e. .jpg's, .pdf's, .icn's etc. Would anyone be willing to share their SD card directory structure so I can recreate his as best as I can? I realize each one will be different, but it'll help. I promise to periodically backup the card from now on.
Also, I've found plenty of questions regarding how to move apps to the SD card, but so far have not found any solutions that work. I'm getting the message "Insufficient storage available" and he doesn't even have that many apps installed. He also has a 16G card that is mostly empty. The inability of the Samsung SM-T2105 to move apps to external storage is bewildering considering the pitifully poor space available.
Thanks.
ChipStewart said:
While in Kids Mode, my four-year old outsmarted the security software (not hard to do - kid's security sucks. I'm constantly finding him going where he shouldn't) and reformatted the SD card in his SM-T2105 . I managed to restore the files using PhotoRec, but it dumped the files into directories of like file types - i.e. .jpg's, .pdf's, .icn's etc. Would anyone be willing to share their SD card directory structure so I can recreate his as best as I can? I realize each one will be different, but it'll help. I promise to periodically backup the card from now on.
Also, I've found plenty of questions regarding how to move apps to the SD card, but so far have not found any solutions that work. I'm getting the message "Insufficient storage available" and he doesn't even have that many apps installed. He also has a 16G card that is mostly empty. The inability of the Samsung SM-T2105 to move apps to external storage is bewildering considering the pitifully poor space available.
Thanks.
Click to expand...
Click to collapse
I would like to Bump this I to have a T2105 I do not have the ability to move any apps to SD it is very frustrating.
---------- Post added at 12:43 PM ---------- Previous post was at 12:23 PM ----------
I received the following from generous fellow user @SGTDude about moving apps to sd. I haven't had time to test it, but I thought I would share it with you guys.
Quote:
Repartition the SD card with two primary partitions.
Format the first partition as FAT32.
Format the second partition as EXT4
mount the ext4 partition somewhere
mount -o rw,nosuid,nodev,noatime,discard,journal_checksum,j ournal_async_commit,noauto_da_alloc,data=ordered -t ext4 /dev/block/mmcblk1p2 /system/sd
Copy several folders over from /data
mkdir /system/sd/app
mkdir /system/sd/app-asec
mkdir /system/sd/data
mkdir /system/sd/media
cp -rp /data/app/* /system/sd/app/
cp -rp /data/app-asec/* /system/sd/app-asec/
cp -rp /data/data/* /system/sd/data/
cp -rp /data/media/* /system/sd/media/
add the following lines to /data/local/userinit.sh
mount -o rw,nosuid,nodev,noatime,discard,journal_checksum,j ournal_async_commit,noauto_da_alloc,data=ordered -t ext4 /dev/block/mmcblk1p2 /system/sd
mount -o bind /system/sd/app /data/app
mount -o bind /system/sd/app-asec /data/app-asec
mount -o bind /system/sd/data /data/data
mount -o bind /system/sd/media /data/media
Note: *"/dev/block/mmcblk1p2" is probably right on any SGT3 7" running Kids Rom, but I'd double-check if I were you.
Sent from my SM-T210R using Tapatalk
Click to expand...
Click to collapse
I saw this on http://forum.xda-developers.com/showthread.php?t=2548241 but i really don't know how to do what it ask and no one ever confirms if it works. So I am at a loss. I can't reply because I am a newb.