yashsingh1/xdaforums huggingface dataset:
[G Tablet Q&A, Help & Troubleshooting] rajeevvp:
I'm checking the kernel for error messages with the dmesg command, so it should be executed after a test run. If you reboot, those error messages will be lost.

Ok, so we've confirmed that:

1. the problem affects both partitions, hinting that this is an SD card problem.

2. The problem affects small, newly created files.

3. It manifests under 2 different kernels (recovery and standard).

4. Interestingly both you and the other guy who had this same problem have a slightly different SD card type from the rest of us. This is your card:

<6>[ 11.410418] mmc2: new high speed SDHC card at address aaaa
<6>[ 11.431137] mmcblk3: mmc2:aaaa SE16G 14.8 GiB
<6>[ 11.435712] mmcblk3: p1 p2
<4>[ 11.441021] mmc_rescan out

It's an 14.8 GiB SDHC card - SE16G

Most of us have this one:

<6>[ 11.768169] mmc2: new high speed MMC card at address 0001
<6>[ 11.782640] mmcblk3: mmc2:0001 MAG4EM 14.9 GiB
<6>[ 11.787392] mmcblk3: p1 p2

A 14.9 GiB MMC card - MAG4EM

I noticed this before too, but, I don't know how significant this is. MMC cards and SDHC cards are freely interchangeable, as far as I know. You could ask around. So will I, now that I've seen it on your tablet too.

Care to run a couple more tests, or you want to call it a day?
[G Tablet Q&A, Help & Troubleshooting] titobetlogs:
I think I'll call it a night over here, pretty late. Maybe leave your next request and I can run those this weekend. I'll happily run some more tests for you. I hope this data will prove useful.

The first thing I can do is redo those dmesg.txt files.

So to clarify, you want me to run the dmesg prior to rebooting, pretty much using the following sequence of commands, for /sdcard and /data?

~ # mount /sdcard

~ # mkdir -p /sdcard/a/b/c

~ # echo test > /sdcard/a/b/c/test.txt

~ # cat /sdcard/a/b/c/test.txt

~ # umount /sdcard

~ # mount /sdcard

~ # cat /sdcard/a/b/c/test.txt

~ # umount /sdcard

~ # exit

C:\SOME\PATH> adb shell dmesg > dmesg1.txt

Sucks that I just happened to be the lucky one to run into this problem.
[G Tablet Q&A, Help & Troubleshooting] rajeevvp:
I'll do that. Don't worry about the dmesgs. I've got everything I wanted with this series of tests.

Dude, I would happily exchange tablets with you. The thing is that I can exactly reproduce your problem in software by using union mounts and things. But, this technique requires deliberate intent and it's unlikely to occur by accident.

I've just emailed the guy who wrote that SDHC/MMC/SDIO Linux kernel code asking him for help. Let's hope he can tell us how hardware can suddenly behave like this.

I'll send the final test commands later this evening and get the flashable zip file ready this weekend.
[G Tablet Q&A, Help & Troubleshooting] rajeevvp:
Titobetlogs: Need the output of these command:

C:\some\path> [B]adb shell cat /etc/fstab > fstab.txt[/B]
C:\some\path> [B]adb shell mount /sdcard[/B]
C:\some\path> [B]adb shell mount > mount.txt[/B]
C:\some\path> [B]adb shell umount /sdcard[/B]
[G Tablet Q&A, Help & Troubleshooting] titobetlogs:
Here you go, attached.
[G Tablet Q&A, Help & Troubleshooting] rajeevvp:
You had an external SD card in the slot when you got this output, right?
[G Tablet Q&A, Help & Troubleshooting] rajeevvp:
Since you're going to be using the external SD card in place of the internal one soon, check if the external SD card doesn't have the same problem. Insert an external SD if it isn't there already, boot into CWM, then run:

