yashsingh1/xdaforums huggingface dataset:
[HD2 Android NAND Development] PasSlert:
Hello all,

Just to share my current issue on my HD2. MAGLDR 1.13 & Android NAND ROM appears to have corrupted my NAND 2 weeks ago. Why am I sure it's that ?

Well, after a freeze under Android I pulled out the battery and restared, but my phone never reached MAGLDR 1.13 home screen (the first one, with no boot option).

I installed a stock ROM (tried 1.66, and 3.14 under SD method/bootloader method) but no one won't finish boot after installation (stuck on the splash screen). One thing I noticed : each Windows mobile ROM gets stuck on 8% for about 1 minute (may be a check/skip procedure) and start again to finish completly without any error... but still no reach the splash screen.

It seems the part of NAND between 8% and 9% is corrupted (but needed by both Windows and MAGLDR). MAGLDR reach splash screen because it's liter than Win Mo "boot part".

I hope it helped you in any way... if you want me to make some check with my hardwarly bricked HD2, I'm ok. ;)

Edit : Oh yes, just a last thing, my phone was charging when the freeze occured (the phone charge is managed by MAGLDR, hence may be Android on NAND is not the only one responsible of "bad block effect").
[HD2 Android NAND Development] Unconn:
Your phone has 4 bad block on both ROMs flashes. You see more when you format /data because you have a lot of bad blocks there. Your /system only has 4 bad blocks. So both ROMs format system before flashing and show the same 4 blocks.

I actually think we agree more than you see. I was thinking out loud and troubleshooting. I have actaully shot down my own theory of the ROM libs/versions as I went back to a version I know was not rebooting and it still was rebooting.

I then formatted my SD card, and I may have had one reboot since then, but I also restored my data from a TAR backup and not CWM (yaffs.img) so there is a difference in the way it was written. (see below).

This seems to be what it is. Please see below.

I do believe this is is what it is. The reason I believe this is that if I backup my data with TAR (not CWM), then format, reboot, and then restore using TAR and then sync I seem to go from 5 reboots a day to none or almost none. This process was mentioned and linked to a couple of times in this thread. Part of my problem is I have a bad block in my system partition too. If CWM is 'writing' to this bad block, then even if I TAR immediately off to a backup, I could still have a corrupted file. The one that was restored to that location.

Another strike against the way CWM is backing up a yaffs image is that it backs up the corrupt block also. I know my files are there and that my ROM is running fine, but if I backup my data and then either try to restore my data.img or extract it, it fails halfway through. This has been happening for a while and the behavior only changed when I changed the starting block of my /data partition. Result? The failure point in the yaffs.img extraction changed.
[HD2 Android NAND Development] AngelDeath:
Unconn, I think after your last post, I think we may have found the missing key as to why this is happening between combined tried efforts and results. The key here is unless someone re-writes the process on how the rom is flashed I think we will be stuck with what our results have found. Passlert has a point and is right, at the 8-9% martk in winmo, the rom pauses for a good minute before continuing, this could very well be the checking point of the nand blocks.

As we all know in normal windows on our desktops, and i wouldnt expect MS to change behavior when it comes to mobile, is to do a check of the drive in windows before doing a install, why would a mobile install be any different? So I think there is merit in that. But again the key is twofold: 1) How do we change the way the rom is loaded/flashed on to the phone instead of in raw form as it is now with probably no error check routine, and 2) Is there any recourse to correcting the bad blocks, even if it means replacing the board, cause we all know at some point our phone is going to be useless for android and very well possible for Windows as well if we run out of enough space.

Cause the other thing which I am not sure is, is the bad blocks really bad? Meaning really not writable? Or could it be just a corrupt FIXABLE error, by we just dont have the means or a routine or app was never created?

Cause think about it this way, in a hard drive there is two ways you can have a HD error, one is file system, the other is actual error, but just for arguements sake at the moment, what if there isnt a routine in android or even in WinMo to check and possible fix the FS error, if its even possible. Obviously this is all speculation talk.
[HD2 Android NAND Development] jcsy:
i tried

Stock Windows 6.5

Windows 6.5 Energy Dual Boot SD SUPERRAM

Windows 6.5 Energy Dual Boot SD MCCM Gingerbread

NAND Android HyperGBX v12

NAND Android HyperDroid CM7

NAND Typhoon

NAND RAFIGNA SENSE

Radio 2.12 or 2.14 or 2.15

all of these, no matter whether freshly installed, whether MAGLDR or NAND or SD card build result in 1 thing

HANG/REBOOT process

Reboot, bootloops (sometimes gets thru)

WIFI turn on HANG

DATA turn on HANG

Clear Cache/Dalvik HANG

3G HANG

GPS HANG

Gaming HANG

Refer to this post, i compiled all the possible tests

http://xdaforums.com/showpost.php?p=14861061&postcount=12406

I definitely tried everything and still, faced the problem

I have now concluded that the hardware has bad blocks (even though I checked it was just 1) and is causing my system to reboot 5 times a day, and sometimes 0 times a day

Task 29, Radio, Stock and whatever you can name it

i tried changing battery

changing kernel

changing sd cards

provide better cooling
[HD2 Android NAND Development] Cheech1976:
If it is just one bad block, did you try to use other versions of CWM?

I think due to the size of the particular CWM version, the "beginning" of the NAND partition for the OS is moved by that difference. Of course this would have no effect on the SD builds, so...

I have one bad block as well, but the adress differs if i use 3.0.2.5, 3.2.0.0 or 4.0.1.4.

I wouldn´t want to confirm it yet, but my one bad block has the most effect with 4.0.1.4, but i wouldn´t bet on it yet :D
[HD2 Android NAND Development] AngelDeath:
I'm no expert, but I would probably be safe to say that 1 bad block would not or should not cause this big of an issue. Obviously address location of the bad block I still believe is an issue, but as Cheech has said, the location changes based on the CWR, which might be something, it might not. (Come ot think of it I dont even know which cwr I have, should check that I know its not 4.0).

Not to doubt you jcsy, but I would kinda think there is a more underlying issue with your phone. Because again as I have said in the main post, I have many bad blocks, but I can still use a Eu version using sd-ext and app2sd enabled using my Kingdom 1.5 rom and have no reboot, or freezing issues, or in short absolutely nothing. I would try one of those if you havent (EU Versions, if you are an EU user, then SD Version would be next), and it does seem the system partition size does make a difference, based on where the block location is. What was the size of your System Partition, boot and cache BTW? Mine currently is 8,220,10, by being 220, it has pushed the bad block into the data portion of the phone which never gets written to and avoids the problem.
[HD2 Android NAND Development] jcsy:
thanks for the reply

it might not even be the bad block causing this, but more rather the phone itself crapping up (just after 6-8months) on other parts of the hardware than the NAND

I am currently back on WINDOWS MOBILE 6.5, ENERGY ROM and no MAGLDR anymore. I still face issues once in a while, whether I charge or on WIFI or on SPEAKER phone, it still results in FREEZE/REBOOT and subsequently, battery pull

I still remember I flashed HyperdroidGBXv12, which was about 80MB on NAND with a 150M partition and upon boot up, the problem was also there.

I still remember I had empty Windows Mobile 6.5 Energy ROM back in June, no applications installed (meaning minimal blocks used) and still it would crap on me :D

I still remember I flashed STOCK windows mobile from HTC, without MAGLDR and swapped radios from 2.12 and 2.14 and 2.15, still had the problem

I performed Task 29 50% of the times, both the flashes and would get the same problem :D
[HD2 Android NAND Development] AngelDeath:
Based on that it could very well be another issue, I know one of them that would cause that is excessive heat, the ONLY time my phone ever rebooted was once while using navigon while the phone was plugged in to charge in my car, the back got quite hot and then the phone rebooted. I know you said you tried to cool the phone but if i were you if its under warranty (Which I think your leading me to believe its not) I would see if you can get it repaired, if not, then its a shame.
[HD2 Android NAND Development] Unconn:
If we all have this right, and based on all of the other users experiments and experiences we do, then because all of my bad blocks are in my /userdata partition then my /system partition should flash fine and backup fine but my /userdata will not when using CWM. This is what I have found. My /userdata partition backsup/copies fine using something that reads and writes from a level above yaffs, tar.

SO, and this is where is gets interesting, I should be able to take a tar of my /system and send it over to someone who has bad block in their /system partition. They should then be able to format the /system and untar this to their phone. After a couple of steps the phone should then boot up fine. The reason for this is that the blocks will already have been marked bad by yaffs and tar will not even try to write to them because yaffs will not let it.

