[Droid Eris Android Development] Captainkrtek:
MAJOR Update 7/13/2010 15:48 PDT

Go to http://xdaforums.com/showthread.php?t=724741 for the newer, confirmed root method

The following method is now outdated

Added optional instructions to flash Amon_RA's recovery image

Removed unnecessary steps (old step 6 and 7) because downloading the SDK folder in Step 2 already contains those files

Added .wav file of Tereg's cadence in the timing step

Added commands to Amon_RA's recovery image step

Added list of reported successes

Step 4 (Re-run SDK Setup) has been eliminated

Added 20th reported success with a new condition to try to test

Added YouTube video of user Dradien doing the count in the timing step

Added note in timing step about how long to wait after you see /!\ before you start the step over

Rearranged steps 2 and 3 since installing the USB driver after downloading Tereg's SDK folder might overwrite the modded .inf file

Added TODO note to at some point include instructions at various steps for other OS's where needed.

Tereg's testing has eliminated some extra steps, removed step 6 (the driver step), removed step 8 (maintaining a clean sd card, booting the phone back up, setting charge only, turning phone off), removed steps going into recovery where card DOES NOT HAVE TO BE IN when booting into FASTBOOT, therefore the timing step going from FASTBOOT to HBOOT has been removed.

Note about RUU OTA = Leak v3

