Related
Hello, fellow gTablet users!
I'm kinda newbie here, so first of all my apologies to everyone if that was already asked, 'cause I did some research on the matter and couldn't find all the necessary info for solving my particular issue.
Ok, so here's the deal. I was using my gTab for about half-year now. When I received it, I installed VeganTab-7 Ginger Edition on it (thanks for the devs - very nice ROM!) and it worked flawlessly until yesterday. But then something not good happened and the tablet stopped booting. Now it starts from birds screen, goes on to G-Tabdevs screen, after which VeganTab GingerEd boot screen appears, it has flashing letters for a couple of seconds and then tablet goes black and tries to boot again. I guess it's a boot loop so it's kinda soft brick and I'll have to do wipe data/factory reset through CWM to solve the issue. So this isn't the biggest problem - I've already found all the instructions.
The real problem is that I didn't make backup of my data (guilty!), but I don't want to lose some of it, especially the browser data. I was using Opera Mobile, so I guess that its data should be on /data partition. So I'll need an advice on how I can dump the necessary data before doing factory reset!
I've already tried connecting to desktop, using guide from this (http://forum.xda-developers.com/showthread.php?t=1010943) thread (third method from it), but it didn't work, at least on my Win7 Pro x64 SP1: the tablet shows as removable disk, but I can't access it. I tried to mount /data or /sdcard partitions through CWM recovery menu, but it tells me that it can't find /dev/block/... - I guess that's block device, associated with those partitions. So what are my best options of backuping data?
And the last question: I'll probably install some other ROM just to try something different, but unfortunately I don't remember what loader I have. I'm nearly sure that I installed VeganTab for 1.1, 'cause I did it back in May 2011 and there wasn't one available for 1.2 yet. But just to make sure: how can I find my loader version before I do reset? Or maybe I just have to do the reset and look for it when back on stock ROM?
Seriously, guys, doesn't anybody know how to solve these problems?
Boot into CWM first, then try mounting both /data and /sdcard using the CWM menu. Note down the exact error message displayed in each case. Then connect the USB cable and run these ADB commands on your PC:
Code:
C:\> [B]adb shell dmesg >dmesg.txt[/B]
C:\> [B]adb shell fdisk -l /dev/block/mmcblk3 > fdisk.txt[/B]
C:\> [B]adb shell fdisk -l /dev/block/mmcblk2 >> fdisk.txt[/B]
Post the error messages and those 2 .txt files here.
Thank you for reply, rajeevvp.
When I'm trying to mount /data and /sdcard it says respectively:
Code:
E:Can't mount /dev/block/mmcblk3p2
(No such file or directory)
Error mounting DATA:!
E:Can't mount /dev/block/mmcblk3p1 (or /dev/block/mmcblk2p1)
(No such file or directory)
Error mounting SDCARD:!
Unfortunately I didn't have ADB installed. Now I'm trying to use the guide from here: http://forum.xda-developers.com/showthread.php?t=902860, but fail on step 4, cause there is nothing like "Nvidia harmony" appearing under other devices in my dev manager, just "Nvidia Tegra 2 USB Device" under Disk Drives and "USB Mass Storage Device" under Universal Serial Bus Controllers. I guess these devices are gTablet's internal memory presented as disk drive...
I'll try to install ADB and then write back how it worked.
Interesting error messages. Now I really have to see those text files.
If you're having problems installing ADB on Windows, try using Linux.
Ok, thanks you very much! I'll try that, but unfortunately tomorrow, as it's already too late here.
Btw, I read your post about linux - you're suggesting Knoppix Live CD there. Is it mandatory to use it? I mean I already have PartedMagic live CD burned, maybe I could use it instead...
anary said:
I mean I already have PartedMagic live CD burned, maybe I could use it instead...
Click to expand...
Click to collapse
If sudo and adb work, then no problem.
rajeevvp said:
Boot into CWM first, then try mounting both /data and /sdcard using the CWM menu. Note down the exact error message displayed in each case. Then connect the USB cable and run these ADB commands on your PC:
Code:
C:\> [B]adb shell dmesg >dmesg.txt[/B]
C:\> [B]adb shell fdisk -l /dev/block/mmcblk3 > fdisk.txt[/B]
C:\> [B]adb shell fdisk -l /dev/block/mmcblk2 >> fdisk.txt[/B]
Post the error messages and those 2 .txt files here.
Click to expand...
Click to collapse
Ok, I finally managed to do it. Sorry for the delay.
The files are attached. Did everything how you told me.
Actually I don't think that I understand too much in Android inner mechanics But having looked through these files, I thought that inner sdcard device (mmcblk3) doesn't seem to produce any strange behavior...
Btw, thanks a lot for your advice about using Knoppix - it's really very easy and handy!
anary said:
But having looked through these files, I thought that inner sdcard device (mmcblk3) doesn't seem to produce any strange behavior...
Click to expand...
Click to collapse
You have lost your /data partition altogether. You are supposed to have 2 partitions on that internal SD card: a 14GB FAT32 partition and a 2GB ext3 partition. You only have a single FAT32 partition spanning the entire SD card now.
I may be able to help you get both partitions back if you give me these details:
1. How and when did this happen?
2. Current ROM.
3. Current version of CWM.
4. Did you try to repartition the (internal) SD card recently?
5. Have you ever repartitioned the internal SD card? If yes, then using which version of CWM?
6. After you noticed the problem what steps did you take to fix the problem?
Yeah, I remember I was curious where it stores OS's kernel if all it has is FAT32 partition - now I get it...
Ok, here are the details:
1. I don't really know what has happened, but I guess that it happened when I tried to use tablet like cardreader for microsd card. During that I sort of formatted external sd - maybe that actually was internal memory? I checked through file manager though, and all the files seemed intact...
2. VeganTab GingerEd from this thread: http://forum.xda-developers.com/showthread.php?t=1031250. I'm pretty sure that I didn't install anything except for it.
3. Don't know. But it says ClockworkMod Recovery v2.5.1.1-bekit-0.8 in recovery menu, so I guess its version is maybe 0.8.
4. No I didn't, at least intentionally.
5. I think I did it just once, when installing the ROM. I'm pretty much sure that I used this instructions for repartitioning: http://viewsonic-gtablet-for-dummies.webs.com/repartition.htm (not exactly this, but I did the same as it's written there). To install the ROM I used the instructions from the ROM thread, mentioned above. I didn't whant to do a lot of modding, just wanted the device to work at least better than with stock ROM, so didn't try to change any other low-level things.
6. I just tried to mount partitions through CWM recovery and I tried wiping out cache partition and Dalvik cache. Nothing else.
anary said:
Yeah, I remember I was curious where it stores OS's kernel if all it has is FAT32 partition - now I get it...
Click to expand...
Click to collapse
The OS kernel is not stored on the SD cards. They're stored on a "boot" partition on the NAND flash. And, if the OS was messed up you would get hung up on the initial splash screen (the one with the 3 birds)--you wouldn't go into a boot loop.
1. I don't really know what has happened, but I guess that it happened when I tried to use tablet like cardreader for microsd card. During that I sort of formatted external sd - maybe that actually was internal memory?
Click to expand...
Click to collapse
That's what caused this problem. CWM-2.5.1.1-bekit-0.8 does not work on the external SD card (but, CWM-2.5.1.3 and CWM-4.0.1.5 do).
Did you format the internal SD card using CWM?
I checked through file manager though, and all the files seemed intact...
Click to expand...
Click to collapse
Files where? The internal SD card or the external one? And, how did you check this? After formatting the internal SD card, the very next boot into the ROM would've put you into a boot-loop because the /data partition is missing.
I think I may be able to get stuff from /data, but, everything on /sdcard is most likely gone. (Actually, the files are most likely all there, but, without direct access to the tablet, it's very difficult to get the retrieve any of them.) Just don't touch the tablet until I've figured out the commands you will have to use.
That's what caused this problem. CWM-2.5.1.1-bekit-0.8 does not work on the external SD card (but, CWM-2.5.1.3 and CWM-4.0.1.5 do).
Did you format the internal SD card using CWM?
Click to expand...
Click to collapse
No, I was going to format external SD card and I tried to do it through Android (or maybe VeganTab) menu. I think that doing this, I could accidentally format internal SD, but I'm not sure this could be done from within the OS. During the same logon session I checked files on internal SD with file manager and all of them were where they should have been. So I thought that all was ok. But when I rebooted next time, it wasn't booting... That's why I told you that maybe it was because of formatting.
And just to be clear: I didn't do anything using CWM after it stopped booting, apart from wiping system and Dalvik caches.
Do you have a large capacity micro SD card (anything larger than the maximum amount of data that's currently on the internal SD card) that you can use to save retrieved data into?
rajeevvp said:
Do you have a large capacity micro SD card (anything larger than the maximum amount of data that's currently on the internal SD card) that you can use to save retrieved data into?
Click to expand...
Click to collapse
Yep. Won't be any problem.
anary said:
Yep. Won't be any problem.
Click to expand...
Click to collapse
OK. Format that micro SD to contain a single DOS partition; then we'll proceed.
rajeevvp said:
OK. Format that micro SD to contain a single DOS partition; then we'll proceed.
Click to expand...
Click to collapse
Ok. That's done.
Boot into CWM, go into the "mounts and storage" menu, unmount all mounted partitions, connect the USB cable, and run these commands using ADB--do not back out of that "mounts and storage" menu while we're fixing this. We're trying to see if the data on the current /sdcard partition can be retrieved.
Code:
$ [B]adb shell[/B]
~ # [B]mount -r /dev/block/mmcblk3p1 /sdcard[/B]
~ # [B]ls -l /sdcard[/B]
If the ls listing looks OK, then we force a filesystem check before copying the data to the external micro SD card:
Code:
~ # [B]mount -r /system[/B]
~ # [B]umount /sdcard[/B]
~ # [B]/system/bin/fsck_msdos -f -y /dev/block/mmcblk3p1[/B]
If the listing doesn't look OK, then the data on /sdcard is lost.
Post the exact output of each command.
Ok, mount says this:
Code:
mount: mounting /dev/block/mmcblk3p1 on /sdcard failed: Invalid argument
and ls after that gives no output - I think it shouldn't give any, 'cause I didn't mount anything...
Does this mean I'm screwed?
Try this mount command:
Code:
~ # [B]mount -r -t vfat /dev/block/mmcblk3p1 /sdcard[/B]
The same result.
Alright so here's the deal, my internal SDCARD is corrupted and the /data partition is unusable.
My device is i9003 and it's running on MIUI at the moment. By default MIUI didn't detect my external SD or my internal SD but after editing "vold.fstab" I was able to mount the first partition of my external SDCARD as external memory and everything was good, I could finally use the camera and pretty much do everything else.
But I was still unable to mount the second partition of my external SDCARD as my internal memory which meant none of my messages could be saved and the phone would pretty much go back to factory settings after a reboot, this apparently is because the /data partition (present on the internal memory) stores all the user data such as the time, the theme I'm using, etc and not having a /data partition meant none of these settings were really saved.
Having no internal memory also means I cannot install any apps such as Link2SD.
Moving on, after many hours of googling I found out that it might not be possible to mount the internal memory using "vold.fstab" and the only way to do it could be by mounting the memory manually during init.
So here's what I want again, I want to use the second partition of my external SDCARD as internal memory, this is likely to solve all my problems and make my phone usable again.
Thanks for all the help, appreciate it.
You need to edit /init.rc (or init.vendor.rc). To make the edits here stay, you'll need to create a new boot.img to flash your device with.
Have a look at an extract of mine init.<vendor>.rc:
Code:
on fs
# mount mtd partitions
# Mount /system rw first to give the filesystem a chance to save a checkpoint
#mount yaffs2 [email protected] /system
#mount yaffs2 [email protected] /system ro remount
# Use below two lines instead of above to run /system from SDcard instead of internal flash
mount ext3 /dev/block/mmcblk0p3 /system
mount ext3 /dev/block/mmcblk0p3 /system ro remount
#mount yaffs2 [email protected] /data nosuid nodev
mount ext3 /dev/block/mmcblk0p4 /data nosuid nodev
mount yaffs2 [email protected] /cache nosuid nodev
Compare the lines I've commented out with the others. Here both /data and /system resides on the SDcard, you only need to care about /data. Also remember your device nodes may not be named "mmcblk0p3" etc.
But you'll need to make those changes in the initramfs in your flashed boot.img to make them stay.
kuisma said:
You need to edit /init.rc (or init.vendor.rc). To make the edits here stay, you'll need to create a new boot.img to flash your device with.
Have a look at an extract of mine init.<vendor>.rc:
Code:
on fs
# mount mtd partitions
# Mount /system rw first to give the filesystem a chance to save a checkpoint
#mount yaffs2 [email protected] /system
#mount yaffs2 [email protected] /system ro remount
# Use below two lines instead of above to run /system from SDcard instead of internal flash
mount ext3 /dev/block/mmcblk0p3 /system
mount ext3 /dev/block/mmcblk0p3 /system ro remount
#mount yaffs2 [email protected] /data nosuid nodev
mount ext3 /dev/block/mmcblk0p4 /data nosuid nodev
mount yaffs2 [email protected] /cache nosuid nodev
Compare the lines I've commented out with the others. Here both /data and /system resides on the SDcard, you only need to care about /data. Also remember your device nodes may not be named "mmcblk0p3" etc.
But you'll need to make those changes in the initramfs in your flashed boot.img to make them stay.
Click to expand...
Click to collapse
Thanks for the reply man, mind telling me the how I can go about doing this?, I've got the ROM I flashed via CWM here with me, I could send it over to you if that would make things easier for you.
EDIT: would pulling init.rc via ADB, making the changes and pushing it back do the trick? or do I have to go for the boot.img? In case it's the latter, I'm going to need help doing it.
PhantomPhreek said:
Thanks for the reply man, mind telling me the how I can go about doing this?, I've got the ROM I flashed via CWM here with me, I could send it over to you if that would make things easier for you.
Click to expand...
Click to collapse
You'll find a good tutorial about how to work with boot images here: http://android-dls.com/wiki/index.php?title=HOWTO:_Unpack,_Edit,_and_Re-Pack_Boot_Images
If you already got the ROM in a file, this should be easy! Got ADB and FASTBOOT as well?
kuisma said:
You'll find a good tutorial about how to work with boot images here: http://android-dls.com/wiki/index.php?title=HOWTO:_Unpack,_Edit,_and_Re-Pack_Boot_Images
If you already got the ROM in a file, this should be easy! Got ADB and FASTBOOT as well?
Click to expand...
Click to collapse
I'm not sure I've got FASTBOOT but I've definitely got ADB and I've also got the ROM. Would pulling init.rc via ADB, making the changes and pushing it back do the trick? or do I have to go for the boot.img?.
PhantomPhreek said:
I'm not sure I've got FASTBOOT but I've definitely got ADB and I've also got the ROM. Would pulling init.rc via ADB, making the changes and pushing it back do the trick? or do I have to go for the boot.img?.
Click to expand...
Click to collapse
No. You need to reboot the phone for the init.rc script to execute, and once you reboot the phone, the root file system is overwritten by the flashed image ... Catch 22.
You'll NEED to create a new boot.img with a new initramfs containing your changes.
kuisma said:
No. You need to reboot the phone for the init.rc script to execute, and once you reboot the phone, the root file system is overwritten by the flashed image ... Catch 22.
You'll NEED to create a new boot.img with a new initramfs containing your changes.
Click to expand...
Click to collapse
Shucks, this explains why it didn't work. Alright, so I extract boot.img from the rom, follow the tutorial.What is it that I have to edit again? "/init.rc" or "init.<vendor>.rc"?.
Thanks for the help man, appreciate it.
EDIT: Looks like the tutorial is meant for Linux, I'm currently on Windows. I might be asking for a lot here but is there any chance I could get you to do it for me?
PhantomPhreek said:
Shucks, this explains why it didn't work. Alright, so I extract boot.img from the rom, follow the tutorial.What is it that I have to edit again? "/init.rc" or "init.<vendor>.rc"?.
Thanks for the help man, appreciate it.
Click to expand...
Click to collapse
Of course, MIUI may have some boot hooks you could use to re-mount /data after boot. I know nothing about that ROM. Also keep in mind that each time you update the ROM, you have to remake this edit.
Also, no idea what MIUI calls its init.rc, you'll just have to see for yourself. If you've got the mount commands in init.rc, fine. Else look elsewhere.
A good first step would to make sure you really are able to flash a new boot.img. Download fastboot and verify your device understands it. Else you have to use some proprietary flash program, and I'm not familiar with Samsungs bootloaders at all. Ask in the Samsung forum if so.
kuisma said:
Of course, MIUI may have some boot hooks you could use to re-mount /data after boot. I know nothing about that ROM. Also keep in mind that each time you update the ROM, you have to remake this edit.
Also, no idea what MIUI calls its init.rc, you'll just have to see for yourself. If you've got the mount commands in init.rc, fine. Else look elsewhere.
A good first step would to make sure you really are able to flash a new boot.img. Download fastboot and verify your device understands it. Else you have to use some proprietary flash program, and I'm not familiar with Samsungs bootloaders at all. Ask in the Samsung forum if so.
Click to expand...
Click to collapse
Looks like the tutorial is meant for Linux, I'm currently on Windows. I might be asking for a lot here but is there any chance I could get you to do it for me?. ADB and I do see the file init.rc and I also see the mount commands as well. I used adb shell to run the command you sent over with a few edits for second partition and it does mount but as you said, it all goes away after reboot.
PhantomPhreek said:
Looks like the tutorial is meant for Linux, I'm currently on Windows. I might be asking for a lot here but is there any chance I could get you to do it for me?. ADB and I do see the file init.rc and I also see the mount commands as well. I used adb shell to run the command you sent over with a few edits for second partition and it does mount but as you said, it all goes away after reboot.
Click to expand...
Click to collapse
Hmm... are you even able to create a second ext3 partition on the SDcard using Windos..?
kuisma said:
Hmm... are you even able to create a second ext3 partition on the SDcard using Windos..?
Click to expand...
Click to collapse
haha, I used CWM to create the partitions initially, but then I used a software called MiniTool, works well. Can I get you to to do it?
PhantomPhreek said:
Alright so here's the deal, my internal SDCARD is corrupted and the /data partition is unusable.
Click to expand...
Click to collapse
The ROM you are using requires an ext4 partition as partition #3 of the SDcard. This is mounted as /data. Repartition your SDcard #1 as FAT, #2 whatever, and #3 as ext4, and everything will work as intended. :victory:
I guess you've missed this in the ROM documentation ...
kuisma said:
The ROM you are using requires an ext4 partition as partition #3 of the SDcard. This is mounted as /data. Repartition your SDcard #1 as FAT, #2 whatever, and #3 as ext4, and everything will work as intended. :victory:
I guess you've missed this in the ROM documentation ...
Click to expand...
Click to collapse
Wah~ really?, I'll try that and get back here with the results. Thanks a lot!.
EDIT: Is it FAT or FAT32?
PhantomPhreek said:
Wah~ really?, I'll try that and get back here with the results. Thanks a lot!.
EDIT: Is it FAT or FAT32?
Click to expand...
Click to collapse
FAT32.
kuisma said:
FAT32.
Click to expand...
Click to collapse
Tried but didn't work out. I made three partitions, all primary - #1 FAT32, #2 FAT32, #3 EXT4. Plugged the SDCARD in and the external memory was detected as usual, but not the internal memory.
I tried changing the time, it was reset back after reboot.
After that I left the SDCARD as is and flashed the ROM again and now, neither the internal nor the external memory are detected. This is probably because the "vold.fstab" which was edited by me, was overwritten on re flashing.
I'm at a dead end, any ideas?
PhantomPhreek said:
Tried but didn't work out. I made three partitions, all primary - #1 FAT32, #2 FAT32, #3 EXT4. Plugged the SDCARD in and the external memory was detected as usual, but not the internal memory.
I tried changing the time, it was reset back after reboot.
After that I left the SDCARD as is and flashed the ROM again and now, neither the internal nor the external memory are detected. This is probably because the "vold.fstab" which was edited by me, was overwritten on re flashing.
I'm at a dead end, any ideas?
Click to expand...
Click to collapse
Attach an output of "df", "mount", the file "/init.latona.rc" and "/etc/vold.fstab" here, and I'll have a look at it. Hmm... include the output of "dmesg" as well, to be on the safe side.
kuisma said:
Attach an output of "df", "mount", the file "/init.latona.rc" and "/etc/vold.fstab" here, and I'll have a look at it. Hmm... include the output of "dmesg" as well, to be on the safe side.
Click to expand...
Click to collapse
What bugs me is the fact that the external SD is not detected, from what little knowledge I have, external SD is unrelated to the internal SD which I currently have problems with, meaning it should be detected without a problem.
Also I have to add, CWM doesn't detect my external SD right away, when I go to recovery and go over to "Choose zip from sdcard" it says "E:Can't mount /sdcard/". The solution I've found coincidentally is to go to "mounts & storage", mount "/emmc", pull the SDCARD out plug it in again and then "mount /sdcard" this works perfectly and I'm able to flash roms from the sdcard.
One problem at a time, please. Attach the files I requsted, so we can determine why /data failes to mount. Looking at your ROM:
Code:
$ grep " /data$" init.latona.rc
mount ext4 /dev/block/mmcblk0p3 /data
I want to know why this fails, and I guess the answer is in the dmesg output. And please before I'll get another whiskey.
kuisma said:
One problem at a time, please. Attach the files I requsted, so we can determine why /data failes to mount. Looking at your ROM:
Code:
$ grep " /data$" init.latona.rc
mount ext4 /dev/block/mmcblk0p3 /data
I want to know why this fails, and I guess the answer is in the dmesg output. And please before I'll get another whiskey.
Click to expand...
Click to collapse
I can't seem to find "/init.latona.rc" everything else you requested I've mailed them over already
EDIT: the dmesg output is AFTER I mounted "/sdcard" manually as explained in my previous post.
PhantomPhreek said:
I can't seem to find "/init.latona.rc" everything else you requested I've mailed them over already
EDIT: the dmesg output is AFTER I mounted "/sdcard" manually as explained in my previous post.
Click to expand...
Click to collapse
The files you mailed me does not correspond to the ROM you refereed.
The /etc/fstab show that /data is mounted as an rfs file system, not ext4. So either format partition #3 on the sdcard as rfs (Samsung proprietary), or edit /etc/fstab and change "rfs" to "ext4". I'd prefer the later, assuming your kernel supports ext4. Else use ext3.
Code:
/dev/block/mmcblk0p3 /data rfs rw
But you can't have flashed the ROM you told me you did. It excepted an ext4 file system ...
My situation: Galaxy S3 with latest (26 Oct. 2012) update to 4.1.1 via Kies. Then rooted. Works smoothly. External Sd-card visible, no problem.
Then:
repartitioned SD-card with gparted in Fedora machine: mmcblk1p1 with old contents, mmcblk1p2 for new contents, both vfat. Filled mmcblk1p2 with contents from linux machine.
In the phone the first partition (the one with the old data) is recognised as before. The second partition is not seen.
By using the terminal emulator as super user I can mount the second partition by the command:
mount -rw -t vfat /dev/block/mmcblk1p2 <mountpoint>
<mountpoint> is a directory VISIBLE to File Explorer.
After mounting, however, the directory contents are NOT visible in File explorer (even after stopping and restarting File explorer) but can be listed perfectly in the terminal emulator. Giving the cp-command for copying of an individual (MP3) file from the <mountpoint> to the folder Music shows the copied file in that folder and the music can be played in the usual way through the GUI.
Question:
Does anybody have an idea how to make the mounted 2nd partition visible to the apps so that the files can be accessed though the GUI?
Thanks for thinking about this problem.
Bananiel-1944
Found the solution by some more thinking after all:
mount -rw -t vfat -o umask=0000 /dev/block/mmcblk1p2 <mountpoint>
The -o umask=0000 is essential, otherwise the permissions are rwx------; with the umask option they are rwxrwxrwx and thus can be reached.
For safety sake, mount when needed and umount promptly afterwards.
Bananiel-1944
Bananiel-1944 said:
My situation: Galaxy S3 with latest (26 Oct. 2012) update to 4.1.1 via Kies. Then rooted. Works smoothly. External Sd-card visible, no problem.
Then:
repartitioned SD-card with gparted in Fedora machine: mmcblk1p1 with old contents, mmcblk1p2 for new contents, both vfat. Filled mmcblk1p2 with contents from linux machine.
In the phone the first partition (the one with the old data) is recognised as before. The second partition is not seen.
By using the terminal emulator as super user I can mount the second partition by the command:
mount -rw -t vfat /dev/block/mmcblk1p2 <mountpoint>
<mountpoint> is a directory VISIBLE to File Explorer.
After mounting, however, the directory contents are NOT visible in File explorer (even after stopping and restarting File explorer) but can be listed perfectly in the terminal emulator. Giving the cp-command for copying of an individual (MP3) file from the <mountpoint> to the folder Music shows the copied file in that folder and the music can be played in the usual way through the GUI.
Question:
Does anybody have an idea how to make the mounted 2nd partition visible to the apps so that the files can be accessed though the GUI?
Thanks for thinking about this problem.
Bananiel-1944
Click to expand...
Click to collapse
Dear Bananiel,
your post was closest to the solution of my problem, maybe you could suggest something that will finally help me.
I've partitioned external SDcard with CWM to be used for Link2SD. Link2SD's script works fine and the EXT2 partition mounts well. The problem is with the FAT32 partition which can't be mounted by android (I get "SD card empty of file system damaged" in the notification area). When I go in CWM recovery mode I can mount that partition by choosing "mount USB storage" option and then I can see it on my PC. Partition is healthy and PC has no problems with it.
I've tried issuing commands you've suggested in your post through ADB SHELL, after that when I go to folder that I've designated as mount point I can see files from non-working partitio, but the message in notification area still persist. Also the change is not permanent, after reboot I have to do that again.
Thanks in advance for any help given.
Bananiel-1944 said:
Found the solution by some more thinking after all:
mount -rw -t vfat -o umask=0000 /dev/block/mmcblk1p2 <mountpoint>
The -o umask=0000 is essential, otherwise the permissions are rwx------; with the umask option they are rwxrwxrwx and thus can be reached.
For safety sake, mount when needed and umount promptly afterwards.
Bananiel-1944
Click to expand...
Click to collapse
dxage said:
Dear Bananiel,
your post was closest to the solution of my problem, maybe you could suggest something that will finally help me.
I've partitioned external SDcard with CWM to be used for Link2SD. Link2SD's script works fine and the EXT2 partition mounts well. The problem is with the FAT32 partition which can't be mounted by android (I get "SD card empty of file system damaged" in the notification area). When I go in CWM recovery mode I can mount that partition by choosing "mount USB storage" option and then I can see it on my PC. Partition is healthy and PC has no problems with it.
I've tried issuing commands you've suggested in your post through ADB SHELL, after that when I go to folder that I've designated as mount point I can see files from non-working partitio, but the message in notification area still persist. Also the change is not permanent, after reboot I have to do that again.
Thanks in advance for any help given.
Click to expand...
Click to collapse
In my situation (SD-card with two partitions, both vfat) the first partition automatically was mounted at start-up, the second needed to be mounted manually whenever I wanted to access it. This was also my intention as that second partition contains sensitive information.
Android has a file fstab.<system-id> in the root directory, in which some mounts are mentioned (but not all).
You could try to edit this file with the permanent mounts you are looking for. I'm not sure if that works, however, as I do not want a permanent mount.
Can you publish your results, please?
Bananiel
Finally!
I managed to get my external partitions visible with the help of this post.
Device: Samsung Galaxy Tab2 10.1
ROM: Candy5_p5110 Android 5.1.1
SDExternal: 2 Partitions; 1st VFAT, 2nd Ext3
Using Mount2Sd from Google Playstore.
I had the same mounting issues. SD external would only mount Partition 1 automatically and manually mounting Partition 2 would only be visible via Terminal.
The solution that finally fixed the invisible 2nd Partition was to reformat the 2nd Partition with Ext3 and allowing Mount2Sd to find it and mount to /sd-ext. Formatting to vfat or ext4 did not work. Only Ext3 did the trick.
I hope this helps others and big thanks to the OP for bringing this issue up.
Hi all.
I recently went about updating my tablet, and in the back of my mind I was under the impression that TWRP would backup the internal sdcard's files during the normal backup, so I thought nothing of wiping the internal sdcard. Whoops. It, of course, didn't, and now I find myself with a whole slew of stuff gone. Not much else was written to the internal sdcard (which is on an ext4 filesystem), so I suspect that a good bit of my stuff can still be sitting there in the data graveyard. Hopefully.
Since I'm on Linux and can't mount the sdcard directly (since for some odd reason Linux has issues with MTP), all I've been able to do was this:
I booted the tablet into recovery mode and opened up adb, and ran the following command through the adb shell:
Code:
~ # dd if=/dev/block/mmcblk0p8 of=/dev/block/mmcblk1p1
Where mmcblk0p8 is the internal sdcard with the lost data, and mmcblk1p1 is an external sdcard. I thought that by running that command, I could create a carbon copy of each and every little thing on the old sdcard, write it onto something my computer could read, and then go through the normal recovery process. In this case I planned to use a Linux tool called "extundelete."
Here's where I get stuck. The sdcard appeared to have cloned correctly, given that the entire thing is now filled up and reads as an ext4 filesystem on gparted (when it was previously fat32), but now I can't mount it. And if I can't mount it, I can't restore anything. Here's what I get when I try to mount it:
Code:
Error mounting /dev/sdb at /media/user/57f8f4bc-abf4-655f-bf67-946fc0f9f25b: Command-line `mount -t "ext4" -o "uhelper=udisks2,nodev,nosuid" "/dev/sdb" "/media/user/57f8f4bc-abf4-655f-bf67-946fc0f9f25b"' exited with non-zero exit status 32: mount: wrong fs type, bad option, bad superblock on /dev/sdb,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so
So to sum it up, I accidentally wiped my tablet's internal sdcard using TWRP 2.3.3.0, and now I want to recover what was lost during the wipe. Not that it matters, my tablet is a Transformer Infinity in case anyone asks. Though I don't think that's really relevant here.
If anyone knows how to help me, or knows of a better way I should go about getting my data back, that would be, for a lack of better words, super awesome.
Thanks!
BJSerpas said:
Error mounting /dev/sdb
Click to expand...
Click to collapse
Seems you tried to mount /dev/sdb, not /dev/sdb1.
Also, did you make the SDcard partition the same size as the source partition? And what did dmesg say?
Also, http://forum.xda-developers.com/showthread.php?t=1994705 might be of some help..
kuisma said:
Seems you tried to mount /dev/sdb, not /dev/sdb1.
Also, did you make the SDcard partition the same size as the source partition? And what did dmesg say?
Click to expand...
Click to collapse
When I plugged it in, Linux automatically mounted it to sdb and not sdb1. And the external SD card was the same size as the internal one, 32gb. Currently not home so I can't run dmesg at the moment.
And thank you bodh, that looks very useful and is more or less what I was trying to do. I'll have to get on a windows PC it seems, but no issue there. In the meantime, is there a way to write protect the internal SD from the android terminal emulator until I get home? I don't want my old files accidentally overwritten. Or I could just not use the tablet if that's the better option here.
Thanks guys!
I'm not sure you could write protect the internal sd. I've tried changing permissions on it and get errors. You're best bet is probably to go without the tablet use for now.
BJSerpas said:
When I plugged it in, Linux automatically mounted it to sdb and not sdb1. And the external SD card was the same size as the internal one, 32gb. Currently not home so I can't run dmesg at the moment.
Click to expand...
Click to collapse
I'm talking about the number of blocks exactly, not "32gb" or so. And mount /dev/sdb1 manually, don't rely on Gnome failing to mount /dev/sdb.
Hi!
Partitioned my 32GB sdcard, and put CM10.2 on it, but when I check it I have only about 400mb of space or something like that. I had the same amount of space on a 4GB sdcard I used before. Why am I not able to use up the rest of the GB's?! Can someone tell me how to fix it, I don't know if I'm partitioning wrong or doing something wrong, but I want to be able to have lots of extra space for music, apps, etc. Please help! Thanks!!!
I believe you used a low level utility like dd or similar to flash an image onto a partition.
You need to run fsck on that partition, then run resize2fs to expand the ext2/3/4 partition.
Let's say your partition is /dev/block/mmcblk1p1
You would do (in a terminal):
adb reboot recovery
adb shell
# umount /dev/block/mmcblk1p1
# e2fsck /dev/block/mmcblk1p1
# resize2fs /dev/block/mmcblk1p1
After that, your partition will get expanded to whatever size you made it.
It takes a while so be patient. The larger the partition, the longer it will take.
Zenile said:
Hi!
Partitioned my 32GB sdcard, and put CM10.2 on it, but when I check it I have only about 400mb of space or something like that. I had the same amount of space on a 4GB sdcard I used before. Why am I not able to use up the rest of the GB's?! Can someone tell me how to fix it, I don't know if I'm partitioning wrong or doing something wrong, but I want to be able to have lots of extra space for music, apps, etc. Please help! Thanks!!!
Click to expand...
Click to collapse
if you got a prebaked image of a bootable cm card from somewhere, then it usually has 4 partitions on it that were set to the sizes the author of the card specified.
/boot
/system
/data
/sdcard
You would need to put the card in a PC, and use a disk partitioning utility to resize the partitions
some of the images include additional flash files that you install to expand the card's partitions for you. (succulent's), but
you have to do it as you install for the first time.
I prefer to build the card empty first, and load the boot files and zips manually.
linux tools like gparted, Parted Magic , booting from a live USB or CD work pretty well.
Windows based ones like Easus Partition master, or Paragon, not so good.
Mini Tool partition wizard (windows/free) sometimes works
this looks to be a decent write up
http://www.mobileread.com/forums/showthread.php?t=202660
mikeataol said:
...
I prefer to build the card empty first, and load the boot files and zips manually.
linux tools like gparted, Parted Magic , booting from a live USB or CD work pretty well.
Windows based ones like Easus Partition master, or Paragon, not so good.
Mini Tool partition wizard (windows/free) sometimes works
this looks to be a decent write up
http://www.mobileread.com/forums/showthread.php?t=202660
Click to expand...
Click to collapse
The write-up is also posted on XDA at http://forum.xda-developers.com/showthread.php?t=2098419. It was written back in the days of CM10.1, so to use it for CM10.2 or CM11:
Obtain the boot files: MLO, u-boot.bin, and flashing_boot.img -- as well as the files boot.img and recovery.img, from the /boot partition of the pre-made SD CM image. Make sure that MLO is the first file to copy to the freshly made /boot partition.
Substitute in the appropriate ROM and Gapps zip files corresponding to the particular CM build of interest.