[Nook HD WIP] Dual boot stock and CM10.1 Hybrid 6/13

bokbokan

Senior Member
May 15, 2011
1,317
3,211
0
*** The sdcard card created by this thread is not compatible with the original sdcard installation of CM10/CM10.1.
This is a work-in-progress and things are changing very fast so you may lose some of your data as we moved from one version to another
.

After a brief discussion with leapinlar few weeks back, this is a new CM10.1 sdcard installation based on that discussion.

Features:
  • Dual boot stock and CM10.1.
  • Using only three partitions to allow stock to boot properly.
  • /data is stored in emmc while /system is in sdcard (Caveat: Doing stock factory reset inside stock will wipe out data of both the stock and CM10.1)
  • Can be flashed with ROM from this thread starting cm-10.1-20130130-UNOFFICIAL-hummingbird.
  • /data maximum size is now only limited by the size of the emmc.
For installation instructions follow this post. Thanks Diogenes5.

CWM Image file: sdcard-cwm-hummingbird-hybridv2.zip. Date Posted: 2/2
  • Data Wipe/Factory Reset now working.
  • Backup/Restore to/from both emmc and sdcard now also working. (/boot will not be backup and restored)
uImage.20130613.hybrid.hd.zip and update.20130613.ramdisk.hybrid.hd.zip *** latest ***
  • Fixed: Intermittent boot problem
  • cyanoboot now working for lg display.
update-20130221.zip
  • cyanoboot modified to pass serial number to kernel command line for android to properly report a valid number instead of unknown.
update-20130204v2.zip
  • Fixed device booting to stock recovery instead from the stock ROM.
update-20130204.zip
  • cyanoboot modified to allow CM10.1 (cm-10.1-20130203-hummingbirdv2 and above) rebooting directly to its menu.

Older downloads:

CWM Image file: sdcard-cwm-hummingbird-hybrid.zip.
Update: Download View attachment update-20130201.zip and extract uImage and ramdisk.stock to the boot partition of the SD card created from the above file. You can now delete kernel.stock as it is no longer being used.
  • Stock now booting normally.
  • Added Boot from SD alternate in cyanoboot menu.
    Thanks to leapinlar for the suggestions above.
  • TODO: Wipe/Backup/Restore operations under CWM.

Only CM10.1 ROM dated 1/30/13 and above will work properly with this new SD card installation.

Currently this installation is compatible only with leapinlar Stock recovery tool provided in this thread.
 
Last edited:

bokbokan

Senior Member
May 15, 2011
1,317
3,211
0
This hack/trick is already superceded by the above post.

BEWARE: This hack/trick should be used only by HD owners who are very familiar with SD card installation of CM10/CM10.1. This may or may not work. Using this tools could brick your device, you have been warned!!!

Prerequisite: Working CM10/CM10.1 SD card installation from this thread.

Instructions
  1. Download the attached hybrid.zip file.
  2. Make a backup copy of /boot/uImage before copying all the files to the /boot partition of the SD card.
  3. Insert SD card to the HD and let the device boot from it.
  4. Hold the 'n' button of the device until the cyanoboot menu is shown.
  5. Press the 'n' button multiple times until 'Initialize Hybrid' is highlighted.
  6. Hold the 'n' button for at least 3 seconds to activate it.
  7. Wait until the device rebooted (Depending on the speed of the SD card, you may have to wait for a long time).
  8. Enjoy a faster and smoother CM10/CM10.1
Note: To uninstall, delete ramdisk.hybrid*, ramdisk.sync*, ramdisk.sys*, ramdisk.data* and u-boot.altboot from the SD card. Delete both cm_system.img and cm_data.img from the EMMC to recover the 2GB of storage space.

Technicals/Details
uImage - updated cyanoboot for hybrid booting.
Boot menu descriptions
  • Boot Hybrid - uses ramdisk.hybrid as the ramdisk.
  • Initialize Hybrid - uses ramdisk.sync as the ramdisk.
  • Sync System: SD -> EMMC - uses ramdisk.sys-sync as the ramdisk.
  • Sync Data: SD -> EMMC - uses ramdisk.data-sync-emmc as the ramdisk.
  • Sync Data: EMMC -> SD - uses ramdisk.data-sync-sd as the ramdisk.
  • Default Boot Image - uses u-boot.altboot as configuration file.
ramdisk.sync - will check whether cm_system.img and cm_data.img are present in /emmc. If not create the two files with sizes 800MB and 1200MB respectively. Loop mount both files and copy the contents of partition 2 and partition 3 of the SD card. Rename ramdisk.hybrid.copy to ramdisk.hybrid to enable the cyanoboot menu Boot Hybrid. Store the value 1 to the file u-boot.altboot to enable default booting from hybrid/EMMC.

