Droid X Recovery (and Droid 2 too!)



Well, this was a bitch.

Caveats:
This is not a *real* recovery. The way this recovery works is by hijacking portions of your boot process during system initialization and starting into recovery instead. So, if you hose your system *COMPLETELY* you will need to SBF. Specifically, if your logwrapper, logwrapper.bin, or hijack binary are missing from /system/bin, you will be screwed.

Do I have to be rooted to run this?
Yes.

So can we now install custom ROMs?
Yes, but you can't replace the kernel or boot image. But really, once you have access to /system, anything is possible. It will just take a little hackery.

How does this work?
When your device boots up, there is a init.rc script in your boot image that runs various components found in /system. The Droid X recovery bootstrap mimics the "logwrapper" binary. The hijacker then looks for "/data/.recovery_mode", and if it finds it, it unmounts /system to prevent android from starting. It then starts up recovery instead.

How do I boot into recovery?
You can manually create the /data/.recovery_mode via a terminal file and simply reboot, and you will be in recovery. Or you can use the handy Droid X Recovery Bootstrap application to reboot into recovery.

What if my phone won't boot? How do I get into recovery without the app?
When the hijacker runs, it will automatically create the "/data/.recovery_mode" file after it finishes. This tells the system that the next time it boots, it should boot into recovery. But, when the system starts, the Droid X Recovery Bootstrap will then delete that file when Android is fully started, to prevent you from booting into recovery. So what does this mean? If you fail to boot, simply pull your battery, and your next boot will be into recovery (unless your /system is *really* hosed, in which case you need to SBF).

How do I fix my phone if I really mess it up?
Use an SBF. Google it. http://twitter.com/b16a2smith/status/21544626803

Why does the Droid X Recovery Bootstrap start on boot?
As mentioned above, it needs to log that your phone booted successfully and recovery mode is not necessary. It also replaces your "adb daemon" with one that has root permissions, allowing for easier usage of the adb command.

Will this work with ROM Manager?
Yep! But you must run the Bootstrap app and leave it installed.

Is this open source?
Yep.
Recovery: http://github.com/koush/android_bootable_recovery
Droid X Bootstrap: http://github.com/koush/DroidXBootstrap
Droid X Hijack: http://github.com/koush/android_vendor_motorola_droidx

OK STOP TALKING, WHERE DO I GET IT?
You can donate and grab it for $2 off the Android Market (search for Droid X Recovery Bootstrap or Droid 2 Recovery Bootstrap), or you can download it for free here:
Droid X Recovery Bootstrap
Droid 2 Recovery Bootstrap

125 comments:

Michael said...

Definitely going to buy it in the Market to support your efforts. Thanks a million for your work.

getaproxy said...

How do i click enter? i can do up and down with volume but no enter.

deodexed said...

THis is amazing work, thank you so much! We will make sure to donate!

Zac said...

This is great! the one thing my old Droid had on my X is no more!!!

Koush said...

Use the camera button to click.

Anonymous said...

Thank you.

Zack said...

what can we do with it now

Nic said...

Just purchased in market to support your efforts.

Anonymous said...

Do we need to be rooted to run this?

john said...

Hey thanks i will always support you, u did a great job and i never new u are from the same time as i am.

Anonymous said...

Nice work koush. Don't have an X, but this is great for all the X owners.

Wicked Beav said...

So my question is that after we flash our rom, can we delete whatever necessary files so everytime we reboot it doesn't go into recovery.

mark said...

just snagged it off the market, great work! i can taste the froyo...

Robert said...

Of course you have to be root to run this. Please read his entire post before you start asking questions.

Very nice work Koush! I will be sure to donate to support the cause.

Zack said...
This comment has been removed by the author.
Tim said...

So what next after download...do i hit bootstrap recovery or boot recovery??? New to all this...thanks...

barkleyfan said...

Dammit koush, now I got no reason not to buy a X. Does it look like you might be able to access kernel soon? I wanna know what the chip can really do.

Anonymous said...

WOW! Did you have any help on this or is?

