yashsingh1/xdaforums huggingface dataset:
[G Tablet Android Development] aabbondanza:
Anyone that is interested in installing this via CWM, I created a CWM flashable verison from fosser2's download. Here is a link to the "normal font" version http://dl.dropbox.com/u/36150173/CWMR5504_recovery.zip. If you want the "big font" version, all you have to do is open the zip, delete the recovery.img, rename the Team DRM/fosser2/plastikman supplied version to recovery.zip & then add it to the zip.

I have installed this on 2 of my gTabs (one gTab Comb v3.3, the other CCCv8) and did not had any issue installing it this way.

Just a few notes on this version; it does give you the ability to flash from both the internal sd & external sd but uses a different naming convention though..."sdcard" is the name used for the external microsd slot and "internal sd" is what we would normally call sdcard. This version also appears to have fixed the "reboot recovery" bootloop bug of cwm3.0.2.8 (or aleast bypassed it)...when I selected "reboot recovery" it did the same as "reboot system now" (as I was doing this I crossed my fingers hoping it wasn't going to bootloop me...yea..no bootloop).

CWMR is touch capable. You scroll/select in 3 different ways...you can either use the capacitive buttons (which have been remapped to...Search is "select", Home is "scroll up", Menu is "Scroll down" and Back is "back"), you can also use the on screen touch controls (back, up, down & return), or you can also swipe up and down to scroll up/down and swipe sideway to select.

Al

PS:

WARNING: This is the beta6 release. The op page over in the Slatedroid gTablet Laboaratory says that selecting repartition will only repartition the EXTERNAL SD. Two users have reported magic value mismatch after repartioning with this version. plastikman, who created it says he is looking into it.
[G Tablet Android Development] lsu205:
So u can install from the older cwm that's in flashback like any other zip?
[G Tablet Android Development] jamcar:
why does it only boot into CWM mod now? it would boot normally when i was on CWM 3.x.x.x
[G Tablet Android Development] aabbondanza:
Yes but beware of repartition bug

Yes you can. I installed on both mine from CWM 3.0.2.8.

Please note the warning I put on my previous post! It probably isn't a good ides to "repartition" with this version until plastikman finds the bug. If you need to repartition (which shouldn't be very oftern) you can always flash the old CWM (or stock recovery) via this version. The recoveries are so small that I keep a copy of each on the tablet just in case.
[G Tablet Android Development] wuilly:
is the download ok i have try to unzip it and it gives me an error file is not a zip file
[G Tablet Android Development] aabbondanza:
Alternate location

You don't need to unzip it but it does need to be a vailid zip.

Yes, the download is OK from dropbox. I just redownloaded it to my PC & tested the archive. No erors found.

I also put it on mediafire...try this link http://www.mediafire.com/download.php?qg3n084hfu783i2 & see if it's any different for you.

Al

---------- Post added at 09:23 PM ---------- Previous post was at 09:15 PM ----------

It shouldn't (and didn't for me). Are you sure you didn't select accidentally hit "reboot recovery" instead of "reboot system now" (since you were still in CWM3.0.2.8 untill you reboot)? If you did accidentally hit reboot recovery then it would have put you in a CWM bootloop.

There are 2 ways I've used to fixed a CWM bootloop (yes I've accidentally hit reboot recovery too)..one was is to use nvflash to format partition 7 (MSC) and the other way is to use CWM to flash stock recovery and then install CWM3.0.2.8 (for b/l1.2) via stock recovery. Formatting MSC is the fastest, but most people I suggest these fixes to choose to do the stock recovery route. If you want detailed instruction for either, let me know.

Al
[G Tablet Android Development] nyciz:
Great work and thanks for putting in one spot. I'll probably wait till a ICS ROM is released with but must say that this is a great first step till we get it. Cant wait for 10" of ICS....my cappy luvs ICS...
[G Tablet Android Development] rajeevvp:
What does the recovery do when you don't have a microSD card in the slot. The /etc/recovery.fstab file is setup to fall back to using the internal SD card like CWM-4.0.1.5 is. Does it work on the internal SD card if no external one is present?

---------- Post added at 09:23 PM ---------- Previous post was at 09:19 PM ----------

That procedure only works as a side effect. Simpler to wipe MSC directly. See post #3 of this thread.