ramdisk.hybrid.copy - will be renamed automatically by ramdisk.sync to ramdisk.hybrid to enable booting from cyanoboot menu and default booting when the value 1 is stored in u-boot.altboot

ramdisk.sys-sync.copy - should be manually renamed to ramdisk.sys-sync to enable cynoboot menu Sync System: SD -> EMMC. This is needed to update cm_system.img after a CM10/CM10.1 update of the SD card by CWM.

ramdisk.data-sync-emmc.copy and ramdisk.data-sync-sd.copy - should be manually renamed to ramdisk.data-sync-emmc and ramdisk.data-sync-sd to enable syncing data both ways. (Not included yet)

u-boot.altboot - created with a value of 1 by ramdisk.sync. Changing the value to 0 will default to normal SD boot. Value can be changed while in the cyanoboot menu.

Pros/Cons
Pros
  • Very fast and smooth interface.
  • SD card can be unmounted and removed.
Cons
  • SD card is always needed during boot time.
  • Update should be done to the SD card first before syncing with EMMC.
  • Consumed 2GB of spare EMMC storage.
  • Reboot to recovery sometimes is not working and will reboot to EMMC/Stock recovery.
 
Last edited:

bokbokan

Senior Member
May 15, 2011
1,317
3,211
0
Bokbokan, if you get this working so that you can get the SD down to 3 or less partitions, I have a trick to let it boot to stock with the card still in.

Sent from my HD+ running CM10 on SD with XDA Premium
I can try booting from the stock using customized kernel and a ramdisk sourced from the EMMC but so far haven't tested it because of my bricked stock. Did not bother to restore it yet since this make my device easier to boot/reboot from SD.

What trick do you have up your sleeve?
 

bokbokan

Senior Member
May 15, 2011
1,317
3,211
0
Is there a speed gain for those whose cards are already faster than nand, or that's mostly for those what have slow(er) cards?
This is very useful for those having very slow/moderate card speed. For faster card the benefit is to allow the device continue running even without the card except during boot time.
 

leapinlar

Senior Member
Oct 18, 2006
8,873
3,876
0
I can try booting from the stock using customized kernel and a ramdisk sourced from the EMMC but so far haven't tested it because of my bricked stock. Did not bother to restore it yet since this make my device easier to boot/reboot from SD.

What trick do you have up your sleeve?
Actually there are two ways.

The first is to put the stock ramdisk in the SD boot partition. For me I don't run your CM10 so it was easy for me to make it boot to stock by putting it in the CWM SD card. Then I select SD and it boots to stock. But that does not help CM10 users because they need ramdisk to be for CM10.

But for CM10 users, you can install Quick Boot from the Play Store and install it in CM10. Then tell Quick Boot to boot to bootloader and it boots to stock. But with verygreen's/your CM10 SD partition structure, stock hangs at 99%. That is because stock chokes on 5 partitions on the SD. That is why I was saying that if you could get down to 3 partitions, you could boot to stock from CM10.

But on my HD+, which I do run CM10, I changed the partition structure so it only has 3. But I don't expect users to do that. It needs to be built into the SD from you and verygreen. That is why I like your idea of putting some things on emmc so the partitions can get down to 3.

But I will briefly explain what I did to customize my HD+ CM10 SD. I deleted partition 4 and 5, normally the sdcard partition and the extended partition that holds it. Then I moved partition 2 and 3 to the end of the SD. Then I expanded partition 1 to fill the space. So I have a large fat32 partition 1 and partitions 2 and 3 the same size as original at the end of the SD. Then I modified vold.fstab in /system/etc to point to partition 1 for sdcard instead of 5. And now the hard part. I modified the CWM SD so it also points to partition 1 for sdcard so it can find updates. I also removed the /boot entry so a nandroid would not backup my sdcard as part a backup. The /boot was not backing up/restoring properly anyway.

This is highly customized and I don't think users should do this, but it works.
The down side is your boot files are mixed in with your sdcard files and are vulnerable to tampering by the user. But the Nook Tablet SD installs do this, which is where I got the idea. And on the positive side, Windows can now see sdcard when plugged in directly and stock can use the card as an external SD with no modifications.

One of the challenges for you and verygreen would be how to dynamically build the SD with this structure for varying SD sizes. I had to do it all manually and I don't think you would want users to do have to do that.

So this is just some ideas for future configurations.

Edit: One idea is if you could put /system and /data both on emmc, and create sdcard as p2, then you could have the boot files and sdcard files separate. And it makes it easy to create the SD dynamically. But you do not get the advantage of Windows seeing the partition or stock seeing sdcard without modification.