C:\SOME\PATH> [B]adb shell[/B]
~ # [B]umount /sdcard[/B] [I]Unmount /sdcard before starting[/I]
~ # [B]mount /dev/block/mmcblk2p1 /sdcard[/B] [I]Mount external SD card partition[/I]
~ # [B]mkdir -p /sdcard/a/b/c[/B] [I]Make a directory tree[/I]
~ # [B]echo test > /sdcard/a/b/c/test.txt[/B] [I]Create a file[/I]
~ # [B]cat /sdcard/a/b/c/test.txt[/B] [I]Read it back again[/I]
test [I]Correct[/I]
~ # [B]echo 3 > /proc/sys/vm/drop_caches[/B] [I]Flush kernel caches[/I]
~ # [B]cat /sdcard/a/b/c/test.txt[/B] [I]Read it back again[/I]
test [I]Correct[/I]
~ # [B]umount /sdcard[/B] [I]Unmount[/I]
~ # [B]mount /dev/block/mmcblk2p1 /sdcard[/B] [I]Remount /sdcard[/I]
~ # [B]cat /sdcard/a/b/c/test.txt[/B] [I]Reread file[/I]
test [I]You should see "test" here[/I]
~ # [B]umount /sdcard[/B]
[G Tablet Q&A, Help & Troubleshooting] titobetlogs:
see attached. Did I do that right? looks like I couldn't umount the sdcard to begin with
[G Tablet Q&A, Help & Troubleshooting] rajeevvp:
That's perfect. You can ignore that error--no sdcard was already mounted; probably because you just booted into CWM when you ran that test.

Your external SD card has no problems. We can use it safely. BTW, this is how the tests on the internal SD card should have turned out.
[G Tablet Q&A, Help & Troubleshooting] titobetlogs:
Great, thanks for that. I'll run this test if I upgrade to a bigger card. Hope to get a 32 gb soon. Is that the max the tablet will accept?
[G Tablet Q&A, Help & Troubleshooting] rajeevvp:
That's what I've been told.
[G Tablet Q&A, Help & Troubleshooting] titobetlogs:
Sweet, that's a good sized card anyway. For now I'll just go with the 16 gb card that we tested.
[G Tablet Q&A, Help & Troubleshooting] titobetlogs:
Rajeevvp,

Quick Question: I believe you mentioned somewhere that the SD card would always have to be in the tablet to function properly. After we run through the process, Would it be okay to swap SD cards out when the tablet is off? Was wondering how it would work if I went with the 16 GB card I currently had and later wanted to update to the 32, and even if this might be an easy way to swap out between different roms...

My gut tells me it can't be that simple, that somehow the internal memory of the tablet has to be somehow linked to the SD card? But would be cool if something like this was possible.

Also, if you shouldn't be taking it out at all, if it ever was accidentally ejected, could that potentially permanently brick the system?
[G Tablet Q&A, Help & Troubleshooting] titobetlogs:
oops error post
[G Tablet Q&A, Help & Troubleshooting] titobetlogs:
Hey Rajeevvp,

One other thing, looking at micro SD cards, is it important that it be a certain class (2, 4, or 6?) Will that make a difference in performance?

Thanks,

Marc
[G Tablet Q&A, Help & Troubleshooting] rajeevvp:
That is correct, because the /data partition is on the (internal) SD card. The minimum size of the /data partition, for the the gTablet, is somewhere around 512 MB because that is where user apps are stored. If we had a bigger NAND flash (currently 512 MB) on the gTab, we could've put /data too on the NAND flash, like is done on most Android phones.

As long as the tablet is off, you can do whatever you want--backup, restore, delete, add files..., as long as you replace the card (or another card with the same contents) before the tablet is powered on.

You can upgrade the card whenever you want. You'll just have to remember to make 2 partitions on the new card and then copy the contents of (at least the /data) partitions over to the same partitions on the new card.

This will be pretty difficult (but, not impossible) because the current kernel and other system utilities (think CWM, for example, or ROM Manager) looks for the /system, /cache, /misc, /logodata, ... partitions (all except /data and /sdcard, in fact) only on the NAND flash. With some work you could move all of this--except the "boot" and "recovery" partitions--onto SD cards. This again, will be a custom solution--meaning you'll to do some work if you ever switch ROMs. (In fact, even the new ROM installation will have to be customized.)

Your gut is very smart, then. As I said, it is possible, but it will be a custom job involving some amount of work.

I'm not an electrical engineer, so I can't tell you what happens when an SD card is unmounted in preparation for an ejection. Is the power to the card turned off? Can you remove the card even with the power on? You'll have to ask someone else about this.

Software-wise, the /sdcard partition can be unmounted anytime even now--just try it--but, the /data partition needs to be mounted always. So, what would happen if you eject the SD card while the system was running? What would happen if you ejected a floppy disk while the system was using it? The answer is: It depends. The running system could lock-up. You might lose some data. You might trash the partition. But, you wouldn't, I think, brick the device permanently--I mean you should be able to use CWM to format/partition/filesystem check the SD card back to a usable state.

As long as the card is recognized by the tablet it should work. Again, I'm not an expert on SD card internals (if I were, I would've "fixed" your problem instead of authoring "workarounds"), but, I don't forsee any problems with most standard micro SD cards.

Yes, performance is dependant on SD card class--the higher the better.

