hey,
Long story short, I royally screwed things up on my I/O tab. So now I'm trying to restore a nandroid backup via fastboot. The only problem is that I don't know the name of that data parition. I've tried
Code:
fastboot flash userdata data.img
and
Code:
fastboot flash data data.img
is there any way I can see the partition table in fastboot? I should be able to get adb if I need it as well.
Thanks,
Sam
maybe I don't have the name wrong. maybe it's just the fact that /data keeps getting mounted as read only for no apparent reason..
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 have a ZTE Axon 7 (A2017U) and I'm trying to install a stock rom (A2017UV1.1.0B35). I currently have TWRP installed and an unlocked bootloader. I can access the device via fastboot and TWRP recovery mode, but otherwise it will not boot.
I'm stuck in a loop:
If I install my rom via TWRP, when I reboot the phone the /system partition is never mounted. I can see "Failed to mount '/system' (Invalid argument)" written in the log
If I view the /system partition details on TWRP's "Wipe->Advanced wipe->Repair or change file system" screen, the partition is listed as "Present: Yes, Removable: No, Size: 0MB, Used: 0MB, Free: 0MB, Backup size: 0MB
If I format the /system partition using "Wipe" function, the "Formatting system using make_ext4fs" operation succeeds and partition seems to be correctly formatted using ext4, and is listed as "Present: Yes, Removable: No, Size: 5455MB, Used: 10MB, Free: 5444MB, Backup size: 10MB
I'm able to access the partition via the terminal, and if I write a text file to it and reboot the device, I'm able to read it back... It seems the partition is working correctly.
I attempt to install the rom again using TWRP's "Install->Install zip" option, and after ~10 minutes it states that installation was completed successfully.
I reboot the device and the OS does not load. If I access TWRP, I see the /system partition is not mounted and the cycle continues
I've also tried installing other roms (e.g. Lineage OS), but they all fail assert checks, even thought I'm 100% positive they're for the correct device.
I'm tearing my hair out here. I'm a programmer by day and I'm fairly experienced with Unix, but admittedly I don't have much experience working with Android. There's a good chance I'm missing something.
Any idea what's going on, or what to try next? Is there any other information I can provide that might help me troubleshoot the problem?
I don't know of this will help, but I had a similar issue with a Samsung phone once. What had happened is when I flashed the new ROM the .dat or .img file was smaller than the original partition and it shrunk the system partition. I was lucky and I had previously dumped a copy of my system partition with terminal and was able to put it back.
When the partition was shrunk it wouldn't install any other ROM's either. If you could get another user with your same device to dump their system into an .img file we might be able to fix it with dd commands.
Sent from my LG-Q710AL using Tapatalk