Is there a difference between Recovery Mode and the Recovery Console? If so, how do i get into the recovery console?
Im trying to partition my sd card to add an ext2 partition and i found a thread that suggests doing it through the recovery console with a few commands. Im just not sure where to go to enter those commands, because ADB doesnt work and i cant seem to open up a console through clockworkmod recovery.
How do i get into Cyanogens Recovery Console?
Posting the URL to the thread you mention might have been useful.
There is no difference between the two.
In any event, you have two choices: use the onscreen menus, or use the command line. I'm guessing at what the other poster meant when he said "console", but I presume he was just talking about the recovery boot menus provided by /sbin/recovery.
There are partitioning menus available in both Amon_RA recovery and ClockworkMod recovery, and for what you are trying to do (SD card partitioning), the easiest thing to do is to just use the menu.
ADB does work with both Amon_RA or ClockworkMod; if it is not working for you, it is likely a driver issue on your PC (but I suppose it could be a hardware problem, but then you would also see the problem with your ROM booted).
Please note that partitioning your SD card destroys all the information on it - you should make a backup of the SD card before you partition it. (If your USB connection is working, this can be done with the "MS-USB toggle" menu option in the Amon_RA recovery.)
bftb0
Related
What exactly does the partition command in recovery mode do?
Edit: Disregard. Was trying to discern whether it partioned the whole internal card or just the portion the system uses. Appears it partitions/wipes the entire card.
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
I think I stupidly posted this in the General forum, so hopefully I'll have better luck here. Here's what I wrote before:
Hi, I'm trying to unbrick USB on my Atrix using this guide: http://forum.xda-developers.com/showthread.php?t=751265 but every time I try and use the fastboot command 'fastboot oem enableqxdm 0' I get 'FAILED error:00120000'.
I am really tearing my hair out! failing this, would flashing via fastboot fix this error? I tried reflashing using fastboot with the CM9 ROM I had handy but adb didn't like it (my installation is borked you see, I can get into recovery but can't reflash the ROM 'cause my sc cards can't be read...so I'm in a bit of a vicious circle here).
If anyone can help I would be so grateful.
Which recovery are you using atm?
Hey,
I'm using ROM Racers custom ROM, from here: http://forum.xda-developers.com/showthread.php?t=1204500
Would that make a difference?
That's a recovery, not a ROM. derp
Just messing with ya. But if you have Romracer's recovery you should be able to mount your storage from within recovery. There should be a "mounts & storage" option in the menu. That should allow your computer to read the card and/or internal as usb storage. Or, if you have a card reader you can put the necessary files on your sd card that way.
markdjj said:
Hey,
I'm using ROM Racers custom ROM, from here: http://forum.xda-developers.com/showthread.php?t=1204500
Would that make a difference?
Click to expand...
Click to collapse
live4nyy said:
That's a recovery, not a ROM. derp
Just messing with ya. But if you have Romracer's recovery you should be able to mount your storage from within recovery. There should be a "mounts & storage" option in the menu. That should allow your computer to read the card and/or internal as usb storage. Or, if you have a card reader you can put the necessary files on your sd card that way.
Click to expand...
Click to collapse
Yeah thanks but I know this...Ok, here is my problem: I can't mount the internal or external card in recovery, it comes up with ERROR: can't mount / emmc and Error: can't mount / sdcard . I can't mount either card on the PC either and as described in trying to fix the USB connectivity it comes up with the 0x120000 described above in fastboot. On top of that the installation of my ROM is borked (which was Jokersax's ICS beta but I have several others on file I could use)...so I can't reflash the handset. ALL I can do is get into recovery - and a fat lot of good that is doing me!
On top of all that, the reason I ended up like this seemed to be when I erased the internal memory card from my Mac...and this was out of pure frustration fro the mysterious random reboot issue, for which I'd tried almost everything else. But one step at a time eh?
So if anyone can help I'd be really glad right now...
Do you have a card reader? Have you tried formatting the sd card (either through recovery or through the computer using "mounts & storage")? Do you have another sd card that you can try?
Can you be more specific as well? When exactly are you getting the "error" and have you tried "mount usb storage" option in "mounts & storage"? Do you only have a Mac or do you have access to a Windows computer?
markdjj said:
Yeah thanks but I know this...Ok, here is my problem: I can't mount the internal or external card in recovery, it comes up with ERROR: can't mount / emmc and Error: can't mount / sdcard . I can't mount either card on the PC either and as described in trying to fix the USB connectivity it comes up with the 0x120000 described above in fastboot. On top of that the installation of my ROM is borked (which was Jokersax's ICS beta but I have several others on file I could use)...so I can't reflash the handset. ALL I can do is get into recovery - and a fat lot of good that is doing me!
On top of all that, the reason I ended up like this seemed to be when I erased the internal memory card from my Mac...and this was out of pure frustration fro the mysterious random reboot issue, for which I'd tried almost everything else. But one step at a time eh?
So if anyone can help I'd be really glad right now...
Click to expand...
Click to collapse
Ok, I cannot mount the sd card in any way, either through recovery or on the PC.* the SD card is fine as it the phone registered the card as empty (and read the empty card fine) until it started refusing to read anything at all.* Mount USB storage option definitely does not work (it was working and then it stopped)
*
The error comes from trying the USB unbrick solution (link in my original post at the top)...in fastboot I am trying 'fastboot oem enableqxdm 0' and then in red writing the ERROR 0x120000 (or whatever it was, it's above) appears on the screen of the Atrix and in the command line box on the PC (I am using my windows 7 laptop for all this btw, don't want to confuse you with my mentioning of the Mac above).
*
So...I either need a way to flash from Fastboot so I can get a working system again at least AND/OR I need to fix the USB connectivity (so I can mount the internal/external card on my PC) and fix the mounting in the Atrix itself.* If I can fix the mounting issue (both mounting within Recovery and mounting on the PC) I can then reflash (and use my SD cards again).
*
Any ideas?
I would think reflashing a newer recovery fron fastboot might help you with your problem if your current recovery is borked. (CWM 5.8.1.8 maybe?)
Ok, so I have installed the CMW touch recovery over fastboot...and I can now mount the external SD card. I have also managed to erase the external SD card using fastboot (fastboot erase sdcard) but the phone still can't see it. The internal memory is untouchable either through recovery or fastboot
markdjj said:
Ok, so I have installed the CMW touch recovery over fastboot...and I can now mount the external SD card. I have also managed to erase the external SD card using fastboot (fastboot erase sdcard) but the phone still can't see it. The internal memory is untouchable either through recovery or fastboot
Click to expand...
Click to collapse
Try a fastboot -w command and flash a new ROM from the external see if it works. It would be easier if we knew what caused you to have this problem...
Right, some good news...I have managed to partition my SD card from recovery (only to 4 gigs though but it's a start...), managed to put my and now I am rebooting as I type...although it's taking a long time to reboot...
Maybe I should do a fastboot -w first
littleemp said:
Try a fastboot -w command and flash a new ROM from the external see if it works. It would be easier if we knew what caused you to have this problem...
Click to expand...
Click to collapse
Yeah it's still not booting, even though I installed the rom from recovery.
Thinking back my troubles started when a) I wiped both the internal and external to fat 32 from my Mac and then b) I converted all file systems to ext4 from the advanced menu. Yeah, that may be it...
markdjj said:
Yeah it's still not booting, even though I installed the rom from recovery.
Thinking back my troubles started when a) I wiped both the internal and external to fat 32 from my Mac and then b) I converted all file systems to ext4 from the advanced menu. Yeah, that may be it...
Click to expand...
Click to collapse
Yep... that'll do it.
littleemp said:
Yep... that'll do it.
Click to expand...
Click to collapse
So...in order to fix this, can I simply reformat from a Linux box?
markdjj said:
So...in order to fix this, can I simply reformat from a Linux box?
Click to expand...
Click to collapse
to be honest... no clue. I really never thought of messing with the partitions like that.
Hey Guys,
I have always used CWM Rom Manager but now it only bricks the phone when installed. "Encryption Error - Factory Reset", but that does not work, have to use AP Fastboot and reinstall JellyBean. Now that I have it up again, I want a recovery solution besides Titanium Backup that will backup the entire phone, like CWM did. So, I installed SafeStrap. (Rooted with Android 4.1.2)
Now I would like to format the internal SD Card to start fresh, but when I boot to recovery in SafeStrap, Wipe does not format the internal card. The terminal window in the Wipe action shows that it cannot find block device. But, the File Manager in recovery works just fine and the backup seemed successful. When I go to Advanced, Settings, there is one setting that cannot be unchecked. "Use rm -rf instead of Format?" No, I do not want to wipe the existing partition, I want to format the entire internal SD partition, so I do indeed want Format like CWM would do. Is there a way to uncheck this box and how do you do it?
SafeStrap does have a Terminal, use at your own risk. So do I need to Format the internal SD Card by command line? Command line Syntax, please? Since this is a deadly serious operation, I would hope to get an answer and someone to confirm it, if possible. Familiar with Linux so that might help.
Anyone can help, please?
Update:
I checked out the SafeStrap Terminal. It is very, very crude, does not display much information like a Linux shell would. I can enter parted or at least the command echos to the screen, but the print command does not even show the partitions on the block device for the Internal SD Card, /dev/block/mmcblk1p25. There must be a better way...
I think you have to go to the SLOT like the ROM-SLOT-1 to do this.The stock rom slot dosent allow you to format or wipe anything.
Sent from my XT910 using xda app-developers app
I've attempted to flash a newer version of cyanogenmod on my phone (10.1.3 to 11). I'm using TWRP 2.6.1.0
I can not boot because I've wiped the phone (dalvik, system, data, internal storage, cache), and I suspect the ROM I have is corrupted but I can't connect it to my computer and transfer the file via USB because I have no ROM installed and can not boot. I also can't take the SD card (since there's non) and put the file that way.
My phone is Oppo find 5
My root file flashing was successful, but installation of the ROM cm-11-20140204-NIGHTLY has failed. I assume the file was corrupted, but I have no way to find out what it is.
I now realize my mistakes, like wiping the system unnecessarily.
Is there any way to get another file on the device? any other suggestions?
Also, I'm not sure if this is the correct place to post this, but I was not able to find the right place. I apologize in advance.
Eyal,
http://forum.xda-developers.com/showthread.php?t=2141817
Check that thread, set up adb and push a ROM to the internal sd of your phone via adb. You can use adb in recovery mode (I could in CWM, dont know about your recovry) so if you can boot into recovery, you can push the rom. (There is info on the thread about adb pushing/pulling)
Sent from my GT-S5660
Cwm has an option to mount storage to PC in mounts & storage menu
Check if twrp has the option
You can mount it that way:good:
vneogi199 said:
Cwm has an option to mount storage to PC in mounts & storage menu
Check if twrp has the option
You can mount it that way:good:
Click to expand...
Click to collapse
it doesn't seem to recognize anything.