[Click Android Development] Coburn64:
To be honest, I'm a nice guy, but when threads get filled with utter "OMG, How do I root?" posts, I get pissed off. I don't mean to backseat moderate or anything, I just really get fed up sometimes. Hence, I've broken out the hardcore side of myself, and I present:

Coburn's (mostly) failproof rootmeplz kthxbai tutorial, featuring the awesome m7 exploit.

YOU CANNOT USE THIS ROOT GUIDE TO INSTALL ANDROID 2.0.x/2.1/2.x AT THIS MOMENT IN TIME. PLEASE DO NOT ASK IF YOU CAN INSTALL ANDROID 2.x USING ROOT, AT THIS STAGE IT'S A BIG FAT NO! THANK YOU FOR YOUR ATTENTION!!

Alright.

Easy to understand, plain english guide

Download the ZIP file attached to this post. Extract the files to a safe location - perhaps C:\Tattoo ?

Now, you'll need adb for windows. You can get it from my website's server here: ADB for windows.

Make sure your device is in USB Debug Mode (Settings > Applications > Development). This is ESSENTIAL! ;)

Extract all the files in the adb4win zip file to your C:\Tattoo folder.

Now, go to Command Prompt. In XP, it's under System Tools in Accessories. In Vista/7, it'll be under accessories.

Do the following at the command line:

C:\Users\Coburn> cd C:\Tattoo

This will change your working directory from C:\Users\Coburn (or silimar) to C:\Tattoo .

Now, at the command line, do this:

C:\Tattoo> adb-windows shell "mkdir /data/local/bin" (with the quotes!).

This makes a directory on the Tattoo under /data/local, called bin. If you get a error (like mkdir failed, file/folder exists), this is fine! Don't sweat it.

Now, run this command:

C:\Tattoo> adb-windows push m7 /data/local/bin/m7

...and wait until finish.

Run this:

C:\Tattoo> adb-windows shell "cd /data/local/bin && chmod 755 ./m7" (with the quotes!)

This allows you to run the sucker.

Now, the fun part. Run this:

C:\Tattoo> adb-windows shell

This will dump you at a "$" shell. do the following:

C:\Tattoo> adb-windows shell

$ cd /data/local/bin

$ while ./m7 ; do : ; done

...lotsa text will flow down your screen. This is normal. Sometimes the exploit causes adb to freeze up, I don't know. I think it may be due to the exploit. It worked on my mac fine though...

Soon, you'll be greeted with this:

#

This is the root prompt! If you get stuff like this:

# usage: reboot ...

usage: reboot ....

usage: reboot ...

Just keep your cool, press enter and the # will say "Boo" again. This is due the exploit spawning reboots to gain the shell.

Then, do these commands from this thread's first post:

When you get this:

C:\Tattoo> adb-windows shell

$ cd /data/local/bin

$ while ./m7 ; do : ; done

[... lotsa pasta ...]

#

You can do anything then! Look at /system, /data, etc etc. You're broken free, my friend, and you'll forever be free. Until you press that exit button. you didn't. You didn't press that exit button? lolwut u did? Grrrrrrr!!! :mad:

EDIT: Added Guide to remount partitions. It's below.

Now you need to install su. Exit your root shell (via CTRL+C) (NO, Coburn, are you serious? ME LOSE ROOT SHELL?! :mad: :mad:) and download this su.zip and extract it to C:\Tattoo. DO NOT EXIT THE COMMAND PROMPT WINDOW.

Meanwhile, back at the ranch, in your command prompt window, do this:

C:\Tattoo> adb-windows push su /data/local/bin/su

Then break out a shell...

C:\Tattoo> adb-windows shell

at the $ prompt, enter:

$ chmod 755 /data/local/bin/su

$ cd /data/local/bin/

..run the exploit again via "while 'true' ; do ./m7 ; done" to get root again then enter ...

# chown root.root /data/local/bin/su

# chmod 4755 /data/local/bin/su

# mount -o rw,remount /dev/block/mtdblock5 /data

# mount -o rw,remount /dev/block/mtdblock3 /system (This line allows you to play around with files on the system partition!)

After that, you can exit out of the root shell, and try a normal shell and this:

$ /data/local/bin/su

...which should make you get a nice # prompt. (Sometimes it doesn't, for me it got su: permission denied, wtf?)

(End SU Part of guide)

Tested on Windows 7. Also works on a phone terminal emulator too! :D

Keep your cool peeps - I do this for fun, I'm not a fulltime android dev. I am an addict though.

Happy rootin my friends.

Cheers,

Tattoo Hacker Coburn.

Greets fly out to the geeks that hacked it originally - without you, I'd have got a nexus one. :p

Thanks for marsdroid for correcting an error. Kudos to you, bro! :)

"ANDROID - It's a virus. In a Good Way. Once it's in your system, you can't get rid of it."