[Droid 2 Android Development] facelessuser:
I wanted to do a write up of the most likely issues that would be encountered in the rooting process with these scripts. Now that I am more intimately acquainted with the process, I have noted three places the scripts may fail. These are not due to any fault of the scripts, but more quirks with the process and/or user error. This is not to say freak problems can not occur.

The three issues as follows: Not connected at start, failing to root with exploit, and failure to reconnect after exploit.

1. Not connected at start

What you will see:

The script hangs when it says "Checking devices..." or, you quickly get an error when it attempts to transfer the payload to your phone.

What is happening: The script can't find your phone.

Possible resolution:

Quit script if it is still hanging, and make sure you are in PC mode, and have debugging enabled. If you have this done, try reconnecting your phone. Sometimes the drivers can be a bit funny.

2. Failing to root with exploit

What you see:

An error soon after the exploit finishes and the script finds the device.

What is happening:

After the exploit, the script reconnects to your phone with a new ADB session and checks to see if you have a root shell. It errors out because the exploit did not successfully give you a root shell.

Possible resolution:

Run it again. I haven't had this happen except once in my testing, but it is possible. Since you didn't get the root shell, it is safe to try the script again.

3. Failure to reconnect after exploit

What you see:

The script hangs after exploit.

What is happening:

In order to get a fairly reliable method of reconnected to the phone after the exploit, I kill the adb server PC side and then try to reconnect with a fresh adb server. In Linux and Mac, I then just issue a command to "wait for the device" after the kill; this seems sufficient for these platforms. In windows, I have to kill the adb server, wait, start the server, wait a little, and then issue the "wait for the device command". There seems to be a larger delay on windows to successfully reconnect to the phone, and if I don't physically start the server, I may not see the phone. I think this is because of the way the way the Moto drivers operate.

Possible resolution:

You could try disconnecting the phone and reconnecting.

You could kill the script, disconnect and reconnect your phone, and issue the command "adb shell" and see if you have the '#' symbol. If this is the case you have two options.

Option 1. Restart the phone and try the script again.

Option 2. Continue on manually. Issue the commands via adb shell to copy su, busybox, and Superuser.apk to their respective places and grant the permissions they need.

If you see a '$', you can just exit out of the adb shell and rerun the script.

Please try and use this to assess what has happened first. If you still have issues, we can try to assist you in resolving your problems

In the future I plan on adding the option to unroot.

I also plan on adding the ability for the user to pass in parameters to execute certain parts of the script in case they are just having lots of issues etc. That way you can evaluate each phase of the procedure, or pick up right where it failed last.

Oh, yeah, I am going to fix some of the typos and misspelling too.:)