[ROM][CM7] [v1.3] Size-agnostic SD Card image and CM7 installer for SD Cards.

Search This thread

topcaser

Senior Member
Dec 17, 2005
865
117
Hi, I want wipe all my data and account on the SD card to sell Nook. Is this possible with the alternate recovery? Or does apply a factory reset to Nooks internal RAM?

PS: I want to sell it preinstalled with the latest CM9 nightly. Therefore I do not want to just format the SD card.

Gesendet von meinem GT-I9300 mit Tapatalk 2
 

leapinlar

Senior Member
Oct 18, 2006
8,873
3,878
Hi, I want wipe all my data and account on the SD card to sell Nook. Is this possible with the alternate recovery? Or does apply a factory reset to Nooks internal RAM?

PS: I want to sell it preinstalled with the latest CM9 nightly. Therefore I do not want to just format the SD card.

Gesendet von meinem GT-I9300 mit Tapatalk 2
If you use the alternate recovery from my thread (v3.0.2.8), you can have it do a factory reset and it should remove your installed apps and data from the SD card installation only. Emmc apps and data sould not be touched. If you want to wipe the apps and data on emmc, use either the stock recovery or a normal CWM recovery to do the factory reset.
 
  • Like
Reactions: topcaser

topcaser

Senior Member
Dec 17, 2005
865
117
OK cool, thanks. I host the original BN OS on emmc. Where do I find the version number of the recovery?

Gesendet von meinem GT-I9300 mit Tapatalk 2
 

topcaser

Senior Member
Dec 17, 2005
865
117
Hi,

I want to do an exact copy from one sd card to another (same size, same brand). Do I have just to create an image and flash this image to the new fresh formatted card or are there some extra steps to do?

Sent from my HP TouchPad using Tapatalk
 

leapinlar

Senior Member
Oct 18, 2006
8,873
3,878
Hi,

I want to do an exact copy from one sd card to another (same size, same brand). Do I have just to create an image and flash this image to the new fresh formatted card or are there some extra steps to do?

Sent from my HP TouchPad using Tapatalk
There are two ways to clone the SD to another. The first is using win32diskimager as described in my tips thread linked in my signature and the second is to use partitioning software to clone one disk to another. I have not tried the latter, but another user said he did it successfully.
 
  • Like
Reactions: topcaser

davidr415

Senior Member
Feb 16, 2011
132
26
leapinlar..

just for education, can you explain why topcaser's suggested method won't work? I am not disagreeing, just trying to learn..

Thanks..
 

Neo3D

Senior Member
Jan 2, 2008
2,533
758
Amazon Fire HD 8 and HD 10
Amazon Fire

leapinlar

Senior Member
Oct 18, 2006
8,873
3,878
I tried to copy a CM9 zip onto a freshly imaged card but there wasn't enough free space? I have an 8gb mSD card but it's been imaged to show 107mb of 115mb free?
You need to use my revised image that has been enlarged for the larger CM9 zips. It also fixes the duplicate gapps issue. Get it in my tips thread linked in my signature. Item B2 in the second post.
 
Last edited:
  • Like
Reactions: Neo3D