Anonymous said...

Wow did you have any help on this is did you go at this alone?

Anonymous said...

so a zip rom will flash fine? i dont get my X til next week, hopefully a rom or 2 will be built by then :)

Zack said...

Can someone please walk me through this whole custom recovery/rom thing I'm kinda new to this (first android) everything works just don't know what to do with it

Daniel said...

Can someone send me a step by step giggle on how to so this? Dpureco53@gmail.com
Thanks.

Anonymous said...

Props to you as well as the folks at Alldroid who secured the Dev Phone. I know that RAina nd Bird deserve some credit for all of these developments.....

JB said...

What is the difference between bootstrap recovery and reboot recovery?

fox said...

run bootstrap recover then reboot recovery

Colin said...

To those looking for instructions after install. Click bootstrap then reboot recovery. Tada!

Once in there use volume keys to move up and down and camera to select. Select backup/restore first! Then backup. Not much else to do just yet.

E said...

thank you the droid x is on its way thanks to your hard work.

JB said...

do you have to run bootstrap everytime before you reboot recovery or just the first time?

P1X3L said...

Hey that's a sweet logo! ;)

Anonymous said...

Thanks koush, I will gladly part with $2.00 for this.

Anonymous said...

Thanx loads!!! As soon as my new x gets here and the constant reboots vanish i will donate to your efforts!

Hetal Patel said...

Koush Rocks ...............

Anonymous said...

when can we lose blur

garciamess said...

Quite simply AWESOME WORK! Just tested it and it worked flawlessly. I will be purchasing from the market as soon as I have money to spend in my account. Thanks Koush!

Anonymous said...

Stupendous efforts!

I just got into the program and performed a backup successfully.

So, can we load vanilla froyo with this by just putting the stock update.zip on our sdcard, and loading it through the Clockwork recovery?

Simon said...

Sorry if this is a stupid question, but which custom roms? cyanogen?

Anonymous said...

Koush does it again...awesome work! Well worth the$2 on the market!

Darkuni said...

Installed successfully! I went ahead and did a Backup - without problems.

Now, to wait for the custom roms to start dropping. God knows we'll get Froyo from the community LONG before Moto/Verizon gets it to us.

Ljbaumer said...

this is awesome for all droid x owners great work!

will you be doing something similar to this for the droid 2?

andy said...

pakeha says "great work mate. keep it up. purchased in market, and looking forward to the froyo upgrades now."

Anonymous said...

Koush is most definitely a plagiarizing douche! Congrats on that nice busybox binary you got goin. You're truly an integrable developer!

Anonymous said...

someone make a youtube video of a custom rom running on their x

Ixobelle said...

less than three.

Jeff said...

Freakin' awesome! Is there a support forum? I'm getting reboots when I plug in USB.

jerkface said...

Thanks! My Droid X just got a 1836 quadrant score!

Twelve V said...

You F'n rock bro. Best two bucks I ever spent. Thanks for all the hard work it's much appreciated.

Anonymous said...

How can I completely "remove" Droid X Recovery Bootstrap?

Riahon said...

Does the newest version of DXR work with OS 2.2?

Travis said...

Gladly paid $2 for this. Thx for everything man. Keep up the good work.

Anonymous said...

Does this work with the DROID X 2.2 Leak? I have root.

yfital said...

Any chance for a look in the Milestone?
we got the same prob :)

Anonymous said...

So I installed 2.2 just fine, bootsrap worked wonderfully despite the fact I could've just used the standard recovery. But now I've downloaded biedmana new custom rom for the x and I found out that it wont boot iinto recovery, help would be much appreciated

Brandon said...

Thx Great work

Juan said...

Bought to support. Thanks for your hard work

Bill said...

I can't get the recovery to boot (manually, through bootstrap, or the ROM manager).... DX, rooted 2.1, su applied

Jay said...

Koush,

I completly screwed my phone up trying to install a custom Rom.... it won't even boot. I get the motorola screen and it stops. I can't even get my computer to recognize it... Any ideas?? my guess is a new phone is on it's way.

