[Q] Partition becoming read only? - G Tablet Q&A, Help & Troubleshooting

Hi,
A huge thanks to everyone on this forum for their incredible work. I got my G Tablet a couple of weeks ago and its been running flawlessly.
I ran into an issue a couple of days back with rapid FC's on most of my apps.
I am running VeganTab GE upgraded from the stock ROM, CWM 0.8 and Pershoot's 1.4 GHZ kernel. After facing all the rapid FC'S I decided to do a wipeall and start from scratch. I didn't realize the FC's are being caused due to the partition being read only for some reason.
I have tried everything under the sun to resolve this with no luck.
I tried using NVflash and have followed the instructions to the letter and dont it multiple times. Each time it says its successful yet when I boot in VeganTab takes over and all my settings and apps are still there.
Ive tried using NVflash to load CWM and then flash Cyanogen's ROM 7 as well the TapnTap's stock 3588 all to no avail. None of them will load. I cant delete files on the SD card nor write to it. I cant uninstall or install any apps. Everytime I try to do so, it says its uninstalled or installed and I can use the app, but the next time I reboot, things go back to exactly how they were when I started getting those FC's, almost like a restore point in Windows. Anytime I reboot it goes back to that point in time. I have also tried repartitioning the SD card to every possible combination (2048/0, 2048/256, 2048/128, 4096/256) and everytime it says its successful but nothing has changed. I have tried wipe data/factory resets, wipe Dalvik, format all (boot, cache, system, data). I have even tried the Format All zip floating around but it wont load it saying bad file. (Not a file size mismatch since I have downloaded it multiple times from different sources)
I came across this archived thread from a while back where someone had this issue but I haven't found a solution to it yet. I have followed everything in that thread but nothing seems to work. For the time being, the FC's have seemed to have slowed down but my tablet is stuck in some sorta time warp now since I cant seem to update it anymore.
Any help would be greatly appreciated!

It will be of no help, but in general Linux will knock a file system into read only mode when there are too many write errors to the volume. It could be a hardware defect in your unit doing it, or a corrupted file system. However, it seems you've been doing an NVFlash on it, so that should resolve the filesystem I would think.
Maybe in CW you can format /system and /data and see if that helps?
Edit: I see you did format, sorry. I don't know what to offer

Yup I have tried pretty much everything.
Wondering if anyone has any tips or tricks I might have missed. Surely there must be some way to convert this back into write mode.
What other options could I have?

Try this...it puts an empty file in each partition
http://forum.xda-developers.com/showthread.php?t=974422
Then use bekits nvflash files.
Nvflash is like a low level format. You either have a bad usb cable or your not in APX mode when you run nvflash or you have a bad tab. Make sure you are powering on using Power/Vol- not vol+. It will be a black screen and takes several minutes to run

Ive tried that.
Since the SD card is read only, i cant actually copy the file down to the drive to load.
Is there anyway to load this via microSD?
Can CWM view the microSD card?

Sandyjb, which partition is becoming read-only?--I'm not able to make this out after reading your post.
There are 2 distinct kinds of storage devices on the gTablet. You can see them if you type 'mount' in a Terminal Emulator window. For example, here's the output of mount on my tablet:
Code:
rootfs on / type rootfs (ro,relatime)
tmpfs on /dev type tmpfs (rw,relatime,mode=755)
devpts on /dev/pts type devpts (rw,relatime,mode=600)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
tmpfs on /mnt/asec type tmpfs (rw,relatime,mode=755,gid=1000)
tmpfs on /mnt/obb type tmpfs (rw,relatime,mode=755,gid=1000)
/dev/block/mtdblock3 on /system type yaffs2 (ro,relatime)
/dev/block/mtdblock4 on /cache type yaffs2 (rw,nosuid,nodev,relatime)
/dev/block/mmcblk3p2 on /data type ext3 (rw,nosuid,nodev,relatime,errors=continue,data=writeback)
/dev/block/vold/179:25 on /mnt/sdcard type vfat (rw,dirsync,nosuid,nodev,noexec,relatime,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro)
The output of the mount command may vary slightly depending on whether you get the system mount command or the busybox mount command, but the basic information presented will remain the same. What's of interest to us are the lines beginning with /dev/block/ and the mount flags--the stuff within ().
There are, as you can see, 2 kinds of devices listed
/dev/block/mtdblockn and
/dev/block/mmcblkn
(The /dev/block/vold/n:n is also relevant to this discussion, but, more on this later.)
The /dev/block/mtdblockn device are directly addressable NAND flash devices. These are the only devices that the nvflash utility operates on.
The other type of device, the /dev/block/mmcblkn type, are SD card devices--either internal or external. On the gTablet, the internal SD cards are identified as /dev/block/mmcblk3x, and the external SD cards look like /dev/block/mmcblk2x. The SD card devices cannot be formatted or modified using nvflash. You have to use other tools. The /dev/block/vold/n:n device is also an SD card, but it is mounted (as needed) by the vold program which is why it is named differently.
If your external SD card partitions are read-only, try inserting them into a Windows machine and see if running the SD Formatter mentioned in this thread brings it back to its normal state:
http://micosd-doesnt-work.com/
If the program fixes the card, you can put it back in the gTablet and run ClockworkMod to re-partition it again.
If it is either the internal SD card partitions or the NAND flash partitions that are read-only, then the troubleshooting process is slightly more involved. In any case, send me the output of the mount command on your tablet.

Hi Rajeev.
I dont think I have any issues with my external card ie. microsd. Its the drive marked as sdcard card that I have issues with.
I am not as familiar with the results that came back via the terminal.
Perhaps you can elaborate.
Here is what I got
$mount
rootfs on / type rootfs (ro,relatime)
tmpfs on /dev type tmpfs (rw,relatime,mode=755)
devpts on /dev/pts type devpts (rw,relatime,mode=600)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
tmpfs on /mnt/asec type tmpfs (rw,relatime,mode=755,gid=1000)
tmpfs on /mnt/obb type tmpfs (rw,relatime,mode=755,gid=1000)
/dev/block/mtdblock3 on /system type yaffs2 (ro,relatime)
/dev/block/mtdblock4 on /cache type yaffs2 (rw,nosuid,nodev,relatime)
/dev/block/mmcblk3p2 on /data type ext3 (rw,nosuid,nodev,relatime,errors=continue,data=writeback)
/sys/kernel/debug on /sys/kernel/debug type debugfs (rw,relatime)
/dev/block/vold/179:25 on /mnt/sdcard type vfat (rw,dirsync,nosuid,nodev,noexec,relatime,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro)
/dev/block/vold/179:25 on /mnt/secure/asec type vfat (rw,dirsync,nosuid,nodev,noexec,relatime,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro)
tmpfs on /mnt/sdcard/.android_secure type tmpfs (ro,relatime,size=0k,mode=000)
/dev/block/vold/179:17 on /mnt/sdcard2 type vfat (rw,dirsync,nosuid,nodev,noexec,relatime,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro)
/dev/block/dm-0 on /mnt/asec/com.rovio.angrybirds-1 type vfat (ro,dirsync,nosuid,nodev,relatime,uid=1000,fmask=0222,dmask=0222,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro)
/dev/block/dm-1 on /mnt/asec/com.tripit-1 type vfat (ro,dirsync,nosuid,nodev,relatime,uid=1000,fmask=0222,dmask=0222,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro)
$

That mount output looks perfectly normal. You said you were running VEGAnTab-GE. That is a Gingerbread-based ROM, I think, and so should have the SD cards mounted at /mnt/sdcard and /mnt/emmc and not /mnt/sdcard and /mnt/sdcard2.
Whatever the case, I want to check that /mnt/sdcard is writable. So,
1. Can you tell me if there is an /emmc or a /mnt/emmc folder on the tablet. Typing ls -l /emmc /mnt/emmc will do.
2. Try these commands in a Terminal to check if it's an application problem or an OS/hardware problem:
Code:
mkdir /mnt/sdcard/tmp.dir
echo test > /mnt/sdcard/tmp.dir/file.txt
Both commands should succeed if /mnt/sdcard is writable. Next read back the file.txt file:
Code:
cat /mnt/sdcard/tmp.dir/file.txt
should say: test
3. Reboot the tablet and try the cat command again. It should again print: test
4. Remove the directory, and verify that it has gone both before and after a reboot:
Code:
rm -rf /mnt/sdcard/tmp.dir
We'll carry on from here.