I do have my HD customized that way. I have my CWM card modified for stock with a big fat32 p2 to use for stock external SD and then modify the stock vold.fstab through symlinking. And I put the stock ramdisk on the SD boot partition like I described earlier. That way I never have to take the SD out. Stock and CWM are available in the boot menu.
.

Sent from my HD+ running CM10 on SD with XDA Premium
 
Last edited:
  • Like
Reactions: bokbokan

DebauchedSloth

Senior Member
Jan 27, 2008
459
76
0
Wow! This is great!

[edit - some more thoughts]

Spent some more time playing with this - the performance is vastly, vastly improved over my sdcard. Virtually all lag is gone. The actual conversion process was an absolute snap, and everything is running perfectly. Really, really excellent work.

Now, to upgrade, I assume that I boot into recovery, install the system, then *on next boot* choose the sync to EMMC option? Is that what you suggest?
 
Last edited:

bokbokan

Senior Member
May 15, 2011
1,317
3,211
0
Wow! This is great!

[edit - some more thoughts]

Spent some more time playing with this - the performance is vastly, vastly improved over my sdcard. Virtually all lag is gone. The actual conversion process was an absolute snap, and everything is running perfectly. Really, really excellent work.

Now, to upgrade, I assume that I boot into recovery, install the system, then *on next boot* choose the sync to EMMC option? Is that what you suggest?
Yes that is what you should do.
 

msprag13

Senior Member
Jun 17, 2011
113
22
0
CyanoBoot is not useable

I have used leapinar's sdcards as well as yours for cm10 and cm10.1 but I have always had this problem where on boot, I can sort of see the screen for cyanoboot, but it is compressed and distorted at the top of tablet. I can not operate the cyanoboot menus at all and pushing n seems to do nothing.

I have copied the hybrid zip files to /boot but the tablet just skips through cyanoboot and boots cm10.1.

How do I get cyanoboot viewable and to function properly?
 
Last edited:

leapinlar

Senior Member
Oct 18, 2006
8,873
3,876
0
I have used leapinar's sdcards as well as yours for cm10 and cm10.1 but I have always had this problem where on boot, I can sort of see the screen for cyanoboot, but it is compressed and distorted at the top of tablet. I can not operate the cyanoboot menus at all and pushing n seems to do nothing.

I have copied the hybrid zip files to /boot but the tablet just skips through cyanoboot and boots cm10.1.

How do I get cyanoboot viewable and to function properly?
The way you describe the screen is normal with the flash of distorltion at the top. As soon as you see that flash press and hold the n key until the boot menu comes up. If it does not come up, you may have a defective n key.

Sent from my HD+ running CM10 on SD with XDA Premium
 
  • Like
Reactions: graysooner

msprag13

Senior Member
Jun 17, 2011
113
22
0
The way you describe the screen is normal with the flash of distorltion at the top. As soon as you see that flash press and hold the n key until the boot menu comes up. If it does not come up, you may have a defective n key.

Sent from my HD+ running CM10 on SD with XDA Premium
I missed adding that in my original question. When the distortion pops up and I press n, the screen goes blank and then nothing ever happens, just a blank screen. I have tried this with 3 different sandisk 4gb class 4 cards and the behavior is the same. My n button seems to work fine under stock, CM, and in CWM; it only seems to be a problem when trying to access cyanoboot.

Do you still think it could be the n button, and if so would there be a way to use ADB to do the hybridization check?

If this is the button how do I get B&N to replace it? "well ya see it works fine until I try to hack your loader and install a third party ROM, can I have a new one?"
 
Last edited:

leapinlar

Senior Member
Oct 18, 2006
8,873
3,876
0
I missed adding that in my original question. When the distortion pops up and I press n, the screen goes blank and then nothing ever happens, just a blank screen. I have tried this with 3 different sandisk 4gb class 4 cards and the behavior is the same. My n button seems to work fine under stock, CM, and in CWM; it only seems to be a problem when trying to access cyanoboot.

Do you still think it could be the n button, and if so would there be a way to use ADB to do the hybridization check?

If this is the button how do I get B&N to replace it? "well ya see it works fine until I try to hack your loader and install a third party ROM, can I have a new one?"
You say this happens with my CWM for stock version too? The latest version? Some users were having that problem on an earlier version of my CWM. Bokbokan said earlier that the HD comes with two different screens and my earlier version was failing on one kind of screen. I revised the image and it fixed the problem.

Sent from my HD+ running CM10 on SD with XDA Premium
 

msprag13

Senior Member
Jun 17, 2011
113
22
0
Re: [Nook HD] CM10/CM10.1 SD/EMMC Hybrid Installation

You say this happens with my CWM for stock version too? The latest version? Some users were having that problem on an earlier version of my CWM. Bokbokan said earlier that the HD comes with two different screens and my earlier version was failing on one kind of screen. I revised the image and it fixed the problem.

Sent from my HD+ running CM10 on SD with XDA Premium
I tried again with different cards using the hummingbird-v3.img from bokokan's HD CM10/10.1 thread. I also used the 6025 for emmc stock rev2 4gb img from your root/gapps thread on a freshly formatted sdcard and I always get the distorted screen.

There is nothing actually being written to the nook correct? Cyanoboot is the u-boot.bin file on the sdcard? Since I have had this problem all along is there a bad file from an early attempt I am not aware of that is on the internal? When I remove any cards the nook boots normally although I used your OTA plus gapps on the stock.

Sent from my Barnes & Noble Nook HD using xda premium
 

leapinlar

Senior Member
Oct 18, 2006
8,873
3,876
0
Re: [Nook HD] CM10/CM10.1 SD/EMMC Hybrid Installation

I tried again with different cards using the hummingbird-v3.img from bokokan's HD CM10/10.1 thread. I also used the 6025 for emmc stock rev2 4gb img from your root/gapps thread on a freshly formatted sdcard and I always get the distorted screen.

There is nothing actually being written to the nook correct? Cyanoboot is the u-boot.bin file on the sdcard? Since I have had this problem all along is there a bad file from an early attempt I am not aware of that is on the internal? When I remove any cards the nook boots normally although I used your OTA plus gapps on the stock.

Sent from my Barnes & Noble Nook HD using xda premium
As I said earlier, the jagged distortion at the top of the screen is normal for everyone. And nothing important is being written to internal memory. All files for booting are on the card. I am thinking you may have the second screen manufacturer that bokbokan has not been able to test. Can you run an experiment?

Boot to CM10 and open the terminal emulator app. Type su enter. The prompt should change to a # after you grant superuser access. Then type dmesg. This should be done right after booting so the data is fresh. The screen should scroll a lot of data across the screen. Scroll to the beginning of that data and look for a line that starts "kernel command line:". In that line there should be a statement that says "display.vendor=". Tell us what it says after the equal sign.

I know just enough about this to guess that line is what we want to look at. Bokbokan will have to tell us for sure.

Sent from my HD+ running CM10 on SD with XDA Premium
 
Last edited:
  • Like
Reactions: graysooner

msprag13

Senior Member
Jun 17, 2011
113
22
0
Boot to CM10 and open the terminal emulator app. Type su enter. The prompt should change to a # after you grant superuser access. Then type dmesg. This should be done right after booting so the data is fresh. The screen should scroll a lot of data across the screen. Scroll to the beginning of that data and look for a line that starts "kernel command line:". In that line there should be a statement that says "display.vendor=". Tell us what it says after the equal sign.

I know just enough about this to guess that line is what we want to look at. Bokbokan will have to tell us for sure.

Sent from my HD+ running CM10 on SD with XDA Premium
Kernel command line: vmalloc=768M init=/init rootwait omap_wdt.timer_margin=20 androidboot.hardware=hummingbird display.vendor=LGD boot.fb=b2600000
 

leapinlar

Senior Member
Oct 18, 2006
8,873
3,876
0
Re: [Nook HD] CM10/CM10.1 SD/EMMC Hybrid Installation

Kernel command line: vmalloc=768M init=/init rootwait omap_wdt.timer_margin=20 androidboot.hardware=hummingbird display.vendor=LGD boot.fb=b2600000
That is the second device he could not test. That is probably the problem. When he catches up with these posts maybe he can do something. His and my device say display.vendor=AUO.

Sent from my HD+ running CM10 on SD with XDA Premium
 

bokbokan

Senior Member
May 15, 2011
1,317
3,211
0
As I said earlier, the jagged distortion at the top of the screen is normal for everyone. And nothing important is being written to internal memory. All files for booting are on the card. I am thinking you may have the second screen manufacturer that bokbokan has not been able to test. Can you run an experiment?

Boot to CM10 and open the terminal emulator app. Type su enter. The prompt should change to a # after you grant superuser access. Then type dmesg. This should be done right after booting so the data is fresh. The screen should scroll a lot of data across the screen. Scroll to the beginning of that data and look for a line that starts "kernel command line:". In that line there should be a statement that says "display.vendor=". Tell us what it says after the equal sign.

I know just enough about this to guess that line is what we want to look at. Bokbokan will have to tell us for sure.

Sent from my HD+ running CM10 on SD with XDA Premium
You beaten me on this. Thinking to post the same thing. :laugh:
 
Last edited: