yashsingh1/xdaforums huggingface dataset:
[G Tablet Q&A, Help & Troubleshooting] mazuka:
Rajeevvp,

If you still check this thread at times - a friend of mine who lives in Russia is having similar issues - his internal flash card is acting up; he can flash any image with NVFlash but he cannot boot into OS afterwards, the tablet hangs immediately after the bird screen. He can boot into recovery, be it a stock recovery or CWM, but he cannot install and image via recovery - installation always hangs trying to access the/data folder. Same goes to factory reset/wipe data and partitioning - just cannot do it.

I made him run a set of tests based on your previous posts, and I am attaching both tests and results. Based on what I can see his external card/controller is fine and can be used for your card swap procedure, while on his internal card /data is not usable at all, while /sdcard is writable but does not hold changes after reboot, so not usable either.

I also can see some pointers to NAND problems in the logs.

The thing is that RMA is not an option in Russia, they never sold G Tab over there and they do not support it as my friend found out after calling a central Viewsonic office in Moscow. He would need to send the tablet back to me (I bought it for him earlier this year on Woot) and I would re-send it to a US Viewsonic shop, and then send back to him. It is doable but may not worth it if we can make his tablet run on, say, 32GB external card. But if it is the NAND that is going - then RMA would probably be the only right option..

Anyway, if you could look at the attached and tell us what you think?

Really appreciate your help, thank you
[G Tablet Q&A, Help & Troubleshooting] rajeevvp:
Looking at the logs you've sent, I agree with your assessment--his internal SD card is broken. However, get him to also do this slightly more definitive test and report results.

You can safely ignore this. It's not unusual for NAND flash devices to have a few factory-marked bad blocks. I have a couple on my system partition.

You will have to get him to swap the SD card assignments and copy the files (if needed) from the internal SD card to the external one. Just tell me which bootloader, CWM and ROM version he wants to install and I'll tell you if my zip files can be used with it--or if I'll have to make a new ones.
[G Tablet Q&A, Help & Troubleshooting] mazuka:
Thank you Rajeev, I passed all the info on the friend of mine, will post results as I have them.

(And I checked my tablet - some bad NAND blocks too, you are right)
[G Tablet Q&A, Help & Troubleshooting] mazuka:
Rajeev,

While running badblocks against the internal card - no luck at all, it just was sitting all night at zero progress, zero time, zero errors, see the attached badblocks - internal.JPG.

I asked him to run against external to verify that the utility works - yes , it does, see the attached badblocks - external_56%.JPG and badblocks - external_100%.JPG.

As for loader/recovery/image - as far as I understand you have your current swap procedure tweaked for bootloader 1.1/CWM v2.5.1.3, and this is what my friend currently has, plus a stock TNT 3389 ROM. But he'll probably replace stock with a latest Cyanogenmod as soon as he is able to install images via CWM

But if you can modify your swap procedure to account for bootloader 1.2/CWM v3.0.2.8 (1.2 branch revision2) and Beast/Clemsyn combo ROM:

- based on Adam Froyo 2.2

- kernel 2.6.32.9 clemsyn@clemsun-MM061 #88

- Build BeastROMv2.2.1

then we would try that too.

But if it is too much trouble - what you already have is fine.

Thank you very much
[G Tablet Q&A, Help & Troubleshooting] rajeevvp:
Done. There are 3 CWM-flashable files now on page 5 of this thread. One file for CWM v2.5.x (for 1.1 bootloaders); another for CWM v3.x or v4.x (1.1 or 1.2 bootloaders); and finally, one for "fixing" the system proper.

Let me know how it goes.
[G Tablet Q&A, Help & Troubleshooting] mazuka:
Rajeev, I will not be writing you a poem as the other dude did, but my friend is dancing around with his now WORKING g tablet, so thank you very much!

We chose the 1.1 path to beging with, and will definitely do 1.2 in the next few weeks and report it back to you.

On 1.1 - two things we changed in your procedure to tailor to my friend's specifics:

1. He could not navigate to the external card from within his CWM, so he was not able to install your version of CWM via the zip file. Instead he extracted the recovery.img and pushed it with NVFlash, worked like a charm.

2. He currently has just 2GB card in his possession, and he needed some space on it for /sdcard partition, otherwise he would not be able to install the swap zip file, so he partitioned it as 1024 and 0 thus leaving 1GB for /sdcard, and that worked too.

Will post more info (or more questions) as I have them, and thanks again!
[G Tablet Q&A, Help & Troubleshooting] mazuka:
Rajeev,

My friend already has a question - is it still possible to mount the internal /sdcard partition? His point is that since /sdcard was at least readable, he can save space on the external card by using whatever book/music/video files he already has on the internal /sdcard

Thank you
[G Tablet Q&A, Help & Troubleshooting] rajeevvp:
Good workaround. You can also install the modified recovery like this:

C:\> [B]adb push recovery.img /root/.[/B]
C:\> [B]adb shell flash_image recovery /root/recovery.img[/B]

Its a pleasure working with smart users like you and your friend.

---------- Post added at 11:47 PM ---------- Previous post was at 11:36 PM ----------

Sure it's possible. Just edit /system/etc/vold.fstab and uncomment the line containing the string "tegra-sdhci.3/mmc_host/mmc2" then reboot the tablet. My script comments that line out when it does the SDcard device swapping.

I don't recommend using the internal SD card that way though: Since nothing can be written to the card, but, no errors are reported to the kernel to indicate this fact, there is bound to be a severe mismatch between the on-disk structures and the corresponding in-kernel data structures sometime. Eventually this will cause problems--possibly even kernel panics.

There shouldn't be a problem though using the data on that partition if you remount it read-only after Android (actually, vold) has finished mounting it normally.
[G Tablet Q&A, Help & Troubleshooting] mazuka:
Rajeev,

Happy New Year to You!

My friend is about to try a stock 1.2, and then upgrade to the Beasty/Clemsyn combo. I will post results as I have them

Thank you for all your help
[G Tablet Q&A, Help & Troubleshooting] mazuka:
Rajeev, thanks to you, my friend managed to install Beasty/Clemsyn combo, he is happy and sends you his regards.

Here is the sequence we followed:

1. NVFlash stock 4349/Bootloader 1.2

2. NVFlash CWM 3.0.2.8/1.2 rev2 (we could have it flushed simultaneously with the stock image instead of the stock recovery but we decided to go step by step to simplify troubleshooting if any).

3. Boot to CWM and:

>adb shell

~ # umount /sdcard

~ # mount /dev/block/mmcblk2p1 /sdcard

- we could not push anything to the (internal) sdcard no matter what, so we just fooled CWM by presenting the external card as sdcard.

Would it be right to assume that this is what your version of CWM does but on a permanent basis?

4. Installed your version of CWM

5. Boot to CWM and partitioned the 2GB external card as 1024 and 0

6. Boot to CWM and installed your swap package.

7. Boot to GUI to verify that all looks good

8. Boot to CWM and installed Beasty/Clemsyn combo

9. Boot to CWM and installed your swap package.

10. Boot to GUI and cry of joy ;-)

We also tried editing the vold.fstab file per your directions, expecting that the OS would auto-mount it upon reboot as /sdcard2, but it did not.

When we tried mounting it read-only manually (mount -r -t vfat /dev/block/mmcblk3p1 /sdcard2) it would just hang. It does appear as the internal card can be mounted only in the recovery mode, but even then not always, so we just commented it out once again - for good.

At some point in late January we will repeat the entire process above with a 32 GB external card, and I will post results

Thank you!
[G Tablet Q&A, Help & Troubleshooting] rajeevvp:
Nicely done--I'm sure it'll be helpful for other users as well.

For CWM versions 3.x and 4.x, I don't have a customized binary like I have for v2.5.x. CWM v3.x onwards have the device assignments in a /etc/recovery.fstab file instead of being built into the /sbin/recovery binary. So, for these newer versions of CWM, I just replace the recovery.fstab with my own. I also save the original file as /etc/recovery.fstab.orig, so you can look at both to see what's changed.

Not sure what the default behaviour in Beasty is: does it automount at boot time or do you have to mount it manually in Settings > Storage > ...? Whatever the case, vold will run the /system/bin/fsck_msdos program on the device before it is mounted. And that check may fail--it may even cause problems even if the check passes--which may account for the mount failure.

Hmm--I wonder what's changed. Can I get a dmesg and logcat output after you've done this again? For the logcat output, power off the gtab, connect the USB cable, and run a "adb logcat -v time > logcat.txt" on your desktop, then power on the gTab. Kill the logcat command after you've attempted a mount.
[G Tablet Q&A, Help & Troubleshooting] mazuka:
Rajeev,

Attaching the logs you requested.

And two more questions if I may:

1. You did not change the font color in your version of CWM 3.X, right? It is still yellow. Just so we know we did not make a mistake installing or something.

2. My friend told me he cannot turn off the tablet by soft means, it just sits in the spinning circle box forever, so he turns it off by pressing the power button for 8 seconds. He can see it with both 1.1. and 1.2 images. How would we troubleshoot this? Just use ADB logcat in the same manner as you suggested for the previous test? We would start logcat right before turning the tablet off and then initiate the soft off? (meanwhile I will browse the net for similar symptoms)

Thank you
[G Tablet Q&A, Help & Troubleshooting] rajeevvp:
The recovery binaries are the same, so the font colour is the same for CWM versions 3.x and 4.x. The CWM v2.5.1.3 has a different binary which is why I made it display in a different colour.

Not sure what to make of this--is the internal SD card messing with things?

Get me some logs--dmesg, the mount output, the /etc/vold.fstab file and logcat output for starters. Get the logcat output like I suggested. Connect the USB cable and run the logcat before you switch on the gTab. Boot into the home screen and then shut it down however you can. The "adb logcat -v time" command should automatically exit when this happens. This will get me a complete log from bootup to shutdown.
[G Tablet Q&A, Help & Troubleshooting] mazuka:
Rajeev, I have attached the files you requested

Thank you
[G Tablet Q&A, Help & Troubleshooting] rajeevvp:
Need the output of these 3 commands as well:

C:\> [B]adb shell ps > ps.txt[/B]
C:\> [B]adb shell ls -l /dev/block/ /dev/block/vold/ > ls.txt[/B]
C:\> [B]adb shell df > df.txt[/B]
[G Tablet Q&A, Help & Troubleshooting] mazuka:
Absolutely, attaching

Thank you
[G Tablet Q&A, Help & Troubleshooting] rajeevvp:
Looks like I missed one of the (non-standard) shell scripts, /system/etc/inandop.sh, that uses the internal SD-card block device on your Beasty ROM.

I've changed my device-swapping zip file to also fix-up this script, so you should be able to use it as usual if ever you reflash your current ROM, but, for now, do this (in CWM) to make the inandop.sh script in Beasty-v2.2.1 use mmcblk2 instead of mmcblk3:

C:\> [B]adb remount[/B]
C:\> [B]adb pull /system/etc/inandop.sh .[/B]

[I]Edit the file using an editor that preserves Unix line endings,
and change each instance of [B]mmcblk3[/B] to [B]mmcblk2[/B][/I].

C:\> [B]adb push inandop.sh /system/etc/.[/B]
C:\> [B]adb shell chown root.shell /system/etc/inandop.sh[/B]
C:\> [B]adb shell chmod 755 /system/etc/inandop.sh[/B]
C:\> [B]adb shell umount /system[/B]

After this, Wipe the cache and dalvik-cache, then reboot the tablet.

This change should take care of everything relying on the internal SD card on your ROM.
[G Tablet Q&A, Help & Troubleshooting] mazuka:
Thank you, Rajeev!

I will pass the into on to my friend and post results as soon as I have them
[G Tablet Q&A, Help & Troubleshooting] mazuka:
Rajeev,

My friend is saying that after running the above set of commands the tablet is turned off just by short push on the power button (meaning no menu for airplane mode/silent mode, just goes off immediately).

In case this not the result you meant, attaching the edited script as it currently is.

Thank you!
[G Tablet Q&A, Help & Troubleshooting] rajeevvp:
I've not used your ROM, but, that seems to be the correct behaviour. On the ROMs that I've tried, a short press of the power button will turn off the screen (and Android will then try to put the tablet to sleep), and only a long press will give you that menu with options for Home/Reboot/Power off/Recovery/ etc.

I don't think the SD-card device swapping is reponsible here, but, if you really want me to look into this, I'll need to at the logs as before.

The script is correct now. Can you post the contents of these files? I'd like to tie up a few loose ends if possible.

/misc/inandop.log
/data/data/com.adam.settings/shared_prefs/toggle-prefs.xml

And, the output of this command:

C:\SOME\PATH> [B]adb shell ls -l /data > data.txt[/B]
[G Tablet Q&A, Help & Troubleshooting] mazuka:
Rajeev,

My friend clarified the situation with the power button:

1. Yes, a short push just turns off the screen (he verified that by having the tablet play music at that time), but another short press does not turn screen on, no screen lock screen, no anything, the tablet just eventually goes into a deep sleep as you rightly mentioned.