Thanks a ton for your help Rajeev!
Here is what I got back after step 2. Seems like everything worked fine there.
$ export PATH=/data/local/bin:$PATH
$ls -l /emmc /mnt/emmc
ls: /emmc: No such file or directory
ls: /mnt/emmc: No such file or directory
$ mkdir /mnt/sdcard/tmp.dir/file.txt
mkdir failed for /mnt/sdcard/tmp.dir/file.txt, No such file or directory
$ mkdir /mnt/sdcard/tmp.dir
$ echo test > /mnt/sdcard/tmp.dir/file.txt
$ cat /mnt/sdcard/tmp.dir/file.txt
test
$
However, after the reboot, it hung up once during restart. After doing another restart, it loaded into Vegantab just fine. The I ran the same command again and this is what I got
export PATH=/data/local/bin:$PATH
$ export PATH=/data/local/bin:$PATH
$ cat /mnt/sdcard/tmp.dir/file.txt
/mnt/sdcard/tmp.dir/file.txt: No such file or directory
$
Didnt do step 4 after that.

Very interesting--it's just like you said: that partition seems to go back in time. If we can't fix this, you should send that SD card to the folks at NASA. They're sure to be interested in an entropy-negating device.
Alright, let's check to see if the other partition on that SD card--/data--exhibits the same problem. Do a reboot, so we can start from a clean slate--I want to see the kernel messages this time when we write to the SD card.
Code:
$ su
# mkdir /data/tmp.dir
# ls -ld /data/tmp.dir
# echo test > /data/tmp.dir/file.txt
# ls -l /data/tmp.dir/file.txt
# cat /data/tmp.dir/file.txt
test
#
Reboot the tablet, and check if the cat command outputs "test" again. But, before you reboot and check, run these commands so you can send me their output. We've written the output to /mnt/sdcard2, so we shouldn't have any disappearing files.
Code:
$ su
# dmesg > /mnt/sdcard2/dmesg.txt
# logcat -d > /mnt/sdcard2/logcat.txt
# ls -l /data > /mnt/sdcard2/ls-data.txt
# ls -l /mnt/sdcard /mnt/sdcard2 > /mnt/sdcard2/ls-sdcards.txt
# cat /system/etc/vold.fstab > /mnt/sdcard2/vold.fstab.txt
Zip up all those text files and attach it to your next post.

[email protected]
Ok here is what I got before the reboot.
$ export PATH=/data/local/bin:$PATH
$su
#mkdir /data/tmp.dir
# ls -ld /data/tmp.dir
drwxrwxrwx 2 root root 1024 May 9 13:15 /data/tmp.dir
# echo test > /data/tmp.dir/file.txt
# ls -l /data/tmp.dir/file.txt
-rw-rw-rw- 1 root root 5 May 9 13:17 /data/tmp.dir/file.txt
# cat /data/tmp.dir/file.txt
test
#
After the reboot:
# cat /data/tmp.dir/file.txt
/data/tmp.dir/file.txt: No such file or directory
And here are the Text files.

Hmm, the external SD card is referred to twice in /system/etc/vold.fstab. Can you try this:
Edit /system/etc/vold.fstab and comment out the last line in it. It looks like this:
Code:
dev_mount sdcard2 /mnt/sdcard/sdcard-ext auto /devices/platform/tegra-sdhci.2/mmc_host/mmc1
Just add a '#' character at the beginning of the line, like so:
Code:
# dev_mount sdcard2 /mnt/sdcard/sdcard-ext auto /devices/platform/tegra-sdhci.2/mmc_host/mmc1
You can edit it on your PC; then put it back on the tablet and reboot. After the reboot, go through the SD card test commands we did earlier.
To edit the vold.fstab file, you'll have to remount the /system partition read-write. If you know how to use adb, try these commands:
Code:
adb pull /system/etc/vold.fstab vold.fstab
[I]Edit the vold.fstab[/I]
adb remount
adb push vold.fstab /system/etc/vold.fstab
Also, after you've run the SD card test commands, run the "dmesg" and "logcat -d" as before and attach their outputs.
Another thing to try: Remove the external SD card (after you've changed vold.fstab) and see if file and directories persist on the internal SD card.

Ok, after editing vold.fstab, loading microSD back in and rebooting, I ran the test commands.
Code:
$ export PATH=/data/local/bin:$PATH
$su
#mkdir /data/tmp.dir
# ls -ld /data/tmp.dir
drwxrwxrwx 2 root root 1024 May 9 23:48 /data/tmp.dir
# echo test > /data/tmp.dir/file.txt
# ls -l /data/tmp.dir/file.txt
-rw-rw-rw- 1 root root 5 May 9 23:49 /data/tmp.dir/file.txt
# cat /data/tmp.dir/file.txt
test
#
After another reboot and running of the same test command
Code:
# cat /data/tmp.dir/file.txt
/data/tmp.dir/file.txt: No such file or directory
Then I ran the the "dmesg" and "logcat -d" as before
Here are the outputs again.
Thanks again....your time in looking at this is much appreciated!
PS - I didn't understand the last line. Internal directories exist on the main drive (SDcard) when the microSD is taken out? I only started using the microSD very recently and the directory structure on the main drive remains intact irrespective.

sandyjb said:
Ok, after editing vold.fstab, loading microSD back in and rebooting, I ran the test commands.
Click to expand...
Click to collapse
I see that you've placed the '#' on the line before the last line. This makes it a no-effect change. You have to comment out the last line--put the '#' at the start of that line. The last line should look like this:
Code:
# dev_mount sdcard2 /mnt/sdcard/sdcard-ext auto /devices/platform/tegra-sdhci.2/mmc_host/mmc1
Thanks again....your time in looking at this is much appreciated!
Click to expand...
Click to collapse
No probs. Actually, I may have good news and bad news for you... but, we'll get to that after you've fixed the vold.fstab file, rebooted, and repeated the tests in post #8, plus these additional commands via adb:
Code:
adb shell lsmod > lsmod.txt
adb shell ps > ps.txt
adb shell find / -name aufs.ko > find-aufs.txt
PS - I didn't understand the last line. Internal directories exist on the main drive (SDcard) when the microSD is taken out? I only started using the microSD very recently and the directory structure on the main drive remains intact irrespective.
Click to expand...
Click to collapse
If you look at that vold.fstab file you sent me, it has a line like this:
Code:
# todo: the secondary sdcard seems to confuse vold badly
After seeing that, I thought it would be best if you removed the external microSD card while you're running the tests. You can put it back in after we're done fixing this.

Ok after making the change to the vold.fstab file, I ran the test again and I got the same error.
$ cat /mnt/sdcard/tmp.dir/file.txt
/mnt/sdcard/tmp.dir/file.txt: No such file or directory
I dont have ADB setup so I cant run those commands. I made the changes to the text file via notepad. Any other way for me to run those commands?
I took out the microsd card and then ran the dmesg and logcat commands. Somehow I feel like I am doing this wrong....
$su
# dmesg > /mnt/sdcard2/dmesg.txt
cannot create /mnt/sdcard2/dmesg.txt: read-only file system
# logcat -d > /mnt/sdcard2/logcat.txt
cannot create /mnt/sdcard2/logcat.txt: read-only file system
#
This error looks right though since there is no microsd card anymore.
Thanks for your patience!

sandyjb said:
Ok after making the change to the vold.fstab file, I ran the test again and I got the same error.
$ cat /mnt/sdcard/tmp.dir/file.txt
/mnt/sdcard/tmp.dir/file.txt: No such file or directory
Click to expand...
Click to collapse
The vold.fstab looks OK now. Incidentally, I just downloaded VEGAn-GE-7.0.0-RC1-Harmony-signed.zip and checked the pristine vold.fstab inside it. Your original file is exactly the same as the official one. So, it looks like I've been barking up the wrong tree in this case. Oh, well...
I dont have ADB setup so I cant run those commands. I made the changes to the text file via notepad. Any other way for me to run those commands?
Click to expand...
Click to collapse
Since we're able to store files on /mnt/sdcard (the internal SD card), at least until the next reboot, just use /mnt/sdcard/ instead of /mnt/sdcard2 in the command lines. You can use the Terminal Emulator for now to run the commands if you don't have adb set up. But, we'll have need of adb soon, so you should get it set up if you can: http://forum.xda-developers.com/showthread.php?t=902860
Questions:
1. You are running VEGAn-TAB 7.0.0 RC1 (aka VEGAn-TAB Ginger Edition), correct?
2. Do you have ClockworkMod installed? And if so, which version? Ideally it should print this when you're in it: ClockworkMod Recovery v2.5.1.1-bekit-0.8. This seems to be the safest CWM for our gTablets according to the posts on the board.
3. You have tried the standard techniques to fix the SD card problem? Namely,
a) In CWM, formatted the internal SD card again (CWM > advanced > Partition Internal SD card).
b) Ran Fix Permissions (CWM > advanced > Fix Permissions)
4. Do you have anything of value on the internal SD card (/mnt/sdcard), because we might have to blow it away completely soon (or, atleast try to ). So, back up the stuff from /mnt/sdcard to /mnt/sdcard2.
You can insert the external SD card (/mnt/sdcard2) back into the tablet and move, not copy, the stuff from /mnt/sdcard into /mnt/sdcard2. We're doing a test along with backing up your sdcard data. After you move your files and folders, check that they are no longer present in /mnt/sdcard. Then shutdown, remove the external SD card, reboot back into VEGAn 7.0.0-RC1 and again check if the stuff you moved has indeed disappeared from /mnt/sdcard.
But, before you do all this, send me the output I requested in post #14.
5. Your gTablet is not a refurbished or second-hand piece, right? Because, I see a difference in the make of the internal SD card between your tablet and mine.
Here's the relevant portion of the difference in kernel messages (the dmesg output) between your tablet and mine:
Code:
- mmc1: new high speed SDHC card at address 1234
- mmcblk2: mmc1:1234 SA16G 14.8 GiB
- mmcblk2: p1
- mmc2: new high speed SDHC card at address aaaa
- mmcblk3: mmc2:aaaa SE16G 14.8 GiB
+ mmc1: new high speed SDHC card at address aaaa
+ mmcblk2: mmc1:aaaa SU16G 14.8 GiB
+ mmcblk2: p1 p2
+ mmc2: new high speed MMC card at address 0001
+ mmcblk3: mmc2:0001 MAG4EM 14.9 GiB
The lines prefixed with '-' are from your kernel; the ones prefixed with '+' are mine. We can skip the lines which mention "mmcblk2"--this is the external SD card. The lines containing "mmcblk3"--which is how the Linux kernel names these SD cards (MMC block devices as the name suggests)--are interesting because they refer to the internal SD card. I, and 2 other people I've talked to on the board, have the same internal SD card: MAG4EM 14.9 GiB, which is an MMC card. You, however, have a different internal SD card: SE16G 14.8 GiB, which is a SDHC card instead of a MMC card.
So, you have a slightly different kind of gTablet as far as the internal SD card goes. However, from what I've been able to find out, SDHC cards are (normally) freely inter-changeable with MMC cards, so I'm not sure if this is the cause of your problems. But, keep this in mind anyway.

