yashsingh1/xdaforums huggingface dataset:
[Fascinate Android Development] GizmoDroid:
EDIT 3/30: This problem should be solved with the updated version of CWR found here: http://xdaforums.com/showthread.php?t=1017817

Remember that until devs start bundling it with their roms, you will need to flash it after you flash a new ROM. (Superclean 2.9.2 and before includes the broken recovery).

The problem was in the fact that cwr didn't have root access. The updated one now contains this fix.

If you are trying to restore a nandroid from an old backup, you might have issues. I'll try to see about this scenario to see the easiest way to do it (the steps from the previous post in this thread should work.)

Also, it looks like dbdata doesn't auto-mount, so you need to go into the mount menu and mount it before being able to run the fix_permissions script, if you want to run that.

I think I got it fixed so that it will auto-mount it in the script, but it won't be recompiled until JT does it.

Original thread:

Info and links:

http://forum.androidcentral.com/ver...s/72212-warning-trouble-nandroid-backups.html

http://forum.androidcentral.com/verizon-fascinate-rooting-roms-hacks/72185-3-days-hell.html

This seems to explain a lot of the issues people have been having. Probably best to check that thread for updated info, but copying and pasting for those who are other forum-phobic:
[Fascinate Android Development] JaeKar99:
There is a workaround in process of being written up.
[Fascinate Android Development] sheepdog elite:
The workaround is to reflash your theme over the nandroid once you get the restore finished. It's been mentioned that after a few days some one had it go bad that way, but it's what we've got for now.
[Fascinate Android Development] landshark68:
Thanks GizmoDroid,

I was going to post the same info here when I woke up this morning. A group of us over at AC were up til the wee hours working on solutions and I was falling asleep at the keyboard. I'm trying to be more active over here and will update my OP at AC and this thread here.

For now a solution that gets you past the FCLOH is to boot back into cwm and flash whatever theme you have in the nandroid. That will get you past the FCLOH, but some patches and mods are being overwritten by doing that. So far, Adrynalyne's nuance patch stayed, but the mod settings patch did not. We are still working on other possible solutions. For now, other than doing this testing, I am not even bothering with nandroid backups as I can boot to cwm, flash ROM, reboot, boot to cwm, wipe cache & dalvik, flash theme, reboot, boot to cwm, wipe, flash patches and mods, and reboot all in about the same amount of time it takes to safely restore a nandroid of just the base ROM to avoid the FCLOH.

Right now I am going to see if restoring a nandroid, then flashing the theme in the same cwm session avoids the FCLOH.
[Fascinate Android Development] landshark68:
Result of latest test - PASS

So flashing the theme over the nandroid restore in the same cwm session resulted in a clean reboot with no FCBLOH (Added in the B for Boot -Force Close Boot Loop of Hell.) Same problem as before though as Adrynalyne's settings mod was overwritten by the theme. So while this takes care of the FCBLOH problem, but it involves extra steps. Which like I said before kind of defeats the purpose of having a nandroid backup to restore - creating a complete build you can then restore all at once instead of having to do it piecemeal. Well at least for now there is a way to get around the FCBLOH when restoring a themed nandroid backup. Thanks Sheepdog Elite for all the help and for finding this workaround. Everyone just remember if you use this workaround and have any additional patches or mods included in your themed nandroid backup, after you restore check to see if all of your mods and patches are still in place.
[Fascinate Android Development] GizmoDroid:
Since I don't use nandroids/themes much, instead of doing a bunch of testing myself, I'll just ask you guys this:

We are possibly talking about a permissions issue. Why not do a system partition dump before nandroid, and then after restoring, then see what's different? After that point, you can make a script that sets the permissions on those files.

Or if files are actually missing or corrupted, then you will be able to find this out too.
[Fascinate Android Development] landshark68:
Thank you sir. I will pass this along and see what we can find out.
[Fascinate Android Development] GizmoDroid:
Actually, after some preliminary research, my suspicions are not the system partition but the dbdata partition (/dev/block/stl10).