2, A long push indeed brings the airplane mode/sound/power off menu, but after selecting power off the tablet just hangs indefinitely.

So your script update does fix the image behavior in terms of short versus long push, but given the behavior described above I am beginning to think that something else is wrong with his tablet besides the internal flash.

I remember him telling me that he opened the tablet and reset some switches inside, I wonder if that is related. I will collect more details.

He is offline for two days, seems like his internet connection is down, but as soon as he is back I will get the other files you requested.

Thank you
[G Tablet Q&A, Help & Troubleshooting] rajeevvp:
Can you ask your friend to start over again, if possible? Repartition the external SD card, flash the ROM, and apply the sdcard swap zip file. This time, don't copy the old /data or /sdcard contents.

Boot into the ROM after this. See if there are problems with powering on / off. If there are, edit (again, always in CWM) each of the files in /system/etc/init.d/ and make it exit before the scripts really start to do anything: just add this after the "#!/system/bin/sh" line:

exit 0
[G Tablet Q&A, Help & Troubleshooting] BadKermit:
I didn't want to start a new thread, and this is somewhat related. I recently put the latest stable Cyanogenmod on my tab, and now every time I try to store anything to the SD card, I get an error saying the SD card is busy. I tried repartitioning the card to no avail.

Unrelatedly, no matter which ROM I use, my battery meter never shows any depletion. Not as big a deal, but annoying.

If anyone has any thoughts on these issues, I'd really appreciate it.
[G Tablet Q&A, Help & Troubleshooting] mazuka:
Not sure about battery, but about the internal card - if you suspect it is going, attaching an initial set of tests per Rajeev, run once while in CWM and once while in GUI. The only thing I believe you may want to replace /sdcard with /emmc, this is as far as I remember how it is called in CyanogenMod 7.x.x ROMs.

Assuming you use CWM, not a stock recovery, and that you know how to set/use adb (here is a useful link just in case, http://www.androidtablets.net/forum/viewsonic-gtablet-technical/5377-adb-g-tab-step-step.html)
[G Tablet Q&A, Help & Troubleshooting] mazuka:
Rajeev,

Actually my friend was not able to mount the internal card even in the read-only mode to copy contents, so he did not copy anything. I asked him to zero out the init.d files per you description, and he did, and he reported no change in power behavior - a short push locks the screen and there is no way to unlock, and a long push brings the menu, but the tablet hangs when selecting power off.

I sent my friend a 32GB card, so when it arrives (within a week/two) we will definitely repeat the complete reinstall, and I will publish the results, including editing init.d files.

I am also attaching the files you requested earlier, the only thing is that /misc/inandop.log does not exist. I checked on my tablet - I have the same image - and I do not have that file at that location either. What surprised me is that he pulled the second, the xml, file - very little info in it, but he at least has it, and I do not ;-)

Thanks again for all your help
[G Tablet Q&A, Help & Troubleshooting] rajeevvp:
Use mazuka's step-by-step instructions in post #88, and then the badblocks test (see post #66) to determine if your internal SD card is OK. Also get me the output of the dmesg command.

This is a battery hardware issue with no solution at present. But, see this thread for a script you can use to determine battery levels in a different way.
[G Tablet Q&A, Help & Troubleshooting] rajeevvp:
Ask him to send the files he modified so that I can see if he made the changes correctly.

Well, this was a long shot anyway--I thought your friend had started having a Sleep-of-Death issue--but apparently not. BTW, what switches did he change on the gTab?

It's probably simpler to just rename that directory to something else instead of editing all the files in it:

C:\> [B]adb remount[/B]
C:\> [B]adb shell mv /system/etc/init.d /system/etc/init.d.orig[/B]

You can do this right after you install the ROM and my zip file in case you start over.

This is puzzling. (Incidentally, judging from the inandop.sh file you posted it looks like your friend installed the BeastyClemsynFroyoUltimate.zip file instead of the stated Beastv2.2.1+ClemsyncomboGtab.zip.)

There is something else that is odd in that ls -l /data listing you posted. There is a vold.fstab file in /data. Get me a copy of that file and the standard one in /system/etc/. It looks like another non-standard script (/system/etc/Beast/script.sh) might need fixing on your ROMs.

EDIT: Also, make sure that your friend is not using any built-in apps (Notion Ink Adam Settings app?) and fiddling with the partition assignments using them.
[G Tablet Q&A, Help & Troubleshooting] mazuka:
Rajeev,

