yashsingh1/xdaforums huggingface dataset:
[Droid 2 Android Development] facelessuser:
Yes.

Windows: doroot.bat unroot

Mac & Linux: ./doroot.sh unroot

It is new, so don't expect the world. But it does work. I tested it on all platforms.
[Droid 2 Android Development] db306:
Is the name of the file doroot.bat unroot?
[Droid 2 Android Development] facelessuser:
No, you run it from command line with that parameter.
[Droid 2 Android Development] db306:
I'm a little bit of a newb so bare with me. Do I need to extract the new 2.1.2 files to the tools folder of sdk and then run the doroot.bat file again to unroot? Thanks
[Droid 2 Android Development] facelessuser:
You do need to download the new one and place it in the tools folder. Simply running the file will try to root your phone again. You have to run it from command line and pass that parameter.

Tell you what, PM me your email and I'll send you a bat file that will call the other one to unroot your phone. So all you have to do is click.
[Droid 2 Android Development] phwlee:
I rooted my Droid 2 with one of the earlier versions but would like to add the unrrot option. How do I go about doing that? should I just download the latest version and run the doroot again? Sorry, new to this but trying to learn.
[Droid 2 Android Development] phwlee:
We lost our internet the other day at work and I got to use the wireless tether and had my phone plugged in a/c power. That's why I was wondering how long you can keep the wireless tether on. Thanks again.
[Droid 2 Android Development] darkonion:
I believe the new windows version has a unroot.bat that you just download to your tools folder and run to unroot. At least something like that.
[Droid 2 Android Development] facelessuser:
You need the whole zip file. The dounroot.bat just calls doroot.bat with a special parameter to tell it to unroot.
[Droid 2 Android Development] BoxyBox:
Hi.

I'm trying the one-click method and it seems to be stuck. I followed the directions exactly but I am in Charge Only mode because I can't get the debugging icon to appear otherwise. After running the doroot.bin and it stopped at "adb connection will be reset. restart adb server on desktop and re-login" for a few minutes, which I believe is normal. Now, though, it just says "could not kill pid 19526: No such process" and has not moved for about 10 minutes. Do I simply close the command prompt and try again or is there another method to kill the process?

Thanks.

Edit: I just closed the command prompt and powered the phone off. Restarted my laptop as well and tried one more time. This time I got past the "adb connection will be reset" in a few seconds but ended up with a failed root and Error 12. Any ideas on what I'm doing wrong?
[Droid 2 Android Development] facelessuser:
Yes. Just try again.
[Droid 2 Android Development] BoxyBox:
It took a couple more tries but I still don't think it actually worked. After Error 12 the process hung at "Checking for devices" for over 5 minutes and I closed and powered off once more. The fourth attempt seemed to be successful as it said I should be rooted and it only took about 2 minutes. I see the Superuser Permissions in my list of apps but when I open it, it's just a black screen. If I go to manage applications and try to remove preloaded crap (one of the main things I'd like to do), I still don't seem to have that capability.

Are there any other ways to test that I am actually rooted, or am I perhaps only partially rooted? Should I try the process once more or try to run dounroot.bat and start over? Basically I'm completely lost, so any help is appreciated.
[Droid 2 Android Development] facelessuser:
I think you are confused. If the script said you are rooted, you are rooted. You cannot remove system apps through your settings. You need a file manager with root access, and you have to first mount /system as RW. Do not try and root again. You can reboot if you like because you had issues.

Download a terminal emulator from the market. Open up the app and type "su" no quotes. You will see you have root.
[Droid 2 Android Development] vampireincubi:
Genius!

i attempted the manual instructions in the "how to root droid 2" thread a few times and got evrything finalized... except no matter how hard i tried i could not get superuser to show more than a blank screen,

but w/this 123easier root, evrything is gooood:D

i also am a "poor college student" but i do believe i will be making an effort to donate. i can only hope that after some college i will be able to do something like this!
[Droid 2 Android Development] darkonion:
I was messing around with it and I am not sure why it wasn't working.

Instead of running ./doroot2.sh,

do this:

cd data/local/tmp

chmod 0755 rageagainstthecage-arm5.bin

./rageagainstthecage-arm5.bin
[Droid 2 Android Development] darkonion:
Glad this worked out for you. What OS were you running?
[Droid 2 Android Development] Droid2Life:
alright, did it and it kicked me off and brought me back to /tools. now what? are you on gchat?
[Droid 2 Android Development] darkonion:
I am. I will PM you.

adb shell

cd data/local/tmp

chmod 0777 doroot3.sh

./doroot3.sh
[Droid 2 Android Development] facelessuser:
darkonion

You can probably make all of this work with launching one script.

Your first script copies everything to the phone, but instead of calling adb shell and having the user enter in stuff and launch the second script, you can use commands and do the adb shell commands and even launch the second script from the first script.

adb shell "sh ./sdcard/doroot.sh"

Also your first script when calling the second script on your phone will wait for you to return from the adb shell, and then you can execute more commands.

I have already tested this with a proof of concept on my phone. I copied a script to my phones sdcard and gave it executable permissions. I then launched a simple script from my linux system that echoed some commands, called the script on the phone, which echoed commands, and then returned me back to my original script.

You can literally make this process even easier.
[Droid 2 Android Development] darkonion:
Cool. Thanks. I knew there had to be a way to do that. I really need to shower at the moment, but can I hit you up in a bit for more info? I'll PM you my GTalk ID.

-Kevin
[Droid 2 Android Development] facelessuser:
Cool not a problem. Of course you may loose your fancy "1-2-3" name. I guess you may have to call it "1 step root" or something.:)
[Droid 2 Android Development] darkonion:
Is there any way to run multiple commands using that method?
[Droid 2 Android Development] facelessuser:
Give me an example.

You can run multiple commands (one right after another)

adb shell "echo \"what \""
adb shell "echo \"up\""

or you could probably

adb shell "echo \"what \"; echo \"up\""

or just run a script that does these commands on the phone

adb shell "sh ./sdcard/whatup.sh"

whatup.sh

#!/system/bin/sh
echo "what "
echo "up"

understand?:)
[Droid 2 Android Development] darkonion:
So... what I want it to do after I open the shell by the script is...

cd data/local/tmp

chmod 0777 doroot2.sh

./doroot2.sh

-Kevin

Update: I think I got something going...
[Droid 2 Android Development] facelessuser:
Cool. Let me know if you need any more help. I'll be more available later today, but I'll check now and then. I am a firmware engineer by day, and they keep me pretty busy.
[Droid 2 Android Development] darkonion:
It isn't working. Gives me a bunch of errors. PM me your email, I'll send you the whole package and you can take a look.
[Droid 2 Android Development] facelessuser:
sent

I will take a look tonight, and see if I can get this going.
[Droid 2 Android Development] Mijobar:
I am new to this whole rooting thing and I tried the 3 step process and got up to the ./doroot2.sh: not found.

I am running windows 7
[Droid 2 Android Development] darkonion:
A lot of people are having trouble with that. Not sure why. I think a new script will be out shortly. Until then, pm me your google talk id and I can help you out.
[Droid 2 Android Development] facelessuser:
Okay, I just got some free time now, so I am going under, and I'm not coming up until I have one step root. I will also root my phone with it to make sure it works. Here goes nothing.
[Droid 2 Android Development] darkonion:
Email you good sir. I've done some work. Got it all to run with two commands. Just need you to put some finishing touches on.

-Kevin
[Droid 2 Android Development] darkonion:
Porting this stuff over to Windows. Should be ready shortly!

Still buggy, but give this a try. You might have to run ./rageagainstthecage-arm5.bin manually...

http://www.kimete.com/droid/beta/DORootforD2Windows.zip

Put the files, and not the folder into your tools folder. Run the doroot1.bat file. If after midway, it gives you a bunch of error, go into your command prompt and do this:

adb shell

cd data/local/tmp

chmod 0755 rageagainstthecage-arm5.bin

./rageagainstthecage-arm5.bin

After it kicks you back to MS-Dos,

Enter doroot2.bat
[Droid 2 Android Development] facelessuser:
Got it to work in one step LINUX. Launch, wait, root. I may clean up the script later and tweak some stuff as we get feedback from people. I handed it off to darkonion.
[Droid 2 Android Development] BoxyBox:
When I tried that, I could indeed give the app superuser permissions. However, when I try typing "su" into adb shell in order to mount system, I get "Permission denied".
[Droid 2 Android Development] facelessuser:
Typing su in adb shell should pop up the same accept dialog on your phone. If you keep having issues, bootstrap your phone; that will give you a constant adb root shell.
[Droid 2 Android Development] BoxyBox:
Thanks for the help, but I think I'm in over my head. I'm annoyed by bloatware on my phone and I heard good things about rooting, but I can't figure anything out. Can't figure out how to enter Recovery Mode and create a Nandroid backup, can't figure out how to mount system as read-write (entered what I thought was correct into adb shell but nothing has changed), etc. It's been hours and I've performed a million google searches and still have gotten nowhere.

I'll give it a few more days, but if I were to give up completely and revert what I've done (just rooted it, since I got stuck everywhere else), what would be the process for doing this? Just run dounroot.bin and be done with it, or should I take it a step beyond and follow the steps in this topic?:

p=7930621#post7930621 (on this site... can't post links)

Thanks in advance for tolerating my ignorance.
[Droid 2 Android Development] one.:
Just look up the regular rooting procedure, and follow it step by step. Really quite easy.

As far as creating a backup....just download koush's bootstrapper, open it on your phone, select 'bootstrap recovery' (you should get a 'success' message), then 'reboot recovery'. Use the arrow and enter keys to navigate the menu (del is 'back').

Go down to backup & restore, and then choose backup, hit enter. It will take a few mins, and then you can just hit del til you get to the main menu and select reboot now.

Now you have a backup.

if you want, you can plug in your phone after this, set it to usb mass storage, and then navigate to the clockwordmod\backup folder, and copy the folder inside (should be a time/date stamp for a name) to your computer for redundancy.

Honestly though, if you just look up the regular root procedure, and copy/paste all commands it is extremely easy. If you still can't get it to work after reading that thread, perhaps you are in over your head, or should attempt to consult a friend.
[Droid 2 Android Development] BoxyBox:
The phone itself is already rooted. I had difficulty with just the one-click procedure as outlined in the second post of this topic. The main thing I intended to do initially was remove bloatware which constantly runs in the background, but I can't mount system as read-write. I've tried "mount -o remount,rw -t ext3 /dev/block/mmcblk1p21 /system" (which took me an hour to find), but it just spits it back out and I still can't get rid of anything with a file manager. I'm sure there's a way to do this via adb, but that method seems overly tedious/complicated and I wouldn't even know where to begin.

Thanks for mentioning Koush's Bootstrapper, though, as that led me to a very detailed walkthrough of the backup/recovery process and guide to the installation of Epic 1.1, which supposedly removes bloatware. If this can be accomplished without read-write capabilities then perhaps I'm in the clear... for now.

I would still like to know for sure before I do too much and **** up my phone: does the "factory data reset" (in privacy options or within Recovery Mode) really do as it says and revert any rooting that was done, or would a more complex process (as in the topic I mentioned earlier) be required?
[Droid 2 Android Development] one.:
I can't speak to what the 'factory data reset' does per se, but if you want to know about unrooting, just check out the SBF threads in this forum.

As far as removing bloatware and epic 1.1....

just install epic 2.5 instead! Also a new release is supposed to be out within a day or two. Anyway epic does remove a lot of bloatware, and compared to out-of-the-box it's considerably faster. Expect even more in the next release!

It is worth noting that it is still early, so there are a couple of small problems, but nothing earth-shattering, and hopefully a significant chunk of those will be resolved with the next version.

if/when installing a custom rom, just make sure to remember to mount the /system folder in clockwork before installing. If you find the epic thread, there is detailed instructions on everything.
[Droid 2 Android Development] quic:
Worked great!! Thank you.
[Droid 2 Android Development] driverx125:
i cant get the adb shell to remount. i get adb nor found
[Droid 2 Android Development] BoxyBox:
Having the same problem, driverx125. I've tried several commands, including "mount -o remount,rw -t ext3 /dev/block/mmcblk1p21 /system" and "mount -o remount,rw /dev/block/mmcblk1p21 /system", which seem to do nothing. If I try "mount -o remount,rw /system" (which was suggested in several google results), I get a "guide" message which seems to indicate that I've formatted the command incorrectly. "adb remount" (as suggested on the Android wiki) gives the error you mentioned. Trying to "rm com.amazon.mp3 /system/app" after any of these attempts returns an error "file system is read-only".

I've also tried all of these commands via Terminal Emulator on the phone as well, with no success. What am I doing wrong?!

One positive note, though, is that I did get to use Wireless Tether today when my Internet connection went down, which was quite awesome indeed.

And thanks for the suggestion, One. I'll look into it.
[Droid 2 Android Development] MattHorner:
Hey this may have been brought up earlier but im not sure. Ok so im not a complete root n00b but im not exactly a vetran. Im using the droid 2(obviously) and I want to protect my phone from bricking etc. What can I use to backup and protect/revive my phone if this were to happen? Thanks for any help that can be given.

Your brother in android,

MattHorner
[Droid 2 Android Development] facelessuser:
I use nandroid in the clockwork recovery which comes with the bootstrap from Koush. Even if I have to SBF, as soon as I root I can restore exactly to how I was.

If you just need to backup applications, then Titanium Backup is pretty good.
[Droid 2 Android Development] grndscrpr10:
1 click method worked great for me, running Windows XP sp3. It got an error on the first try about: "could not kill pid 19357" but disconnected my phone and reconnected, ran it again and it was done in about a minute. Thanks to all the hard work
[Droid 2 Android Development] eldersoul:
Stuck

Okay, So I am using windows, followed all the steps, run doroot, it checks for device, finds it, starts the service on whatever port, reports that it started successfully and then it just sits there. forever. I've restarted the phone 4 times, the computer 5, installed and uninstalled the Motorola drivers 62.8 times, tried all the different usb modes on the phone, the only one that connects is charge only with debug.... IM STUCK :( Help me please. What am I missing?
[Droid 2 Android Development] facelessuser:
Hmm. Sounds like the script is waiting for your device, but cannot find it.

Try this: Run the script again on Charge Only mode. If it hangs on that step where it is connecting, unplug your phone while the script is still running, and plug it back in. Hopefully, your phone will reconnect and push you further.

You will see the script later disconnect your phone on purpose and reconnect again (you should see the same "connection on port whatever" message). Give it a minute, but if you see the same issue, unplug and replug again and see if you complete.

See if that helps.
[Droid 2 Android Development] stanleyg:
Problems...

Hi,

So I just got my Droid 2 a few weeks ago. I've loved it, but am frustrated by a few things (excess non-removable applications such as blockbuster and cityid, and the inability to access the mobile hotspot feature for free), which has led me to want to root my phone. I am a little nervous to do this, for fear that I will brick my phone, but I think its worth it if I can learn to do it right.

I wouldn't say that these types of technological endeavors are my forte, but I can usually figure them out without too much trouble. My phone is running Froyo 2.2, and the computer I'm using is an intel Mac, running OSX Snow Leopard.

I have tried for HOURS to root my phone. I have followed instructions on the xdadevelopers site, watched youtube videos, etc. I have tried not only on my OSX operating system, but on Windows 7 which I have my computer running as well. When I run the first command, always get the response "is a directory." When I run my second command, which is supposed to actually run the script, I get the response "No such file or directory." I am extremely frustrated, and am close to giving up on the entire rooting process. I would LOVE some help, and really hope that one of you geniuses can put me on the right track, and fix my problems.

Keep in mind that while I'm game to try/figure out anything, I do not have a technological mind and need things explained in a way that may seem painfully simple. I would really appreciate your help!
[Droid 2 Android Development] stanleyg:
Also, I forgot to mention:

I have yet to get to see Terminal showing any recognition of having found the device. I'm sure this is part (or all) of the problem, but who knows.
[Droid 2 Android Development] facelessuser:
I would venture to guess you have a set up issue. I will need you to pick a platform that you would like us to troubleshoot; we can't do both windows and mac at the same time. Let me know and we will go from there. Step 1, I want to get your computer to see your phone. Then we will worry about rooting.
[Droid 2 Android Development] stanleyg:
OSX is my primary platform, and I would much prefer to work there. I tried Windows in a desperate attempt to see if the process would go differently. My phone shows up on the desktop with no problem (I didn't forget to debug), but when I open terminal it shows no recognition of the Droid whatsoever.
[Droid 2 Android Development] facelessuser:
Okay on mac. Explain to me what you did to setup adb. Did you download it? Where did you unzip it to? Did you update it?

Also, can you navigate folders via a terminal in Mac?
[Droid 2 Android Development] stanleyg:
This is what I did.

1. Download mac version of the sdk files from the android development page.

2. Download scripts also found on xda development site called DORootforD2Linux.zip

3. I decompressed each of these, and copied all files found on the second link into the tools folder of the androd-sdk-mac file.

Instructions I read repeatedly mentioned updates, but I found nothing to update, so I didn't. I can navigate folders using Terminal, by dragging and dropping folders so that it finds the correct path.

As a side note, I'm having a lot of difficulty posting as it continually forces me to wait another five minutes before posting my reply.
[Droid 2 Android Development] facelessuser:
PM me with your gmail address. I will invite you to talk with me on GTalk.
[Droid 2 Android Development] facelessuser:
Haven't received a PM so I guess you want to do it this way.

Open your sdk tools folder in a terminal and type

./android update sdk
[Droid 2 Android Development] stanleyg:
I'm sorry for the delay. My gmail is gstanley1127, but I'll stay here as well if you'd prefer.

Okay so, this is what I put in:

Grace-Stanleys-MacBook-Pro:~ gracestanley$ /Users/gracestanley/Desktop/android-sdk-mac_x86/tools ./android update sdk

And this is the response:

-bash: /Users/gracestanley/Desktop/android-sdk-mac_x86/tools: is a directory
[Droid 2 Android Development] facelessuser:
Okay. You are not very familiar with command line, this is your first issue. Don't feel bad though, everybody has to learn.

Enter this

cd /Users/gracestanely/Desktop/android-sdk-mac_x86/tools

Then

./android update sdk
[Droid 2 Android Development] stanleyg:
Oh wow. I knew I was new at this, but I didn't think I was so far off! I put it in, and it brought up the "Android SDK and AVD Manager," and seems to be upgrading.

Amazing. It does seem to be taking a few minutes, though.
[Droid 2 Android Development] facelessuser:
You are on your way. Let me know when it is done. I get an email when people post here.
[Droid 2 Android Development] stanleyg:
Okay. It says all packages have finished installing.
[Droid 2 Android Development] facelessuser:
At this point you can close the android sdk manager.

In the same terminal enter

chmod +x doroot.sh

If it goes well, it will respond with nothing.
[Droid 2 Android Development] stanleyg:
It went well, no response.
[Droid 2 Android Development] facelessuser:
Connect your phone and make sure it is in charge only mode.

Then type

./adb devices

It will start the adb server and it should list a funny code representing your phone.
[Droid 2 Android Development] stanleyg:
Response:

* daemon not running. starting it now on port 5037 *

* daemon started successfully *

List of devices attached

015A94580D020004	device
[Droid 2 Android Development] facelessuser:
Good.

Now comes the fun part.

Type

./doroot.sh

Cross your fingers and let me know what happens.
[Droid 2 Android Development] stanleyg:
There it goes. This is really amazing, I so appreciate you walking it through me like this. I'll make sure a donation comes your way within the week, and I'll post again as soon as it finishes.
[Droid 2 Android Development] stanleyg:
I'm full of stupid questions-

adb connection will be reset. restart adb server on desktop and re-login.

As in.... restart droid and plug back in?
[Droid 2 Android Development] facelessuser:
?

Did you type ./doroot.sh ?

This can't be what it said. It should have said much more.
[Droid 2 Android Development] facelessuser:
No. Wait. If it takes longer than 3 minutes at that point then try closing the terminal. Open a new one. cd to the tools folder again and then ./doroot.sh again. If it stalls a long time there again, ill have you try something else.