My turn now:

Does your version of ClockworkMod Recovery have distinct "format sdcard" / "format internal sdcard" (under "mounts and storage") and "Partition SD Card" / "Partition Internal SD Card" (under "advanced") menu items?
[G Tablet Q&A, Help & Troubleshooting] titobetlogs:
Under mounts and storage, I only see "format sdcard" or "format sd-ext, and under advanced there is only "Partition SD Card" and no selection for "Partition Internal SD Card".

By the way, starting tomorrow I'll be away from my G Tab for a bit and will have intermittent access to internet, so I won't be able to be so quick to respond... but I'm still for sure interested, and will definitely want to pick up where we leave off as soon as possible!

Thanks again for all the help
[G Tablet Q&A, Help & Troubleshooting] Oozura:
Add number 3 tablet to the list

Never had any issues with the internal SD for months. The battery failed on the tablet so I sent it in for replacement. Oddly they send back a tablet with the same back-cover but a different front. I know this because I modified the soft buttons and there was a screen protector.

So, as soon as I get it, I nvflash and load CWM. And try to load my backups to the internal memory. Files appear to copy at first but upon trying to load a cwm-backup or even a new rom.zip, installations abort or backup md5s mismatch.

Go back to CWM and look at the internal SD and low and behold all files I copied are no longer there...

Anyways thanks for the above swap fix. This can temporarily give me some relief..
[G Tablet Q&A, Help & Troubleshooting] rajeevvp:
Just got an interesting PM from user sandyjb who originally introduced me to this "Groundhog Day problem". He decided to send his gTab in for replacement and here's what he says:

Not sure how VS fixed the non-working internal SD card.

Can it be fixed using SW? Or, did they change the system board/sdcard chip?

Can the problem be fixed by moving to a 1.2 bootloader and kernel? (We know that the only change between 1.1 and 1.2 kernels is an additional voltage step. Why did VS add that voltage step?)

More questions than answers at this point...
[G Tablet Q&A, Help & Troubleshooting] titobetlogs:
woah hey! Thanks for the update, I'll try it out with my 16 gb micro sd card and see how it works out. Glad to see I'm not the only one having this problem!
[G Tablet Q&A, Help & Troubleshooting] titobetlogs:
Rajeevvp, thanks for everything! Your fix worked great and I now have a fully functional tablet again.

When I do eventually want to swap out for the 32 gb micro SD card, what would be the best way to go about doing that? Would it be as simple as formatting the new card and copying the files over from the old card?

Thanks again
[G Tablet Q&A, Help & Troubleshooting] rajeevvp:
Yeah. It's that simple.

Just make sure that the first partition on the new card is the VFAT partition (/mnt/sdcard) and the second is the ext3 partition (/data). The /data partition is slightly tricky because the file permissions and owners/groups will need to be preserved. But, you can use a Linux rescue CD like PartedMagic to do everything: create, resize, check, copy, ...

You might also be able to use adb and a few shell commands to transfer between the external SD cards while using the internal SD card as temporary storage (now that it is not being used)--we know that until you unmount/reboot it, it retains data correctly.

Care to run a few more tests on the internal SD when you've got the time?
[G Tablet Q&A, Help & Troubleshooting] titobetlogs:
Hey, you fixed my tablet, sure thing! Just leave instructions for what you want to see and I'll try to get to it when I get the chance!
[G Tablet Q&A, Help & Troubleshooting] titobetlogs:
Hey Rajeevvp, offer still stands if you still wanted to do those tests, FYI. lemme know. Otherwise, thanks again for everything, I've been recovering from surgery and the tablet really has made getting by way easier than it would have been if I didn't have it around.
[G Tablet Q&A, Help & Troubleshooting] rajeevvp:
I'll post those test commands some time later this week--it's been a busy month for me.

I had hoped that ViewSonic had some kind of software fix for your sort of (almost) non-functional internal SD card, after user sandyjb got a working gtab back from VS. But, that hope is now gone, I think. I looked at the kernel messages (using the dmesg cmd) from his replacement gtab, and VS seems to have sent him a new/refurbished unit because of these 2 reasons:

1. He's now got the same internal SD card chip (the Samsung KLMAG4EEHM-B101) as the majority of gTab users.

2. The MAC address of the WLAN card has changed. I checked by comparing his old and new dmesg outputs.