So the process would be (summarised):

- do what ever you want to to get ready to flash Typhoon (or what ever ROM we pick). Format, task 29, or nothing, whatever.

- flash the chosen ROM and reboot back into recovery (this get a valid boot/kernel for the ROM)

- format /system using recovery

- then using ADB and some instructions that I can send, the /system would be restored to this phone from the tar file.

- Then we issue a 'sync' command to make sure the restore is committed before rebooting.

Who is running cLK and can prove they have bad blocks in the /system partition and wants to volunteer to try this? If you do not know how to count the blocks for your partitions to prove your bad blocks are in system then please do not volunteer. example: I know my bad blocks are in my user data because my /userdata starts at 2209. My first bad block is 3735.

I can flash a new ROM and back it up before I even boot into it. This way it is generic. Who is game?

We could have both bad, and just file system corruption out there, but I bet more than 99% of what we are seeing is physical corruption as the yaffs/mtd table is reset every time a yaffs image is flashed.

As a side note I believe that a yaffs image was probably for backing up existing systems for rolling back/recovery of the same system. Not for moving between systems as your phone will not have the same bad blocks as another and this is stored in the image. I imagine this is why Ghost does a read of each file from a FAT partition instead of making a FAT image.
[HD2 Android NAND Development] Unconn:
A Theory

I have a theory as to why there is a sudden epidemic of bad blocks, one of the low level NAND resets. Something like Task 29 or Task 2a. The reason I say this is that one of these utilities might be 'resetting' manufacturer marked bad blocks.

Info:

http://osdir.com/ml/linux.file-systems.yaffs/2005-01/msg00051.html

This would be difficult to test because even if we found someone who had never run one of these utilities on their phone they might actually have no manufacture marked bad blocks. Finding no bad blocks afterward would prove nothing.

Thoughts?

PS the start of the thread linked above talks about soft and hard errors a bit.
[HD2 Android NAND Development] AngelDeath:
Wel here is something, the way I noticed my problem or my bad blocks was after I flashed my rom to test it it started acting funny, after days of banging my head, I decided to format my boot, cache, data and system, flashed the rom, and then looked at the recovery log, thats how I found my bad blocks, I never have done a task 29 cause I didnt believe in it, I only did an info 8 with mtty after I found the errors in the log. So unless the formatting of the location thru CWR causes this, there was no level anything done to the phone. Cause normally I always checked the recovery log to make sure the rom flashed right, but when I was going from 1.42 to 1.5 they were maily fixes that were added and nothing new was added to the rom so i didnt feel I needed to check if everything went right, or if I ran out of room since I made the rom smaller then my previous one.

How does that help your theory? :)
[HD2 Android NAND Development] Unconn:
It proves that not all of the bad blocks were not uncovered by low level NAND resets. :-) I did kind of figure this though, as we will get bad blocks at some point either way as the NAND ages. So I guess it is of no consequence, as how we got the bad blocks does not matter at this point, only how to deal with them better in CWM (if they are not being dealt with).

How about my previous post? You have bad blocks in your /system? I guess we could move your system by changing the size of other partitions. .. Wait! Why don't I just do that? I can backup using tar, recreate my partitions with sizes that force my /system to have bad blocks right near the start since I have bad blocks right in the middle of my NAND. Then I can try untaring to that. If that seems fine, I can try backing up and restoring a few times with CWM. At some point the yaffs.img created by CWM should be corrupted and the tar restore should always be fine if my theory proves correct.

I think I know what I am doing tonight.
[HD2 Android NAND Development] jcsy:
please let us know if that helps
[HD2 Android NAND Development] goldlocke:
Great empiric work you are doing here! :)

To wind back a bit...do we know how CWM writes to Nand for sure? (copy vs. raw) Can we rewrite it to take bad block info into consideration?
[HD2 Android NAND Development] Unconn:
You know I am not 100% sure. I would believe the process does a file by file. BUT, the problem comes when the backup is written back, or a new ROM is flashed. Here is seems sometimes the bad blocks are not taken into affect. Is it new bad blocks (and not manufacturer marked) bad blocks the problem? Are bad blocks a problem in /system or /userdata as long as they are limited (<100)? Does CWM take any yaffs known bad blocks into account when flashing? These are some of the questions we are trying to answer.