1. You are running VEGAn-TAB 7.0.0 RC1 (aka VEGAn-TAB Ginger Edition), correct? YES.
2. Do you have ClockworkMod installed? And if so, which version? Ideally it should print this when you're in it: ClockworkMod Recovery v2.5.1.1-bekit-0.8. This seems to be the safest CWM for our gTablets according to the posts on the board. YES. Version 0.8.
3. You have tried the standard techniques to fix the SD card problem? Namely,
a) In CWM, formatted the internal SD card again (CWM > advanced > Partition Internal SD card). YES. Pretty much every trick there is on the forums, I have tried. Multiple times at that.
b) Ran Fix Permissions (CWM > advanced > Fix Permissions) YES
4. Do you have anything of value on the internal SD card (/mnt/sdcard), because we might have to blow it away completely soon (or, atleast try to ). So, back up the stuff from /mnt/sdcard to /mnt/sdcard2.
You can insert the external SD card (/mnt/sdcard2) back into the tablet and move, not copy, the stuff from /mnt/sdcard into /mnt/sdcard2. We're doing a test along with backing up your sdcard data. After you move your files and folders, check that they are no longer present in /mnt/sdcard. Then shutdown, remove the external SD card, reboot back into VEGAn 7.0.0-RC1 and again check if the stuff you moved has indeed disappeared from /mnt/sdcard. Nope, nothing I care about it on the SDcard. I have tried to manually format it using nvflash, accessing it via USB and just hitting delete on the PC. I even tried to do what you mentioned about, move the file over. It said it successfully did it and the file wasnt present when I checked, but open rebooting, as usual it went back in time.
But, before you do all this, send me the output I requested in post #14.
Here are the attachments from running it on the SD CARD. I will try and get ADB setup as well.
Also, no, I dont believe this is a refurb. I ordered it off Amazon and there it was specified as new.

Related

[Q]How to mount directories across SD cards