Stash that zip file on you SD card, and if you accidentally select "Reboot recovery", just "flash" it to fix the always boots-to-recovery problem.
[G Tablet Android Development] nobe1976:
Just installed using CWM recovey and all is well. Just to test I took out my external sd card and when I went to update from sdcard it showed the content of the internal. So I am guessing that if one would decided to partition there internal sdcard they might need to pull there external out first. Then boot up recovery for there updates.
[G Tablet Android Development] aabbondanza:
Just can't keep up with you raj...why did it take you 2 months to come up with the flashable msc format? Just kidding. I got the format msc from that very thread back in October. Everyone I've run into that is in a CWM loop I've given them the option of formating msc (via nvflash) or flashing stock recovery/then CWM. In every case they have always chosen to flash stock recovery & then flash 3028 (probably because most of the people I help are pretty new to the gTab). I think now they will choose the format via flash method. Thanks for the tip.

Just a question though. Exactly what is the CWM kernel writing to MSC to cause the loop? I assume it is the bootloader that checks for the rocker switch position & some mysterious bit on MSC to determine which kernel to load (but I'm just guessing). But if that is correct then why does flashing stock recovery, doing a normal boot & then flashing CWM fix the problem too (so I'm guessing I am wrong about my guess)? In any case can you explain why it works that way?

Al
[G Tablet Android Development] nobe1976:
When ahead and changed back. When trying to downgrade to a 2.2 rom ended up with a mix match error on boot up. Looked good for what it is. Expecially liked the touch option on it, but it needs some work.
[G Tablet Android Development] rajeevvp:
There are a couple of problems that I noticed with this version of CWM, and which might be responsible for your problems.

1. Roebeet's gtablet.cfg file which almost everybody uses to nvflash back to the 1.2 stock ROM has a bug in the system.img size calculation:

$ [B]fgrep size= roebeet.cfg[/B]
size=3145728
size=131072
size=2097152
size=131072
size=4194304
size=16777216
size=33554432
size=16777216
size=16777216
size=[B]259715200[/B]
size=0xFFFFFFFFFFFFFFFF

The second last line is the size of the "system" partition and it is misaligned. Every other partition is correctly rounded up to end at the gTablet's NAND flash erase size (128K). Compare with bekit's gtablet.cfg:

$ [B]fgrep size= bekit.cfg[/B]
size=3145728
size=131072
size=2097152
size=131072
size=4194304
size=16777216
size=33554432
size=16777216
size=16777216
size=[B]209715200[/B]
size=0xFFFFFFFFFFFFFFFF

Here all the partitions--including the last which uses the remaining available space--are rounded up to a 128K boundary. Looks like roebeet just added 50M to bekit's system.img size without rounding it up. The correct value should've been (using roebeet's system.img size as NUM):

$ [B]( NUM=$((259715200)); echo $(( (NUM + ((1<<17)-1)) & ~((1<<17)-1) )) )
[/B]259784704

--which brings us to problem no. 2:

2. The CWM-5.5.0.4 Beta 6 has a "cmdline" file containing NAND flash partition sizes which overrides the user's partition sizes read from the Partition Table. This is fine if the sizes are the same, but, a bad idea otherwise. In this CWM, the cmdline file sets "system" to be what we calculated above (259784704) but, which disagrees with the size in the PT (259715200).

Use the zip file in the attachment to empty the cmdline file out. This will cause the partition sizes to be read from the PT on the NAND flash.

My recommendation is that:

1. Users nvflash to 1.2 using either

a) the attached gtablet.cfg which has all the partitions correctly ending at 128K boundaries or

b) bekit's original gtablet.cfg. (This option is what I recommend. The "cache" partition is used for OTA updates and if it is much smaller than the "system" partition--like in roebeet's gtablet.cfg, then, depending on the size of the image, automatic updates might fail.)

2. Install the new CWM-5.5.0.4 Beta 6, and then immediately flash the attached zip file to empty out the cmdline file.
[G Tablet Android Development] rajeevvp:
Didn't think adb was going to be difficult for people who have no problem with nvflash...

I looked at this sometime back and its complicated. I'll make a post on this later this weekend after I've looked at VS's newly posted 1.2 kernel patch.

For "mysterious bit" substitute "string", but, you are correct.
[G Tablet Android Development] aabbondanza:
Have a user over at slatedroid tried it & still got this error.

Magic value mismatch

Critical failure: Unable to start kernel.

Unrecoverable bootloader error (0x00000002)

Trying to get more info on exactly what he did to get the error.

Al
[G Tablet Android Development] aabbondanza:
CWMR5504 Fixed

Thanks to rajeevp!!