oh, to answer your question, if we find that CWM is NOT taking into consideration bad blocks, then I am sure there will be quite a stir in the Android community and it will get modified. I do not know if we have a problem for sure yet. We may not be able to do anything about bad blocks in the boot and recovery partitions though (unsure), but we may be able to create new partition layouts individually for this.
[HD2 Android NAND Development] Unconn:
Yup. I can't seem to get CWM to boot unless it is where is expected. So don't get bad blocks in blocks used for /recovery ...

I was able to add a partition between /recovery and /boot so that /misc and /recovery were in the right location and the right size. /boot was the right size then but contains one of my bad blocks... CWM would not flash the boot image:

Restoring boot image...
Error while flashing boot image!

I then moved the bad block into sboot, and the boot.img flashed fine. I restored fine and the phone booted.

I may update this post with the recovery.log, but I think this proves two things:

- we do not want bad blocks in the /boot partition

- we can move the boot partition to save some phones... until they get more bad blocks.

What else does all of this tell us?
[HD2 Android NAND Development] Zupp34:
Whoa! Slow down dude please :D

How are you moving the bad blocks?
[HD2 Android NAND Development] sagarjawaress:
Many ROMs(without ext) boot-loop

Hello, i do not know how to check bad blocks but i am facing serious problem!

I am running NDT MIUI clk.(it works fine)

Also i am unsuccessful booting every other latest MIUI(bootloops).

Although i am successful booting latest NDT booting from clk, but when i try the same version from mag, it bootloops! I always flash ROMs so i know that i am using correct partition layouts & i do clean install. WP7 & WIN mo works fine! Some android ROMs which require ext also works fine!

Firstly i thought may be sd card is the problem but i formatted it and i am sure its fine!

Im worried that i will break my lovely HD2. I think all this is related to the bad blocks:confused:.

Please Help!

(I have EU HD2)
[HD2 Android NAND Development] Unconn:
I am not moving bad blocks. I am moving my partition boundaries. That 'moves' the bad block to different partitions.
[HD2 Android NAND Development] greg17477:
this part confuses me mostly. Are you sure this values are right?

8*128kb = 1024kb, how come its 8192kb on your side?

And 8192kb/1024 = 8mb not 1mb

What am i missing there?
[HD2 Android NAND Development] Unconn:
Are your partition layouts exactly the same between cLK and MGALDR? If they are not then you will get different results. Heck, MAGLDR might use a different amount of space for bootloader so that /misc does not start at block 537. I am not sure. Either of these things could account for the differences you are seeing between the same ROM with different boot loaders. Can you give us your partition sizes? Are flashing the MAGDLR ROM with DFT or CWM? I have seen DFT give some users with bad blocks better results.

Also, one way to see your bad blocks is to run dmesg after a fresh boot. Probably best to dmesg to a file (dmesg >/sdcard/dmesg.txt or maybe c:\adb dmesg >C:\dmesg.txt)

You are correct. I think I started to look at the wrong partition part way through. Let me check and correct it. Thanks.
[Nexus S Q&A, Help & Troubleshooting] Buckii:
Hello i just bought a used nexus s and well here it goes...

the story goes like this he bought it a month ago and just this past week he dropped it in a puddle but was quick enough to retrive said phone he then did the rice trick and now there is no sign of water damage aside from the 2 white seals faded red he said the phone worked for a bout a day and now just freezes in a google logo,...

now this leads me to believe a software issue so i am going to stiack with that for now

i am lookin at any ideas of what it could and what i should do now keep in mind i only paid 50 bucks so if it is repairable i have no issue in doing so for this phone as i wanna be able too use it sometime and toss this optimus one away lol

than you very much
[Nexus S Q&A, Help & Troubleshooting] suomaf:
can you adb to it while it is in the google loop?
[Nexus S Q&A, Help & Troubleshooting] Buckii:
re