Sorry, I did not mean to cause any confusion with the ROM.

When I posted this,

- based on Adam Froyo 2.2

- kernel 2.6.32.9 clemsyn@clemsun-MM061 #88

- Build BeastROMv2.2.1,

I pulled it from Settings, so this stuff is correct.

I should have not said "combo" though because "combo" is kinda got attached to a different Beasty/Clemsyn combination.

Yes, you are absolutely right, what we have is the "ultimate", not the "combo" (but I suspect they are very similar).

I will get the files you requested as well as the story on what switch he played with, and I will tell him to leave the Adam Settings alone.

Thanks again!
[G Tablet Q&A, Help & Troubleshooting] mazuka:
Rajeev,

Attaching all the files you requested:

- init.d.modified.zip contains modified init.d scripts

- vold.fstab.zip contains both vold.fstab files - found under /data and under /system/etc

- g.tab.opened.jpg is the picture of an open g tablet where 1, 2, and 3 are the steps he followed (taken from some post on the subject of inability to power up the tablet). So:

0. First he drained battery by leaving it on and periodically pressing the power button.

1 - The connector he disconnected

2 - Then he waited for 24 hours and simultaneously short-circuited the four contacts in 2 and then connected connector 1

3 - Since it did not help he pressed on the 3 button afterwords expecting some kind of reset.

For the records - we fixed the "cannot power up" issue by flashing stock 1.1 ROM and the very first stock recovery on the top of it. After that he got the bird screen and ability to get to recovery, but not to ROM, and then we called upon you ;-)

Thank you!

P.S. he already messed around with Notion Ink Setting app a few weeks ago, but he will no longer use it.
[G Tablet Q&A, Help & Troubleshooting] rajeevvp:
So, everything is OK now?
[G Tablet Q&A, Help & Troubleshooting] mazuka:
Rajeev, what happened during these few days is that we re-flashed everything from the very beginning, applied your fixes, etc. All works just great, and the power issue is gone now, we even did to have to modify the init.d scripts.

So THANK YOU VERY MUCH from both of us, and we will hopefully not bother you, at least for a while ;-)
[G Tablet Q&A, Help & Troubleshooting] rajeevvp:
Yeah, I confirmed this by flashing the BeastyClemsynFroyoUltimate.zip ROM with a different Clemsyn kernel (1.5ver11GPUavpsystemOCFROYO2.zip) for my 1.1 bootloader. Everything worked just fine. No power-off or wake-up problems.

Just don't fiddle with the SD card assignments in the Notion Ink Adam Settings app. Playing with the other settings there should be OK, I think.

Bother me any time. As I said before, I like working with self-motivated users like you and your friend. You guys hardly needed any hand-holding from me.
[G Tablet Q&A, Help & Troubleshooting] mazuka:
Rajeev,

Just to let you know - my friend has now everything up and running with a 32GB card, the switch was easy:

1. Turned the tablet off, removed the old card

2. Inserted the new card, turned the tablet on and booted to CWM (the version you tweaked)

3. Partitioned the new card as 2048 and 0

4. Mounted USB and pulled your swap utility from his PC

5. Installed the utility, rebooted - Done!

The whole thing took just a few minutes

Well, we are self-motivated, but if it was not for you that motivation would end up being frustration ;-))

Thanks a LOT!
[G Tablet Q&A, Help & Troubleshooting] rajeevvp:
These 2 steps are unnecessary if you just want to use a different SD card.

You have to use the device-swapping zip file only for these 2 cases:

a) you've re-installed the current ROM or

b) you've flashed a new ROM.

Nothing else--not even a "wipe data/factory reset" or "Repartition SD card"--undoes the changes the script makes.

And before you ask: Yes, it's OK to flash the device-swap zip file multiple times. I anticipated users doing this, so I made the script idempotent.
[G Tablet Q&A, Help & Troubleshooting] mazuka:
Thank you Rajeev, I should have figured that!

Your utility modifies system settings in NAND partitions, so obviously no change in/on sdcard should affect it.

Well, my friend was in the heat of the moment, so... ...so it was very wise of you to make the script idempotent ;-)

Thank you!
[G Tablet Q&A, Help & Troubleshooting] mazuka:
And just to prove you that your lessons were studied, I am attaching a diagram I put together based on your posts in this thread. I hope it can be useful for other novice/mid-level gtableteers.

Let me know if I am incorrect in any part, I will tweak.

Thank you