Okay, this is what I want to do. Under Linux, it would be done via /etc/fstab, but Android has changed some things up.
Certain apps store files and other things on the internal SD card of the RAZR. For example, the Amazon MP3 Cloud player stores all downloaded music files to /sdcard/amazonmp3. There is no way to change this. However, I store all my music on my external SD card. So, what I want to do is create a mount point on the internal sdcard for the /sdcard/amazonmp3 directory that points to a directory on my external sd card (/sdcard-ext/amazonmp3).
That way, when I download music, it will still attempt to save it to /sdcard/amazonmp3 which really is a mount point that points to /sdcard-ext/amazonmp3.
Now, there is an app called FoldersPlug which does this. However, it's not doing it across reboots and it's a little buggy in how it works. I'd rather just fix the /etc/vold.fstab file (if that's possible) to mount my directories for me, but I don't completely understand all the needs to be set up in it.
If I have the following directories set up:
/sdcard/amazonmp3 (this will be empty)
/sdcard-ext/amazonmp3 (this will contain all the files and folder structures that would normally be in /sdcard/amazonmp3)
I want it so that the /sdcard-ext/amazonmp3 directory is mounted to the /sdcard/amazonmp3 directory.
Here is what I see when I run the "mount" command to look at the current mount points that are mounted:
Code:
/dev/block/vold/179:97 /mnt/sdcard/amazonmp3 vfat rw,dirsync,nosuid,nodev,noexec,relatime,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
/dev/block/vold/179:97 /mnt/sdcard/DCIM vfat rw,dirsync,nosuid,nodev,noexec,relatime,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
/dev/block/vold/179:97 /mnt/sdcard/Pictures vfat rw,dirsync,nosuid,nodev,noexec,relatime,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
/dev/block/vold/179:97 /mnt/sdcard/Android/data/com.iconology.comics.app vfat rw,dirsync,nosuid,nodev,noexec,relatime,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
These are the mount points that FoldersPlug set up and what I want to do instead is define them in the /etc/vold.fstab file but I don't know how they should be entered into the /etc/vold.fstab file.
Any help would be greatly appreciated!
Thanks!
I may be wrong, but I don't believe Android Vold can mount loopback (bind). You'll have to create a partition on the SD card instead, feeding it to Vold. Then try something similar to;
dev_mount /dev/block/mmcblk0p2 /mnt/sdcard/amazonmp3 /devices/platform/msm_sdcc.2/mmc_host/mmc1
Or if you forget about Vold, and use an ordinary mount;
# mount -o bind /sdcard-ext/amazonmp3 /sdcard/amazonmp3
In this case (bind loopback mount), you don't need it to be a partition.
Maybe the easies way is you just forget about the internal sdcard, replacing /mnt/cdcard with The real McCoy instead.
Cool. Thanks for the help. I see that this would have to be done using busybox, which is cool since I have that installed.
I tested what you stated and yup, that mounts them. So, I guess I'll fool around a little more with the scripts in /etc/init.d and see if I can't get it to work. I might have to do a sleep or something in the script to give the system time to mount the sdcards, but hopefully, this will work.
Thanks again for the tip!
UPDATE:
Well, here's my script but it doesn't seem to work. I have it first check to see if the number of lines returned from doing directory listing on the /sdcard and /sdcard-ext directories are 0. If so, it sleeps for 10 seconds and then tries it again, waiting for the sdcards to be mounted.
Once they are mounted, then I go and mount my directories. However, it doesn't seem to work. I have the script in the /etc/init.d directory and the permissions are set for execution (0777) like the other two scripts in there (98tweaks and S99SuperCharger).
If I go and run the script myself, it works and mounts the directories.
Here is the script. Any other ideas?
Code:
#!/system/xbin/sh
# Check if the SDCARDs are mounted yet.
result="`ls /sdcard/ | wc -l`"
while [ "$result" -eq 0 ]
do
sleep 10
result="`ls /sdcard/ | wc -l`"
done
result="`ls /sdcard-ext/ | wc -l`"
while [ "$result" -eq 0 ]
do
sleep 10
result="`ls /sdcard-ext/ | wc -l`"
done
# The cards are mounted. Now mount the directories
busybox mount --bind /sdcard-ext/DCIM /sdcard/DCIM
busybox mount --bind /sdcard-ext/amazonmp3 /sdcard/amazonmp3
busybox mount --bind /sdcard-ext/Pictures /sdcard/Pictures
busybox mount --bind /sdcard-ext/Android/data/com.iconology.comics.app /sdcard/Android/data/com.iconology.comics.app
Okay. Got it to work finally. I just decided to set it up using ScriptManager instead to run on boot.
Not sure why it wasn't working with the init.d process.
you rock!
iBolski said:
Cool. Thanks for the help. I see that this would have to be done using busybox, which is cool since I have that installed.
I tested what you stated and yup, that mounts them. So, I guess I'll fool around a little more with the scripts in /etc/init.d and see if I can't get it to work. I might have to do a sleep or something in the script to give the system time to mount the sdcards, but hopefully, this will work.
Thanks again for the tip!
UPDATE:
Well, here's my script but it doesn't seem to work. I have it first check to see if the number of lines returned from doing directory listing on the /sdcard and /sdcard-ext directories are 0. If so, it sleeps for 10 seconds and then tries it again, waiting for the sdcards to be mounted.
Once they are mounted, then I go and mount my directories. However, it doesn't seem to work. I have the script in the /etc/init.d directory and the permissions are set for execution (0777) like the other two scripts in there (98tweaks and S99SuperCharger).
If I go and run the script myself, it works and mounts the directories.
Here is the script. Any other ideas?
Code:
#!/system/xbin/sh
# Check if the SDCARDs are mounted yet.
result="`ls /sdcard/ | wc -l`"
while [ "$result" -eq 0 ]
do
sleep 10
result="`ls /sdcard/ | wc -l`"
done
result="`ls /sdcard-ext/ | wc -l`"
while [ "$result" -eq 0 ]
do
sleep 10
result="`ls /sdcard-ext/ | wc -l`"
done
# The cards are mounted. Now mount the directories
busybox mount --bind /sdcard-ext/DCIM /sdcard/DCIM
busybox mount --bind /sdcard-ext/amazonmp3 /sdcard/amazonmp3
busybox mount --bind /sdcard-ext/Pictures /sdcard/Pictures
busybox mount --bind /sdcard-ext/Android/data/com.iconology.comics.app /sdcard/Android/data/com.iconology.comics.app
Click to expand...
Click to collapse
Dude...a little renaming of dirs and i was running. thanx:good:
iBolski said:
Okay. Got it to work finally. I just decided to set it up using ScriptManager instead to run on boot.
Not sure why it wasn't working with the init.d process.
Click to expand...
Click to collapse
Works perfectly
Thanks for your work.
I have a question. Is it possible to create a folder in /mnt/sdcard (for example /mnt/sdcard/myfolder) with a script or automaticly after boot?
What i want is to mount the external SD to this folder (/mnt/sdcard/myfolder) but first you have to create the folder "mysdcard".
But i hope it works with a script only like:
Code:
#!/system/xbin/sh
# The cards are mounted. Now mount the directories
mkdir /mysdcard
busybox mount --bind /sdcard-ext /sdcard/mysdcard
sorry for my english
xoxys said:
Thanks for your work.
I have a question. Is it possible to create a folder in /mnt/sdcard (for example /mnt/sdcard/myfolder) with a script or automaticly after boot?
What i want is to mount the external SD to this folder (/mnt/sdcard/myfolder) but first you have to create the folder "mysdcard".
But i hope it works with a script only like:
Code:
#!/system/xbin/sh
# The cards are mounted. Now mount the directories
mkdir /mysdcard
busybox mount --bind /sdcard-ext /sdcard/mysdcard
sorry for my english
Click to expand...
Click to collapse
sorry my english bad...
if i don't have /etc/init.d directory... can i execute this command in another way?
thanks...
nb:
* modified with debuggerd is not work, my jelly-bean not execute debuggerd on boot
* add script install-recovery.sh on /system/etc is not work too....

[Q] Internal/external sd not mounting [SOLVED]

