Access to /storage/sdcard0 requires root access - Galaxy Note 10.1 (2014 Edition) Q&A, Help & Troubl

Something strange appeared at my SM-605.
I cannot access /storage/sdcard0 without root any more.
Total Commander shows "Insufficient Memory : rootfs lost on reboot" and mounts this partition every time using mount -o remount,rw -t rootfs rootfs /
The same is for /storage/emulated/legacy and /mnt/sdcard
At the same time accessing using /mnt/shell/emulated/0 works just fine.
Re-creating links in /storage does not help.
/etc/vold.fstab never was modified.
What is going on and how to fix it?

Related

[Q] Different commands for mounting system partition?

Are these the same? Or what am I missing here?
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
mount -o rw,remount /dev/block/stl9 /system
Thanks in advance...
Sorry for the bump, but Guys I ve read a lot of posts about guides and tuts. Thats why I found these two methods, So anyone with a sound knowledge please give me a clarification on this? What is the difference about those?
Where do you want to mount it?
in ADB it's just mount /system. In root explorer it is automatically mounted and you can change between R/O and R/W with a single button.
nagypapi said:
Where do you want to mount it?
in ADB it's just mount /system. In root explorer it is automatically mounted and you can change between R/O and R/W with a single button.
Click to expand...
Click to collapse
Thanks for replying,
I found one in here, the workshop about the ADB
http://forum.xda-developers.com/showthread.php?t=879701
You may need to remount system as writable with:
Code:
mount -o rw,remount /dev/block/stl9 /system
That applies when using chmod as well.
Click to expand...
Click to collapse
mount /system seems pretty self explanatory and I know this guide says "remount" but I am not very clear what remounting Vs mounting the Sys partition means. And why are there two different ADB commands for remounting? Hope you can enlighten me.
Well, I always use adb from the recovery, so the basic mount /system command is enough for me.
But sometimes (depending on the operation) - it requires re-mount. However, I never use the /dev/block/stl9 part, just the mount -o rw,remount /system part, and worked fine all the time.
nagypapi said:
Well, I always use adb from the recovery, so the basic mount /system command is enough for me.
But sometimes (depending on the operation) - it requires re-mount. However, I never use the /dev/block/stl9 part, just the mount -o rw,remount /system part, and worked fine all the time.
Click to expand...
Click to collapse
Okay I got it, Can you also please tell me what is the difference of using ADB from the recovery? I assume that the interference from the other system processes is minimum at the recovery? If so I'd also switch to use ADB from the recovery too.
Well if you are not S-OFF, you can mount the /system partition as R/W only from recovery (phone is not booted).

Symlinks on 101 G9