Jay said...

Jay,

Sounds like your install is horked... no worries though! Just get yourself RSDLite and the stock SBF file. Search it. It's easy to do... done it twice today because I have been tinkering around in the /system folder.

Goose said...

help! I tried to install the latest leaked version of 2.2 but instead got stuck at the M logo. Did sbf on phone and lost root(obviously) and now I can't access the bootloader to install the backup off of the sd card. I've tried to root using the "easy root" method but have been unsuccessful. what do i do now?

Norman said...

Goose: I used the first link to root my phone (I had to put my phone in charge only not pc mode to get it to work) and then purchased the app and then used the last link to update my phone:

http://forum.xda-developers.com/showthread.php?t=764950

http://androidcommunity.com/download-droid-x-2-2-13-froyo-upgrade-for-rooted-users-for-now-20100912/

Anonymous said...

Does anyone know how the Official Froyo 2.2 will effect this recovery application? I'm very concerned. I know I will loose root. Should I uninstall bootstrap?

Doc said...

Is there an "official uninstall" for this app? Im having problems with the new update (as it it wont install) and I would prefer to start from scratch. I download "The Gift" but I don't know what to do with it. Any help would be appreciated.

Mai said...

I used these instructions to get my Droid X ready for the OTA Froyo update:


http://androidforums.com/droid-x-all-things-root/155618-easy-way-remove-koushs-recovery.html#post1425130

UNINSTALL the Recovery APK (Droid X Bootstrapper) in Settings, Applications->manage applications
Reboot
Run "adb shell"
Run "su"
Run "mount -o remount,rw /dev/block/mmcblk1p21 /system"
Run "cp /system/bin/logwrapper.bin /system/bin/logwrapper"
Reboot

Thursday O'Connor said...

-HEY!!!!- Don't mean to be so loud and obstreperous in the comments, but I know that the Devour would require a similar method to the Droid X method. Is there a way to modify your source, to get it to work for the Devour?

Anonymous said...

I’m trying to install this on my HTC Magic 32A (firmware 1.5) with no luck. I get the message in the installer: “Droid 2 Bootstrapper could not be installed on this phone.” I’ve copied the .apk file to the root of my SD card and tried running it with both Astro & Linda file manager with same results.

Any advice or suggestions???

David

Anonymous said...

David this is for Motorola Droid x and the droid 2, look at the title of the page. This will not work on HTC devices. LOL

Anonymous said...

You sir are just great. Thanks much

brycevolk said...

I hit the Deny button by mistake. Since the "save my settings" button was checked by default, I am not able to run the Bootstraper. What do I need to do to reset the saved preference? I tried uninstalling/reinstalling the app, but that didn't work. A reboot didn't work either. Thanks.

Anonymous said...

Super user app, remove the remembered app permission. Easy, eh?

John Doe said...

do the uninstall steps a few posts above still apply to those of us on 2.2 ?

Justen said...
This comment has been removed by the author.
Anonymous said...

Just an FYI...for those of you who may be having a problem with this bootstrap, there is a great instruction on thread #4 from this forum. http://alldroid.org/Default.aspx?tabid=40&g=posts&m=9797&#post9797

Grazie Mille Koush, just dl'd the program from the market and made my donation, it's beautiful simplicity!

Anonymous said...

Hey I need some help with my devour. Need to create a back up and am trying to get the full potential out of the 12 minutes I wasted rooting it. Heard that with figuring out the droid x solving how to create custom roms for the devour should be a breeze...what do you think?

Rique said...

I downloaded the zip file from the open source link. But when I open it in my droid, it just opens up the file folders rather than launching the installation wizard. What am I doing wrong?

1barlog17 said...

I bought your app and it works great thanks for all your hard work you do for the Android community. My question is how do I get my DX to reboot like stock when I unroot? I unrooted and uninstalled all my rooted apps but every time I restart my phone it goes into the clockwork recovery menu to restart my phone? I need to go into Verizon and I don't want them to know I rooted. Thanks again for all that you do and any help you could offer would be great.

Jamaul M said...

Has this been answered? Can I put a droid x on the sprint network?

Jared said...

Man, I bought it in the market... and love that this is even available. :) Thanks for all your efforts on the android platform. :)

bubbasixx said...

My Bootstrap will no longer load the bootstrap recovery, hence it will no longer load the reboot recovery. I am trying to get the newest ota update installed on my x but now I cannot get into the recovery to do so. When I try bootstrap recovery I get an error "Error running exec(). Command: [su, -c ./data/data/com.koushdutta.droidx.bootstrap/files/surunner.sh] working directory: null environment: null.

I had been in 2.3.320 and have reflashed it a couple times via RSDLite to try to get a clean version.

All I want now is to get a clean stock version of 2.3.340 and start all over.

Email me if you come up with anything for your bootstrapper.

thanks

Mike
bubbasixx@aol.com

JoeInMO said...

I installed this today on my X and since then I've been getting random reboots. Never had this problem before.

Any suggestions other than remove bootstrap recovery?

bubbleflubber said...

Hey man, great great job. Has done everything for me that I could have wanted. Always bought your apps to continue supporting your efforts. You are such a great credit to the community.

ÇÐ-®ÔM said...

will it be a possibility that you might develop a boot strap for the Milestone XT720? All the xt720 owners are feeling neglected as moto just announced "no more development after éclair 2.1". the bootstrap would mean a lot. open revovery is nice but not rom manager.. happy holidays

Anonymous said...

At the end of my Bootstrap Reboot Recovery Backup I get the following message: "No sd-ext found. Skipping backup of sd-ext Generating md5 sum...
Backup complete"
Is my backup complete or is this missing file going to mess me up if I recover with it later? Thanks, Fred

Anonymous said...

Just bought it off the Market. Thank you so much for doing this!

Bees said...

Has this been updated for Obsidian on Droid X? Just curious... thanks

Anonymous said...

I just got an X and have a problem with google checkout in which i cannot buy any paid app.. once i order them it gets stuck on the authorizing process. I made an attempt at buying your app and was unsuccessful many times, I would love to pay for this but it wont let me ... so i came here and downloaded the apk file and tried using astro file manager to install it and it wont show in my sdcard... any idea why? I NEED HELP!!!!!!!

Anonymous said...

Just wondering why the text on the free download link claims to be an APK file when there is no APK file in the download. Does this need to be compiled somehow? Why not just post the actual APK file? To uncool?

mike said...

How do i put it on my phone from here? i tried to buy the paid version from my phone but its been saying "authorizing purchase" for the past 6 hours...

MaPMaKaR said...

Ok what do I do with the .zip file? Can I use ROM Manager to install the .zip?

MaPMaKaR said...

Ok what do I do with the .zip file? Can I use ROM Manager to install the .zip?

Charles said...
This comment has been removed by the author.
Charles said...

Getting "404 Not Found" error when trying to download either Bootstrapper. Already purchased the D2 version from the market. Hoping to switch to the DX soon and wanted to download the DX version.

Anonymous said...

When clicking on the free link for Droid X , tells me web page can't be found. Is there a alternate website? Thanks.

Anonymous said...

anyone else getting a 404 when using the droidx link?

Anonymous said...

both links are broken

Anonymous said...

Will the links be fixed soon?

DoctorCool said...

I downloaded Droid X Recovery Bootstrap from the Android Market last night. It appears to have worked for me. I was following instruction from, http://www.droidxforums.com/forum/droid-x-hacking-guides/12081-rooolers-guide-root-unroot-backup-rom-sbf-overclock.html

Kevin said...

How do I get rid of bootstrap, terminal emulated and superusar, I've tried doing a hard reset on the phone, also I did the sbf method but it still comes up

Anonymous said...

How do I remove this program???

mario said...

can we possibly look forward to the possibility of using CM on our droid X?

Anonymous said...

Sorry, links dead.

Jacob said...

So I bought the bootstrap for droid2 and am rooted. I hit Bootstrap Recovery and it pops up with a window that says successful. But then when I hit reboot recovery nothing happens. What should I do, I'm trying to load a new theme.

Jacob said...

Never mind, I found out I had my permissions wrong for the su file in /system/bin. I originally had them set to 4755 but it needs to be 6755. Problem solved.

Paul said...

I installed custom Rom TRANQUILITY, and now i cant seem to get it out.. I liked Liberty better, but bootstarpper wont load anymore.. my DroidX freezes at boot logo screen.. if i take the battery out and start without the intention of going into recovery, it loads tranquility just fine.

WHAT CAN I DO!?

Bill said...

I purchased the app through the market, I'm very concerned that this card got hacked please contact me.

Anonymous said...

Bill there is retarded

Anonymous said...

I have no credit card and I would like to download this? Can't find it anywhere else... the search is on.

Anonymous said...

http://www.jfgit.com/droid+recovery+bootstrap+download/

Anonymous said...

WWW.THEIDOCTOR.ORG

Joe said...

purchased. excellent work!

Nathan said...

The link to DROID X or DROID 2 recovery is broken

Anonymous said...

what if i dont have a droid all ihave is the iphone 4 can i still use this

Anthony said...

Download links not working for me, would love to donate thru market but don't have credit card on account as of now.

Anonymous said...

Already donated to get the DX version. Now need D2 version for the GB rooted update. But the links don't work. Please provide new links.

Anonymous said...

I already paid for the DX bootstrap and I need the D2 bootstrap for GB leak but the link is broken. Any update?

Anonymous said...

link to mirror is dead

Nick Vaidyanathan said...

Is there a way to build from source using ant? the link is dead, and I'd rather not use the Eclipse plugin

Drcoma said...

I'm hosting a mirror of the application - found it kicking around on my SD card. Dunno how long it'll be there, but I figured some availability is better than none.

http://thedrcoma.com/Files/droidx.bootstrap.apk

Nothing malicious please.

Anonymous said...

Thanks for you great work but the downloads are down :( are there any mirrors???

Michael said...

Just purchased the app from the Marketplace but cant find the ROM anywhere?

Cliff said...

Can someone please explain what each of the options under restore do?

Anonymous said...

Check this thread for the apk. You need to register to download.

http://forum.xda-developers.com/showthread.php?t=940986

Austin G. Smith said...

used this awesome app purchased from the market for gingerbread update- however now that I am on gingerbread, it doesnt seem to work?!?!

Anonymous said...

[quote]What if my phone won't boot? How do I get into recovery without the app?
When the hijacker runs, it will automatically create the "/data/.recovery_mode" file after it finishes. This tells the system that the next time it boots, it should boot into recovery. But, when the system starts, the Droid X Recovery Bootstrap will then delete that file when Android is fully started, to prevent you from booting into recovery. So what does this mean? If you fail to boot, simply pull your battery, and your next boot will be into recovery (unless your /system is *really* hosed, in which case you need to SBF).[/quote]
Now that i'm using the D2 bootstrap on my DX running .596, pulling the battery does NOT cause the phone to boot into recovery. I have tried from a fresh .340 sbf followed by p3droid's 2-part .596 upgrade. Kinda sucks if i bootloop on .596 to have to start all over from .340; Any suggestions?
BTW i did buy the DX bootstrap app originally :)

Crystal C In The 813 said...

would this work on samsung galaxy? its froyo.ee14 rooted, version 2.2.2

James said...

Bought the Droid X Version from the market, but learned that I needed the D2 version for gingerbread on the droid X. I appreciate you providing them for free, downloaded the D2 version to replace my obsolete DX Version. Thank You.

Alan said...

Not happy. I *purchased* the drod x version only to find out reading the comment above that I should have bought the D2 version for GB but it doesn't say that on the dx market page. Then I purchased the D2 version only to find out it won't let me download it to my phone because it's a DX, not a D2. Even worse, I can't refund the purchase because you can only do that from the phone.