BTW, I would love to know the part number of the internal SD card chip on your gTab. Shoot me a PM if ever you disassemble your tablet.
[G Tablet Q&A, Help & Troubleshooting] titobetlogs:
Sure thing, and if I get lucky enough to get my hands on one of these $99 touchpads I will be much more likely pry the g-tablet open one day!
[G Tablet Q&A, Help & Troubleshooting] rajeevvp:
Oozura, can you get me a dmesg so I can see if you have one of the non-standard internal SD cards?
[G Tablet Q&A, Help & Troubleshooting] bikewobble:
More sdcard isues

After a failed attempt at flashing a new rom, I seem to have also fallen into the gtablet sdcard blackhole. And the sdcard master rajeevvp has offered to attempt to save me, though he doesn't sound too confident about my situation.

First off, I went ahead and got a dmesg file, attached to this post.

Then I attempted to go through his sdcard tests outlined in post #19. Big stumble here.

adb shell loads successfully while running CWM. Step 1 fails:

~ # mount /dev/block/mmcblk3p1 /sdcard
mount: mounting /dev/block/mmcblk3p1 on /sdcard failed: No such file or directory

I explore /dev/block and find these directories:

loop0 loop3 loop6 mtdblock0 mtdblock3 mtdblock6
loop1 loop4 loop7 mtdblock1 mtdblock4 platform
loop2 loop5 mmcblk3 mtdblock2 mtdblock5

For all I know this is a silly observation because it's probably a known quantity, but I thought mmcblk3 looked kind of like mmcblk3p1, so I decided to improvise a substitution.

~ # mount /dev/block/mmcblk3 /sdcard
mount: mounting /dev/block/mmcblk3 on /sdcard failed: Invalid argument

I thought about creating the mmcblk3p1 directory... but decided this might be too much futzing around for now. Best to pull out and wait for rajeevvp's next idea.

While the master is ruminating on these results, I'm next going to attempt the tests outlined in post #3 of this thread: http://xdaforums.com/showthread.php?t=1244908

Right now, I'm still a boot-looping soft brick. But I'm prepared to RMA if necessary. I've had the thing for exactly a week!
[G Tablet Q&A, Help & Troubleshooting] bikewobble:
As stated in my previous post, I just attempted to run the badblocks command from /root/. After using adb to push badblocks to my gtab, I ran a shell to chmod to 500 (using the suggested "adb shell chmod" in one line did not work). I then exited that shell and ran:

adb shell /root/badblocks -b 512 -n -s /dev/block/mmcblk3

rajeevvp warned that this would take a while, but I don't think it's supposed to take this long. I just returned to my computer after 5 hours to find the last line in terminal:

470.00% done, 28:09 elapsed

I'm guessing that should really be 47 *space* 0.00% done after nearly a half hour.

Should I now attempt to run a destructive scan from badblocks? Or should I stop here and wait for advice from rajeevvp?
[G Tablet Q&A, Help & Troubleshooting] bikewobble:
I'll let rajeevvp comment on this in his own time, but he tells me my dmesg.txt file up there reveals a state of total sdcard borkness. Time to RMA!
[G Tablet Q&A, Help & Troubleshooting] rajeevvp:
Mea Culpa--Fixed. Thanks.
[G Tablet Q&A, Help & Troubleshooting] sktsswth:
rajeevvp,

My problems occurred independently of my using flash. I nvflashed several times before deciding on a rom I liked, and everything worked well for a month or so. Successive nvflashings after the issue did not fix the issue.

The more I think about it, I seem to remember for some reason trying the /system/bin/flash_image binary (that came stock with Flashback 7.0) right around the time this started. I was investigating ways to go back and forth between cwm and stock without having to fire up adb and push part9 around. Hmm...
[G Tablet Q&A, Help & Troubleshooting] bikewobble:
Back from RMA; now the question is To Flash or not to Flash?

So my gtab is back from the RMA process, taking almost 3 weeks to the day of sending it back. What's funny is I called to check on its status yesterday. I was told despite receiving it on 9/9, it wasn't processed until 9/13. And that it was still with a tech and wouldn't be shipped until later this week. And with UPS ground shipping, I wouldn't have it for another 5 days after that. Then it arrives via UPS today?!

And it's the same exact tablet for sure. My same poorly applied screen protector is still in place. And I put a WFMU sticker on the back, which is still there. But it's back to Tap UI 1.2-4349 with a seemingly wiped sdcard. Curiously it has Netflix installed and placed on the home screen...

So now the question is, do I dive back into attempting to flash a different rom and potentially mess this up all over again? Or do I leave well enough alone, and just get by with stock (as unappealing as that may sound)?

I have to admit, without an actual tablet to work on my attention span for this thread dwindled. But I did see this post which I found somewhat alarming:

First off, let me confirm that I don't think nvflash is what messed me up. Here's the quick narrative of my problem. Already successfully flashed the last version of Bottle of Smoke and used it for a few days. Then attempted to switch over to the latest Flashback rom, which at the time was I believe the brand new 8.0 alpha. Followed the option 2 instructions to the letter. Successfully repartioned to 2048/0. Got the zip file via USB. Got an error attempting to flash the update. Here's probably where I screwed up: I had the bright idea that I ought to try everything again from the top, including the repartition. Either on my second or third way through those instructions (which I can't actually link to since I don't have 8 posts yet, but if you google Flashback rom, then scroll down to option 2, it's listed as "detailed instructions") the repartiion process hung and never finished. Not knowing what to do, I turned the device on and off. And from that point on it was useless. No repartition ever succeeded (or if it did, it took 1 sec). It was only at that point that I attempted recovering from nvflash, which I'm told would never have helped me anyway since nvflash didn't deal with the part of the tablet that I messsed up.

Anyway, what I'm wondering is, before I attempt flashing any roms or running nvflash... has the gtablet community learned anything new in the 3 weeks I've been gone? Is there some way I can test to see if I have one of these "different sd cards" and whether it would be disastrous for me to run nvflash?

Is there any other kind of testing I should do before attempting to flash a rom? Unless someone's got a good honeycomb recommendation, I'm inclined to give Flashback another try. And this time, if anything goes wrong, I'm coming straight to XDA before proceeding!
[G Tablet Q&A, Help & Troubleshooting] aabbondanza:
Nothing new I've seen. What you could do is go here http://xdaforums.com/showpost.php?p=12434269&postcount=1 & back up your partitions to your PC. That way you will at least have a backup of your bct & partition table just in case. The only way I know of seeing which chip you have would be to open the unit & look at the bottom side of the system board where the emmc chip is located. You can look here http://xdaforums.com/showpost.php?p=10062618&postcount=134 at the back side of the system board. The samsung chip on the top left is the normal emmc. In the past, other users that RMA'd, got back the original case with different internals. The only way of knowing would be compare the mac address on the wireless card (if you knew your old one).
[G Tablet Q&A, Help & Troubleshooting] rajeevvp:
Did you use nvflash to enlarge the system partition before installing BoS?

Given your error messages this is not surprising. Your SD card stopped working some time ago, and anything you tried to do with it after that happened would've resulted in errors. I looked through those Option 2. instructions for installing Flashback, and they're quite standard. I don't think those caused your problems. I think you only noticed them whilst attempting to install FB (though there would've been troubling signs even while using BoS).

Sure (and it is mentioned in this thread). This command will do:

$ [B]dmesg | fgrep mmcblk3[/B]
[ 15.908299] mmcblk3: mmc2:0001 [B]MAG4EM 14.9 GiB[/B]
[ 15.912978] mmcblk3: p1 p2

This, above, is the standard sort of internal SD card.

Yours, from your error messages, is this non-standard one:

<6>[ 8.507543] mmc2: new high speed SDHC card at address aaaa
<6>[ 8.524833] mmcblk3: mmc2:aaaa [B]SE16G 14.8 GiB[/B]

The link between SD card problems and nvflash has not been proven (and as I said, very probably doesn't exist in the cases we've been examining). It is a general caution against using nvflash with someone else's BCT/ODM/... (ie. non-Android) *.img files given the fact that VS has slightly different hardware inside their gTabs and might therefore have installed different BCTs/ODM data to compensate. That's the reason that BCT/ODM data exists in the first place: so that nVidia can use the same kernel source on different "Harmony" board implementations.

Run the badblocks command you tried earlier. It works like a sector scan on a HDD. In fact, you can use the same command on a HDD.

And Al is correct. You will have to compare things like the SD card type and WLAN card MAC addresses to verify that VS has replaced your system board. To check your wireless card MAC address, try:

$ [B]ifconfig wlan0[/B]
wlan0 Link encap:Ethernet HWaddr [B]E0:2A:82:07:B0:3D[/B]
inet addr:192.168.1.102 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:103 errors:0 dropped:0 overruns:0 frame:0
TX packets:92 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:14865 (14.5 KiB) TX bytes:14345 (14.0 KiB)
[G Tablet Q&A, Help & Troubleshooting] bikewobble:
thanks rajeev.

i still might try running all of that at some point for peace of mind.

but i got impatient and decided to just take the plunge. i now have flashback 8.1 running with no issues! i had to use their option 3, nvflash install route, but fortunately nothing went wrong with that. i did run an nvflash backup of my RMA'd partitions and bct file, just in case...