Clockwork has had problems with this one in the past. I don't know if it's on the backup end or restoring end, but I bet it's an issue with one of the scripts mounting the wrong partition, or folder. (clockwork mod mounts it to /datadata while stock rom calls it /dbdata)
[Fascinate Android Development] JaeKar99:
Shark. This is sounding like one of us needs to go back to school to become a script editor. This is getting beyond me.
[Fascinate Android Development] landshark68:
Yeah, he pretty much got beyond me at Actually, :confused: I'm just a guy who has learned quickly and gotten good at flashing, rooting, and problem solving to help other people. I am completely lost when it comes to the technical side. I am trying to learn as much as I can though so I'm not so lost. :D If we can eventually get this info to the right people I would be happy with that. If those right people are the devs, I am more than happy putting this issue on the shelf until they are completely done with their current projects. But anything I can do in the meantime to help I will certainly do or try.
[Fascinate Android Development] GizmoDroid:
The good news is I just successfully restored a themed nandroid!

The bad news is that I'm not exactly sure what I did to fix it.

Nandroid backed-up a themed install.

Nandroid restored same themed install.

Rebooted.

Eternal bootloop ensued.

Rebooted to CWM.

While in CWM, I plugged in the usb and connected via ADB shell. I then typed the following (replace the red part with whichever nandroid backup folder you want to restore)

/sbin/nandroid restore /sdcard/clockworkmod/backup/[COLOR="Red"]2000-01-01.00.06.31[/COLOR]/

Did some other stuff

Rebooted and was greeted with a successfully working phone!

Now, I did some other things too, so I'm not sure if this was the only thing it needed. If this is all it was, then it should be an easy CWM fix. Someone want to try that and let me know?

If that's not it, I'll tell you the other things I did. It's got to be one of them :)

Things to remember: nandroid doesn't back up your kernel or modem at this time. If you try to restore an nandroid backup with an incompatible kernel or modem, you will have problems. Flash these first.
[Fascinate Android Development] landshark68:
I will try it and let you know.
[Fascinate Android Development] landshark68:
Nope, that one wasn't it. Nothing happened in adb or on the phone. Next?
[Fascinate Android Development] GizmoDroid:
Nothing happened... at all? Like it just went back to the prompt without saying anything?

If that's the case, we have bigger fish to fry, because it should have at the very least complained or showed some text.
[Fascinate Android Development] landshark68:
Never mind. Jut took a while for it to start rolling in adb. stand by for results.
[Fascinate Android Development] landshark68:
Boot loop city
[Fascinate Android Development] GizmoDroid:
Not being facetious here, but I need to know exactly what I did different than you.

Can you tell me all the steps you did, in as much detail as you have patience for?
[Fascinate Android Development] landshark68:
Well I'm going to start over. After I went through the procedures I scrolled back up and noticed you tried to restore your nandroid through cwm first. I flashed to just plain sc 2.9.2v through cwm, booted to recovery, ran the commands through adb, rebooted when adb said restore complete. I will now follow your exact steps and try restoring the nandroid through cwm first.

And since I've been flashing so much stuff today I'm going to wipe data, cache, and dalvik before trying to restore the nandroid if you think I should start from a clean slate.
[Fascinate Android Development] GizmoDroid:
Actually, hold off a second. I just redid the steps myself, and that wasn't all of the commands needed, apparently.

Before you jump through a bunch of hopes again, let me try some stuff.

Ya, best bet would be to start clean, flash ROM and theme, nandroid backup, nandroid restore, then do the manual nandroid restore from adb. Try to eliminate all the variables.

If that's not it, then it had to be some funky mounting stuff I was doing. But I'd rather not get into that if I don't have to, because I tried a bunch of stuff all at once.
[Fascinate Android Development] landshark68:
Standing by. I just made a build of sc 2.9.2v and ultimate honeycomb 3.1.1. I'll make a nandroid backup of that while waiting.

ETA - And don't worry about the appearance of being facetious or hurting my feelings or insulting me. I'm a grown person with thick skin. And I've read a bunch of your posts and have the same mind set. Don't insult, but tell it exactly like it is.
[Fascinate Android Development] GizmoDroid:
Well, I've got work to get done tonight, and I am hungry as all get out. I think the lack of food has taken it's toll on my intelligence :o

Basically, I've done the following things, but I can't figure out which one is the crucial step. I can repeatably get it working again, but obviously, not all of this is/should be required, so there are only one or two of these steps that are actually needed:

