[App] Nookie Cloner - bootable sdcard creator - Nook Color Android Development

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/46535328/Nookiecloner-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

rootfan said:
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.
Click to expand...
Click to collapse
Cool, thanks for picking up this idea and running with it!
Is source available somewhere?
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
Click to expand...
Click to collapse
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.
rootfan said:
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.
Click to expand...
Click to collapse
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.

steven676 said:
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.
Click to expand...
Click to collapse
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.

rootfan said:
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.
Click to expand...
Click to collapse
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.

Related

Stuck on card format step with Gpartition

Im following the guid HERE: http://forum.xda-developers.com/showpost.php?p=10999799&postcount=2056
and Im stuck on step 6, 7, 8:
6) Resize the FAT32 partition (Original Size minus [-] 1536MiB) and set the new 1536Mib partition to Primary and ext4
7) Resize this new partition again and leave 512MiB for 2nd ext4 so now you have one ext4 with 1024MiB and one ext4 with 512MiB space.
8) Apply
I have a 16GB card, and im following those directions absolutly to the T..
when Im done I have a 13656MB Fat32 partition, a 1024MB ext4 partition, and a 512MB ext4 partition.
I formatted the orignal 1636 block as primary, and then when I resized it to 1024 leaving 512, the 512 also formatted as primary and ext4 there is no other option other than that, they are greyed out.
hit apply, it said everything went successfully, but when I boot back in to windows to continue with step 11:
make a folder Desire_DL and copy in there ONLY the config file you just saved.
The card is unreadable, cannot copy anything to it.
If i put it back in the phone, the phone says it has to format it.
I am missing something, obviously, but I am following the directions absolutely as written.
What am I doing wrong?
I searched around and came across a thread with directions on Gparted, but it was only regarding a 2gb card and the version of Gparted was totally different looking than the one I am using, as was the purpose it was being used for (dual boot)
your doing it wrong.
Source:
http://forum.xda-developers.com/showthread.php?t=824154
Download the app from the above thread. gui will resize and integrity check the data.img aka ext3 partition if you are using windows.
If your on linux, you could do a loopback mount. But i'm assuming this isn't familiar, and following the steps in the thread #824154 will get your data.img resized correctly.
The tool is nice, because it also does a partition scan similar to doing it if you were using mkfs natively.
Best o luck
ahh
I just realized your trying to dual boot.
launch gparted, then look for the sdcard. It will recognize both fat,fat32,ntfs,ext3,ext4 file systems... you will not be able to read ext3 or ext4 partitions on a windows system unless you get the gpl dll that makes ext3 or 4 readable.
sorry to point you to towards the data.img repartition. I need to learn to read messages in their entirety.
Things would be easier if you were on a mac or linux OS....

Partition layout: exact meaning of value in CWM - partition SDCARD

Hello,
I can't figure what is exactly meaning the Partition Sdcard values in CWM.
I have an i9000, with 8Gb of flash. Some are system reserved. Available is around 6Gb.
When i run CWM, i can partition my sdcard, but i don't see what means the possible values (for 256 to 4096).
This is obviously not ruling the space left on /sdcard mountpoint (i partition to 2048, i still have nearly 6Gb available)... So what exactly means partition sdcard from CWM ??
Thank you, i can't find an answer, and i dislike, when flashing rom, following commands i don't really master (generally a partition SD 2048 / SWAP 256 or SWAP 0).
grv'
bump, sorry !

[Q] Space on SD card