well it is just the google screen with a lock at the bottom of the screen right i also tryed the power and volume hard restart and it took me to the bootloader options for recovery but i think my usb needs to be hooked up maybe as should i have the andriod software for it like im not really used to this and i really would love to see this phone work
[Nexus S Q&A, Help & Troubleshooting] raiderep:
If you can get into the bootloader and it is just a software issue check this thread for info on returning to stock system in the bootloader http://xdaforums.com/showthread.php?t=1078213
[Nexus S Q&A, Help & Troubleshooting] suomaf:
Did you get it to work?
[Nexus S Q&A, Help & Troubleshooting] Buckii:
Not yet it charges fine but when i got to turn it on it goes to a black screen with the google logo with a lock on it also goes into fast boot recovery fine im just have an connectin it to the pc due to lack of knowledge and finding proper usb drivers... the pc picks it up fine just cant seem to find what it asks for... kinda upsetting cause its a nice phone and being that it seems to be a software issue im willing to have ot proffessionally done...
[Nexus S Q&A, Help & Troubleshooting] suomaf:
what is the model of your phone and also the operating system of your computer? You want to be careful about using the correct ROM for your phone. Read up about adb. The process is simple enough if you provide enough information.

adb load cwm

adb flash ROM

and you should be good to go.
[Nexus S Q&A, Help & Troubleshooting] Buckii:
Not 110% sure if some one were to tale it and tend too itt i would pay for shipping completely i just wanna try to use it
[Nexus S Q&A, Help & Troubleshooting] LancerEVA06:
I'm betting the NFC/"SIM Card" daughter board is hosed. If that's the case, you may be screwed, since I'm pretty sure your ESN is stored there. Tear apart the phone and look for corrosion and/or PCB trace delamination. Spray all PCBs down with a mild contact cleaner and fully dry.
[Epic 4G Q&A, Help & Troubleshooting] Killasmoke:
I just downloaded bamboozeled rom & put it on my sd card from there I have to wipe everything 3x & flash? or because I'm on sfr 1.2 do I have to use odin to get on ef02 before I can flash bamboozeled? Thanks for anyone who helps put me on right path! ;)
[Epic 4G Q&A, Help & Troubleshooting] Esteway.619:
U should be able to just wipe and flash it.
[Epic 4G Q&A, Help & Troubleshooting] Ultro:
qbking77's how to

In case you haven't already seen it :>
[Epic 4G Q&A, Help & Troubleshooting] Killasmoke:
Aight goodlooks Esteway I just thought cuz it was based of ef 02 leak that I had to go back to ef02 to flash this rom but you saying that even thou im on sfr 1.2 which is froyo I can still flash bamboozled thru cwm purple cuz both roms are ext4 right? Im still learning my dude im a month & a week into the wonderful world of rooting, flashing, roms, kernels & themes oh my!! Lol ;)
[Epic 4G Q&A, Help & Troubleshooting] ralf_97:
U gotta flash the ef02 leak thru odin first

Sent From The Evo 3D's PIMP!
[Epic 4G Q&A, Help & Troubleshooting] qbking77:
No you just wipe everything and flash.
[Epic 4G Q&A, Help & Troubleshooting] Killasmoke:
Thanks for the reply QbKing77 just flash everything all good you the man! ;)
[myTouch 4G Q&A, Help & Troubleshooting] Virika11:
Hey, I am new with this and rooted my phone to CM7 then wanted to check out other looks so I booted with MT4G_Desire_S_2.3.3 and now my Rom manager wont boot into recovery and all I get is error messages.

All I want to do is:

1. Boot it back to factory defaults

or

2. Go back to the CM7 boot.

If anyone has any steps I can take or any general knowledge, that would be appreciated. Thanks
[myTouch 4G Q&A, Help & Troubleshooting] ronin178:
Are they can't mount cache/fail pu errors? Cause that likely means you have the bad emmc chip few recover from...What exactly were you doing when you flashed the desire rom and what have you tried since?
[myTouch 4G Q&A, Help & Troubleshooting] Virika11:
The errors I get are from Clockworkmod when i push Reboot into Recovery, Fix permissions, and all clockworkmod recoveries... They say "an error occurred while attempting to run privileged commands" I have tried temp rooting it again and on the terminal emulator I put in "su" and it says access denied.

What I exactly did was I temp rooted my phone with CM7 with Visionary and used clockworkmod in recovery mode to boot up CM7. I liked that look for a bit, but then wanted to change the look again to see what else is out there so I booted to recovery and everytime i changed a mod look i cleared cache, data and everything. I booted the desire mod and it booted fine. But now the problem is I can't get into recovery at all...

Hope this helps you understand it better... Anything else you need to know please ask... Thanks for responding.
[myTouch 4G Q&A, Help & Troubleshooting] ronin178:
Hmmm... Not sure I quite understand but...do you have the super user app installed? When you open that app is rom manager listed with a green dot?