EDIT: I believe all that is marked in silver is unnecessary. I don't recommend following this procedure, since it involves a lot of extra steps, but I'm leaving it here for reference.

From the CWM menu, I mounted /system, /data, /dbdata, /cache, /sdcard partitions.

Then, I wiped cache from the menu.

Then I ran su from the command line.

I then mounted /dbdata manually from the command line:

mount -o rw /dev/block/stl10 /dbdata

I then ran the fix permissions script from the command line:

/system/xbin/fxpms

I then ran nandroid from the command line (or run nandroid restore from the CWM menu):

/sbin/nandroid restore /sdcard/clockworkmod/backup/[COLOR="Red"]2000-01-01.00.06.31[/COLOR]/

From the CWM menu, I mounted /system, /data, /dbdata, /cache, /sdcard partitions, again.

[*]I then ran the fix permissions script from the command line, again:

/system/xbin/fxpms

[*]I then wiped the cache again from the menu.

Rebooted to a working phone.

Bleh.
[Fascinate Android Development] landshark68:
Thanks so much for all of this. And I know what you mean about the lack of food taking it's toll. It's 9:30 P.M. here and I am just now eating something for the first time today. This new kernel from jt1134 is awesome and I've been running around like mad answering questions at AC, posting stuff here about battery life and this thread, and trying different things out. Haven't had much of a chance to really take the new kernel for a spin. Get something to eat, do what you gotta do, and I'll do some playing around with your steps to see if I can find what works. Thanks again.
[Fascinate Android Development] GizmoDroid:
Things to remember: nandroid doesn't back up your kernel or modem at this time. If you try to restore a nandroid backup with an incompatible kernel or modem, you will have problems. For changing kernels, do the process below, then flash the kernel before rebooting. For modems, use odin or heimdall to flash the modem before doing the steps below.

Here are the current steps that I think work to restore a themed nandroid backup:

Boot to CWM

Mount system from CWM menu (or "mount /dev/block/stl9 /system" in adb)

Run "su" from adb

Restore Nandroid from CWM menu (or "nandroid restore /sdcard/clockworkmod/backup/insert_nandroid_folder_name/" in adb)

Reboot!

Apparently I need to sleep now.

EDIT: I lied about sleeping. The revised list above seems to be repeatably working. Hopefully it's not a fluke.

Working theory:

/sbin/su is missing in CWM (which is why I've been mounting /system so that I could get to /system/xbin/su). When nandroid is restoring, it probably needs su to properly set the permissions.

This is why I've been needing to run the fix permissions script after the nandroid finishes restoring. Since the fix permissions script included with CWM (/sbin/fix_permissions) is faulty, I've been mounting /system again (because the nandroid process umounts it) to get access to /system/xbin/fxpms, which is an updated fix permissions script that Adrynalyne started including with superclean not too long ago.

So I think this boils down to su not being accessible at boot up by CWM. Just need to hunt down where that is happening in the source, and hopefully we will get this patched right up! In the meantime, someone could throw together a shell script to put on your sdcard to run the three commands (mount system, su, nandroid).

Also, just to give a little insight why this only seems to show up on themed nandroids (but could actually pop up in several different situations): when we modify apps and framework, we invalidate the certificates/signatures. We trick the phone by loading files in recovery, that way the phone won't check the signature to the file; it will just assume it's valid.

When we do the nandroid, and the phone boots up and sees a bunch of files with different permissions, it assumes they are new and tries to validate them by comparing their files to their signature. Since themers modify crucial system files that are important for boot up, when the signature is found to be different from the files, then the system blocks them from loading. This is why the phone often cannot make it past boot-up, and for the times when it can, it will have lots of errors.

It's ok if that didn't make any sense. It's late and I'm rambly. I'm mostly just typing it so I don't forget. :D
[Fascinate Android Development] landshark68:
Thanks so much for all that great work GizmoDroid. And thanks for posting the info over at AC. I'm making sure everyone sees it and knows who did all the work. Awesome.
[Fascinate Android Development] GizmoDroid:
Well, I hope that it's correct info. There may be more to it, or I might just be overlooking something even simpler.

I definitely expect my "working theory" to be at least half wrong when all is said and done ;) (for example, I don't think su is supposed to get linked in /sbin, but something is broken somewhere else that makes nandroid require su to run properly), but hopefully the steps I provided as a temporary work-around are valid for most people.

Just from the little bit of investigation I've done, I've seen enough to know that Clockwork still needs some work to be fully compatible with the Fascinate. I think we see a lot of errors from people flashing CWM files that don't have robustly written update scripts that properly mount and set permissions.

This is why most people recommend wiping and starting from scratch every time, because otherwise, you run the risk of the system throwing out the files because of invalid signatures. As many times as it pops up in the forums, it's obvious that there is an issue with the current implementation of clockwork.

Hopefully, someone will come along and port voodoo support to clockwork 3.0 (definitely not that hard, relatively speaking), and gets this whole mounting/permissions thing figured out. I think the biggest issue lies in some non-uniform mounting of partitions (example: /datadata in clockwork is /dbdata in the main OS) and Samsung's tendency to relocate files from their standard location (example: /data/system/packages.xml is found at /dbdata/system/packages.xml)

So really, what we need is a top to bottom check of cohesiveness between the kernel, recovery, and OS. Honestly, I feel like this would be a huge benefit to the AOSP and CM7 guys as well, who are probably hacking their source to be compatible with Samsung's jacked up file locations.
[Fascinate Android Development] landshark68:
And thanks for that explanation. Not overly complicated and you didn't talk over my head. This is scary, but some of this is starting to make more sense to me. I really don't have a clue when it comes to talk about script, but more and more of this is starting to come together and click for me. To think, just over two months ago I was still stock and didn't even know what rooting was, and I don't have any kind of technical background. I'm not saying I'm ever going to fully understand script and code, but thanks to great people like you and DroidXcon over at AC who take the time to work with and explain things to those of us who are less knowledgeable. I'm sure my learning curve will continue to accelerate the more I interact with everyone here at XDA and over at AC. Thanks again and I will work with your method to verify it and see what else I can figure out from it.
[Fascinate Android Development] landshark68:
So it really does come down to what people in the know have been saying. Samsung makes great hardware, but their software is total doodoo. They need to pay great gobs of money to our devs to come write their software for them. Seeing the magic they have all performed with that POS EB01, I would love to see what they could turn out starting from scratch. From what I understand that's what jt's Vanilla AOSP is. Correct? Not sure about MIUI and CM7. Just haven't done a lot of reading up on those yet, been focusing on learning everything I can about rooting and flashing and operation of the phone and ROMs before moving on. I prefer to learn in steps and fully understand each step before moving on to the next.
[Fascinate Android Development] GizmoDroid:
AOSP starts at the operating system/kernel layer, and only has the features that plain Android has, until someone adds them. Samsung takes it and proceeds to ruin it by adding a bunch of crap. Then they use a bunch of proprietary drivers in their kernel, so that even when they do make it open source, we still don't have fine control of them, but we can drop the driver "blobs" into our AOSP kernel.

Miui is probably mostly compatible with the AOSP on the kernel level. You can think of it as a very complex theme that involves a lot of OS related stuff to be modified. It has it's own apps and framework too. It's main focus is being pretty and easy to use on the front end, with having the power to modify almost every graphical aspect of the phone through its own settings menu.

Cyanogenmod originally started out as AOSP... many many sleepless nights ago. It requires a custom kernel, and gives you control of nearly every aspect of your phone from it's own menu. Its like the ultimate powerhouse of what an Android phone is capable of. I was almost disappointed switching from an ancient original moto droid to the fascinate because I had been on CM6. Despite the new hardware in my SF, I felt like it was almost a downgrade. This is why everyone is so excited about CM7, not just because it's based on the Gingerbread AOSP, but because anyone that has ever ran any CM knows that it is truly a beast.
[Fascinate Android Development] landshark68:
Sweet. Well I think I've bugged you enough for one day. Besides that, after all that digging around last night I only ended up with about 3 hours of sleep, so I'm heading off to try and get around 6 now. Thanks again.
[Fascinate Android Development] GizmoDroid:
Sleep? Oh... ya, that's what everyone is doing when it gets really quiet, right?
[Fascinate Android Development] GizmoDroid:
This problem should be solved with the updated version of CWR found here: http://xdaforums.com/showthread.php?t=942021

Remember that until devs start bundling it with their roms, you will need to flash it after you flash a new ROM. (Superclean 2.9.2 and before includes the broken recovery).

The problem was in the fact that cwr didn't have root access (ro.securable was set to 1). The updated one now contains this fix.

If you are trying to restore a nandroid from an old backup, you might have issues. I'll try to see about this scenario to see the easiest way to do it (the steps from the previous post in this thread should work.)
[Fascinate Android Development] landshark68:
Got it. Thanks again.
[Fascinate Android Development] gunnermike:
hey thanks for this btw, just a note for everyone.

i was running imnuts voodoo kernel for the third battery support. i flashed the updated cwm this morning and when i rebooted i got the pop up saying i was using an unsupported battery. no big deal, i just flash the kernel again. i may not have noticed if i hadnt been using a third party battery. im not sure what it means, but i thought you should know.
[Fascinate Android Development] wideopn11:
Thanks Gizmodroid for looking into this and figuring out what was causing problems. I had a feeling something was broken with cwr but I don't know the code well enough yet to go looking for it. Maybe now this will cut down on some of the redundant questions from people getting stuck in boot loops and complaining about roms.
[Fascinate Android Development] jackmei2:
sweet, this also fixed voodoo not showing up as enabled. thanks!
[Fascinate Android Development] Not_So_There:
Can I flash the zip version of this without disabling voodoo first?
[Fascinate Android Development] gunnermike:
Yes
[G2 and Desire Z Q&A, Help & Troubleshooting] Avirex64:
First off I'm new to XDA and loving it so far, lots of info on here. Anyways I have been reading and reading and reading through all the different threads on rooting and installing roms on my G2 and STILL don't feel comfortable enough to do it on my own. I just don't trust myself and plus their is just so many and I don't know which one to choose. I will gladly pay someone a reasonable price to walk me through the steps maybe on the phone or something. If anyone is interested please let me know. I have been wanting to root my phone for awhile now...
[G2 and Desire Z Q&A, Help & Troubleshooting] EdKeys:
I'll help you out and it won't cost you anything.... PM me your contact info and some times that you are available. Give me a few options since I work nights and my schedule is kinda flaky.
[G2 and Desire Z Q&A, Help & Troubleshooting] shabbypenguin:
indeed if you join #g2root on irc freenode there is a channel dedicated to helping people root and hack their phones, all at no cost to you :)
[G2 and Desire Z Q&A, Help & Troubleshooting] frankth3frizz:
i felt the same exact way! i actually freaked out last night because i was half way through a root and it wasnt working! i had to hard reset cuz i got scared. then this morning isaw this thread and it took me like 15 minutes to figure everything out :O

http://xdaforums.com/showthread.php?t=928160
[G2 and Desire Z Q&A, Help & Troubleshooting] Avirex64:
Thanks a lot for helping me out man!!! Wasn't as bad as I thought it would be, but again thanks for helping me through the process successfully!!
[G2 and Desire Z Q&A, Help & Troubleshooting] eioous:
I felt the same way when i decided to root my phone and this site gave me pretty good instruction on how to do it.

This is what i used to root my phone.

http://theunlockr.com/category/howto/android_how_tos/htc-g2-how-tos/

There are steps to follow, videos to go along with the steps, and links to all the files you will need.

Just make sure to watch and read everything a couple times before attempting.

Good luck in your rooting endeavors.:D
[G2 and Desire Z Q&A, Help & Troubleshooting] IronMan66:
Isnt it great when u finally get root. Its like a new day is dawning
[G2 and Desire Z Q&A, Help & Troubleshooting] pmcqueen:
ahhhhhhhhhhhhhhhhhhhhhhhhhhh why do people keep posting links to visionary?!?!?!

USE GFREE/RAGE, PEOPLE. it is so much easier and safer...
[G2 and Desire Z Q&A, Help & Troubleshooting] Avirex64:
Yupppp, loving it so far
[G2 and Desire Z Q&A, Help & Troubleshooting] tackleberry:
me too

dont be scared...if you can read, you can root. i did visionary and gfree method on device, because for some reason i cant get adb to work no matter how many times i read it over and over. but i have done 2 G2's now and both went flawlessly with gfree method on device.