i tried to make a symlink on my archos but when i tried it gave Function not implemented.
is there a way to implement this function?
Gr.Roymar
roymar said:
i tried to make a symlink on my archos but when i tried it gave Function not implemented.
is there a way to implement this function?
Gr.Roymar
Click to expand...
Click to collapse
Hi
Where are you trying to create these symlinks?
On the A101S you cannot create symlinks in /mnt/sdcard because this is a vfat partition which does not a support symlinking, you also won't be able to make link in /mnt/storage ; /mnt/data ; /storage ; /sdcard ; This is because these are mounted by the sdcard service which is designed to provide a windows friendly fat view onto the file system.
Creating links anywhere else shouldn't be a problem ( depending on the filesystems you are using )
Hope tjhat helps.
trevd said:
Hi
Where are you trying to create these symlinks?
On the A101S you cannot create symlinks in /mnt/sdcard because this is a vfat partition which does not a support symlinking, you also won't be able to make link in /mnt/storage ; /mnt/data ; /storage ; /sdcard ; This is because these are mounted by the sdcard service which is designed to provide a windows friendly fat view onto the file system.
Creating links anywhere else shouldn't be a problem ( depending on the filesystems you are using )
Hope tjhat helps.
Click to expand...
Click to collapse
Thanx for you're answer.
i was indeed trying to make a symlink in /storage because of de maps of the sygic navigator take a lot of room
Greetz Roymar
roymar said:
Thanx for you're answer.
i was indeed trying to make a symlink in /storage because of de maps of the sygic navigator take a lot of room
Greetz Roymar
Click to expand...
Click to collapse
If you after freeing up space, it is still possible with a bit of hacking voodoo . There are 2 ways I know of in fact.
METHOD 1 - SDCARD SERVICE
you can point the /storage ( /mnt/storage in reality ) to any directory you like. I've currently got mine pointing to an multi partitioned external 32gb sdcard. :0 all you need to do is change the sdcard service in the /etc/init/init.A101S.rc,
Currently it mounts /data/media to /mnt/storage, if you have an external sdcard card handy, try this as a quick and dirty test
From a terminal emulator or adb shell run the following commands
Code:
stop sdcard ;
sdcard /mnt/sdcard 1000 1015 &
ls /storage
You will now see that the external sdcard can be access through /storage. to kill the test run
Code:
pkill -9 sdcard
start sdcard
Everything should be back to normal. As I mentioned to make a more permanent change edit the following line in the /etc/init/init.A101S.rc
Code:
service sdcard /system/bin/sdcard /data/media 1000 1015
METHOD 2 - MOUNT BIND
The other, perhaps more straight forward method uses the bind argument on the mount to command to "mount an already visible filesystem elsewhere" .
In the example I'll bind the external sdcard to a directory in the internal storage
use the terminal emulator or adb once again to execute the following commands
Code:
mkdir /storage/sdcard
mount --bind /mnt/sdcard /storage/sdcard
To make this more parmanent, I would probably create a wrapper shell script for the sdcard service to make sure it all gets started together, that's just my preference, As we say in trade ( or maybe it's a saying i've just made up :silly: ) ; "there's more than one way to mount a file system!"
In Summary: I would go with method 2 as this effectively achieves the desired effect off "symlinking" an external directory in the /storage
Cheers
trevd said:
If you after freeing up space, it is still possible with a bit of hacking voodoo . There are 2 ways I know of in fact.
METHOD 1 - SDCARD SERVICE
you can point the /storage ( /mnt/storage in reality ) to any directory you like. I've currently got mine pointing to an multi partitioned external 32gb sdcard. :0 all you need to do is change the sdcard service in the /etc/init/init.A101S.rc,
Currently it mounts /data/media to /mnt/storage, if you have an external sdcard card handy, try this as a quick and dirty test
From a terminal emulator or adb shell run the following commands
Code:
stop sdcard ;
sdcard /mnt/sdcard 1000 1015 &
ls /storage
You will now see that the external sdcard can be access through /storage. to kill the test run
Code:
pkill -9 sdcard
start sdcard
Everything should be back to normal. As I mentioned to make a more permanent change edit the following line in the /etc/init/init.A101S.rc
Code:
service sdcard /system/bin/sdcard /data/media 1000 1015
METHOD 2 - MOUNT BIND
The other, perhaps more straight forward method uses the bind argument on the mount to command to "mount an already visible filesystem elsewhere" .
In the example I'll bind the external sdcard to a directory in the internal storage
use the terminal emulator or adb once again to execute the following commands
Code:
mkdir /storage/sdcard
mount --bind /mnt/sdcard /storage/sdcard
To make this more parmanent, I would probably create a wrapper shell script for the sdcard service to make sure it all gets started together, that's just my preference, As we say in trade ( or maybe it's a saying i've just made up :silly: ) ; "there's more than one way to mount a file system!"
In Summary: I would go with method 2 as this effectively achieves the desired effect on "symlinked" an external directory in the /storage
Cheers
Click to expand...
Click to collapse
That's a great solution, thank you for the effort
a thanx for you
trevd said:
If you after freeing up space, it is still possible with a bit of hacking voodoo . There are 2 ways I know of in fact.
METHOD 1 - SDCARD SERVICE
you can point the /storage ( /mnt/storage in reality ) to any directory you like. I've currently got mine pointing to an multi partitioned external 32gb sdcard. :0 all you need to do is change the sdcard service in the /etc/init/init.A101S.rc,
Currently it mounts /data/media to /mnt/storage, if you have an external sdcard card handy, try this as a quick and dirty test
From a terminal emulator or adb shell run the following commands
Code:
stop sdcard ;
sdcard /mnt/sdcard 1000 1015 &
ls /storage
You will now see that the external sdcard can be access through /storage. to kill the test run
Code:
pkill -9 sdcard
start sdcard
Everything should be back to normal. As I mentioned to make a more permanent change edit the following line in the /etc/init/init.A101S.rc
Code:
service sdcard /system/bin/sdcard /data/media 1000 1015
METHOD 2 - MOUNT BIND
The other, perhaps more straight forward method uses the bind argument on the mount to command to "mount an already visible filesystem elsewhere" .
In the example I'll bind the external sdcard to a directory in the internal storage
use the terminal emulator or adb once again to execute the following commands
Code:
mkdir /storage/sdcard
mount --bind /mnt/sdcard /storage/sdcard
To make this more parmanent, I would probably create a wrapper shell script for the sdcard service to make sure it all gets started together, that's just my preference, As we say in trade ( or maybe it's a saying i've just made up :silly: ) ; "there's more than one way to mount a file system!"
In Summary: I would go with method 2 as this effectively achieves the desired effect off "symlinking" an external directory in the /storage
Cheers
Click to expand...
Click to collapse
I have archos G9 101 Turbo 250GB HDD
i try with this solution but cant true
app install to internal memory
acasilver said:
I have archos G9 101 Turbo 250GB HDD
i try with this solution but cant true
app install to internal memory
Click to expand...
Click to collapse
I would expect that to be case, This apply's to the SD Versions only, It should be fairly trivial however to change the new location to an hard disk partition. Can run the following adb command and post the output here, then i'll see if I can point you in the right direction :good:
Code:
adb shell mount
Thanks
trevd said:
I would expect that to be case, This apply's to the SD Versions only, It should be fairly trivial however to change the new location to an hard disk partition. Can run the following adb command and post the output here, then i'll see if I can point you in the right direction :good:
Code:
adb shell mount
Thanks
Click to expand...
Click to collapse
Code:
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Enable_SDE>adb shell mount
rootfs / rootfs rw 0 0
sysfs /sys sysfs rw,relatime 0 0
devtmpfs /dev devtmpfs rw,relatime,size=455588k,nr_inodes=113897,mode=755 0 0
/dev/mmcblk0p2 /mnt/system ext4 rw,noexec,noatime,user_xattr,barrier=1,data=orde
red 0 0
/dev/loop0 / squashfs ro,relatime 0 0
tmpfs /dev tmpfs rw,nosuid,relatime,mode=755 0 0
devpts /dev/pts devpts rw,relatime,mode=600 0 0
proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,relatime 0 0
usbfs /proc/bus/usb usbfs rw,relatime,devuid=1000,busuid=1000,listuid=1000 0 0
tmpfs /tmp tmpfs rw,relatime,mode=775,gid=1000 0 0
/sys/kernel/debug /sys/kernel/debug debugfs rw,relatime 0 0
none /acct cgroup rw,relatime,cpuacct 0 0
tmpfs /mnt/asec tmpfs rw,relatime,mode=755,gid=1000 0 0
tmpfs /mnt/obb tmpfs rw,relatime,mode=755,gid=1000 0 0
none /dev/cpuctl cgroup rw,relatime,cpu 0 0
/dev/block/mmcblk0p1 /mnt/rawfs rawfs rw,relatime 0 0
/dev/block/mmcblk0p2 /mnt/system ext4 rw,nosuid,noexec,noatime,user_xattr,barrie
r=1,data=ordered 0 0
/dev/block/mmcblk0p4 /data ext4 rw,nosuid,noatime,user_xattr,barrier=1,data=orde
red,noauto_da_alloc 0 0
/dev/fuse /mnt/nand fuse rw,nosuid,nodev,relatime,user_id=1000,group_id=1015,def
ault_permissions,allow_other 0 0
/dev/block/vold/8:1 /mnt/storage ext4 rw,nosuid,nodev,noexec,noatime,nodiratime,
fmode=0664,dmode=0775,uid=1000,gid=1015,user_xattr,barrier=1,data=ordered 0 0
/dev/block/vold/8:1 /mnt/secure/asec ext4 rw,nosuid,nodev,noexec,noatime,nodirat
ime,fmode=0664,dmode=0775,uid=1000,gid=1015,user_xattr,barrier=1,data=ordered 0
0
tmpfs /mnt/storage/.android_secure tmpfs ro,relatime,size=0k,mode=000 0 0
C:\Enable_SDE>
doesn't work on CM10.1
Hello,
Thank you for your methods!
I used your method 2 on Blue ROM (4.0.4) with success but I just put the CyanogenMod 10.1 and it doesn't work anymore, here is the command line I put on my script for CM10.1 :
mount -o bind /storage/sdcard1/Android /sdcard/Android
It only works on ADB command from the PC, if I try on Terminal emulator on the tablet I have no error but no effect.
Do you have a solution please?
pourmadeesse said:
Hello,
Thank you for your methods!
I used your method 2 on Blue ROM (4.0.4) with success but I just put the CyanogenMod 10.1 and it doesn't work anymore, here is the command line I put on my script for CM10.1 :
mount -o bind /storage/sdcard1/Android /sdcard/Android
It only works on ADB command from the PC, if I try on Terminal emulator on the tablet I have no error but no effect.
Do you have a solution please?
Click to expand...
Click to collapse
Yeah that sounds about right, it's because the /storage directory on 4.2.2 ( CM 10.1 ) is just a "virtual directory" the real data is /data/media/0 try changing your bind to there, You can probably just get away with a symlink especially if you're external sdcard is in ext4... I'll have to have a play with that!! :good:
Thank you, it works from Terminal Emulator!
An another linked question :
I restored my Gameloft games (Ice Age Village, MIB,... and Rayman) from Titanium Backup as usually but this time I have problem once I put this symlinks, it tells me I need to download datas I select Yes or ok but I have an error and I can't play, I precise it's only with CM10.1 with symlinks, I did it many time with 4.0.4 with no problem
pourmadeesse said:
Thank you, it works from Terminal Emulator!
An another linked question :
I restored my Gameloft games (Ice Age Village, MIB,... and Rayman) from Titanium Backup as usually but this time I have problem once I put this symlinks, it tells me I need to download datas I select Yes or ok but I have an error and I can't play, I precise it's only with CM10.1 with symlinks, I did it many time with 4.0.4 with no problem
Click to expand...
Click to collapse
Hmm, Maybe the Symlink method is no good for you in this particular instance. Just to be clear are you saying you used "mount --bind" or did you go with a symlink using the "ln -s" command... At a wild guess I'd be inclined to thing it maybe be some anti-piracy measure in Gamesloft Games or it could be a permissions issue.
Just a little tip for you. If you're going to ask questions you're going have to bring folks more than "I've got an error" That's doesn't tell anyone anything really.... What does the error say? for starters. The more info you have the better. Then the people who want to help can help and you get to play you're games a whole lot sooner :good: Winners All round :silly:
trevd said:
Hmm, Maybe the Symlink method is no good for you in this particular instance. Just to be clear are you saying you used "mount --bind" or did you go with a symlink using the "ln -s" command... At a wild guess I'd be inclined to thing it maybe be some anti-piracy measure in Gamesloft Games or it could be a permissions issue.
Click to expand...
Click to collapse
I did this command :
Code:
mount -o bind /storage/sdcard1 /data/media/0
My goal is to get "data" and "obb" at least on the sdcard instead of internal memory, am I doing the right thing?
Just a little tip for you. If you're going to ask questions you're going have to bring folks more than "I've got an error" That's doesn't tell anyone anything really.... What does the error say? for starters. The more info you have the better. Then the people who want to help can help and you get to play you're games a whole lot sooner :good: Winners All round :silly:
Click to expand...
Click to collapse
You're allright, here is some two screenshot of MIB without symlinks :
If first ask for additionnal files, I select Yes and it starts downloading.
But, if I run the mount command, after the first screenshot asking additionnal datas, I get this message (and screenshot doesn't work, "Couldn't capture screenshot. Couldn'tsave screenshot. Storage may be in use.") : "A problem occured and the download could not be completed successfully. Do you want to restart the download? An unstable network may cause problems when downloading." I select Yes but additionnal datas message and the same message bootloop. It seems it's a storage problem...
For Rayman, it starts without problem without symlink and I get a "Download error, please make sure you are connected to Internet and try again later" with mount command. Of course I'm connected...
Hope you can help me
Nobody knows what is the problem with symlinks and CM10.1 ?

[DEV] SCRIPT MOD inte2ext swap

I am a fresh owner Tf300.
It annoyed me that he sees Tf300 internal memory as sdcard
and as an external Micro SD card.
I searched and znalałem Script of SG3.
Modified it - it works.
But there is a problem.
Micro SD card is mounted as sdcard
but the internal (the old SDcard) will not mount)
Maybe someone can help
Because he wants to improve both were mounted partitions correctly
script base from galaxys3 http://forum.xda-developers.com/showthread.php?t=1772234
KOD:
#!/system/bin/sh
# Wait for the system to mount the internal media and remout it as r/o
# this should prevent the system from writing to it until we make the
# switch, yet keeps the /data/media r/w, so at the end it won't be r/o
for i in $(seq 1 1 3000)
do
if ( grep -c "/storage/sdcard0" /proc/mounts ); then
mount -o remount,ro /storage/sdcard0
break;
fi
usleep 100000
done
# now wait for the external media and remount
for i in $(seq 1 1 3000)
do
if ( grep -c "/Removable/MicroSD" /proc/mounts ); then
# create new temporary mount point
mount -o remount,rw /
mkdir /storage/tmpmnt
mount -o remount,ro /
# do the rebinding using the temporary mount point
mount -o bind /data/media /storage/tmpmnt
mount -o bind /Removable/MicroSD /storage/sdcard0
mount -o bind /Removable/MicroSD /data/media
umount /Removable/MicroSD
mount -o bind /storage/tmpmnt /storage/MicroSD
umount /storage/tmpmnt
# make bind for ums mode
mkdir -p /storage/MicroSD/sdcard1
touch /storage/MicroSD/.nomedia
mount -o bind /storage/sdcard0 /storage/extSdCard/external_sd/sdcard1
# done
break;
fi
usleep 100000
done
exit
I´m no developer but that´s a start. Hope someone helps.
arcance said:
I am a fresh owner Tf300.
It annoyed me that he sees Tf300 internal memory as sdcard
and as an external Micro SD card.
I searched and znalałem Script of SG3.
Modified it - it works.
Click to expand...
Click to collapse
Trochę Polskiego się tu wkradło
Please change word "znalazłem" to "found"
It works for me after I modified it and install the latest busybox v1.21.0. ( I'm using Energy ROM 4.1.1 btw). Let me know if this works for you.
Here's the script ( I also attach the flashable zip) :
#!/system/bin/sh
# Wait for the system to mount the internal media and remout it as r/o
# this should prevent the system from writing to it until we make the
# switch, yet keeps the /data/media r/w, so at the end it won't be r/o
for i in $(seq 1 1 3000)
do
if ( grep -c "/storage/sdcard0" /proc/mounts ); then
mount -o remount,ro /storage/sdcard0
break;
fi
usleep 100000
done
# now wait for the external media and remount
for i in $(seq 1 1 3000)
do
if ( grep -c "/Removable/MicroSD" /proc/mounts ); then
# create new temporary mount point
mount -o remount,rw /
mkdir /storage/tmpmnt
mount -o remount,ro /
# do the rebinding using the temporary mount point
mount -o bind /data/media /storage/tmpmnt
mount -o bind /Removable/MicroSD /storage/sdcard0
mount -o bind /Removable/MicroSD /data/media
umount /Removable/MicroSD
mount -o bind /storage/tmpmnt /Removable/MicroSD
umount /storage/tmpmnt
# make bind for ums mode
mkdir -p /Removable/MicroSD/EXTERNAL_SD
touch /Removable/MicroSD/ EXTERNAL_SD/.nomedia
mount -o bind /storage/sdcard0 /Removable/MicroSD/EXTERNAL_SD
# done
break;
fi
usleep 100000
done
exit
Odp: [DEV] SCRIPT MOD inte2ext swap
Ok trying thanx for help
Sent from my HTC Desire Z using xda app-developers app
One question. Will this script solve the I/O problem, as now the tablet will use my class10 sdcard as internal, or didn't I understand it well?
why not just edit the vold file
Sent From My Unlocked & Rooted 4.2.2 Android Powered []D [] []V[] []D TF300T
Works
I think good solution for people ho heve only 16gb internal and sdmicro 64gb or biger
Edit vold ithink no god solution and not be save
Regards
Sent from my ASUS Transformer Pad TF300T using xda app-developers app
arcance said:
Works
I think good solution for people ho heve only 16gb internal and sdmicro 64gb or biger
Edit vold ithink no god solution and not be save
Regards
Sent from my ASUS Transformer Pad TF300T using xda app-developers app
Click to expand...
Click to collapse
you can edit the vold file and accomplish the same results. you need to use a root explorer.I have done it on every device I own at one point.yes it saves.
Hi
Trying use modification
When try flesh i see error can't find tmpmnt
I don't have idea
Use 4.2 xcromi 4.7.0
And need more space for instal soft my tf300 have 16gb only.
Or sugestion how modyfication vold.
Reagarts
Sent from my ASUS Transformer Pad TF300T using xda app-developers app

[Q] Internal/External Memory Swap

So, I have a Sprint Galaxy S3 Running Cyanogenmod 10.2.1, and I'd like to trick it into thinking my 64GB SdCard is the Internal Memory.
So far, by using Script Manager, and this Code:
busybox mount -o remount,rw /
busybox mount -t vfat -o umask=0000 /dev/block/vold/179:33 /mnt/shell/emulated/0
busybox mount -t exfat -o umask=0000 /dev/block/vold/179:33 /mnt/shell/emulated/0
if busybox mount | busybox grep vold/179:33; then
busybox mount -o bind /data/media /mnt/sdcard1
fi
I put it here: /system/etc/init.d
And tested it here: /data/
Running this makes all my apps stop working, and after a minute can no longer access the settings even.
When I plug it into a computer however, it is reading my Internal storage as the 64GB Card.
Any help is Appreciated!
This is some code I found and edited, so I'm not entirely sure of the Mechanics behind it.
Here are the Credits:
#!/system/bin/sh
#extsd2internalsd is a modification that allows to switch internal sd to external sd and viceversa.
#With this you can use default internal sd only for app storage
#and the external sd to store all apps resource and all others stuff. The resut is a very big increase of installable apps on gs3
#All credits to Mattiadj of xda forum for the idea and script and to mike1986 for the cmw zip.
#xda thread url at
#Script Modified for U.S. Galaxy S3s by Zedomax at GalaxyS3Root.com to be compatible when sdcard is not inserted.

mount usbstick with ext or anything other than fat

Hi. How can I mount on a rooted aftv an usbstick that is formated in ext3/ext4 or anything else than ntfs and fat32?
It's so f.... annoying.
I've tried with stickmount, but the symlink it creates is empty. I imagine that is 'cos the aftv software immediately takes over and asks to format the usbstick to fat32?
An usb stick with fat gets auto-mounted like this:
Code:
#mount
/dev/block/vold/8:1 /mnt/media_rw/usbdisk vfat
rw,dirsync,nosuid,nodev,noexec,relatime,uid=1023,gid=1023,fmask=0007,dmask=0007,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
/dev/fuse /storage/usbdisk fuse rw,nosuid,nodev,noexec,relatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
Now, if I want to mount my usb stick with ext4 to be accessable by kodi etc, where would I mount it to?
Code:
toolbox mount -t ext4 -o rw,nosuid,nodev /dev/block/sda1 /data/media/0/usbStorage/sda1
That location /data/media/0.... is only readable by root. Hey, anyone?

Categories

Resources