Plastikman verified rajeevvp was correct and has issued an updated CWMR. Here it is in a flashable format http://dl.dropbox.com/u/36150173/CWMR5504_recovery.zip. He switched from using pershoot's kernel (which required the command line) to using the stock kernel. I tested the new version to install a rom, do a factory data reset, a wipe cache, a wipe dalvik & a fix permissions. All worked normally. Give it a try. I also corrected the links in my previous posts to point to the updated version.

Al
[G Tablet Android Development] viskon:
Thank you. This worked well for me, since I was not inclined to do the nvflash thing. I was able to boot back into my Beasty+Clemsyn rom without incident. Tested by rebooting again and was able to boot into the rom with no issues.
[G Tablet Android Development] rajeevvp:
... and in the process also brought back the always-reboots-into-recovery problem, right? Whereas with the pershoot kernel "Reboot Recovery" would just reboot the tablet into the ROM?

BTW, the pershoot kernel doesn't need a cmdline file: craigacgomez's CWM-4.0.1.5 too has a pershoot kernel and its cmdline file is empty. As I mentioned before: if the cmdline file is empty, then the bootloader will construct a cmd line for the kernel.
[G Tablet Android Development] adca14:
to install the cwm recovery do I simply transfer the zip to the internal sdcard and flash zip from sdcard as if it were a rom?
[G Tablet Android Development] aabbondanza:
Yes "reboot recovery" bug is back & already noted/posted for plastikman to check into. When he posted the new version last night he noted that reboot recovery still needed fixed.

Al

---------- Post added at 01:43 PM ---------- Previous post was at 01:41 PM ----------

Yes. Remember this is for 1.2 bootloader.
[G Tablet Android Development] aabbondanza:
Thanks rajeevvp for putting in the work on this. I actually understand it pretty well. I've passed the link to your post on to plastikman. Hopefully he will use it to fix CMWR.

Al
[G Tablet Android Development] rajeevvp:
There are some things which may not be readily apparent:

1. Since we know that the kernel/CWM/bootloader uses MSC for the BCB, any attempt to use the partition as a filesystem at the same time should, very probably, be considered a mistake (unless, YAFFS2 is designed to skip the first 128K erase block entirely).

The various Beasty/Clemsyn ROMs and GtabComb* ROMs use that partition for storing logs (when there is a perfectly good /data partition for that). What would happen if YAFFS2 decided to store data--as part of its standard wear-levelling policy--onto that second page of MSC? Mysterious system hangs at boot? Boot loops? Other wonky behaviour? Nobody can predict.

2. Related to this is the MSC partition specification in the gtablet.cfg files that we use. It says that MSC is a YAFFS2 partition:

[partition]
name=MSC
id=7
type=data
allocation_policy=sequential
[B]filesystem_type=yaffs2[/B]
size=16777216
file_system_attribute=0
partition_attribute=0
[B]allocation_attribute=0x10[/B]
percent_reserved=0
filename=part7.img

when from our discussion we have determined that it ought to be raw partition; ie. this:

[partition]
name=MSC
id=7
type=data
allocation_policy=sequential
[B]filesystem_type=basic[/B]
size=16777216
file_system_attribute=0
partition_attribute=0
[B]allocation_attribute=8[/B]
percent_reserved=0
filename=part7.img

3. Less alarmingly: a hexdump of the part7.img file in the various nvflash images that I have show data (strings--from log files) inside the files when they should be "clean": ie. should have been filled entirely with 0xFF.

It might be a good idea to replace the current part 7 (MSC) and part 8 (OGO) files with 0xFF-filled image files. The same for part 5 (MBT)?

4. Given the fragility of the MTD device driver in the kernel and the already discussed bootloader/kernel incompatibilities in reboot-to-recovery techniques, the only safe way to boot into recovery or the bootloader is using Power and Vol +/- keys.
[G Tablet Android Development] aabbondanza:
Beta 10 of CWMR - flashable from CWM http://dl.dropbox.com/u/36150173/CWMR5504_recovery_B10.zip

Boot recovery working, menu option wording improved & re-ordered, & ability to format /misc partition within CWM.
[G Tablet Android Development] lsu205:
is b10 the version that can be flashed from cwm 3.x?
[G Tablet Android Development] aabbondanza:
Yes. This is also the same thing over at S/D and I am the same person you PM'd over there.