Hi,
Since my last upgrade of cynaogenmod nighties yesterday on my galaxy s2, my internal AND external sdcard are not mouting anymore
I tried to understand why and I found that my /storage folder was empty. I think it should have been populated by /init.smdk4210.rc script :
Code:
...
on early-init
export EXTERNAL_STORAGE /storage/sdcard0
export SECONDARY_STORAGE /storage/sdcard1
mkdir /storage 0775 system system
mkdir /storage/sdcard0 0775 system system
mkdir /storage/sdcard1 0775 system system
mkdir /storage/usbdisk0 0775 system system
...
I tried to mount /storage/sdcard0, but without success (in fact I am not sure to have the right method).
Extract of /system/etc/vold.fstab
Code:
...
# internal sdcard
dev_mount sdcard0 /storage/sdcard0 11 /devices/platform/dw_mmc/mmc_host/mmc0/mmc0 nonremovable,encryptable
...
I thought that
Code:
mount /devices/platform/dw_mmc/mmc_host/mmc0/mmc0 /storage/sdcard0
would have been sufficient, but unfortunately not (I tried with /sys/devices/platform/dw_mmc/mmc_host/mmc0/mmc0 to).
I would like to retrieve my internal sdcard content.
Thank you in advance,
Bill
Ok after some investigations it is a known bug from 20130121 cyanogen nighties.
To get back internal sdcard :
Code:
su
echo mkdir /storage/sdcard0 > /data/local/userinit.sh
chmod 700 /data/local/userinit.sh
reboot
You can find more information here : http://forum.cyanogenmod.org/topic/63994-cm101-internal-sd-card-dont-mount/
Problem should be solved in future cyanogen nighties release https://github.com/cyanogenmod/android_system_core/commit/7cc503720f1a8a6aa9481c5f9fd4552bc463a501
Thanks for help
Bill
deleted
HELP!
my phone shows up on my computer but only my external sd card shows up, not my internal! help me fix it! ive attached some screenshots. btw, what are you guys using to run that code? (im a noob)
i ran the commands in terminal emulator but after reboot, everything remained the same?
billdangerous said:
Ok after some investigations it is a known bug from 20130121 cyanogen nighties.
To get back internal sdcard :
Code:
su
echo mkdir /storage/sdcard0 > /data/local/userinit.sh
chmod 700 /data/local/userinit.sh
reboot
You can find more information here : http://forum.cyanogenmod.org/topic/63994-cm101-internal-sd-card-dont-mount/
Problem should be solved in future cyanogen nighties release https://github.com/cyanogenmod/android_system_core/commit/7cc503720f1a8a6aa9481c5f9fd4552bc463a501
Thanks for help
Bill
Click to expand...
Click to collapse
I have the same problem and would like to get my phone back up and running.
How did you solve it?
I mean, where do I have to write those commands?
I'm a noobie, so please be so kind to explain
Peter.
kreatiir said:
I have the same problem and would like to get my phone back up and running.
How did you solve it?
I mean, where do I have to write those commands?
I'm a noobie, so please be so kind to explain
Peter.
Click to expand...
Click to collapse
If you have adb on your computer (and an usb cable to connect your phone to the computer), type these commands on a terminal window :
Code:
adb root
adb shell
then (as stated in pervious post) :
Code:
su
echo mkdir /storage/sdcard0 > /data/local/userinit.sh
chmod 700 /data/local/userinit.sh
reboot
If you do not have adb on your computer, you may download a terminal emulatror application on your android, then type the 2nd block of commands given above.
May the Force be with you !
Erm, if you have the problem with CM10.2 20130821, this solution is sadly not working...
SD card not mounting
I have got a symphony w125 from Bangladesh. It was running afterwards. After 2/3 months I rooted it from androidkothon.com . But after some days I got a notification... "Preparing phone memory
Checking for errors"
I neglected it and thought it'll be fine soon. But it won't. When I opened ES file manager, it showed me SD card unmounted. (Both for internal & external) .I tried my 16 GB m SD card inserting again. but it again showed the same notification . Then I did once "factory reset' and once "clear eMMC". Then also the same thing happened. While running suddenly shows system ui not responding automatically turns off. Then it doesn't start until I open the battery and insert it again. How to get my storage back now...?
sir i have a spreadtrum phone its board is sp6820gb_7620 and cpu id is 8810 cpu frequency is 1ghz and ram is 512mb with mali 300 gpu,
android version is 2.3.6 and kernal version is 2.6.35.7 [email protected] #7, software version is mocordroid2.3.6.w12.20_p20.01_20130715.130506, hardware version is 1.1.0. my problem is that my phone has only 128 mb of internal memory and when i tried to edit vold.fstab to swap its memory with memory card it stopped detecting sd card when turned on but when in recovery mode sd is shown present, i think its very similar to karbonn a1+ in hardware and software part so can you please help me with my phone?
[
Help me bro's please.
I swapped internal memory to sd card using vold.fstab file replacing.And now my int storage n sd card arent mounting ????
using karbonn smart a26 mobile
Internal and external sdcard unmounted
yj121 said:
i ran the commands in terminal emulator but after reboot, everything remained the same?
Click to expand...
Click to collapse
Accidently i formated my internal sd card and external sd card , now i am unable to mount it...
Plz help :angel:
---------- Post added at 05:23 PM ---------- Previous post was at 05:16 PM ----------
shailoo said:
Accidently i formated my internal sd card and external sd card , now i am unable to mount it...
Plz help :angel:
Click to expand...
Click to collapse
I ran all codes and my device is tablet micromax funbook P560....
Plz help
Code:
su
echo mkdir /storage/sdcard0 > /data/local/userinit.sh
chmod 700 /data/local/userinit.sh
reboot
Hi, i have this same problem with S3 mini, i can use this same command for my device or i will brick it?
I need mount internal storage, i have 0.00 bytes :/
Thanks!!
Hi
i am new to this and trying to fix my note 1 gt n7000
it was working fine till yesterday and suddenlly the internal memory the sdcard0 stopped
it does not mount and also when i turn the mobile on a pop up comes saying cannot download as not storage available.
there are some important photos in that which i would like to recover.
please help i tried the code mentioned below in terminal emulater but when i type
it says
not found and also for the latter commands it says permission denied.
i have rooted my device.
please help.
Code:
su
echo mkdir /storage/sdcard0 > /data/local/userinit.sh
chmod 700 /data/local/userinit.sh
reboot
If you do not have adb on your computer, you may download a terminal emulatror application on your android, then type the 2nd block of commands given above.
May the Force be with you ![/QUOTE]
same problem
yj121 said:
my phone shows up on my computer but only my external sd card shows up, not my internal! help me fix it! ive attached some screenshots. btw, what are you guys using to run that code? (im a noob)
Click to expand...
Click to collapse
I have the same problem. Please help me solve it
its not working for me
billdangerous said:
Hi,
Since my last upgrade of cynaogenmod nighties yesterday on my galaxy s2, my internal AND external sdcard are not mouting anymore
I tried to understand why and I found that my /storage folder was empty. I think it should have been populated by /init.smdk4210.rc script :
Code:
...
on early-init
export EXTERNAL_STORAGE /storage/sdcard0
export SECONDARY_STORAGE /storage/sdcard1
mkdir /storage 0775 system system
mkdir /storage/sdcard0 0775 system system
mkdir /storage/sdcard1 0775 system system
mkdir /storage/usbdisk0 0775 system system
...
I tried to mount /storage/sdcard0, but without success (in fact I am not sure to have the right method).
Extract of /system/etc/vold.fstab
Code:
...
# internal sdcard
dev_mount sdcard0 /storage/sdcard0 11 /devices/platform/dw_mmc/mmc_host/mmc0/mmc0 nonremovable,encryptable
...
I thought that
Code:
mount /devices/platform/dw_mmc/mmc_host/mmc0/mmc0 /storage/sdcard0
would have been sufficient, but unfortunately not (I tried with /sys/devices/platform/dw_mmc/mmc_host/mmc0/mmc0 to).
I would like to retrieve my internal sdcard content.
Thank you in advance,
Bill
Click to expand...
Click to collapse
i have tried to correct this bug on my ROM tried it hard .
its the only bug i have
so
billdangerous said:
Hi,
Since my last upgrade of cynaogenmod nighties yesterday on my galaxy s2, my internal AND external sdcard are not mouting anymore
I tried to understand why and I found that my /storage folder was empty. I think it should have been populated by /init.smdk4210.rc script :
Code:
...
on early-init
export EXTERNAL_STORAGE /storage/sdcard0
export SECONDARY_STORAGE /storage/sdcard1
mkdir /storage 0775 system system
mkdir /storage/sdcard0 0775 system system
mkdir /storage/sdcard1 0775 system system
mkdir /storage/usbdisk0 0775 system system
...
I tried to mount /storage/sdcard0, but without success (in fact I am not sure to have the right method).
Extract of /system/etc/vold.fstab
Code:
...
# internal sdcard
dev_mount sdcard0 /storage/sdcard0 11 /devices/platform/dw_mmc/mmc_host/mmc0/mmc0 nonremovable,encryptable
...
I thought that
Code:
mount /devices/platform/dw_mmc/mmc_host/mmc0/mmc0 /storage/sdcard0
would have been sufficient, but unfortunately not (I tried with /sys/devices/platform/dw_mmc/mmc_host/mmc0/mmc0 to).
I would like to retrieve my internal sdcard content.
Thank you in advance,
Bill
Click to expand...
Click to collapse
i know the problem has been solved but...
i had the same issue. what i did was run the command:
su
echo mkdir /storage/sdcard0 > /data/local/userinit.sh
chmod 700 /data/local/userinit.sh
reboot
but it only takes effect after a reflash of the rom. after reboot for me, it never fixed and would never mount, but after a clean flash of the rom i was using, it seemed to mount fine. so you must reflash, as reboot does not do anything.
Cannot mount internal sd card
I just flashed my honor 4x with flyme Custom ROM
but now my phone doesn't mount my internal sd card
I tried running these commands on shell using ADB, but it doesn't fix the issue
Pleasr help me out here
Thanks
My phone is a BluLifeOne 2015. One day it stopped booting past the logo so I tried to reflash stock with QFIL to no avail. I no longer can access recovery or OS but I can boot into fastboot and boot into TWRP with the command fastboot boot recovery.img. When I try and format the system it says 0mb and can't mount data, cache or system (argument invalid). The internal storage, data, cache and system are all showing as 0mb and I've tried to change file system on all of them but it does not change the size or give me access to the internal storage. I also tried to flash a zip file but same invalid arguments everytime. Can someone help.

[Q] Emulated internal storage as sdcard

Hello everyone.
Yesterday I received my Huawei Honor 3C and I've installed MIUI ASAP instead of Emotion UI.
Everything's great but I have a problem with double SD Card, I mean: I have my own external card and the phone got his own by emulating it's internal storage as SD Card (it's a symlink to /storage/emulated/0 and it's the same as /storage/emulated/legacy, so this fake sd is eating up my storage, there are also other symlinks in /storage/, /mnt/ and even in root folder there is a symlink sdcard->/storage/emulated/legacy). Phone and apps are correctly seeing external card as SD Card but in reality the internal storage is being used for everything.
Because of this I have only about 5GB available instead of 64GB
Is there any way to terminate the emulation or changing it's target to sdcard2 so that I could use my card correctly? I've tried few things but nothing works. Symlinks are being recreated during boot so editing or deleting them does not work. Editing vold.fstab does nothing because ext is being mounted after boot while the emulation stars while in it - I guess that a proped ini script could do the work.
huaweiproblem said:
Hello everyone.
Yesterday I received my Huawei Honor 3C and I've installed MIUI ASAP instead of Emotion UI.
Everything's great but I have a problem with double SD Card, I mean: I have my own external card and the phone got his own by emulating it's internal storage as SD Card (it's a symlink to /storage/emulated/0 and it's the same as /storage/emulated/legacy, so this fake sd is eating up my storage, there are also other symlinks in /storage/, /mnt/ and even in root folder there is a symlink sdcard->/storage/emulated/legacy). Phone and apps are correctly seeing external card as SD Card but in reality the internal storage is being used for everything.
Because of this I have only about 5GB available instead of 64GB
Is there any way to terminate the emulation or changing it's target to sdcard2 so that I could use my card correctly? I've tried few things but nothing works. Symlinks are being recreated during boot so editing or deleting them does not work. Editing vold.fstab does nothing because ext is being mounted after boot while the emulation stars while in it - I guess that a proped ini script could do the work.
Click to expand...
Click to collapse
First thing I do to troubleshoot that stuff is to copy everything off the internal storage, then format it in recovery, then copy everything back when booted up.
Why do you think that wiping and installing the exact same stuff could help? If you're copying back the same files that were there before - then you're back at starting point.
I've tried also a few different things, mostly trying to modify inid.rc scripts.
I found an interesting script in init.ssd.rc, that is:
Code:
on init
# See storage config details at source.android.com/tech/storage/
# fix non-shell uid process can not access shared-sd
mkdir /mnt/shell 0700 shell shell
chmod 0750 /mnt/shell
chown shell sdcard_rw /mnt/shell
mkdir /mnt/shell/emulated 0700 shell shell
mkdir /mnt/shell/emulated/0 0700 shell shell
mkdir /storage/emulated 0555 root root
mkdir /storage/sdcard1 0000 system system
export EXTERNAL_STORAGE /storage/emulated/legacy
export SECONDARY_STORAGE /storage/sdcard1
export EMULATED_STORAGE_SOURCE /mnt/shell/emulated
export EMULATED_STORAGE_TARGET /storage/emulated
mount tmpfs tmpfs /storage/emulated mode=0705,uid=1023,gid=1023
# Support legacy paths
symlink /storage/emulated/legacy /sdcard
symlink /storage/emulated/legacy /mnt/sdcard
symlink /storage/emulated/legacy /storage/sdcard0
symlink /mnt/shell/emulated/0 /storage/emulated/legacy
symlink /mnt/shell/emulated/0 /storage/emulated/0
symlink /storage/sdcard1 /mnt/sdcard2
and so I deleted those symlinks, packed up the ramdisk and flashed boot.img with those changes... still nothing, the symlinks are still being recreated every boot.
Damn, what a stupid thing. I've found a solution on 4pda forums. I was trying to do it the complicated way while I had everything in the system settings, in a hidden MIUI menu with some untranslated chinese marks.
Under battery settings there are options in chinese, I just had to choose the fifth chinese one and change the storage options :victory:
huaweiproblem said:
Damn, what a stupid thing. I've found a solution on 4pda forums. I was trying to do it the complicated way while I had everything in the system settings, in a hidden MIUI menu with some untranslated chinese marks.
Under battery settings there are options in chinese, I just had to choose the fifth chinese one and change the storage options :victory:
Click to expand...
Click to collapse
Glad you solved it. The reason I mentioned the wipe and all because it's not an uncommon issue when switching from some stock system to custom ones (like CM, etc) where they change the mount point of external from /sdcard to /sdcard0 and it will just copy everything from /sdcard/ to /sdcard0 and you'll have copies of everything which cuts the storage in half. Case in point: http://forum.xda-developers.com/showthread.php?p=51709918#post51709918

[Q] Need to access files on broken phone

Hi there, first time I write here and I probably have a lot to learn
However, a few days ago I accidently dropped by Galaxu SIII from my balcony. As a result both the screen and the touch is broken, the rest seems to work. So, of course I can connect the phone to my computer and gain access to those folders that are always monuted. However I wan't to get access to all files, like I did on the phone after I rooted it. It looks like USB debugging is off even though I was sure it was on, ADB refuses to see the phone anyway. I have tried many ideas, including remote connection to the phone, but all soloutions require to either enable USB debugging or open an app and that is exactly what I cannot do! So what can I do besides getting a new screen, which I don't want since I've already brought a new phone. Mostly I want to save my contacts and I cannot to that with Samsung KIES since I have CM11 on the phone. I really can't find any solution and I really hope somebody out there can help me!
//Oscar
SuperLarre said:
Hi there, first time I write here and I probably have a lot to learn
However, a few days ago I accidently dropped by Galaxu SIII from my balcony. As a result both the screen and the touch is broken, the rest seems to work. So, of course I can connect the phone to my computer and gain access to those folders that are always monuted. However I wan't to get access to all files, like I did on the phone after I rooted it. It looks like USB debugging is off even though I was sure it was on, ADB refuses to see the phone anyway. I have tried many ideas, including remote connection to the phone, but all soloutions require to either enable USB debugging or open an app and that is exactly what I cannot do! So what can I do besides getting a new screen, which I don't want since I've already brought a new phone. Mostly I want to save my contacts and I cannot to that with Samsung KIES since I have CM11 on the phone. I really can't find any solution and I really hope somebody out there can help me!
//Oscar
Click to expand...
Click to collapse
I suppose your files are not on the SD-Card? If they are just remove the card, but I'm pretty sure you wouldn't ask this question if it was that easy!!
broonage said:
I suppose your files are not on the SD-Card? If they are just remove the card, but I'm pretty sure you wouldn't ask this question if it was that easy!!
Click to expand...
Click to collapse
You're right, it isn't that easy!
SuperLarre said:
You're right, it isn't that easy!
Click to expand...
Click to collapse
You could try nandroid backup from recovery, maybe using an otg for watching what your're doing on a separate screen.
When all data is nandroided, you can try going trough the backup (the data section specially).
If the backup has several parts (ie, a b c d… ) you can "merge" them into a single file that could be opened with 7zip or winrar. Just open a DOS command prompt and:
type data.ext4.tar.a data.ext4.tar.b >> data.ext4.tar
Thats the example for 2 parts a and b.Then, after unpacking the tar, you could look into the data to get stuff. For example…
Sms & mms:
data/data/com.android.providers.telephony/databases
Contacts:
data/data/com.android.providers.contacts/databases
And a lot of other stuff. Note that you need something to read-edit ".db" files, like an sqlite editor.
Alternatively, if you're using a similar phone, with same manufacturer, a close android version (for example not gb 2.3 vs kk 4.4, but yes jb 4.1 vs jb 4.3), etc, then you could copy such addresses and paste them inside your new phone (crossing fingers and any other crossable bodypart) and you might get all that stuff back.
Good luck.
Put a blank SD (formatted as FAT32 or exFat) on the phone. It must be sized as the phone's internal memory size (16 or 32GB)
Set the phone in download mode. Flash Phil'z recovery with Odin.
Start the phone in recovery mode. Connect usb to computer and after 10-15 seconds ADB will be enabled.
/data is mounted by default (internal SD is stored inside /data).
Now mount the external SD:
enter adb shell and put:
Code:
mount /dev/block/mmcblk1p1 /external_sd
If any error appear, stop.
If nothing appeared, check that it was sucessfully mounted. Ensure that mmcblk0p12 and mmcblk1p1 are mounted as this!
Code:
mount
rootfs on / type rootfs (rw)
tmpfs on /dev type tmpfs (rw,nosuid,relatime,mode=755)
devpts on /dev/pts type devpts (rw,relatime,mode=600)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
/dev/block/mmcblk0p8 on /cache type ext4 (rw,nodev,noatime,nodiratime,barrier=1,data=ordered)
/dev/block/mmcblk0p12 on /data type ext4 (rw,nodev,noatime,nodiratime,barrier=1,data=ordered)
/dev/block/mmcblk1p1 on /external_sd type exfat (rw,relatime,fmask=0000,dmask=0000,allow_utime=0022,codepage=cp437,iocharset=utf8,namecase=0,errors=remount-ro)
Now copy all the internal storage to the external SD:
Code:
mkdir /external_sd/intData; cd /data; tar cf - * | ( cd /external_sd/intData; tar xf -)
Take a breath and come 15 minutes later to see if it finished. It may take more if the device was nearly full.
After it comes back to shell (you see the # symbol again) it means it's over.
Now let's flush the filesystems and unmount the partitions :
Code:
cd /; sync; umount /external_sd; umount /data
Remove the battery and the sd card.
Put the SD on your computer...done!
- The internal SD is stored on /data/media.
- The app data is on /data/data.
- The apps are on /data/app
- Your contacts are stored on /data/data/databases/com.android.providers.contacts/contacts2.db.
Putting that DB file on the same place of other Android phone and rebooting after will restore your contacts. Or you can convert them to VCF:
http://askubuntu.com/questions/445997/how-to-convert-androids-contacts2-db-to-vcf
Good luck!
dabyd64 said:
Put a blank SD (formatted as FAT32 or exFat) on the phone. It must be sized as the phone's internal memory size (16 or 32GB)
Set the phone in download mode. Flash Phil'z recovery with Odin.
Start the phone in recovery mode. Connect usb to computer and after 10-15 seconds ADB will be enabled.
/data is mounted by default (internal SD is stored inside /data).
Now mount the external SD:
enter adb shell and put:
Code:
mount /dev/block/mmcblk1p1 /external_sd
If any error appear, stop.
If nothing appeared, check that it was sucessfully mounted. Ensure that mmcblk0p12 and mmcblk1p1 are mounted as this!
Code:
mount
rootfs on / type rootfs (rw)
tmpfs on /dev type tmpfs (rw,nosuid,relatime,mode=755)
devpts on /dev/pts type devpts (rw,relatime,mode=600)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
/dev/block/mmcblk0p8 on /cache type ext4 (rw,nodev,noatime,nodiratime,barrier=1,data=ordered)
/dev/block/mmcblk0p12 on /data type ext4 (rw,nodev,noatime,nodiratime,barrier=1,data=ordered)
/dev/block/mmcblk1p1 on /external_sd type exfat (rw,relatime,fmask=0000,dmask=0000,allow_utime=0022,codepage=cp437,iocharset=utf8,namecase=0,errors=remount-ro)
Now copy all the internal storage to the external SD:
Code:
mkdir /external_sd/intData; cd /data; tar cf - * | ( cd /external_sd/intData; tar xf -)
Take a breath and come 15 minutes later to see if it finished. It may take more if the device was nearly full.
After it comes back to shell (you see the # symbol again) it means it's over.
Now let's flush the filesystems and unmount the partitions :
Code:
cd /; sync; umount /external_sd; umount /data
Remove the battery and the sd card.
Put the SD on your computer...done!
- The internal SD is stored on /data/media.
- The app data is on /data/data.
- The apps are on /data/app
- Your contacts are stored on /data/data/databases/com.android.providers.contacts/contacts2.db.
Putting that DB file on the same place of other Android phone and rebooting after will restore your contacts. Or you can convert them to VCF:
http://askubuntu.com/questions/445997/how-to-convert-androids-contacts2-db-to-vcf
Good luck!
Click to expand...
Click to collapse
Amazing answer, however during the first steps, could he be blocked? Due to not seeing the screen? Maybe I'm over complicating things.

Symbolic link (symlink) with rooted Android 10

Hi. Everyone knows that FB app saves its downloaded images in DCIM folder. At the same time, Google Photo doesn't allow to select subfolders elegible to media auto-backup. So my idea is to create a symbolic link between that Facebook subfolder and another one on different location, and so properly save photos and videos on a different folder.
There's any way to do it? I found different procedures on different site but nothing seems to work (btw, i don't know is a procedure fault or an android 10 fault), naturally using Magisk root permissions.
peppe1996 said:
Hi. Everyone knows that FB app saves its downloaded images in DCIM folder. At the same time, Google Photo doesn't allow to select subfolders elegible to media auto-backup. So my idea is to create a symbolic link between that Facebook subfolder and another one on different location, and so properly save photos and videos on a different folder.
There's any way to do it? I found different procedures on different site but nothing seems to work (btw, i don't know is a procedure fault or an android 10 fault), naturally using Magisk root permissions.
Click to expand...
Click to collapse
When you download a photo from within the Facebook app, it is stored in DCIM/Facebook. When you launch the Gallery app, the image shows up right under "Photos". Also in the gallery app if you click on the "COLLECTIONS" tab, it shows up there under "Camera".
FYI: Creating a symlink basically doesn't require Android is got rooted, unless you want to create symlinks in Android's /system partition.
I think it's really easy to create symlinks on Android.
Example:
Code:
adb devices
adb shell "mkdir -p /data/DCIM-Facebook 2>/dev/null"
adb shell "cp -a /DCIM/Facebook /data/DCIM-Facebook"
adb shell "rm -rf /DCIM/Facebook"
adb shell "ln -sf /data/DCIM-Facebook /DCIM/Facebook"
adb shell "ls -l /DCIM/Facebook"
jwoegerbauer said:
When you download a photo from within the Facebook app, it is stored in DCIM/Facebook. When you launch the Gallery app, the image shows up right under "Photos". Also in the gallery app if you click on the "COLLECTIONS" tab, it shows up there under "Camera".
FYI: Creating a symlink basically doesn't require Android is got rooted, unless you want to create symlinks in Android's /system partition.
I think it's really easy to create symlinks on Android.
Example:
Code:
adb devices
adb shell "mkdir -p /data/DCIM-Facebook 2>/dev/null"
adb shell "cp -a /DCIM/Facebook /data/DCIM-Facebook"
adb shell "rm -rf /DCIM/Facebook"
adb shell "ln -sf /data/DCIM-Facebook /DCIM/Facebook"
adb shell "ls -l /DCIM/Facebook"
Click to expand...
Click to collapse
Thanks for the answer man. I tried your procedure and this is what happened https://ibb.co/py7mkfK
This is the classic error that i had with other procedures.
@peppe1996
My fault was to NOT tell you that symlinks only are possible on partitions that support it, means their filesystem is either ext2 or ext3 or ext4 or yaffs2.
Internal sdcard /storage/emulated/0 where folder DCIM resides has filesystem /dev/fuse. Hence my script example was totally wrong.
Sorry for this.
jwoegerbauer said:
@peppe1996
My fault was to NOT tell you that symlinks only are possible on partitions that support it, means their filesystem is either ext2 or ext3 or ext4 or yaffs2.
Internal sdcard /storage/emulated/0 where folder DCIM resides has filesystem /dev/fuse. Hence my script example was totally wrong.
Sorry for this.
Click to expand...
Click to collapse
NP man. So can I do nothing about?
@peppe1996
IMHO an alternative is to create a so-called bind mount. A bind mount is an alternate view of a directory tree. Classically, mounting creates a view of a storage device as a directory tree. A bind mount instead takes an existing directory tree and replicates it under a different point. The directories and files in the bind mount are the same as the original. Any modification on one side is immediately reflected on the other side, since the two views show the same data.
Example pseudo code:
Code:
mount -o bind /some/where /else/where
In your case this should problemfree work because both /sdcard/DCIM/Facebook and /sdcard/Pictures have the same filesystem.
FYI: mount command by default is available in any Android version.
IMPORTANT: Such a bind mount isn't persistent: you have to get it created everytime when Android boots up. That in turn requires to have an init.d script what does the job.
jwoegerbauer said:
@peppe1996
IMHO an alternative is to create a so-called bind mount. A bind mount is an alternate view of a directory tree. Classically, mounting creates a view of a storage device as a directory tree. A bind mount instead takes an existing directory tree and replicates it under a different point. The directories and files in the bind mount are the same as the original. Any modification on one side is immediately reflected on the other side, since the two views show the same data.
Example pseudo code:
Code:
mount -o bind /some/where /else/where
In your case this should problemfree work because both /sdcard/DCIM/Facebook and /sdcard/Pictures have the same filesystem.
FYI: mount command by default is available in any Android version.
IMPORTANT: Such a bind mount isn't persistent: you have to get it created everytime when Android boots up. That in turn requires to have an init.d script what does the job.
Click to expand...
Click to collapse
Thanks mate for tips, but i think this is not i need for my scope. If I'll have the same file tree in both path, Facebook images must remain in the original folder and Google Photo will upload them. If i can preserve some file to be binded, I could try to insert a .nomedia file in DCIM/Facebook. So, DCIM/Facebook will be hidden to Google Photo and i can continue to see Facebook downloaded images in Pictures folder (on the contrary, also .nomedia will be copied and also Pictures/Facebook will be not visible on Google Photo).
@peppe1996
IMHO an alternative is to create a so-called bind mount. A bind mount is an alternate view of a directory tree. Classically, mounting creates a view of a storage device as a directory tree. A bind mount instead takes an existing directory tree and replicates it under a different point. The directories and files in the bind mount are the same as the original. Any modification on one side is immediately reflected on the other side, since the two views show the same data.
Example pseudo code:
Code:
mount -o bind /some/where /else/where
In your case this should problemfree work because both /sdcard/DCIM/Facebook and /sdcard/Pictures have the same filesystem.
FYI: mount command by default is available in any Android version.
IMPORTANT: Such a bind mount isn't persistent: you have to get it created everytime when Android boots up. That in turn requires to have an init.d script what does the job.
Click to expand...
Click to collapse
Hello, i just bring this here up again because i have a similar problem.
I tryed your command and it passed without errors. But without the wished effect.
Code:
:/ # mount -o bind /storage/231A-1B1B/DCIM /storage/emulated/0/DCIM
This is the output of "mount"
Code:
:/ # mount <
rootfs on / type rootfs (ro,seclabel,relatime)
tmpfs on /dev type tmpfs (rw,seclabel,nosuid,relatime,size=891960k,nr_inodes=163101,mode=755)
devpts on /dev/pts type devpts (rw,seclabel,relatime,mode=600)
none on /dev/memcg type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
none on /dev/cpuctl type cgroup (rw,nosuid,nodev,noexec,relatime,cpu)
none on /dev/bfqio type cgroup (rw,relatime,bfqio)
adb on /dev/usb-ffs/adb type functionfs (rw,relatime)
proc on /proc type proc (rw,relatime,gid=3009,hidepid=2)
sysfs on /sys type sysfs (rw,seclabel,relatime)
selinuxfs on /sys/fs/selinux type selinuxfs (rw,relatime)
/sys/kernel/debug on /sys/kernel/debug type debugfs (rw,seclabel,relatime)
tmpfs on /mnt type tmpfs (rw,seclabel,nosuid,nodev,noexec,relatime,size=891960k,nr_inodes=163101,mode=755,gid=1000)
/dev/block/vold/public:179,65 on /mnt/media_rw/9FE1-FB0F type exfat (rw,dirsync,nosuid,nodev,noexec,noatime,fs=exfat,uid=1023,gid=1023,fmask=0007,dmask=0007,allow_utime=0020,codepage=cp437,iocharset=utf8,namecase=0,symlink=0,bps=512,errors=remount-ro)
/data/media on /mnt/runtime/default/emulated type sdcardfs (rw,nosuid,nodev,noexec,noatime,fsuid=1023,fsgid=1023,gid=1015,multiuser,mask=6,derive_gid,default_normal)
/data/media on /mnt/runtime/read/emulated type sdcardfs (rw,nosuid,nodev,noexec,noatime,fsuid=1023,fsgid=1023,gid=9997,multiuser,mask=23,derive_gid,default_normal)
/data/media on /mnt/runtime/write/emulated type sdcardfs (rw,nosuid,nodev,noexec,noatime,fsuid=1023,fsgid=1023,gid=9997,multiuser,mask=7,derive_gid,default_normal)
/dev/block/mmcblk0p23 on /system type ext4 (ro,seclabel,relatime,discard)
none on /acct type cgroup (rw,nosuid,nodev,noexec,relatime,cpuacct)
none on /config type configfs (rw,nosuid,nodev,noexec,relatime)
/dev/block/mmcblk0p24 on /cache type ext4 (rw,seclabel,nosuid,nodev,noatime,noauto_da_alloc,data=ordered)
/dev/block/mmcblk0p25 on /data type ext4 (rw,seclabel,nosuid,nodev,noatime,noauto_da_alloc,data=ordered)
tmpfs on /sbin type tmpfs (rw,seclabel,relatime,size=891960k,nr_inodes=163101,mode=755)
/sbin/.magisk/block/cache on /sbin/.magisk/mirror/cache type ext4 (rw,seclabel,relatime,noauto_da_alloc,data=ordered)
/sbin/.magisk/block/system on /sbin/.magisk/mirror/system type ext4 (ro,seclabel,relatime,discard)
/sbin/.magisk/block/data on /sbin/.magisk/mirror/data type ext4 (rw,seclabel,relatime,noauto_da_alloc,data=ordered)
/sbin/.magisk/block/data on /sbin/.magisk/modules type ext4 (rw,seclabel,relatime,noauto_da_alloc,data=ordered)
tmpfs on /storage type tmpfs (rw,seclabel,nosuid,nodev,noexec,relatime,size=891960k,nr_inodes=163101,mode=755,gid=1000)
/data/media on /storage/emulated type sdcardfs (rw,nosuid,nodev,noexec,noatime,fsuid=1023,fsgid=1023,gid=9997,multiuser,mask=7,derive_gid,default_normal)
tmpfs on /storage/self type tmpfs (rw,seclabel,nosuid,nodev,noexec,relatime,size=891960k,nr_inodes=163101,mode=755,gid=1000)
/dev/block/vold/public:179,97 on /mnt/media_rw/231A-1B1B type vfat (rw,dirsync,nosuid,nodev,noexec,noatime,uid=1023,gid=1023,fmask=0007,dmask=0007,allow_utime=0020,codepage=cp437,iocharset=utf8,shortname=mixed,utf8,errors=remount-ro)
/mnt/media_rw/231A-1B1B on /mnt/runtime/default/231A-1B1B type sdcardfs (rw,nosuid,nodev,noexec,noatime,fsuid=1023,fsgid=1023,gid=1015,mask=6)
/mnt/media_rw/231A-1B1B on /mnt/runtime/read/231A-1B1B type sdcardfs (rw,nosuid,nodev,noexec,noatime,fsuid=1023,fsgid=1023,gid=9997,mask=18)
/mnt/media_rw/231A-1B1B on /mnt/runtime/write/231A-1B1B type sdcardfs (rw,nosuid,nodev,noexec,noatime,fsuid=1023,fsgid=1023,gid=9997,mask=18)
/mnt/media_rw/231A-1B1B on /storage/231A-1B1B type sdcardfs (rw,nosuid,nodev,noexec,noatime,fsuid=1023,fsgid=1023,gid=9997,mask=18)
/mnt/media_rw/231A-1B1B on /storage/emulated/0/DCIM type sdcardfs (rw,nosuid,nodev,noexec,noatime,fsuid=1023,fsgid=1023,gid=9997,mask=18)
The last line appears after i try to mount the folder. Does anybody k ow what goes wrong here?
Marco

Categories

Resources