yashsingh1/xdaforums huggingface dataset:
[Nook HD, HD+ Android Development] snargledorf:
Before the functionality was removed in the beta, I was able to run lag fix and did successfully without my device bricking.

Does this mean I'm one of the lucky few? Or is the brick not immediate? Does the trim function need to run a couple times before it bricks and I just didn't run it enough times to see that happen?

Thank you for making this thread. I've been looking for updates on this topic.

Edit: Also forgot to add, I ran the commands you listed and my firmware appears to be the same except for two details. My version number is '06' and the date is '11/2012'. Hope this helps.
[Nook HD, HD+ Android Development] MechaGen:
To my knowledge, it's the MAG2GA chip and firmware 05 combination that is most susceptible to bricking. The 06 firmware is patched, and theoretically safe. Verygreen's patched kernel does a similar thing, only by software instead of firmware.
[Nook HD, HD+ Android Development] FoxForceFive:
I've got version 06 mag2ga cat date of 10/2012.

Hopefully that information posted about it being just the 05 version of the mag2ga chip that was faulty is correct! Can anyone else confirm that?

The other thread (the impossibly long & diverse cm10.2 thread) also mentions a patched trim kernel.

Is this kernel patched the way that the kernels were patched for the Nexus 7?

If so I'm prepared to do some testing letting trim run automatically on my hd+ using cm10.2.

Reason being the community needs to get some testing done & whilst it's not as easy to change the Nook need warranty as it is in the us, in the UK we do have the warranty & I shouldn't be without it for more than a couple of weeks should the worst happen.

If someone can confirm that ( [MENTION=3654172]verygreen[/MENTION] perhaps) & point me to it I'll give it a go.

Part of the reason I got this device was to run custom roms & play with it, whilst I can't write code or compile I can follow instructions to the letter & may as well do my bit, especially as my device is under warranty for almost a full 12 months.
[Nook HD, HD+ Android Development] king200:
I'm not certain which version of trim to run. I have been using the first release by Verygreen with Carbon Rom.

On the HD, the later versions 2 and 3 will not start and I have to flash the rom again to fix.

With the HD+, I"ve been using the initial release without problem and I'm reluctant to try later releases. If the first release is working, is there any benefit of using later releases? If it matters, I have the 6 update of the bad chip.
[Nook HD, HD+ Android Development] wellersl:
Does this do more or less what eMMC Brickbug Check (on Google play) does?
[Nook HD, HD+ Android Development] wolfhelm:
Yes
[Nook HD, HD+ Android Development] huntz:
Well, from the application "eMMC Brickbug Check" you can read the info from your eMMC chip. But the check about the "Brick Bug" is not looking for the MAG2GA bug.

You can see for yourself reading the links from the Google Play page https://play.google.com/store/apps/details?id=net.vinagre.android.emmc_check [...] no mention of MAG2GA chip or Nook HD+.
[Nook HD, HD+ Android Development] wellersl:
True that. Just a tiny bit here relevant to the HD+:

MAG2GA TRIM bug

Status: possible fix available? (unverified)

Fix type: kernel workaround avoiding buggy functionality

Patch: https://github.com/CyanogenMod/andr...mmit/3de09ec8e73b7352c37f50a40d696f20be454b8b

Some Nook HD+s have been reportedly bricking due to a corruption bug in Samsung's EMMC firmware (model MAG2GA) related to TRIM.

The 2012 Nexus 7 has the same EMMC model as the Nook HD+s (as does the Epic 4G). The Nook HD+ firmware (v06 dated 08/2012) is newer than the 2012 Nexus 7 firmware (v05 05/2012), and yet the Nexus 7s did not seem to have the problem.

A kernel patch in the 2012 Nexus 7 seems to have addressed the issue. This patch may need to be ported to other devices which have the same firmware and use TRIM (default in AOSP 4.3/CyanogenMod 10.2).
[Nook HD, HD+ Android Development] FoxForceFive:
So can someone confirm is there is a trim kernel with that ported patch available for the Nook hd+?

Is this the one that was hidden in spoiler tags in the cm10.2 thread? (looked back through it for what feels like the millionth time & can't find it!)
[Nook HD, HD+ Android Development] huntz:
Yes, the kernel with patch is the one hidden into the spoiler. I'm using it with M1.

cm-10.2-20131102-SNAPSHOT-M1-ovation.zip - md5: 0d1159bec2da3c082b9b859d59643f42

gapps-jb-20130813-signed.zip - md5: 1f51b5cc6370c1f45dc951109b6ce6ed

trimfix-kernel-ovation-2.zip - md5: becad8723b2a7bb5de5504a4c5924143

I have collected, to be clear, all files used with MD5 (so you cannot pick a wrong file...)

For Nook HD+ - http://nook.rootshell.ru/hd/trimfix-kernel-ovation-2.zip
[Nook HD, HD+ Android Development] FoxForceFive:
Cool, I'll put that on this weekend & hopefully all will be well!

Thanks so much for gathering it all together like that, ace work.

---------- Post added at 07:25 PM ---------- Previous post was at 07:21 PM ----------

I assume as if it does brick there will be zero emmc access (or zero emmc actually!) there is little point bothering with any debugging/logging software as it will be useless?

If there were a logging script installed into sd running on that solely I suppose that could work. If such a thing exists that is.

I am perfectly happy to leave it running for a few weeks without being able to use it if there's something I can run off sd that will provide valuable information should it be needed.
[Nook HD, HD+ Android Development] huntz:
This bug is known as super-brick bug. If you experience it, the Nook will stop working rebooting itself and not starting anymore (you can recover the device using a custom rom using only the SD slot). No script to debug needed...

I'm switching between CM10.1 and CM10.2 doing trim when I'm on CM10.2 (I'm not always with CM10.2 because I have problems with WiFi).

Good luck and remember to note firmware and date of your chip so if you experience some problems we can try to investigate...
[Nook HD, HD+ Android Development] FoxForceFive:
Yeah, I understood that much (did some reading when I find I had a bad chip in my sgs2 ages ago).

I was hoping there was a logging script that ran off sd so it'd provide some helpful information about possible fixes if I did brick it rather than a way to fix it, as I'll just swap it out under warranty should it happen.
[Nook HD, HD+ Android Development] nimaim:
I'm going to take the plunge and test out the patched TRIM kernel. I have the MAG2GA chip just like everyone else, but mine has the 06 revision so let's see what happens. It's worth it to me as I only paid $100 for it and can't stand any lag. Thanks for starting this thread OP. It will help in determining exactly what units are getting bricked.

Just to add, if we want to make the original post include all info, I also think it should be mentioned how to verify TRIM is enabled on our units (like huntz mentioned here: http://xdaforums.com/showpost.php?p=47118462&postcount=1068)
[Nook HD, HD+ Android Development] FoxForceFive:
Ok, I'm going to install CM10.2 M1 & the Trim patched kernel.

How is best to do this coming from CM10.1 (emmc install)?

I assume placing the trim kernel, cm10,2 & correct gapps on the SD card, then I install them in the same order?

I wanted to double check simply cos I'm unsure whether it's safer to flash the kernel before the cm installation or after.
[Nook HD, HD+ Android Development] MechaGen:
Flash CM, then Gapps and kernel.
[Nook HD, HD+ Android Development] Tschumi:
I have the dreaded MAG2GA chip bute the 0x06 revision, I guess it's (relatively) safe to use the trim-enable kernel?
[Nook HD, HD+ Android Development] FoxForceFive:
Did I do this right?
[Nook HD, HD+ Android Development] starbright_:
Me to, date is 11/2012, bought in July 2013. But still not test this Trim feature. I am outside US an no chance to send device back for repair.
[Nook HD, HD+ Android Development] starbright_:
TheDannemand reported here :http://xdaforums.com/showpost.php?p=47525259&postcount=1169

"And now with the trim-kernel, it doesn't become laggy as it did before. (I have MAG2GA 16GB, Rev 06 from 11/2012)."
[Nook HD, HD+ Android Development] nimaim:
Yep exactly the same results and same chip that I have (rev 06 from 11/2012). My unit used to get bogged down after a couple days running the original kernel; with the TRIM kernel, it's staying snappy.
[Nook HD, HD+ Android Development] abs99:
Does the 32GB HD+ version suffer from this bug too?
[Nook HD, HD+ Android Development] chachi:
Shouldn't but just run the emmc check app and lookup the result
[Nook HD, HD+ Android Development] starbright_:
It is depended on the type of flash, not the amount.
[Nook HD, HD+ Android Development] FoxForceFive:
So, I'm back on cm10.1.3 stable thanks to the really annoying wifi bug.

What's the easiest way to use trim, step by step?

I know I'll need to be in cm10.2 to do it, but unsure how to d it without reflashing each time.
[Nook HD, HD+ Android Development] leapinlar:
No you don't, just download the trim/lagfree app from Play Store and install and run it in CM10.1. But it does not have the bugfix in it.
[Nook HD, HD+ Android Development] FoxForceFive:
That's the riskiest way of doing it though, isn't it?

I'd prefer to do it with the patched trim kernel.
[Nook HD, HD+ Android Development] leapinlar:
Yes, if you have the bad emmc chip, it does not have bugfix in it.

Another way another user says works is to use CWM to nandroid backup, wipe data and datamedia and restore. But that removed you media files, so back those up too.
[Nook HD, HD+ Android Development] snargledorf:
Issues with lag fix kernel resetting?

So I have been running cm 10.2 with the patched trim kernel for a couple days and all has been fine for me even when running fstrim manually (Via LagFix or through adb/shell)

I have the version 06 firmware and my mfg date is 11/2012

One issue I have been hitting however is that every once in a while, after a reboot it would seem, trim stops working and I need to reflash the trim enabled kernel which fixes the issue.

I don't have any logs explaining why or really any exact steps to reproduce it (yet) but I thought I would post it so that devs are aware as well as to see if anyone else has noticed this.

UPDATE: So I did a regular reboot and trim is still working so it doesn't appear to reset on reboot. Will try and see if wiping cache/dalvik makes a difference.

UPDATE 2: So clearing cache didn't do anything either. I will keep an eye on this and try to report back if I determine what is causing the reset.

UPDATE 3 FINAL: Ok it was due to Cyandelta. I am on the nightly builds so it was overwriting the kernel when it would update. (DOH!)

Please move on, nothing to see here.

For others in the same boat, you can have Cyandelta reinstall the kernel after the update automatically by putting the kernel in the Cyandelta folder on the sdcard, then going into settings in Cyandelta and selecting "Install additional zip after ROM 1" and choosing the kernel zip file.
[Nook HD, HD+ Android Development] jisoo:
Starbright, thank you for this thread. Hopefully we can put together a coherent list of what chip versions are susceptible to the bug, and confirm whether or not the workaround prevents eMMC failure.

I'm the unofficial maintainer for the Carbon 4.3 builds, and I think I'm at the point where I'm very interested in trying out a trim-patched kernel (and providing one for Carbon if it does not brick my own device).

A couple of questions first, though:

My device (32GB HD+) reports as MBG4GA, manfid 0x000015, fw revision 06 and manufacturing date of 10/2012. Are there any records of trim bricking with this chip? Anyone with the same device version running a patched kernel?

Does anyone know where the specific patches for the trim work-around by verygreen are? There's a link in this thread to commit 3de09ec8e73b7352c37f50a40d696f20be454b8b -- is this the one? Has verygreen made any posts with a link to the specific commit (I couldn't find one)?

Thanks,

Jisoo
[Nook HD, HD+ Android Development] snargledorf:
I would have to assume that was the patch he used.

I did a little more research and found this commit 50c7f9d622a3b57d24ce935f6117bf5b8a5fc5e1 for the BN omap kernel as well as many other devices with the same memory chip.

Unless there was a new patch for this bug that hasn't been published to any of the CM repos.

EDIT: Only thing that has me skeptical is the fact that the commit was made about 3 months ago which doesn't really fit into the timeline of when people started seeing issues and when they warned people to upgrade/downgrade to avoid bricking. The advice to upgrade/downgrade affected people on CM 10.2 nightlies <= 8/15 aka 3~ months ago, and then there was no word on whether there was a fix or not.

Probably reading too much into this lol.
[Nook HD, HD+ Android Development] king200:
I have the same device as yours. I have been running the first patched kernel, Aug. 24 but with CarbonRom. Was using that kernel with CM 10.2 until the WiFi problem ~1011. The version 2 of the Fstrim kernel came after that time and was necessary because of a change in CM that I don't think was the same in Carbon.

My HD/Hummingbird also works with the 0824 fstrim kernel and Carbon. I tried version 2 and 3 and they did not work. I needed to power off the HD and get into recovery with the hardware keys. Reflashing the rom fixed the negative experiment.

For reference purposes, I flash the rom and boot into system to check if the rom is ok. Then I boot into recovery and flash the Fstrim kernel. And then I boot into system and reboot. I also use SuperSU instead of Superuser.

My device(s) flicks between homescreens and between app drawer as smoothly as my Galaxy S3, 4.1.2. Rarely the device slows and becomes insensitive touch and needs a reboot. A combination of Chrome, Browser, Playstore updating several apps at once, and the Currents widget seem to always be the running when this happens. The kernel makes no difference.
[Nook HD, HD+ Android Development] FoxForceFive:
Interesting. Thanks for the information.

Do you know if that combination of kernel & rom enables auto trim, or do you run it manually?
[Nook HD, HD+ Android Development] king200:
I don't run it manually.
[Nook HD, HD+ Android Development] jisoo:
I would strongly assume that patch is not the specific one included in the kernel verygreen posted here, as it would be automatically pulled into the nightlies (as well as any other ROM which uses CM's device trees). The patch is not going to be in the CM repos, but I can't find anything recent in verygreen's own github repos either.

I'll PM verygreen to get the patch source. The kernel is GPL-licensed, and we should actually be providing sources for any kernel we post (though very few devs on xda follow that rule meticulously...)

[edit:] Ok, verygreen has kindly clarified the situation. The kernels he posted have just the August 14 commit ext4: disable FITRIM reverted,. The 50c7f commit is the trim bug fix and is in the CM source tree. It just doesn't do anything as the whole trim functionality is turned off in the standard kernel.

I will try this on Carbon soon (when I find the time) and put together a flashable kernel in the thread.
[Nook HD, HD+ Android Development] FoxForceFive:
Great news. I love cm10.2 (esp pie controls), but the wifi bug makes it unusable.

Having carbon with pie controls & no wifi bug with trim would be great.
[Nook HD, HD+ Android Development] gtharea:
I have a 16gb hd+ with MAG2GA v6 08/2012 running cm10.1.3. Is it safe to run the lagfix app from the store? Thanks for your help
[Nook HD, HD+ Android Development] leapinlar:
No, that's how several have bricked.
[Nook HD, HD+ Android Development] DSent:
I realize that it's too early to jump into conclusiom, but I'm on MAG2GA v6 and had been using 10.1.3 with Lagfix for a couple of days and so far no problems (I must've ran Lagfix over 10 times on it already). So if you don't care too much about bricking it, I'd say go for it, there's a good chance you'll be alright.
[Nook HD, HD+ Android Development] razholio:
If yer nook is lagging and you need a fix, your safest option is to upgrade to 10.2 and use the latest lag fix kernel.
[Nook HD, HD+ Android Development] MechaGen:
The following was copied directly from wiki.cyanogenmod.com

"MAG2GA TRIM bug

Status: possible fix available? (unverified)

Fix type: kernel workaround avoiding buggy functionality

Patch: https://github.com/CyanogenMod/andr...mmit/3de09ec8e73b7352c37f50a40d696f20be454b8b

Some Nook HD+s have been reportedly bricking due to a corruption bug in Samsung's EMMC firmware (model MAG2GA) related to TRIM.

The 2012 Nexus 7 has the same EMMC model as the Nook HD+s (as does the Epic 4G). The Nook HD+ firmware (v06 dated 08/2012) is newer than the 2012 Nexus 7 firmware (v05 05/2012), and yet the Nexus 7s did not seem to have the problem.

A kernel patch in the 2012 Nexus 7 seems to have addressed the issue. This patch may need to be ported to other devices which have the same firmware and use TRIM (default in AOSP 4.3/CyanogenMod 10.2)."

I too have used the lagfix app from the AppStore on my CM10.1 MAG2GA equipped HD+, but it is very risky.
[Nook HD, HD+ Android Development] leapinlar:
Maybe we could prevail upon verygreen to patch the CM10.1.3 stable kernel to apply this fix. That is what he did for the CM10.2 fixed kernel.
[Nook HD, HD+ Android Development] DSent:
That would be awesome. There's quite a lot of people who are still using 10.1.3 , so it would nice to have the patch for it too.
[Nook HD, HD+ Android Development] jisoo:
I've posted the trim-enabled kernels in the Carbon thread: http://xdaforums.com/showpost.php?p=47818336&postcount=227

I really hope these do not brick the devices or I need to find another tablet to play with...
[Nook HD, HD+ Android Development] mg.degroot:
Already posted it in the cm10.2 thread, but here seems more relevant:

I'm Running de trim kernel together with the nightly for more then a week now, and no problems so far. The chip is the MAG2ga with firmware revision 6. I installed a new nightly yesterday together with the trim-enabled kernel and still running good.
[Nook HD, HD+ Android Development] huntz:
I'm again with CM10.2.

[MENTION=2492996]starbright_[/MENTION], maybe you can update the first post with this little how-to manually run the TRIM command (Use At Your Own Risk)...

After the update and a reboot, on Terminal (after a "su -"):

fstrim -v /system
fstrim -v /data
fstrim -v /cache

and also

vdc fstrim dotrim

With 11/27 no problems to report for now; also WIFI is working. :good:
[Nook HD, HD+ Android Development] fanoush:
emmc brick recovery?

I guess it is an old news but some people recovered their samsung emmc chips in Kindle by completely erasing them via sending low level MMC command http://xdaforums.com/showthread.php?t=2413453

Anyone tried this with bricked Nook HD?
[Nook HD, HD+ Android Development] bpaulien:
I agree. Please update OP with this information. It's very useful and would make it much easier to find. I went on a wild goose chase last night looking for this, and somehow didn't find that last bit (vdc fstrim dotrim) is that necessary, or what does it do?

I also found out that I have the version 6 chip, so I guess it's not as bad as I feared. (I've been Running the trim enabled kernel knowing it might brick,but it turns out I may not be at risk like I thought.)
[Nook HD, HD+ Android Development] Zippy Dufus:
I have version 5. Is this more at risk than version 6 ?

I'm sticking with 10.1 because 10.2 got too slow.
[Nook HD, HD+ Android Development] huntz:
In fact, the patch to the kernel is addressing the MAG2GA chip with firmware 05, as you have.

So, if the patch is working correctly (but why not?), you can do TRIM even if you have the faulty MAG2GA chip version.

If you can replace your Nook HD+ in warranty, give a try to 10.2 with the patched kernel.

You can also try CM 10.2 nightly without flashing the patched kernel (so, with TRIM disabled). Make also a nandroid backup before flashing 10.2, so you can easly revert back to 10.1.3.

Let us know! :fingers-crossed:
[Nook HD, HD+ Android Development] Zippy Dufus:
Not likely, because I am a Canadian who has muled my NookHD+ plus two others back from the US and we do not have B&N.

Has anybody ever reported a brick using the patched kernel? I thought that I saw a reference to only one confirmed case in the the forums.

Also, I always build my ROM from scratch so I'm wondering if there is a repo with the patched kernel code or a compile flag that I can set? I haven't checked, but is the command line trim command deployed with the non-patched kernel?
[Nook HD, HD+ Android Development] jpisini:
Dumb question does the patched kernel auto run the trim command on a regular basis or do you have to do it manually?
[Nook HD, HD+ Android Development] jisoo:
You want to reverse the last commit in the kernel/bn/omap

repo ( 7c4b0f46a5a9ed6a9dd7fd91cf918e5ad1c44355. The "non-patched" kernels actually do nothing with trim.

It runs automatically from 4.3/CM-10.2 onward. In older versions, you have to run it manually.
[Nook HD, HD+ Android Development] riboswitch:
Hey folks,

I want to know if there is a fixed/patched kernel for the MAG2GA Rev 06.

Wanted to install carbon 4.3 with trim, but I'm unsure right now.

edit: and how can I backup the /boot
[Nook HD, HD+ Android Development] sunami88:
I also have rev 06, and would like to know...
[Nook HD, HD+ Android Development] NishantM:
Afaik there are no specific builds for a particular emmc. The kernel only has trim re-enabled and the fixes are merged to the ROM. Correct me if I'm wrong.
[Nook HD, HD+ Android Development] TheDannemand:
That's my understanding as well: Verygreen's trim kernel includes the patch that checks for certain Samsung emmc and Revision and implements trim in a different way on the risky ones. It's the same patch Google uses to work around the same problem on 2012 Nexus 7 tablets which use the same Samsung emmc.

Also, my understanding is that only MAG2GA Rev 05 is affected, while Rev 06 is safe (and thus gets the regular, non-patched TRIM treatment). I have MAG2GA Rev 06 as well and have been using the trim kernel with CM10.2 for a couple months now.

See huntz' excellent post here.
[Nook HD, HD+ Android Development] D000XXX:
Afaik he just undid what he disabled after the trim problem was brought up and it seemed to work for everyone again, no negative results since that time. Rev05 is suspected to be faulty but it's not proven. Many problems also occurred on 10.1 because of trimfix working wrongly there (including 06 devices).

The whole situation is kinda unclear, so I wouldn't say one version is OK while the other isn't (there are people running 05 and 10.2 w trim) , it's still a lot of speculation.

But I may be wrong, too :)
[Nook HD, HD+ Android Development] whatagonad:
Can someone confirm this basic question for me please. Essentially if you have the MAG2GA Rev 06 (and presumably the Rev 05), due the faulty chip the lag issue is essentially similar to a PC with a hard drive (not SSD) that is getting full of files but has never been (or can't be) defragged? If broadly correct does leaving the memory with several GB spare unused delay/stop the lag from occurring?
[Nook HD, HD+ Android Development] NishantM:
I think you are correct. I have the same chip and I keep most of the files (videos/music/ebooks/TiBackup) on the 32GB MicroSD. There's only a slight lag, which can easily be ignored. I am yet to try the trim kernel as I'm located outside US, so a bit skeptical/scared.
[Nook HD, HD+ Android Development] whatagonad:
Thanks. Shouldn't these nooks have been recalled if this is the case?
[Nook HD, HD+ Android Development] NishantM:
Nook HDs run on stock ROM based on Android 4.0. Trim doesn't come into picture there. No trim, no brick issues due to trim.
[Nook HD, HD+ Android Development] whatagonad:
thanks. I just assumed android had Trim built in and that these faulty chips meant it didn't work!

Whats the consensus of opinion re this issue - its it worthwhile handing into these Nooks until a definite/reliable fix is sorted?