Al
[G Tablet Android Development] lsu205:
I figure that out, but since the file names (SD didn't have b10), wasn't sure. Thanks for the help (on both sites)
[G Tablet Android Development] rajeevvp:
Hmm. I see that this one messes with /misc. Expect reports like: "Help! Today I booted my tablet and it got stuck at the 3 birds."

With the "power off" and "format /misc" options in CWM now, what ought to be done is remove that "Reboot recovery" item altogether and not touch MSC in any way.
[G Tablet Android Development] aabbondanza:
I think he took your recommendation @ the end of post#22 "I recommend that for the gTab, CWM devs just disable the checks for "/misc" in CWM so that it enables a "Format misc" option under "Mounts and storage". Users can use that to get out of the boot-into-recovery loop. Or, just flash my MSC formatting zip file".

Had a rather interesting thing happen last night on one of my tablets with CWMR on it (the older beta 6). Hadn't really done anything with CWMR on that one except to boot it. Tried booting to CWMR again to compare menu options between 6 & 10 & didn't get any "recovery key detected" & didn't boot to recovery. Power off & on to try & boot to Android & immediately the tablet gave me the bird(s) and boots no further. Had to nvflash. Just had another user report a similar issue with beta10.

Al
[G Tablet Android Development] rajeevvp:
Missed this part, then--I thought I was pretty clear:

Also explained--just format MSC using nvflash:
[G Tablet Android Development] aabbondanza:
Yeah but it's just strange that it is happening now. By the way, you can add Calkulin+Clemsyn to the list of roms that write to MISC. I see an inandop.log there. As far as heeding you recommendations...what can I say. I gave him the link but I'm just a user...can't control what get's written.

What would be the purpose in clearing partition 5 & 8? I though 5(MBT) was the master boot table. It looks like the first 256 bytes contain data. Don't realy remember what 8 (OGO) is but I thought I remembered readng that some roms put the boot animation there (instead of /system/media).

Al
[G Tablet Android Development] plastikman187:
you were very clear i was testing this as the 2.6.39 kernel that we are testing on ICS does not appear to be using the same code and we dont have the same issues with reading/writing to the mtd devices.

the tests that you have here appear to be working fine on our .39 kernel

http://xdaforums.com/showpost.php?p=13360228&postcount=1319

the .39 kernel we are using is here

https://github.com/TeamDRH/android-tegra-nv-2.6.39-rel-14r7

it is possible that some tablets are less reliable than others but the people in IRC that i had test this did not run into issues.

thanks,

-plastikman
[G Tablet Android Development] aabbondanza:
Two version maybe!!

So, maybe we need two versions, one for .32 kernels that don't have the "reboot recovery" but leaves the "format misc" and then the .39 version that has it all.

Al
[G Tablet Android Development] plastikman187:
also wanted to mention that the 5502 build that we were using before the touch recovery also had /misc enabled.
[G Tablet Android Development] rajeevvp:
That wasn't a "test" as such. I just wanted to show that the mtdblock layer in the stock and pershoot kernels was buggy. Anyway, CWM doesn't use the mtdblock device for writing stuff into MSC; plus the kernel in the 5.5.0.4 recovery is either stock or pershoot, both 2.6.32.x, so I don't see how what you said is pertinent. Are you planning to replace the .32 kernels with .39 kernels in recovery too?

All right, I ran a test of my own just now with the Beta 10 that's posted here. I just replaced the kernel in it with the stock kernel from the recovery.img in VS's 3588 update--I have a 1.1 bootloader-- and removed the /misc entry from recovery.fstab, then nvflashed the new recovery image. I:

1. Booted into recovery mode 20 times. Each time used the "power off" option. No problems were encountered.

2. Booted into recovery mode 20 times. Rebooted each time using "reboot system now". Same results as above.

3. Booted into recovery mode 20 times, wiped cache each time (just to mess with the NAND flash), powered off using menu item. Worked every time.

4. Booted into recovery mode 20 times, used the "Reboot Recovery" option to get back each time. Same results (fingers crossed).

5. Ran a series of dd if=/dev/mtd/mtdn of=/dev/null bs=2K*N on each of the MTD devices except "system" which has bad blocks on mine. As long as the blocksize parameter was a multiple of 2K, all the dd's succeeded. Encountered system hangs on other block sizes--which is bad behaviour, but not very surprising (I would've expected the dd commands to terminate with "Bus errors") given the current Tegra MTD code.

Then put back the /misc entry recovery.fstab in the RAMdisk archive.

Had problems almost from the beginning of the first test sequence. Booted 5 times then got stuck on the 3 birds. Had to format MSC using nvflash. Didn't bother with the rest of the tests after that.

---------- Post added at 12:32 AM ---------- Previous post was at 12:29 AM ----------

And this was using which device tree? Can you point me to the git branch and commit that had this? As far as I'm aware, the CM guys removed that /misc entry from their SMB-A1002 tree a long time ago.

