Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,784,161 Members 41,601 Now Online
XDA Developers Android and Mobile Development Forum

[App] Nookie Cloner - bootable sdcard creator

Tip us?
 
rootfan
Old
(Last edited by rootfan; 21st May 2014 at 08:50 AM.)
#1  
rootfan's Avatar
Senior Member - OP
Thanks Meter 122
Posts: 173
Join Date: Jul 2011
Location: Idaho Falls
Smile [App] Nookie Cloner - bootable sdcard creator

Welcome to nookie cloner. This app makes a fully bootable sdcard copy of your on device ROM in a single click. For example, you may still be using CyanogenMod 7 as your nook colors default ROM and would like to test out the latest kit kat/ CyanogenMod 11 nightly. With this app you could make a fully bootable sdcard backup of CyanogenMod 7 with all of your data and apps and then install CyanogenMod 11. You would then effectively have a dual boot of cm 11 along with your old cm 7 install including all data and apps. It also works in reverse so the contents of a bootable sdcard can be flashed back as your main ROM. As far as I have tested this app should work for all nook color ROMs, even stock. Bellow information on the way this app formats sdcards can be found. I'm in the process of making changes specified by Steven676. In the meantime this app is still completely functional. If you find it useful or appreciate my work then please give the thanks button a press

Download Nookie Cloner alpha 1: https://dl.dropboxusercontent.com/u/...ecloner-A1.apk

Info:

Partition layout:
mmcblk1p1 - boot / fat32 size: 100 MB
mmcblk1p2 - system / ext4 size: 500 MB
mmcblk1p3 - data / ext4 size: 1000 MB
mmcblk1p4 - extended partition
mmcblk1p5 - cache / ext4 size: 400 MB
mmcblk1p6 - sdcard storage / fat32 size: whatever is leftover



Current bugs that I'm working to fix:

When the stock ROM is booted from an sdcard it doesn't mount the right fat partition so you only get 100 mb of external storage



Thanks:
Fattire - for the original idea.
racks11479 - For some essential ARM tools used in the process.

Disclaimer: I can not be held responsible for any "bad" things that happen to your nook, data, etc... because you choose to use this app on your device. To your comfort though, I have used this app for a while and have not experienced any serious implosions or explosions as of yet
Attached Thumbnails
Click image for larger version

Name:	Nookie_Cloner.png
Views:	164
Size:	24.0 KB
ID:	2746503  
The Following User Says Thank You to rootfan For This Useful Post: [ Click to Expand ]
 
steven676
Old
#2  
Senior Member
Thanks Meter 2,372
Posts: 582
Join Date: Nov 2011
Quote:
Originally Posted by rootfan View Post
Welcome to nookie cloner. This app makes the creation of bootable sdcards possible right on your nook with a single click. It also works in reverse by cloning the contents of a bootable sdcard onto your devices internal storage.
Cool, thanks for picking up this idea and running with it!

Is source available somewhere?

Quote:
Partition layout:
mmcblk1p1 - boot / fat32 size: 100 MB
mmcblk1p2 - system / ext4 size: 500 MB
mmcblk1p3 - data / ext4 size: 1000 MB
mmcblk1p4 - extended partition
mmcblk1p5 - cache / ext4 size: 400 MB
mmcblk1p6 - sdcard storage / fat32 size: whatever is leftover
This isn't a good partition layout, though -- both /system and /data are too small for future-proofing. I'd suggest at least 640 MB for /system (for the pending eMMC repartitioning, we're kicking around 768 MB) and 2 GB for /data. For performance reasons, you also want all the partitions (except for /boot, which is fixed in place because of first-stage bootloader limitations) to start on a 4MB boundary, though you may need to fiddle a bit with your tools to achieve this.

See the discussion on eMMC repartitioning in the dev thread beginning here for more information, particularly the bits on units and extended partition packing.

Also, you do not need a cache partition on SD card -- the ROMs and recoveries will not use it.

Quote:
Originally Posted by rootfan View Post
Current bugs that I'm working to fix:

Stock ROM does not mount the sdcard partition properly. If it asks you to format the card on boot don't do it as it formats the bootable card in its entirety.

I think 4.3 doesn't mount the card properly but it should be an easy fix.
Honestly, the original idea was to only do this with install-location-agnostic builds (like CM11 builds from May 16 or later) -- with these, the ROM automatically figures out where everything is and you don't need to fiddle with the initramfs. If you are going to support modifying earlier builds to change the install location, please detect install-location-agnostic builds and leave them untouched.
The Following 5 Users Say Thank You to steven676 For This Useful Post: [ Click to Expand ]
 
rootfan
Old
(Last edited by rootfan; 17th May 2014 at 03:24 AM.)
#3  
rootfan's Avatar
Senior Member - OP
Thanks Meter 122
Posts: 173
Join Date: Jul 2011
Location: Idaho Falls
Quote:
Originally Posted by steven676 View Post
Cool, thanks for picking up this idea and running with it!

Is source available somewhere?



This isn't a good partition layout, though -- both /system and /data are too small for future-proofing. I'd suggest at least 640 MB for /system (for the pending eMMC repartitioning, we're kicking around 768 MB) and 2 GB for /data. For performance reasons, you also want all the partitions (except for /boot, which is fixed in place because of first-stage bootloader limitations) to start on a 4MB boundary, though you may need to fiddle a bit with your tools to achieve this.

See the discussion on eMMC repartitioning in the dev thread beginning here for more information, particularly the bits on units and extended partition packing.

Also, you do not need a cache partition on SD card -- the ROMs and recoveries will not use it.



Honestly, the original idea was to only do this with install-location-agnostic builds (like CM11 builds from May 16 or later) -- with these, the ROM automatically figures out where everything is and you don't need to fiddle with the initramfs. If you are going to support modifying earlier builds to change the install location, please detect install-location-agnostic builds and leave them untouched.
Thanks for the advice Steven. I'll try to get your suggestions implemented soon as possible. The way the app currently functions allows for the creation of bootable sdcards as far back as the stock froyo ROM. My noted bug is simply that the fat partition at mmcblk1p6 is not mounted properly. The sdcard is eaither not mounted at all (my fault) or the boot partition is mounted as the external sdcard. Perhaps it would simply be better to expand the boot partition for use as sd storage. I'll still modify it though so the new partition agnostic ROMS are not changed.
 
steven676
Old
#4  
Senior Member
Thanks Meter 2,372
Posts: 582
Join Date: Nov 2011
Quote:
Originally Posted by rootfan View Post
My noted bug is simply that the fat partition at mmcblk1p6 is not mounted properly. The sdcard is eaither not mounted at all (my fault) or the boot partition is mounted as the external sdcard.
Look at /system/etc/vold.fstab (releases older than 4.3) or fstab.encore in the initramfs (4.3+); you can specify which partition of the SD card to use there.
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes