Related
Maybe some of you guys have figured this out already but it's probably important to note for people developing custom recovery or boot ROMs.
There is a partition on the internal flash named "bootdata" that stores a files named BCB and BootCnt. The secure bootloader updates BootCnt on every non-sdcard boot and if it gets too high it will automatically boot into the recovery partition instead of the boot partition. So, if you're making any custom ROM to be run from the internal flash then you'll want to reset that file in a boot script somewhere. The shell command "dd if=/dev/zero of=/bootdata/BootCnt bs=1 count=4" would do it (Assuming you've mounted the bootdata partition )
The BCB file is similar in that if the secure bootloader boots into the recovery partition for any reason, it will write to that file and will always boot into the recovery partition until that file is cleared. The shell command to clear that file is "dd if=/dev/zero of=/bootdata/BCB bs=1 count=1088"
The bootdata partition just contains a standard vfat filesystem so you just mount it normally.
And for the love of your god do not delete those files! If you do then booting from internal memory will continue to boot into the recovery partition until they are replaced. You would be able to boot from an SD card to replace them though.
bauwks said:
Maybe some of you guys have figured this out already but it's probably important to note for people developing custom recovery or boot ROMs.
There is a partition on the internal flash named "bootdata" that stores a files named BCB and BootCnt. The secure bootloader updates BootCnt on every non-sdcard boot and if it gets too high it will automatically boot into the recovery partition instead of the boot partition. So, if you're making any custom ROM to be run from the internal flash then you'll want to reset that file in a boot script somewhere. The shell command "dd if=/dev/zero of=/bootdata/BootCnt bs=1 count=4" would do it (Assuming you've mounted the bootdata partition )
The BCB file is similar in that if the secure bootloader boots into the recovery partition for any reason, it will write to that file and will always boot into the recovery partition until that file is cleared. The shell command to clear that file is "dd if=/dev/zero of=/bootdata/BCB bs=1 count=1088"
The bootdata partition just contains a standard vfat filesystem so you just mount it normally.
And for the love of your god do not delete those files! If you do then booting from internal memory will continue to boot into the recovery partition until they are replaced. You would be able to boot from an SD card to replace them though.
Click to expand...
Click to collapse
Yup. On the NookColor these had the same functions. Lived on /rom instead of /bootdata however.
Note: My CWM image doesn't probably handle BCB or bootcnt yet (I do in my CM9 image but that is another thing )
nemith said:
Yup. On the NookColor these had the same functions. Lived on /rom instead of /bootdata however.
Note: My CWM image doesn't probably handle BCB or bootcnt yet (I do in my CM9 image but that is another thing )
Click to expand...
Click to collapse
My Ubuntu image does not mount this partition.
bauwks said:
Maybe some of you guys have figured this out already but it's probably important to note for people developing custom recovery or boot ROMs.
And for the love of your god do not delete those files! If you do then booting from internal memory will continue to boot into the recovery partition until they are replaced. You would be able to boot from an SD card to replace them though.
Click to expand...
Click to collapse
Yep-- this is all taken care of in cm9
Update: I don't think you mentioned, but for completeness, there's also the serial file in /rom at devconf/DeviceId that will trigger a rom reformat if it goes missing. there are also some edge conditions that will trigger recovery/flashing such as the presence of certain update.zip files on SD. Also SD boots are treated differently by default, don't increase the boot count, etc. In short, this is very similar to how NookColor works with the added disadvantage of having to deal with, rather than simply ignore or remove, these various "go to recovery' conditions.
I can verify that Bauwks script works and allows internal booting without a bootloop.
Nemith, if you find the time can you add something like this to your CWM recovery.img? I think just adding the /bootdata mount and dd calls to the init.rc file should work. I was going to build my own CWM .img but figured you already had the source code handy.
I'de like to dabble in a CM7 port soon, while CM9 and Ubuntu ports are in-work
Thanks for all your hard work guys!
CWM recovery bootloop
bauwks said:
And for the love of your god do not delete those files! If you do then booting from internal memory will continue to boot into the recovery partition until they are replaced. You would be able to boot from an SD card to replace them though.
Click to expand...
Click to collapse
I flashed cm9 alpha 0.2 on my nook tablet using the nook tablet recovery apk. It booted into cyanoboot, however it had an error message that said disc majic error. I noticed I had put the wrong boot image on my sd card from the alpha 0.1. I rebooted 8 times and booted into cwm. Now in cwm I flashed a backup of my tablet. I then made the common mistake of clicking reboot recovery. Then trying to fix the bootloop into cwm recovery while unaware of the sevarity of what I was doing I went into mounts and storage and formated each bootdata, cache, data, emmc, rom, and system. I just restored my backup again and now I know what I need to do. My stock Nook recovery was overwriten when I clicked reboot recovery. Also I formated my rom folder and that might have contained my serial number and info.
I basicaly deleted my partions. while stuck in the cwm boot loop. Can you please send me or send me the link to a step by step way that I can get my nook tablet 16gb stuck in the cwm boot loop back to normal.
I tried using fastboot but I dont know the commands to open it. Also I dont know how to use adb either. I have a 2gig, and a 256 mb micro sd. I have a windows pc. Can you show me step by step how to restore those partions, how to do it on adb or fastboot, or the update zip method. I need help as soon as possible. Thanks.
Its similar to this
This seems like the only place folks are looking at bcb in much detail, so I thought I'd post an observation: on the simple touch, if you boot from noogie after issuing an "erase and deregister" command from the OS, the bcb file contains command strings.
I don't know what reads the strings, but after erase and deregister, bcb seems to be used to tell the device to run recovery:
recovery --wipe_data
is an ascii string from bcb on a deregistered and not yet rebooted glowworm - I put the noogie disk in, did the erase and deregister, then dumped the partitions once it came back up.
the command flags available in recovery as of cupcake are documented at
http://www.netmite.com/android/mydroid/cupcake/bootable/recovery/recovery.c
Just wanted to bump this so more people know about it, because I didn't and I reformat my /bootdata.
Can anyone make an image of it for restore purposes?
An image of /factory would be nice as well But less important as we're all (likely) using CM.
edit
Actually disregard this.. I have the nook hd+, but the /bootdata format info will probably be handy for any nook device.
Don't format bootdata or factory!
roustabout said:
This seems like the only place folks are looking at bcb in much detail, so I thought I'd post an observation: on the simple touch, if you boot from noogie after issuing an "erase and deregister" command from the OS, the bcb file contains command strings.
I don't know what reads the strings, but after erase and deregister, bcb seems to be used to tell the device to run recovery:
recovery --wipe_data
is an ascii string from bcb on a deregistered and not yet rebooted glowworm - I put the noogie disk in, did the erase and deregister, then dumped the partitions once it came back up.
the command flags available in recovery as of cupcake are documented at
http://www.netmite.com/android/mydroid/cupcake/bootable/recovery/recovery.c
Click to expand...
Click to collapse
pbassjunk said:
Just wanted to bump this so more people know about it, because I didn't and I reformat my /bootdata.
Can anyone make an image of it for restore purposes?
Click to expand...
Click to collapse
To fix the Recovery Boot Loop caused by invalid/missing BCB and BootCnt in /bootdata, flash Succulent's flashable_fix_bootloop.zip posted at his blog http://iamafanof.wordpress.com/2013...-1-jellybean-sdcard-img-for-nook-tablet-0110/ (see under heading "I am stuck in a recovery boot loop?").
An image of /factory would be nice as well But less important as we're all (likely) using CM.
Click to expand...
Click to collapse
/factory contains a backup copy of stock ROM as well as a backup copy of the device data in /rom partition (romdata.zip), the latter includes data that is unique to each Nook (such as MAC address, security certificate, etc.) and hence is not replaceable with a copy from another Nook.
...
Don't format bootdata or factory!
Click to expand...
Click to collapse
Nor /romdata. See http://forum.xda-developers.com/showpost.php?p=37515697&postcount=31 for more info.
I created a flashable zip as well, which should reset that partition to a stock (zero-count) state. Hopefully it's not unique per device (I don't think it is, as I've used this successfully on two distinct devices.)
Is a fix being baked into any official roms, CM and the like? I don't mind the workaround via scripting, but the two I bought and modded I gave as gifts, so when they break (they both have) I definitely hear about it and receive the units back again for fixing.
ZIP is attached. Please let me know if it works or doesn't work for you, should you end up using it.
weasel5i2 said:
I created a flashable zip as well, which should reset that partition to a stock (zero-count) state. Hopefully it's not unique per device (I don't think it is, as I've used this successfully on two distinct devices.)
Is a fix being baked into any official roms, CM and the like? I don't mind the workaround via scripting, but the two I bought and modded I gave as gifts, so when they break (they both have) I definitely hear about it and receive the units back again for fixing.
ZIP is attached. Please let me know if it works or doesn't work for you, should you end up using it.
Click to expand...
Click to collapse
Having trouble with the /bootdata/BCB/ and my nook hd+ booting into recovery. Am I just supposed to flash the fix to the SD card boot partition?
tinkering said:
Having trouble with the /bootdata/BCB/ and my nook hd+ booting into recovery. Am I just supposed to flash the fix to the SD card boot partition?
Click to expand...
Click to collapse
You might want to see leapinlar's tip #10 in his post http://forum.xda-developers.com/showpost.php?p=35811322&postcount=1 for the Nook HD/HD+.
digixmax said:
You might want to see leapinlar's tip #10 in his post http://forum.xda-developers.com/showpost.php?p=35811322&postcount=1 for the Nook HD/HD+.
Click to expand...
Click to collapse
Thanks for the link to leapinlar's post. That helps me to understand the problem and fix a bit better. I didn't see the zip that seemed to fit my situation on his post. I did a SD install non-rooted and I see only only emmc fixes on his post. I tried your fix with these steps and I must have done something wrong. Maybe you could point me in the right direction.
DL, unzip, write image to sd using PC(could only write the .img, don't know what to do with the folder) , put SD into nook HD+, try to boot= no boot
Does the device have to be rooted to flash the repair zip? I don't think I am utilizing the fix properly.
tinkering said:
...
DL, unzip, write image to sd using PC(could only write the .img, don't know what to do with the folder) , put SD into nook HD+, try to boot= no boot
Does the device have to be rooted to flash the repair zip? I don't think I am utilizing the fix properly.
Click to expand...
Click to collapse
No, the device does not have to be rooted to get flashed.
If this is your first time trying to boot off SD, it's possible that your HD+ is one of the units that have difficulty booting off SD card -- see http://forum.xda-developers.com/showthread.php?t=2288688.
Is your device still on stock ROM and stock Recovery?
digixmax said:
No, the device does not have to be rooted to get flashed.
If this is your first time trying to boot off SD, it's possible that your HD+ is one of the units that have difficulty booting off SD card -- see http://forum.xda-developers.com/showthread.php?t=2288688.
Is your device still on stock ROM and stock Recovery?
Click to expand...
Click to collapse
Sorry, I probably should have updated my last post. I was attempting to flash the repair incorrectly. Unfortunately, I have a new problem and have moved my question to the "[Q][Panic] HD+ won't boot, can access CWM SD but can't mount sdcard or emmc" thread.
The device would boot from SD. Was running CM10.2 and CWM recovery. The trouble I am having now is that I can't flash anything from the SD in CWM recovery because it wont mount the SD. (See details in thread referenced above.)
Thanks
Hi all, I built my sdcard per: http://iamafanof.wordpress.com/2012/...r-nook-tablet/ (built by"Succulent")
My kids have two NT's. With two 16GB Sdcards, one class4 the other class 10. I know class4 is recommended, but one poster in forums said he's taken images of CM built on class4's and applied this image to class 10's in several cases and has had no problems. So I thought what the heck, can't hurt to try, so that's what I did (using Winimage). It booted fine 5 or 6 times for me, and I installed several APK's of games from Humble Bundle . I turned over the Nook to my little girl and she brought it back to me later showing she gets errors on boot, after swiping the lock symbol to unlock it. One is "Unfortunately, Talk has stopped". If you click OK on this, you get ""Unfortunately, Trebuchet has stopped". Clicking OK on this does nothing, it keeps popping up indefinitely. I don't know if the sdcard is hot pluggable (can be removed with power to the tablet), but she did admit to doing this. So I'm wondering if some corruption occurred to the CM build on the sdcard. Has anyone seen these errors? I could reflash it from the image I made off the class 4, but want to understand what happened so we don't run into it again. The funny thing is, I don't recall the startup wizard off the 1st class4 card prompting me with several screens regarding Google crap like it did on the 2nd card which was flashed from the same image. That was even after telling it I had no Google acct hoping it would leave me alone.
can anyone explain the boot menu you get when you press the N button? (I'm not including the faded selections) I'm wondering especially about the recovery options. Here's my menu:
INT BOOT ( I assume will boot to B&N native OS?)
INT RECOVERY ?
SDC RECOVERY ?
SDC BOOT (Iassume, boot to CM10 off sdcard?)
SDC ALTBOOT ?
START FASTBOOT ?
baytee said:
...
So my question is, can anyone explain the boot menu you get when you press the N button? (I'm not including the faded selections) I'm wondering especially about the recovery options. Here's my menu:
INT BOOT ( I assume will boot to B&N native OS?)
INT RECOVERY ?
SDC RECOVERY ?
SDC BOOT (Iassume, boot to CM10 off sdcard?)
SDC ALTBOOT ?
START FASTBOOT ?
Click to expand...
Click to collapse
Yes,
internal boot - boots Rom in emmc
Internal recovery - recovery in emmc
Sdcard boot - boots your sdcard Rom.
Sdcard recovery - boots sd card recovery ( keep recovery.img in root of sdcard for it to load recovery)
Sdcard altboot - alternate recovery ( not necessary, unless you want both cwm and twrp at same time)
Fastboot - fastboot mode , fastboot commands to flash .img file etc with this method .
As for your problem, try entering recovery, wipe cache and dalvik cache partition (I've done this on emmc version, never tried sdcard version of any Rom) this may solve the issue. If not try factory reset.
And removing sdcard while device is switched on is called hot swapping , hot plug is a CPU governor. Not sure if sdcard roms are hot swappable, but I think not.
Sent from my ST27i
Thanks.
emmc=internal nook memory I assume?
Oh, and...just to clarify, I haven't modified (rooted) my tablet. (you mention factory reset). I should mention that with the sdcard out, it boots B&N OS just fine.
And the part you say about wiping the two caches, so I should go into SD Card Recovery to do that? Once you get into it, you have various choices like the ones you mention? (I'd read that this choice was to backup your NT to sdcard). And please, I want to be very, very careful not to wipe out the B&N stock OS, so please, any detailed instructions you can give so I don't make that mistake, I'd greatly appreciate it. (I see so many posts on these forums about people bricking their Nook tablets it worries me.)
baytee said:
Thanks.
emmc=internal nook memory I assume?
Oh, and...just to clarify, I haven't modified (rooted) my tablet. (you mention factory reset). I should mention that with the sdcard out, it boots B&N OS just fine.
And the part you say about wiping the two caches, so I should go into SD Card Recovery to do that? I'd read that this choice was to backup your NT to sdcard. But once you get into it, you have various choices like the ones you mention? And please, I want to be very, very careful not to wipe out the B&N stock OS, so please, any detailed instructions you can give so I don't make that mistake, I'd greatly appreciate it. (I see so many posts on these forums about people bricking their Nook tablets it worries me.)
Click to expand...
Click to collapse
Um I don't know much about how it works for sdcard Rom. I've always only used emmc version. I guess if you were to enter recovery, it would access the stock cache partition by default , and we aren't trying to clear that.
Try this - use titanium backup (only talking about your sdcard Rom here, nothing to do with your stock) and in options, you may be able to wipe your cache or dalvik cache.
Or,
boot into your sdcard Rom, in settings > backup and restore > factory reset. This will delete all user data and return Rom to original Cm10 that you flashed on sdcard.
Or if it's only google talk and trebuchet launcher issue, install a new launcher (go launcher, adw etc) , then use titanium backup to uninstall trebuchet and talk.
Sent from my ST27i
From what I see, titanium backup is an android app. If I can't boot to Android (Trebuchet error loops as I said) I don't know how I can install this to do anything? Nor can I install another launcher or go into Settings as the error doesn't let you get any further.
I guess if there was a way to browse files/folders on the sdcard partitions on the sd to manually delete the cache files.....but if they're linux partitions (ext3 or4) you can't do that under windows...
baytee said:
From what I see, titanium backup is an android app. If I can't boot to Android (Trebuchet error loops as I said) I don't know how I can install this to do anything? Nor can I install another launcher or go into Settings as the error doesn't let you get any further.
I guess if there was a way to browse files/folders on the sdcard partitions on the sd to manually delete the cache files.....but if they're linux partitions (ext3 or4) you can't do that under windows...
Click to expand...
Click to collapse
In cwm, enter mounts and backup, then (if) you see /sdcard /cache, mount that and format that ONLY.
Do not format anything else as some options can brick device (Rom, bootdata, factory etc)
Wiping cache is safe (99%)
Again, I have never used sdcard Rom so I don't know what will show up in your recovery. But if you see something like sdcard cache, it can be cleared. If it doesn't specify sdcard, let us assume it refers to stock emmc.
Sent from my ST27i
How do I get into CWM?
baytee said:
How do I get into CWM?
Click to expand...
Click to collapse
Select SDC Recovery on the Cyanoboot boot menu -- see steps 7 & 8 of the post at http://forum.xda-developers.com/showthread.php?t=2061536.
If you want to backup the BN stock ROM just in case, see step 9.
digixmax said:
Select SDC Recovery on the Cyanoboot boot menu -- see steps 7 & 8 of the post at http://forum.xda-developers.com/showthread.php?t=2061536.
If you want to backup the BN stock ROM just in case, see step 9.
Click to expand...
Click to collapse
I chose sd recovery, chose Backup & Restore, then Backup. It started running right away. It said:
SD Card space free: 228MB
Backing up boot image
Backup of boot image completed
Backing up recovery image
Backup of recovery image completed
Backing up system
Error while making a backup image of /system!
I plug sdcard into PC card reader and the FAT partition has 0 bytes free. So, appears it ran out of space. I saw your comment about 600MB space being needed. So I'm redoing the partitions now.
baytee said:
I chose sd recovery, chose Backup & Restore, then Backup. It started running right away. It said:
SD Card space free: 228MB
Backing up boot image
Backup of boot image completed
Backing up recovery image
Backup of recovery image completed
Backing up system
Error while making a backup image of /system!
I plug sdcard into PC card reader and the FAT partition has 0 bytes free. So, appears it ran out of space. I saw your comment about 600MB space being needed. So I'm redoing the partitions now.
Click to expand...
Click to collapse
Why backing up now when it's not working? Fix your issue, then make a backup. So the next time there's a problem you can restore to working condition.
Sent from my ST27i
Well, backing up, I think, was a good suggestion by Digimax. So I'm glad I did it. and now i know how to do it for future. Just in case anything EVER goes wrong, I'll always have that image now on my pc. Bad thing was, apparently B&N nook OS apparently keeps lots of APKs around after installing them. I had to make my 1st fat32 partition over 2GB for the entire backup to process without running out of space. backup size=1.6gb
I ran into lost chains - convert to cluster msgs trying to delete the folder of the first failed backup, but it never would delete even after a chkdsk, so I formatted the card and put the original image back onto it, adjusted the partitions, and then ran into a new probem.....the Cyanomod spinning logo never stopping spinning so it won't boot up. So I give up. I don't know if it's that it's a class 10 card that all these problems are happening. barring any other suggestions, I guess I'll make sure the other NT we have runs stable for a few weeks and if so I'll order another class 4 like that one has.
baytee said:
Well, backing up, I think, was a good suggestion by Digimax. So I'm glad I did it. and now i know how to do it for future. Just in case anything EVER goes wrong, I'll always have that image now on my pc. Bad thing was, apparently B&N nook OS apparently keeps lots of APKs around after installing them. I had to make my 1st fat32 partition over 2GB for the entire backup to process without running out of space. backup size=1.6gb
I ran into lost chains - convert to cluster msgs trying to delete the folder of the first failed backup, but it never would delete even after a chkdsk, so I formatted the card and put the original image back onto it, adjusted the partitions, and then ran into a new probem.....the Cyanomod spinning logo never stopping spinning so it won't boot up. So I give up. I don't know if it's that it's a class 10 card that all these problems are happening. barring any other suggestions, I guess I'll make sure the other NT we have runs stable for a few weeks and if so I'll order another class 4 like that one has.
Click to expand...
Click to collapse
I don't know about your bootloop issue, but I don't think it's a sdcard class issue.
Anyhow, now that you have stock backup, aren't you going to consider flashing cm10 internally? Do you actually use stock?
Sent from my ST27i
I'm a little leery of it, at least while it's under warranty. I don't know how reliable recovery is.? Besides, my daughter wasn't thrilled with it being down for several days with me fussing with it and asked if she could have her "B&N boot" back I admit It is a bit of a pain having to pull it out of it's case, lift the flap, pop-in or out the sdcard to switch between them. (& also to have to remember to always turn it off b4 removing/inserting)
I may do it in the future though. Thanks for the help
FWIW, you don't have to actually remove the card to boot into stock. Just reboot, hold "n" to get into Cyaonoboot menu and choos "int boot" or something like that, and it will boot to stock with the sd-card still inserted.
Great, thanks for that tip!
Card died
I think many of these symptoms could have been caused by a dying card. It did have a corruption error once, and then it finally completely died. Just for anyone else that runs into these.
baytee said:
Well, backing up, I think, was a good suggestion by Digimax. So I'm glad I did it. and now i know how to do it for future. Just in case anything EVER goes wrong, I'll always have that image now on my pc. Bad thing was, apparently B&N nook OS apparently keeps lots of APKs around after installing them. I had to make my 1st fat32 partition over 2GB for the entire backup to process without running out of space. backup size=1.6gb
...
Click to expand...
Click to collapse
FWIW, /cache does not need to be backed up, which should help reduce the backup space requirement.
[Caveat emptor: adopt/follow this guide at your own risk].
Rooting and especially running a custom firmware (commonly referred to as “ROM”) on an NT unlock the NT’s full potential as a Android tablet. However these undertakings entail a significant risk: accidents or errors in the Rooting or Custom ROM Flashing process can render the NT unusable (aka “bricked”), potentially permanently. This risk can be mitigated by:
developing a basic understanding of the essence of the Rooting and ROM Flashing processes – in particular which parts of the NT storage/content get modified or replaced, and which parts do not
choosing an effective yet low risk rooting/flashing process, and most importantly,
making preparation in advance for a recovery process in the event something goes wrong: by far the most common cause of permanent bricking is not the initial bad rooting/flashing process but rather the subsequent use of unsuitable recovery (“unbrick”) procedures/tools.
NT Internal Storage (EMMC) Partitions and Associated Content (approximated partition sizes on a 16GB NT w/ 8GB allocated for user media)
/xloader (128KB, /dev/block/mmcblk0p1): first stage bootloader (MLO)
/bootloader (256KB, /dev/block/mmcblk0p2): second stage bootloader (u-boot.bin)
/recovery (15.3MB, /dev/block/mmcblk0p3): recovery process (recovery.img)
/boot (16.3MB, /dev/block/mmcblk0p4): boot process (boot.img)
/rom (49.1MB, /dev/block/mmcblk0p5): a set of 15 files containing factory installed device info (ProductID, manufactured data, etc.) and individual device data (serial no., MAC address, security encryption keys, etc.)
/bootdata (49.1MB, /dev/block/mmcblk0p6): boot control and status data (BCB, BootCnt, max17042.bin)
/factory (378.8MB, /dev/block/mmcblk0p7): backup copy of stock ROM as well as backup copy of device data in /rom partition (romdata.zip)
/system (628.6MB, /dev/block/mmcblk0p8): running copy of ROM (system and base apps)
/cache (436.2MB, /dev/block/mmcblk0p9): storage area for temporary data by system/user apps
/media (7.8GB, /dev/block/mmcblk0p10): user media content
/userdata (often referred to as /data, 5.8GB, /dev/block/mmcblk0p11): user-installed apps
For information on the roles of some of these partitions in the NT boot process: see http://omappedia.org/wiki/Bootloader_Project and http://forum.xda-developers.com/showthread.php?t=1444630.
Rooting
Rooting essentially adds a number of system files and apps to the stock ROM on the /system and /data partitions. The simplest routing method which uses CWM recovery running on bootable SDcard and which contains relatively the most current rooting content package can be found at http://forum.xda-developers.com/showpost.php?p=31271965&postcount=240. To get a sense of what get installed into /system and other changes to the stock ROM file-system, take a peek at the two folders “data” and “system” and the "updater-script" file in the folder "META-INF\com\google\android" inside the rooting content package "update.zip" referenced in that post.
Custom-ROM Flashing
Flashing custom ROM replaces the boot.img in /boot with a copy of boot.img from custom ROM zip file and the stock ROM in /system with the custom ROM and Gapps from the custom ROM and Gapps zip files, and wipes out /data (where user-downloaded apps from Google Play store will be installed) as well as /cache. Some custom ROM builds, such as Succulent’s CM10.x or 11.x builds (which are posted on his Blog http://iamafanof.wordpress.com/) also include copy of CWM or TWRP recovery.img which replaces the stock recovery.img in the /recovery partition. To get a sense of what get installed onto the NT and where, take a peek at the folders (except for "META-INF") and the "updater-script" file in the folder "META-INF\com\google\android" inside the ROM and Gapps zip files.
A method for flashing CyanogenMod (CM) ROM using CWM or TWRP recovery running on bootable SDcard is outlined at http://forum.xda-developers.com/showpost.php?p=51377882&postcount=163 (CM10.x ROM) and http://forum.xda-developers.com/showthread.php?t=2692403 (CM11 ROM).
An alternative to installing CyanogenMod (CM) ROM intenally on emmc is to install and run it off an SDcard, leaving the NT entirely unmodified. See http://forum.xda-developers.com/showthread.php?t=2098419 for info on how to create CM10.x SDcard images using Succulent's CM10.x builds.
Recovery from a Bad Rooting and ROM Flashing
It should be clear from the above discussion that the Rooting and custom ROM Flashing processes only involve /system, /data, (and in the case of ROM Flashing) /boot and /recovery. Thus, a logical approach for recovery is to make a backup copy of these affected partitions prior to Rooting and ROM Flashing. This approach makes even more sense since the very same CWM or TWRP recovery tool used to install the content of the Rooting/ROM/Gapps zip packages can also be used to make a backup copy of the affected partitions’ content and subsequently restoring these partitions using the content backup copy if needed. For this reason, while there are various approaches to Rooting and ROM Flashing, the most pragmatic and prudent one is to use CWM or TWRP Recovery tool running off a bootable SDcard, as this enables using the SDcard for content backup and, more importantly, using the SDcard to boot the NT and restore the backup content even when the NT becomes un-bootable on its own.
The remaining partitions of the NT – namely: /xloader, /bootloader, /rom, /factory, and /media – are not involved and should not be affected at all by Rooting and ROM Flashing. Hence there is absolutely no reason to use any “unbrick” process/tool that would flash/reformat/repartition/wipe/zero-out any one of these partitions – unless it has been determined with certainty that these partitions have been irreversibly corrupted. In particular the two partitions /rom and /factory which contain factory-installed individual device data must never be reformatted/wiped/zeroed-out without first backing up their content in a restorable form -- therefore refrain from using any “unbrick” tool that reformat/overwrite/wipe these two partitions without first backing up and subsequently restoring their content.
Making a Bootable Recovery SDcard
There are two approaches to making a bootable SDcard with Recovery tool for Rooting and ROM Flashing: using a pre-made SDcard image (download, unzip and write the image to the SDcard using a disk-image writer program), and creating the SDcard from scratch. The first approach is convenient, while the second although a bit more time-consuming (and potentially frustrating) provides the flexibility in customizing the card: e.g., selecting particular version of Recovery tool (i.e., for its features, or its compatibility with the particular ROM release), sizing the SDcard boot partition to provide adequate space for backing up current ROM).
The TI OMAP processor used by the NT is very fussy about the cylinder/head/sector geometry of its “boot disk” (i.e., the SDcard in this case) – see http://processors.wiki.ti.com/index.php/SD/MMC_format_for_OMAP3_boot for more info). Fortunately its requirements can be met using many disk-partition management tools such as MiniToolPartition or EASEUS Partition Master simply by selecting the approriate menu options in creating the boot partition: cylinder aligned, primary/FAT32 with partition ID type 0x0C and with LBA and Active flags set.
Next the boot partition needs to contain a specific set of boot files: MLO, u-boot.bin and boot.img and/or flashing_boot.img (aka Cyanoboot); these can be found in SD_boot.zip compiled by Succulent and posted at http://iamafanof.wordpress.com/2012/11/11/how-to-guide-bootable-cm7cm9cm10-sdcard-for-nook-tablet/). I have also found that it helps to first copy MLO (to the freshly made boot partition) before copying the other files, since it appears that the NT OMAP processor only scans the first couple of entries in the partition looking for this file (see http://www2.sakoman.com/OMAP/preparing-a-bootable-sd-card.html and http://permalink.gmane.org/gmane.comp.embedded.openbricks.scm/515).
In my experience, the two most common symptoms of failed SD boot and their likely causes are:
The NT boots straight to stock -- most likely the boot partition's type and/or flags are not correctly set, or the NT cannot find the MLO in the boot partition (see comment re: the ordering in file copying above).
The NT screen stays dark for several minutes then eventually boots to stock -- most likely the MLO or u-boot.bin are corrupted. Check the exact size of these two files in bytes, they should be respectively 38,356 and 179,812.
Also, it should be noted that many NTs will boot off a SD card only from the power-off state and upon insertion of a powered USB cable.
To complete the making of the Recovery SDcard, download a recovery program .img file for sdcard (such as cwm_6012_sd.img or twrp_2220_sd.img from http://forum.xda-developers.com/showthread.php?t=1640958), rename it to recovery.img, and copy it to the SDcard boot partition.
Info/Tools for Restoring to Stock
For situations with absence of a working DYI backup copy, attempts can still be made to restore the NT to stock.
Restore to Stock ROM from Rooted Stock ROM (NT with intact stock Recovery and /factory partition): consider using the “8 failed boots” method documented at http://nookdevs.com/NookColor/RestoreToStock (it was written for the Nook Color but should be applicable to the Nook Tablet as well).
Restore to Stock ROM from Custom ROM:
A good source for resource/tool for restoring to stock is Succulent's repository at https://github.com/succulent/acclaim_recovery_sdcard; see its README file for an annotated index/description of the resource/tools and usage instructions. Another potential recovery tool is the repart.img described at http://raywaldo.com/2012/06/how-to-un-brick-a-nook-tablet-8gb-or-16gb/.
HOW-TO Guides for Installing CyanogenMod on Nook Tablet
Installing CM11 Internally on Nook Tablet
Installing CM10.x Internally on Nook Tablet
Updating NT Internal Emmc to CM11 from CM10.x
Building a CM10.1 (JB 4.2.x) SD card for Nook Tablet
So I got tired of my weird configuration of running the apps in a mounts2sd with a second ext4 partition on my sdcard and technically nothing should prevent us from running safestrap on the sdcard. So I looked around and it took me a while but I found Hashcode's source code and spent some time studying all the voodoo he does, and most of it is fairly straight forward. Small breakdown:
* Extend TWRP with ifdef statement to add new buttons
* sh scripts get called to perform the functionality for those button
* Swap out some links in /dev/block when you switch between slots and stock
* The entire boot partition including scripts, TWRP, etc are stored in boot image
* The boot image is stored in the stock system under /etc/safestrap
Like I said before, most of the functionality is done in borne shell scripts, but there is some hardcoding in TWRP like creating the .img file to /ss. I really don't want to try to recompile TWRP at this time. As such, I want to limit my changes to the borne shell and configuration INI files only. The simplest answer is to remap /ss from internal storage to the sdcard storage. Another option is to have "system" and "cache" in the internal storage and moving "data" to the sdcard. The difficulty here is since TWRP is hardcoded to create the .img file under /ss, I need to move it during the format stage which happens in the script. The danger with the first option I don't know if the phone will boot if the sdcard is removed. safestrap looks for that directory to figure out the mappings in /dev/block. I think if the directory is missing then it will attempt to create it. After that, things might go bad.
Anyway, what are your thoughts?
i wish and hope your still working on this..my phone is so low in internal storage..i cant even use a rom slot other than stock,,ive been useing stock slot ,flashing custom rom in stock slot....anyways hope you continue to figure this out..i know lots of people would appreciate it..thanks
So I've tried multiple ways and have had to step away, think about it some more, and come back to it. Essentially I was not able to get system to boot off of the sdcard. However, the good news is today I was able to have system and cache on internal storage and data on sdcard. So here are the keys to the kingdom that I have found....
The CM11 (and I assume other) ROMs there is a /system/etc/kexec/ramdisk.img file. This file is extracted (gunzip < ramdisk.img | cpio -iu) into the root directory "/" (rootfs). There is a shell script "/sbin/fixboot.sh" that gets executed by /init at the start of the android (on fs). That script essentially mounts /ss to /emstorage and does all the loop storage links to the system.img, cache.img, and data.img files. I was able to mount another /ss2 to my sdcard and point the userdata to /ss2/safestrap/rom-slot?/userdata.img. The limitation is that vfat limits all files to 4 GB max, so the userdata.img cannot be more than 4 GB of storage.
So an option is I can create an updated ramdisk.img file. You would just drop this into your /system/etc/kexec directory on the slot-rom you want to use it. The only file changed in ramdisk.img is /sbin/fixboot.sh. ramdisk.img is part of the CM11 distribution so you would need to replace it each time you perform an update on that rom slot. Other than that, safestrap would by default create userdata.img to be in internal storage.
The next part I'm going to look at is to create a f2fs partition on my sdcard and have my userdata use that f2fs partition. I figure I should good considerable more I/O as f2fs is suppose to be a good amount faster than ext3/4 and we wouldn't be going through a loop device from ext3 to vfat for all I/O. In addition, my data partition would no longer be limited to 4GB due to the file limitation size of vfat.
Thoughts...
So Spyder doesn't have f2fs on it so I've been running ext4. The kernel would need to be setup to be compiled with it. I have a second 6Gb partition formatted with ext 4 with writeback journaling but per my timing tests I don't think it has made a difference. Now I have more than enough space left in both the data and internal partitions. I don't know if it is just a placebo effect but my apps do seem to start slightly faster.
There doesn't seem much interest in this but it was a fun exercise for me. This will be good enough for me as I'll probably upgrade my phone sometime in the future.
Sent from my XT912 using XDA Free mobile app
Hi
I'll try to make it brief. Some time ago, my stock Nook slowed down like a mule so I decided to root it, then applied Trimmer to enable trim. Beforehand I'd checked the eMMc with a Brickbug app and it popped up with "sane chip", as I'd read some Nooks had a faulty Samsung eMMc.
It went into a bootloop, and only started showing shredded Nook letters on an abstract background during boot. Then I tried various bootable SD cards to try to flash various stuff, as per available XDA threads, especially - leapinlar's, verygreen's and amaces'. First it would not complete the flashing of a ROM, just froze towards the end, then eventually wouldn't boot up at all.
Here's the weird part. Without an SD card, it doesn't boot up at all.
When I make a bootable SD, it only boots to TWRP 2.6.0.0 (some other versions [amaces] it won't boot to), but doesn't see any zips on the card and won't let me flash anything, even though it previously did, but wouldn't complete the flash.
Whatever else I burn on the card, it either doesn't boot up at all, or boots to whatever it is you can see on the attached printscreens, and won't mount anything. So if I'm guessing right, the eMMc is not borked, as it seems the device boots to some remnants of something that's there, and not on the SD.
Is there a way of fixing that mess? I'd appreciate any ideas.
Best
W.
You can try to flash this flashable_fix_bootdata-ovation.zip which typically should cure corrupted or missing bootdata issues.
Hi, thanks but how? The only thing I tried so far that the Nook boots to is a TWRP 2.6.0.0. bottable card and it won't see the zips on it. So how can I flash the fix bootdata zip?
wojtasys said:
Hi, thanks but how? The only thing I tried so far that the Nook boots to is a TWRP 2.6.0.0. bottable card and it w on't see the zips on it. So how can I flash the fix bootdata zip?
Click to expand...
Click to collapse
Have you tried the verygreen's old SD-based CWM recovery?
If you mean the one from that thread:
https://forum.xda-developers.com/showthread.php?t=2600572
I have. The download links for the initial card image don't work. I looked elsewhere - nowhere to be found.
Sorry about the trouble, guys, forgot to update the dns when the server moved. I just updated it, but it'll take some time to propagate. The actual new ip address is now 178.34.187.142 - you can place it into your hosts file if you don't want to wait.
Nook HD+ Bootloop error
OK, I tried the succulentboot.zip from your folder:
https://www.mediafire.com/folder/6a4rivb8kkdfu/Nook HD+):
Now the zips on the sd are accessible, so I tried flashing the flashable_fix_bootdata-ovation and the screen shows the result.
I tried flashing stock recovery too and it says it's done that, but I guess without the fixed bootfiles it won't work anyway.
wojtasys said:
OK, I tried the succulentboot.zip from your folder:
https://www.mediafire.com/folder/6a4rivb8kkdfu/Nook HD+):
Now the zips on the sd are accessible, so I tried flashing the flashable_fix_bootdata-ovation and the screen shows the result.
I tried flashing stock recovery too and it says it's done that, but I guess without the fixed bootfiles it won't work anyway.
Click to expand...
Click to collapse
Assuming that your flashing of stock recovery was successful (recovery's reports of successful completion can sometimes be erroneous) and also your factory backup partition is still intact, you can try to initiate a factory reset by using the "8 failed boots" method: with the Nook in the power-off state, power it on, then as soon as the boot screen appears hold down the power button until it powers off, do this 8 times, and the Nook should go into stock recovery to revert to factory-fresh state.
Flashing your flashable_restore_stock-recovery-ovation zip ends with the screen I'm attaching.
Then I tried "8 failed boots" but it only boots to CWM SD, without the card - it doesn't power up at all.
Eventually, nothing changes.
Tried putting the stock ROM on the card and flashing that, but the partition size is too small, even though its a 16GB card.
wojtasys said:
Now the zips on the sd are accessible, so I tried flashing the flashable_fix_bootdata-ovation and the screen shows the result.
Click to expand...
Click to collapse
If the issue is about the two files, you could mount /bootdata and copy them manually (ADB shell should be functional with any of these recoveries). You'd extract BCB and BootCnt from ZIP, and copy them onto SD card, then do something like:
Code:
mkdir -p /bootdata
mount -t vfat /dev/block/mmcblk0p6 /bootdata
cd /external_sd or /sdcard or /emmc (wherever SD card root is mounted)
cp BCB BootCnt /bootdata/
Or, you could edit the updater-script inside ZIP to remove the device assert line like in the attachment here. By the way, are the updated images here also failing?
Flashing your flashable_fix_bootdata-ovation-no-assert.zip shows "install from sd card complete" but the device still won't power up without the card.
Trying to mount bootdata results in "error mounting bootdata".
There's no adb command line in that sd recovery, just adb sideload. TWRP 2.6 had it but it didn't access the files on the sd.
Then, I'm not sure I'll know how to edit the updater-script inside ZIP to remove the device assert line.
Chances are your EMMC is hosed, in which case you can try running CM entirely off SD card using the succulent special build available at https://iamafanof.wordpress.com/201...-4-4-4-for-bricked-no-emmc-nook-hd-04nov2014/.