---------- Post added at 01:17 AM ---------- Previous post was at 12:32 AM ----------

Mostly: "When in doubt, dike it out.", but, I'm less certain about wiping MBT (there was a "?" in that post). OGO, as you said is used for the bootanimation.zip file (on phones). Not sure if it is used by the stock ROM--none of the custom ROMs seem to use it, though.

Al, you have a few gTabs of you own, right? Could you get me:

1. The partition table (using nvflash) from each of them; and also indicate if you've ever done a full nvflash (using --create) on it.

2. The output of the dmesg command on each. ROM or CWM--doesn't matter, just mention which though.

3. The output of a fdisk -l /dev/block/mmcblk3 command. Just tell me if you've ever done a "Repartition SD card" on it or if the internal's never been repartitioned.
[G Tablet Android Development] aabbondanza:
Interesting, very interesting!

Do you want the partition table in .img file format generated by --read or the .txt file generated by --getpartitiontable?

Tablet 1: CCCv8 - dmesg & fdisk generated - standard partition structure now but had non-standard structure before nvflash - internal sd repartitioned

Tablet 2: This one has gTab Comb 3.3 - dmesg generated but get an fdisk: applet no found when trying to do the fdisk- fdisk doesn't appear to be on gTab Comb- standard partition structure - internal sd repartirioned - this one has been nvflashed as well

Tablet 3: CCCv7 or 8 (can't remember) - dmesg & fdisk generated - non-standard partition structure (and bct) that is fully intact

Tablet 4: CCCv8 - still need to do this one - dmesg & fdisk generated - non-standard partition structure (and bct) intact - internal sd repartitioned

I have backups of most of the original partitions for 3 of the tablet. Kind of lucked into this. Shortly after I got them I used nvbackup to backup the partitions. Back then I just ran the backup assuming they were all the same. Now that you asked, I looked at the partition tables & noticed 14 partitions. At the time nvbackup was configured to only backup partitions 2-11 (12 was rem'd out). So, I modified nvbackup to backup 12-14 and was able to retrieve them on 2 of the 3 (the one that had been nvflashed was gone ofcourse).

Anyway let me know what you want as far as partitions go.

Al
[G Tablet Android Development] rajeevvp:
The text file.

Do the fdisk in CWM.

What're those 2 new partitions called? NVC and KLO?

Does this table describe the state of your tablets?

[B]nvflashed[/B] [B]repartitioned[/B]
tablet 1 yes yes
tablet 2 yes yes
tablet 3 no ???
tablet 4 ??? yes

Can you fill in the missing details?

EDIT: Can you run this fdisk command as well on all the 4 tabs?

# [B]fdisk -u -l /dev/block/mmcblk3[/B]

If your fdisk doesn't understand the ``-u'' flag, then, use the busybox binary attached. You can use this both on the ROM and in CWM.
[G Tablet Android Development] aabbondanza:
Yes, the extra partitions are NVC & KLO.

I thought it was interesting that tablet1 is working after nvflashing from a non-standard partition structure (with a different BCT) to the standard structure with the standard BCT worked. The BCT is supposed to contain timing data for the particular emmc and ram installed (aleast according to what I have read). The emmc chips must be similar enough to work.

[B]nvflashed[/B] [B]repartitioned[/B]
tablet 1 yes yes
tablet 2 yes yes
tablet 3 no Yes
tablet 4 no yes

Al
[G Tablet Android Development] rajeevvp:
KLO is another "bootbmp"/BLO-type partition. I don't know what NVC is for. The Malata T8 can have this 14-partition NAND flash structure according to one of the .cfg files that come with the firmware, but, even there it is not the default, I think. Very unusual to find it on a gTab.

I've been thinking about cataloguing all this in a systematic way for some time now, but, the long-term nature of the work and the hand-holding that will be required has dissuaded me from even starting. The moderators have assured me that they'll make such a thread sticky if it was ever started. Maybe you'd consider spearheading this effort?

At the very least we'd like:

1. The gtablet.bct

2. The partition.txt

3. A dmesg output

from any users visiting the thread. Users on the stock ROM with pristine NANDs are the real targets of the survey.
[G Tablet Android Development] aabbondanza:
Just wanted to post an update. The backup in CWMR 5504 is not functioning correctly. It will backup everythig EXCEPT apps that have been moved to sd. An easy way to determine if you have any apps like this is to open you file explorer of choice & browse to /mnt/asec. If you find folders in there then ayou have apps moved to sd & they WOULD NOT be backed up. All other the rest of the backup should be good. Hopefullly a updated version will come out soon.

Al