Hi!
Partitioned my 32GB sdcard, and put CM10.2 on it, but when I check it I have only about 400mb of space or something like that. I had the same amount of space on a 4GB sdcard I used before. Why am I not able to use up the rest of the GB's?! Can someone tell me how to fix it, I don't know if I'm partitioning wrong or doing something wrong, but I want to be able to have lots of extra space for music, apps, etc. Please help! Thanks!!!
I believe you used a low level utility like dd or similar to flash an image onto a partition.
You need to run fsck on that partition, then run resize2fs to expand the ext2/3/4 partition.
Let's say your partition is /dev/block/mmcblk1p1
You would do (in a terminal):
adb reboot recovery
adb shell
# umount /dev/block/mmcblk1p1
# e2fsck /dev/block/mmcblk1p1
# resize2fs /dev/block/mmcblk1p1
After that, your partition will get expanded to whatever size you made it.
It takes a while so be patient. The larger the partition, the longer it will take.
Zenile said:
Hi!
Partitioned my 32GB sdcard, and put CM10.2 on it, but when I check it I have only about 400mb of space or something like that. I had the same amount of space on a 4GB sdcard I used before. Why am I not able to use up the rest of the GB's?! Can someone tell me how to fix it, I don't know if I'm partitioning wrong or doing something wrong, but I want to be able to have lots of extra space for music, apps, etc. Please help! Thanks!!!
Click to expand...
Click to collapse
if you got a prebaked image of a bootable cm card from somewhere, then it usually has 4 partitions on it that were set to the sizes the author of the card specified.
/boot
/system
/data
/sdcard
You would need to put the card in a PC, and use a disk partitioning utility to resize the partitions
some of the images include additional flash files that you install to expand the card's partitions for you. (succulent's), but
you have to do it as you install for the first time.
I prefer to build the card empty first, and load the boot files and zips manually.
linux tools like gparted, Parted Magic , booting from a live USB or CD work pretty well.
Windows based ones like Easus Partition master, or Paragon, not so good.
Mini Tool partition wizard (windows/free) sometimes works
this looks to be a decent write up
http://www.mobileread.com/forums/showthread.php?t=202660
mikeataol said:
...
I prefer to build the card empty first, and load the boot files and zips manually.
linux tools like gparted, Parted Magic , booting from a live USB or CD work pretty well.
Windows based ones like Easus Partition master, or Paragon, not so good.
Mini Tool partition wizard (windows/free) sometimes works
this looks to be a decent write up
http://www.mobileread.com/forums/showthread.php?t=202660
Click to expand...
Click to collapse
The write-up is also posted on XDA at http://forum.xda-developers.com/showthread.php?t=2098419. It was written back in the days of CM10.1, so to use it for CM10.2 or CM11:
Obtain the boot files: MLO, u-boot.bin, and flashing_boot.img -- as well as the files boot.img and recovery.img, from the /boot partition of the pre-made SD CM image. Make sure that MLO is the first file to copy to the freshly made /boot partition.
Substitute in the appropriate ROM and Gapps zip files corresponding to the particular CM build of interest.

Solved -- Running safestrap on sdcard -- looking for input

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

How I can restore partition size to original?

When i was uploading new rom, partitions connect to one. Many roms have a problems with this. Second partition has a 0MB size. I try upload stock rom by flashtool and no results. I want to restore original size. How I can do this? My phone is sony xperia lt30p.
What ROM have you flashed? Have you done a clean install, means having wiped existing Android OS before?
What's the name of the mentioned 0MB partition?
BTW:
Android comes with standard partitons as
/boot
/system
/recovery
/data
/cache
/misc
and their sizes basically are hardcoded.
Never have noticed, heard or read that when a ROM gets flashed a partition with size of 0MB will be created.
Name se
jwoegerbauer said:
What ROM have you flashed? Have you done a clean install, means having wiped existing Android OS before?
What's the name of the mentioned 0MB partition?
BTW:
Android comes with standard partitons as
/boot
/system
/recovery
/data
/cache
/misc
and their sizes basically are hardcoded.
Never have noticed, heard or read that when a ROM gets flashed a partition with size of 0MB will be created.
Click to expand...
Click to collapse
The name second partition is ,,sdcard". Tt isn't sdcard it is internal memory for photos and the like things
jareczex said:
Name se
The name second partition is ,,sdcard". Tt isn't sdcard it is internal memory for photos and the like things
Click to expand...
Click to collapse
Don't confuse /sdard and sdcard.
With regards to /sdcard:
This is NOT a partition on the internal storage memory of the device but rather the ( external ) SD card.
With regards to sdcard:
This simply is a symbolic link to device's /data/media partition what is mounted as /storage/emulated/0
And How i Can restore default memory this partition? Partition with external sdcard has other name.
OK it's the partition named /data/media you're referring to.
If a partitition shows 0MB ( can't get mounted ) then this is because it probably is encrypted. Hence decrypt it. The common method is to perform a Factory Reset. If you've TWRP installed / at your fingertips then decrypting also can be done with TWRP.
This phone is other than many phones
For me, everything you post is crazy stuff: I can not understand what the problem really is.
Since Android is on the market, it has more or less the same partition layout as shown above. And I'm pretty sure your phone has this, too.
I mean about problem, when i am installing rom, show me comunicat ,,Error instaling zip file 'external_sd/android9 sony t/open_gapps-arm-9.0-pico-20201114.zip" and i wanna get rid of this problem, across restore this partition. Do you know, what i have a mean?
My last 2 cents here: Open Gapps isn't a ROM. It's merely a suite of re-compiled Google apps.
FYI: I no longer participate this thread. I hope for you others jump in.
ok, thank you for your help. Information for other people: I can't install apps on this roms, so i want to restore this partition

Categories

Resources