Top Liked Posts

  • There are no posts matching your filters.
  • 165
    Due to popular demand I have created a size-agnostic SDCard CM7 installer.
    Also allows to install unmodified CM7 builds on SD card.

    Current version: 1.3

    Grab the installer image here:
    http://crimea.edu/~green/nook/generic-sdcard-v1.3.img.gz
    it's a ~9M image that would unpack into ~130M disk image.

    Also note - not all SD cards are created equal. Here is a thread of interest is you have not bought one yet: http://forum.xda-developers.com/showthread.php?p=12964262
    Short version: buy Sandisk-branded class 4 microSD cards.

    Write the image on your SD card. I tested with 2G, 4G and 8G cards and all worked.
    Any uSD card of 1G or bigger in size should work if it is recognized by your nook.
    Write on Windows by using WinImage and on Linux/MacOS X by using dd (to the entire device, not one of the partitions. The device name should not have any numbers at the end. The command is something like dd if=/somewhere/generic-sdcard.img of=/dev/sdX bs=1024k)

    After done with writing, eject and then re-insert the uSD card into your computer.

    Download a CM nightly build from here http://download.cyanogenmod.com/?device=encore (It is recommended to choose -87 nightly or later. If you plan to use prior version for initial install, stick with installer 1.2.1 for a different u-boot version)

    Or just use your own update-cm-*-KANG-signed.zip file that is produced if you do your own builds.
    The image would correctly detect unmodified CM7 builds and would make necessary adjustments to make them work on SD card.

    Put the file to the SD card (there is only one partition). Don't change the name of the file.

    unmount the uSD card and insert it into the nook.
    Boot from this SD card. It'll boot and will update you on progress.
    When it's done, it'll power off.

    That's it, you now have CM7 on your SD card.

    How to install market and gapps:
    After you have booted into the CM7 on SD card for the first time and set up wifi access (important!)
    Go to http://wiki.cyanogenmod.com/index.php?title=Latest_Version and at the end there is a table with various google apps versions. Get the one suitable for your cyanogen version (CM7 is the latest for now). The file is named gapps-....zip
    shutdown your nook and take the SD card out, insert it into your computer.
    Copy the gapps-... file to the SD card on the first partition (titled boot) without changing the file name.
    Insert the uSD card back into the NOOK and boot into "Recovery mode" (hold nook N key and then press and hold power until the "Loading..." message appears and then disappears with screen going blank. Release power button, then press it again and hold for ~5 seconds, the bootloader "Loading..." message should be on the screen for three seconds or so before you release power button, keep holding N button until screen blanks again. If the screen went off while you were holding the power key, that means you were holding it for too long).
    Alternatively if you do not want to fight the timing, boot normally into Android, then from desktop hold power key until a poweroff menu appears, In the poweroff menu choose "reboot", in the next menu choose "recovery" and press "OK". The nook would reboot straight into recovery.

    How to update to a new build:
    put the new build you want to try on the first partition. (the name must be update-cm-*.zip or cm_encore_full*.zip or just update-*.zip)
    Boot from the SDcard in the recovery mode (see above) and the new snapshot would be installed.
    The partition layout would be preserved, filesystems are NOT reformatted, so your data should be safe.

    Installing other stuff:
    Booting in recovery mode would install all files that are named "update-..." and end with .zip The files would then be deleted! Most of the packages should work, but I only tested a subset and not entire syntax of updater script is implemented. Certainly format and delete are not implemented.

    OC Kernel installation instructions:
    Starting with v1.2.1 there are no special instructions, install normally as described above.

    Partition layout for the SD cards depends on size:
    Less than 600M - unsupported.
    up to 1G cards gets: system of ~300M and data of the rest of space. No FAT partition
    2G cards (more than 1G up to 1800M) gets: 300M system, 612M data, rest is FAT sdcard
    more than 2G cards gets: 460M system, 975M data, rest is FAT for sdcard.

    How to update if you already installed using older version of the installer and don't want to reinstall (understandably):
    • Get update zip from http://crimea.edu/~green/nook/update-genimage-1.3.zip
    • Put the zip file as is onto the first partition of your sdcard..
    • reboot into recovery (triggered by the keys, the reboot into recovery does not work yet).
    • The new version would be installed and you are done.
    • You can combine this installation together with updating to .32 kernel in one step. Just put the update-cm file and the update-genimage-1.3.zip to the first partition. Make sure there is still at least 1M of space left!

    Changes in 1.3
    • Install u-boot.bin and MLO loaders if provided.
    • Fixed a problem that led to overwrite of recovery kernel if a nightly was installed more than once)
    • (only in full image) updated u-boot to ignore BCB as that was a common source of problems. (that's why this version is not recommended for initial install with older nightlies, those don't provide a more correct u-boot for later operations. It's fine to do the update from older installer release, though)

    Changes in 1.2.1
    • Really fixed dalingrin kernel packages installation
    • A bit more robust handling of install scripts

    Changes in 1.2
    • Updated to new u-boot from B&N 1.2 update
    • Ability to obey BCB in eMMC (allows reboot into recovery from CM7)
    • Hopefully simplified the timing to trigger recovery boots from keyboard
    • Added support for Dalingrin's kernel update packages

    The v1.1 version that is known good to work with 2.6.29 kernel releases is located at http://crimea.edu/~green/nook/generic-sdcard-v1.1.img.gz
    20
    I thought I would share something that I finally figured out. I have been trying to find a way to mount the sd card boot partition without removing the card or booting to emmc. I wanted to do this so that I could download the nightly on the nook and put it directly in the boot partition. I figured out a way and it works great.

    Use a root file manager to create a new folder in /data. I called mine sdboot. Then create a blank text file. I named mine 19mountsdboot (with no .txt on the end!). Then I put the following text in it and saved it:

    #!/system/bin/sh
    # mount SD boot partition
    busybox mount -t vfat /dev/block/mmcblk1p1 /data/sdboot;

    Copy that new file to the /etc/init.d folder using your root file manager. Change the permissions to match the other files there. Now reboot the nook.

    When finished booting, you should be able to use your root file manager to go to /data/sdboot. And you should see your boot files there. (Don't mess with them.)

    Now you can copy the nightly zip there. Then reboot to the verygreen recovery and your nightly should install.

    All this without taking the card out or booting to emmc or hooking up to your PC. And it should stay that way even after flashing new nightlies to the sd.

    Edit: I attached the file here in case people were having trouble getting it right. Just unrar and put in the /etc/init.d folder and change permissions. You still need to create the folder in /data first.

    EDIT 2: I just modified the file to automatically create the directory and mount it. Just unrar and put the file in /etc/init.d folder and fix permissions. No need to create the new folder. Or better yet, I created a flashable install zip that does everything for you. You only need to flash it once (for SD installs). It will survive flashing of new SD nightlies. It can also be flashed to emmc and will mount the SD boot partition, but only if an SD install SD is in the slot. It will recognize an ordinary SD and not try to mount the SD boot partition. However, if you want to keep this on emmc, reflash after every emmc nightly flash.

    EDIT 3: Just found a problem with the install zip. Needed to have the permissions set properly. Should be all fixed now. Use the rev. 1 zip

    EDIT 4 (6-13-12): Added Rev 2 of the script and install zip. Rev 2 adds a symlink to the root directory so that 'sdboot' shows up in the root directory as well as in /data/sdboot. You can manually install the script to the /system/etc/init.d folder. Just unrar it and put it in that folder and set the permissions to execute. If you do not feel comfortable manually installing the script, put the zip in the boot partition and reboot to recovery and it will install it automatically for you. And you do not have to re-flash again after a new ROM flash. (If you previously had installed a prior version to /data/local/init.d, manually remove it before you flash the new version. If you don't you will have two copies on your system and that sometimes causes Root Explorer to lock up.) This version works great to direct download your new zip to sdboot with the new Goo Manager. Just change Goo Manager's download directory to /sdboot/ and it will put it on your boot partition.
    13
    Updated SD image for CM9/CM10

    [Update 10-17-12] Updated installation instructions for putting CM9/CM10 on SD have been posted here. And updated image to Rev 5 to fix an issue with installing CM10.

    [Update 8-21-12] Rev 4 of image and boot files attached.

    I updated the image and boot files to better accommodate CM10 and JellyBean gapp zips and provide bigger /data partitions for larger sized SD cards. The boot partition is now 300MB so the larger CM10 and JB gapps zips will fit. And now all SD cards 8GB and larger will have a 2GB /data partition to accommodate more installed apps. Thanks DizzyDen for that suggestion.

    [Update 6-13-12] Rev 3 of image and boot files attached.

    When updating Rev 2, somehow the duplication fixes got removed. Rev 3 restores the duplication fix along with the naming fixes.

    [Update 5-09-12] Rev 2 of image and boot files attached (Replaced with newer version).

    A pending change that the CM team is implementing will adversely affect verygreen SD users. They are changing the naming standard for new nightlies. They will no longer be naming the files starting with update-. That means the existing install script will no longer recognize or install a new nightly when it is copied to the boot partition. Users must rename the file to start with update- if they want the existing install script to work.

    In order to assist users I have modified the install script to now also install nightlies if they begin with the new standard (cm-). I also added to the script the ability to recognize the new prefix (diff_) that is used by the new Goo Manager program to make an incremental update to an existing ROM. (Edit: The new script will continue to recognize and install zips beginning with update- to provide backward compatibility.) I have attached new rev2 files (replaced with newer version) that are to be used as described in the original post below.


    --------

    I have made new boot files for SD install users. They have been modified to fix the Google App duplication issue with CM9 and Google Apps. The revised script in these files will look to see if you have installed the Google versions of Calendar, Gallery, and QuickSearchBox. If you have them installed it will remove the versions that come with ICS/CM9 so that two versions of those apps will no longer show in your system.

    I have attached two files.

    The first is a revised generic image file for use if you have never set up your SD. It has the new boot files in it. It also has the larger partition so that the CM9 nightlies will fit. Just follow the instructions in the first post of this thread to learn how to install it.

    The second file is the revised boot files themselves. This is for use if you have already set up your SD and you just want the new scripts to fix the duplication issue. To install these files, just go to your boot partition and rename two files, uRecImg and uRecRam. Just add .bak to each file. The attached file is a rar containing the new files. Just unrar and copy the two files to the boot partition to replace the files you renamed earlier. The next time you install a nightly, the script will do its checking and remove the duplicates if necessary.

    Enjoy
    7
    I uploaded the v1.2 update and updated the first post.
    Check the "recovery boot" instructions, they are changed and I believe together with the updated u-boot binary the triggering of it should be easier (even with older u-boot binary updated sequence of events is probably more robust).

    For those who want to upgrade I provide update zip that would do the updating, no need to replace files by hand anymore.
    I tested the upgrade and it works. Also supported is simultaneous u-boot upgrade + update to .32-kernel based image from dalingrin.

    The new image with 2.6.29 kernels is untested! But it might still work, i guess.

    Enjoy.
    4
    Just to let everyone know, I've uploaded a fixed version of this install image that will work better with Ice Cream Sandwich builds -- it'll no longer require you to flash sneakpeek1 first, and you won't have to rename the gapps. It's available for download in the Ice Cream Sandwich Nightlies thread. Huge thanks to Verygreen for helping me get it fixed.