More successes added with the new "60 partition" method explained by user anoek here: (http://xdaforums.com/showpost.php?p=7089301&postcount=970)

Added 2 successes where both did not run loop.bat

Please note this process is experimental at best. While we have reported a number of successes, it has not been consistent and the success rate seems to be very low or non-existent for a number of users. We are doing the best we can to replicate this process in a more reliable way, and to continue testing for easier ways to achieve this.

**TODO**

Clarify/expand steps that need instructions based on user's OS

List of reported successes

If you find other people with reported successes, there are duplicates listed, or specific information needs to be added for an individual's case, please let Tereg or myself know.

1. Dc_striker (http://xdaforums.com/showpost.php?p=6927162&postcount=1)

2. Hairson (http://xdaforums.com/showpost.php?p=6942651&postcount=186)

3. tereg

4. a-wilcoxj (andirc) Also rooted another phone for another XDA member using his SD card

5. lame eris (http://xdaforums.com/showpost.php?p=6974393&postcount=209)

6. kzoodroid (http://xdaforums.com/showpost.php?p=6975283&postcount=225 and http://xdaforums.com/showpost.php?p=6975440&postcount=228) Also rooted another phone for another person using his SD card

7. RKLamb2 (http://xdaforums.com/showthread.php?p=6972493#post6972493)

8. Dradien (http://xdaforums.com/showpost.php?p=6980387&postcount=318 and http://xdaforums.com/showpost.php?p=6980491&postcount=320)

9. graphitedv (http://xdaforums.com/showpost.php?p=6981435&postcount=334 http://xdaforums.com/showpost.php?p=7011890&postcount=598) - Rooted a second phone, rooted using a Mac running 10.5.8 and the 2GB PNY card

10. djblade17 (http://xdaforums.com/showpost.php?p=6981578&postcount=336) - Win 7 64 bit

11. xtreme3737 (http://xdaforums.com/showpost.php?p=6985257&postcount=365)

12. reethewhat (http://xdaforums.com/showpost.php?p=6987179&postcount=389) - Win7 64 bit

13. largerlager (http://xdaforums.com/showpost.php?p=6988950&postcount=399)

14. Austinjs0102 (http://xdaforums.com/showpost.php?p=6989397&postcount=405) - Windows XP SP3, 2GB PNY card

15. HaRdC0r3 (http://xdaforums.com/showpost.php?p=6963059&postcount=457)

16. varkie (androidforums) (http://androidforums.com/htc-droid-eris/109901-how-many-successfully-went-leak-root.html#post1023198) - PNY 2GB National Geographic SD card

17. Pimpshit420 (http://xdaforums.com/showpost.php?p=6990916&postcount=426)

18. rcharris (http://xdaforums.com/showpost.php?p=6991694&postcount=437) -- Rooted using OS X. Originally tried in WinXP, switched to Mac OS X and got it rooted.

19. bpenney1 (http://xdaforums.com/showpost.php?p=6993850&postcount=448) Had PNY card

20. davinci27 (http://xdaforums.com/showpost.php?p=6996272&postcount=468 and http://xdaforums.com/showpost.php?p=6996996&postcount=472)

21. Jdog94, on page 71, used airplane mode.

(http://xdaforums.com/showpost.php?p=7034130&postcount=733)

22. NAA_Silent (androidforums) http://androidforums.com/htc-droid-eris/109865-leak-root-has-been-found-4.html#post1065772 -- "I tried about 30 times on my work machine running XP while using my Polaroid 16 gig card. I was not successful. Last night I tried again on my Win 7 64 laptop using the factory 8 gig card that came with my Eris. After about 5 attempts I hit the jackpot. I left the loop running instead of ctl+c after each attempt."

23. lostpilot28 (http://xdaforums.com/showpost.php?p=7103114&postcount=1009 and http://xdaforums.com/showpost.php?p=7113530&postcount=1038) - "I flashed the 60partitions.img file to my PNY 2GB SD card and did exactly as he said."

24. igot3ballz (http://xdaforums.com/showpost.php?p=7104474&postcount=1013)

25. listyb01 (http://xdaforums.com/showpost.php?p=7106183&postcount=1017)

26. homewmt (http://xdaforums.com/showpost.php?p=7106822&postcount=1019) - Used anoek's dd image of 60 partition sd card

27. szgtr (http://xdaforums.com/showpost.php?p=7122616&postcount=1055) - Used 4GB RiDATA card

28. lil_dez (http://xdaforums.com/showpost.php?p=7142521&postcount=1087) - Did not run loop.bat

29. Nickboxer7 (http://xdaforums.com/showpost.php?p=7143847&postcount=1088) - Did not run loop.bat

NEW thing to test "The last time I got /!\, I left the phone in the /!\ and popped the card out tand then right back in. Still had /!\ on the screen, but suddenly the device showed up in the loop." Also disable wifi, 3g, gps, bluetooth, and enable airplane mode.

Applications

-->Development-->and check the box titled "USB Debugging"

Video Tutorial by ECLIPS3 & Tereg

http://vimeo.com/album/250913

Prerequisites

Here is a dd image of teregs sdcard in a 7zip archive

http://www.multiupload.com/OT7SH4XNBP

1.Get the Java JDK

For the Java JDK go to http://java.sun.com/javase/downloads/index.jsp

Install Java Platform, Standard Edition, JDK 6 Update 20

2. Downloading Android SDK and running SDK_Setup

Go to http://developer.android.com/sdk/index.html and download the sdk for the platform you are using. Extract the folder contained in the .zip file to the C: drive. (In Windows's case, that would be C:\android-sdk-windows\).

Run SDK_Setup.exe from inside the android-sdk-windows folder.

*Note: you may get a prompt saying that it can't download the repository.xml*

To fix that error close the warning box and click on "Settings" on the left hand side and then check the box that says "Force Https://... sources to be fetched using http://"

Go to Available Packages, the list should now be populated, expand the list by clicking the little + next to https://dl-ssl.google.com/...

*Note: it is not necessary to download the SDK Platforms

Check the box marked "USB Driver Package" at the very bottom of the list

Click Install selected on the lower right corner of the window.

Click the Accept All Radio button on the lower right window that was brought up, and then click the Install button on the lower right corner.

To make sure you are on the right track you should now see in the list of installed packages two total packages:

Android SDK Tools, revision 6

USB Driver package, revision 3

3. Overwrite the android-sdk-windows folder with all the files you need

**TODO** (Include instructions for Mac and Linux SDK downloads)

Here you can download Tereg's complete SDK with all the files used http://www.multiupload.com/01Q1UXGLOF

Unzip the folder to C:

In our setup we have extracted the Android SDK to C:\android-sdk-windows

Root Process

Tereg's analysis has shown that RUU OTA = 2.1 Leak v3. If you have Leak v3 on your phone, then you probably do not have to do this step.

4. Flash the RUU OTA Update

Go to: http://shipped-roms.com/shipped/Des...WWE_2.36.605.1_release_signed_with_driver.exe and download the RUU OTA executable.

WARNING: THIS WILL WIPE YOUR PHONE. IF YOU HAVE ROOT YOU WILL LOSE ROOT. BACKUP THE CONTENTS OF YOUR SD CARD AND APPS YOU HAVE INSTALLED BEFORE YOU CONTINUE WITH THIS STEP.

If you need to backup the content of your SD Card, mount your phones SD card as a disk drive, open the drive within My Computer, and copy/paste all folders into a new folder. Copy the contents somewhere safe, we are not responsible for any lost data.

In addition to backing up your SD card, you should find a way to back up your phone (apps, settings, etc) using any method available (like MyBackup or Astro File Manager, etc). You will have a stock, wiped phone when you are finished with this step.

Execute the .exe and go through the wizard process.

5. Make sure USB Debugging is turned on on the phone

From the Home screen, press the Menu button -> Settings. Tap Applications -> Tap Development -> Make sure that USB Debugging is CHECKED.

Open a command prompt by going to Start -> Run. Type cmd in the text box, click OK.

If using Linux, open a terminal prompt and change your working directory to the android SDK tools folder and execute the "adb devices" command.

Execute these commands

cd \

If you don't see

C:\>

then type and execute

c:

Execute the following commands

cd android-sdk-windows
cd tools
adb devices

If you see the following

List of devices attached
HTxxxxxxxxxx device

where xxxxxxxxxx is some alphanumeric value, then you have done this step successfully.

Note: Old Step 6: Updating drivers for devices has been tested as unnecessary

6. Mounting the SD Card as a Disk Drive and formatting

Mount the SD card as a disk drive from within the phone. To do this, drag the notification bar down and tap the Ongoing notification (either Charge Only or HTC Sync) section. Tap the Disk Drive option (Mount as disk drive), and tap Done.

If you don't still have Computer Management open, click the "Start" button on your computer, RIGHT click on "My Computer", click "Manage", then Click "Disk Management" which is under "Storage" on the left pane and you will see all your drives.

Find your SD Card in the lower half of the right-hand pane. If you do not see your SD card, go to the Action menu and select "Refresh". If you bought the SD Card listed here, the size of the partition is 1.83 GB. Right click on this partition, and select "Format...", and click the "Yes" button that you are sure you want to do this.

Make the volume label blank, pick FAT32 as the file system, and select the allocation unit size 4096

DO NOT do a quick format.

Click the format button on the bottom right corner, then click OK to confirm the format.

Let it format, DO NOT eject the card while formatting.

When the format is complete, power off the phone.

Note: Old Step 8: Maintaining a clean SD card has been tested as unnecessary

7. Booting into recovery (the timing step)

.wav file of Tereg doing the count in this step: http://www.multiupload.com/IRL99EH394

NEW: Dradien has uploaded a video doing the count - http://www.youtube.com/watch?v=2bRl2ul7GdA

Note: The SD card does not have to be in. It can be out before you boot into FASTBOOT. Therefore, you do not need to press down on the SD card while in FASTBOOT, press Vol Down, then remove the SD card.

Make sure that the SD card is OUT before you begin this step.

Boot into FASTBOOT mode by pressing and holding the Send+Power buttons.

Go into HBOOT by pressing the Vol Down button.

NOTE: Running the loop is just for convenience purposes. It is not mandatory for this method to work.

Start -> Run -> type cmd in the box, click ok.

In the command prompt type

cd C:\android-sdk-windows\tools

Type

loop

and press enter

Position your right hand over the sd card and the left hand over the Volume Up button. As soon as you press Volume Up, starting counting "1-1000, 2-1000, 3-1000, 4-1000", which in Tereg's case took approximately 2.5-3.5 seconds. As soon as you finish counting, press the SD card into the phone.

Watch the command prompt. If it works it should display

List of devices attached

HTxxxxxxxxxx recovery

over and over again where xxxxxxxxxx is some alphanumeric value

If this succeeded you can stop the loop by pressing Ctrl+C

Important Note: After you see the /!\, you will need to wait for several seconds before you restart this step. You will need to wait for Device Manager to stop flickering before you pull the battery. Wait at least 10-15 seconds after you see the /!\ icon before you start this step over.

If this did not succeed, make sure that Device Manager is not flickering, then pull the battery to turn off the phone. Stop the loop in the command prompt by pressing Ctrl+C, and repeat this step again starting with the phone off.

8. Pushing files in recovery, and getting #

Next on the phone press Volume UP + Power at the same time, which will bring up a menu in Recovery.

Then select "Apply sdcard:update.zip"

THIS STEP WILL FAIL, don't worry, we expect it to.

Once the update has failed we need to go back to our command prompt (the one we stopped the loop in) and type

adb push ota.zip /sdcard/update.zip

and press enter, then type

adb push root.zip /sdcard

and press enter.

After each command, ensure there is no error message after executing the command.

The status for success will be something like

xxx KB/S (x bytes in xxxx.xxxs)

At the next prompt, type this command but DO NOT execute it yet.

adb push update.zip /sdcard

This is another timing step. You will need to scroll down to "Apply sdcard:update.zip", and press the Power button then look for a very faint, dim progress bar near the bottom of the screen. The progress bar will be green.

AS SOON AS YOU LOCATE THIS PROGRESS BAR, you need to execute the command you typed.

If successful you should see the Clockwork Mod Recovery along the top of the phone.

Go to the Partitions menu on your phone by rolling the trackball down and pressing the trackball to select it.

Then select "mount /system" once.

Scroll down to +++++Go Back+++++ and select it.

Scroll and select "Install zip from sd card". Then, scroll and select "Choose zip from sdcard", then scroll and select "root.zip"

Once this is done, select Reboot System from the menu, and let it boot normally.

After the phone comes back up to Sense UI, in the command prompt execute this command

adb install Superuser.apk

Again, you should see something like:

xxx KB/s (x bytes in xxx.xxxs)
pkg: /data/local/tmp/Superuser.apk
Success

underneath the command where x is some number

Once this step is done, make sure the phone is unlocked, awake and not asleep.

Type

adb shell

then type

su

You will get a prompt on the phone from superuser asking for permission. Allow this.

the $ symbol will change to #, which indicates you have root.

[Optional] Step 11. Flashing Amon_RA's recovery image

This step is optional. Follow these steps if you would like to flash Amon_RA's recovery image after you have achieved a root prompt.

Open the command prompt and change your working directory to C:\android-sdk-windows\tools exactly as you did in Step 12.

Execute these commands (Note: When you see $ or #, that does NOT mean you type $ or # respectively in the command. It means that is the prompt you should see at the time you are executing these commands.

If you extracted the android-sdk-tools folder in Step 3, you have all the files you need for this step.

adb shell

$ su
#mount -o rw,remount /dev/block/mtdblock3 /system
# exit
$ exit

adb push recovery.img /sdcard
adb push flash_image /data/local

adb shell

$ su
# chmod 755 /data/local/flash_image
# /data/local/flash_image recovery /sdcard/recovery.img
# reboot recovery

If you do these commands, you should be able to see Amon_RA's recovery.

At the bottom of the screen it should say "Build: RA-eris-v1.6.2", and you should have the following menu options.

- Reboot system now
- USB-MS toggle
- Backup/Restore
- Flash zip from sdcard
- Wipe
- Partition sdcard
- Other
- Power off

Note: If you are getting Permission Denied errors while doing any of these steps and you still have Clockwork's Recovery partition installed, user Dradien has reported success with the "Fix Permissions" function within Clockwork's Recovery main menu. Dradien reported that that function took about 5 minutes and afterwards was able to flash Amon_RA's recovery image.

Afterward

One thing to note, there is a step we did not do that Slide Root method did which is install a full root.zip that allows you complete root access when you execute an "adb shell ..." command.

i.e. if you run adb shell as the following example command prompt

C:\>adb shell

you will see a $ prompt, not a # prompt.

Therefore, any commands you are executing (at least for the moment) that require root access (like to flash Amon RA's recovery for instance):

adb shell mount -o rw,remount /dev/block/mtdblock3 /system

you will need to do this in the following manner

adb shell

$su

#mount -o rw,remount /dev/block/mtdblock3 /system

So, if you are getting permission denied errors from a regular command prompt while executing commands (adb shell mount..., adb flash_image..., etc) that require root access, you will most likely need to drop into shell manually, su into root, then cut off the first part of the command, put the rest of the command into the prompt and execute it.

Example:

adb shell mount -o rw,remount /dev/block/mtdblock3 /system

becomes

mount -o rw,remount /dev/block/mtdblock3 /system

Look at other tutorials on how to flash roms, if you have any questions pm me (Captainkrtek) or join us on irc.andirc.net #droideris & #leakroot and ask for any of the opers or Tereg for help.

Below are pictures and tools Tereg used, and how he oriented the phone and positioned his hands and screwdriver over the Vol Down/Vol Up buttons with left hand and over the SD card with the right hand during the SD card timing steps.