# BionicRestorer for Linux/Mac Users



## crpeck (Sep 24, 2011)

For Mac and Linux people - it's BionicRestorer v1.0
A way to flashboot restore your Bionic to 5.5.893

I'm finished with the new MotoRooter for Mac/Linux - naming it BionicRestorer because it's completely different. Right now it's in my Dropbox Folder, still no where to put it - lol.

Here's the link to BionicRestorer.zip
(Note - the originally posted BionicRestorer.zip had a minor bug, it was updated on 2/9/2012)

Download it, unzip it, cd into the BionicRestorer directory and type ./BionicRestorer.sh to run it. Mac folks can double click on the Mac-BionicRestorer.command file in that directory.

Linux People - this is solid, I've run it on LinuxMint (Ubuntu) and Scientific Linux (Redhat) and it worked everytime without a glitch.

Mac People - This is tempermental on the Mac, I've tried it on 3 different Mac's and it worked sporadically on a Macbook Air running 10.7.2, didn't work on the iMac at all running 10.7.2, and worked consistently on a Macbook running 10.6.8. Use at your OWN RISK!!!! If it hangs, all I can is - try it again, or, run Linux, or, use RSDlite on Windows.

Option 3 (restore system, boot, recovery seems to work well on a Mac, but, NOTE that these files are from v5.5.893! If you select option 3 you had better have flashed or updated to that version previously, or, it will most likely bootloop when it finishes.

*Note* - This does NOT contain the actual files needed for flashing,
just the brains to flash them. You will need to download the zipfile
VRZ_XT875_5.5.893.XT875.Verizon.en.US_CFC_01.xml.zip from
http://rootzwiki.com...893-fxz-leaked/
then unzip it into the BionicRestorer directory.
Once it is extracted there should be a directory named:
VRZ_XT875_5.5.893.XT875.Verizon.en.US_CFC_01.xml
which contains all the files needed to do a flash restore.

And the menu looks like this:

* BionicRestorer.sh (1.0) by crpeck *

1. Restore a Bionic to 5.5.893 - NOT FOR 5.9.901 BIONICS!
-restores EVERYTHING to official 5.5.893
-wipes data

2. Restore a 5.9.901 Bionic to 5.5.893
-restores EVERYTHING EXCEPT for the cdt.bin to 5.5.893
-cdt.bin is restored using the 5.9.901 file
-wipes data
** YOU SHOULD ONLY USE THIS IF YOU ARE OR HAVE BEEN ON 5.9.901 **

3. Minimal Restore of system, boot, and recovery only
-restores ONLY the system,boot and recovery to official 5.5.893,

4. Root and ForeverRoot a non-rooted Bionic
-roots and installs the ForeverRoot hack

5. Copy 5.9.901 update file to sdcard
-this copies the unoffical 5.9.901 update file to your sdcard
chances are, your Bionic will bug you to do an update when it see's it
there, you can usually force it via the 'Check for Updates' screen.

6. Verify MD5sums of the flash image files (you should do this at least once)

7. Help - More detailed Information

q. Quit

*NOTE: Selections 1-3 do NOT root the phone! Run 4 after running them. *

By Your Command (1-7,q): 

I took the .xml file from the VRZ_XT875_5.5.893.XT875.Verizon.en.US_CFC_01.xml.zip and re-wrote it into shell scripts (I also took out the piece in there that erases the internal sdcard - who wants to lose that - lol). There is a considerably amount of error-checking as well, but, I'm sure I missed something (which will result in v 1.1).

I encourage you to look through the scripts, feel free to modify and make it better! This may be the last release of this from me, as work is replacing my Bionic with a gnex in the near future - gonna miss the Bionic, it's been a fun learning tool.

Enjoy....

Oh - look at the 00_README_1ST.txt file - it's similar to this writeup, and, select the help option for more detailed information.


----------



## frostincredible (Jun 9, 2011)

Worked flawlessly on Ubuntu. Thank you!


----------



## Stelv (Dec 12, 2011)

Thank you. I always appreciate mac methods. This will come in handy.

Sent from my DROID BIONIC using Tapatalk


----------



## LDubs (Nov 8, 2011)

Thanks bro. This got me out of a jam.


----------



## CantMesWitDis (Jan 4, 2012)

So started to run this then backed out because once you choose 2, it talks about enter your password.... are you referring to your computer's password?


----------



## crpeck (Sep 24, 2011)

CantMesWitDis said:


> So started to run this then backed out because once you choose 2, it talks about enter your password.... are you referring to your computer's password?


It's wants your password on the computer you are running it on. It has to run with 'root' privileges on you Mac or Linux computer.


----------



## CantMesWitDis (Jan 4, 2012)

Thanks, that's what I figured, but just wanted to make sure....so ran it on a MACbook OS 10.6.8. It's hanging at ...

Here we go, I don't stop on errors, once it starts there is no stopping
Running: /Users/Desktop/Droid/BionicRestorer/bin/moto-fastboot32.Darwin reboot-bootloader
rebooting into bootloader... OKAY [ 0.006s]
Running: /Users/Desktop/Droid/BionicRestorer/bin/moto-fastboot32.Darwin flash mbm allow-mbmloader-flashing-mbm.bin
< waiting for device >
sending 'mbm' (256 KB)... OKAY [ 0.019s]
writing 'mbm'... OKAY [ 0.486s]
Running: /Users/Desktop/Droid/BionicRestorer/bin/moto-fastboot32.Darwin reboot-bootloader
rebooting into bootloader... OKAY [ 0.006s]
Running: /Users/Desktop/Droid/BionicRestorer/bin/moto-fastboot32.Darwin flash mbmloader mbmloader.bin
< waiting for device >
sending 'mbmloader' (40 KB)...


----------



## LDubs (Nov 8, 2011)

How long has it been sitting on that step? That is a small file, shouldn't take that long. If it hangs for a while, you can hit CTRL-C to kill it and then restart it. As Crpeck said it's a little bit flaky on Mac. Also, reboot your Mac before starting again.


----------



## CantMesWitDis (Jan 4, 2012)

Yeah, a small file so it shouldn't take long at all....but it was sitting for 10 minutes. Gonna go the restart method and retry. If I'm running 901 can I do option 3 since Crpeck said that's the only stable option on Mac???


----------



## LDubs (Nov 8, 2011)

Were you on 901? If so Im not sure option 3 will work.

Tapatalked from my Bionic


----------



## CantMesWitDis (Jan 4, 2012)

Yeah I was on 901 leak. So I've gone through and done multiple restarts, etc, running and it always hangs in one spot or another. If it hung in a reboot bootloader, I would just manually do it and it would skip to the next step. I now got it to go through everything and reboot. As long as the radio.img was executed, I should be back on 893. We'll see if it boots or not. If it does, I'll probably rerun the scripts and choose option 3 to get a clean install (as I had to force skip erasing cache, erasing userdata, sending ebr, ...well here's the full code.

Here we go, I don't stop on errors, once it starts there is no stopping
Running: /Users/Bradshaw/Desktop/Droid/BionicRestorer/bin/moto-fastboot32.Darwin reboot-bootloader
rebooting into bootloader... OKAY [ 0.006s]
Running: /Users/Bradshaw/Desktop/Droid/BionicRestorer/bin/moto-fastboot32.Darwin flash mbm allow-mbmloader-flashing-mbm.bin
< waiting for device >
sending 'mbm' (256 KB)... OKAY [ 0.019s]
writing 'mbm'... OKAY [ 0.453s]
Running: /Users/Bradshaw/Desktop/Droid/BionicRestorer/bin/moto-fastboot32.Darwin reboot-bootloader
rebooting into bootloader... OKAY [ 0.006s]
Running: /Users/Bradshaw/Desktop/Droid/BionicRestorer/bin/moto-fastboot32.Darwin flash mbmloader mbmloader.bin
< waiting for device >
sending 'mbmloader' (40 KB)... OKAY [ 0.008s]
writing 'mbmloader'... OKAY [ 0.297s]
Running: /Users/Bradshaw/Desktop/Droid/BionicRestorer/bin/moto-fastboot32.Darwin flash mbm mbm.bin
sending 'mbm' (256 KB)... OKAY [ 0.020s]
writing 'mbm'... OKAY [ 0.447s]
Running: /Users/Bradshaw/Desktop/Droid/BionicRestorer/bin/moto-fastboot32.Darwin reboot-bootloader
rebooting into bootloader... ERROR: usb_read failed with status e00002ed
FAILED (status read failed (No such file or directory))
Restoring cdt.bin from 5.9.901
< waiting for device >
sending 'cdt.bin' (16 KB)... OKAY [ 0.007s]
writing 'cdt.bin'... OKAY [ 0.560s]
Running: /Users/Bradshaw/Desktop/Droid/BionicRestorer/bin/moto-fastboot32.Darwin erase cache
erasing 'cache'... ERROR: usb_read failed with status e00002ed
FAILED (status read failed (No such file or directory))
Running: /Users/Bradshaw/Desktop/Droid/BionicRestorer/bin/moto-fastboot32.Darwin erase userdata
< waiting for device >
erasing 'userdata'... ERROR: usb_read failed with status e00002ed
FAILED (status read failed (Operation timed out))
Running: /Users/Bradshaw/Desktop/Droid/BionicRestorer/bin/moto-fastboot32.Darwin flash lbl lbl
< waiting for device >
sending 'lbl' (16 KB)... OKAY [ 0.007s]
writing 'lbl'... OKAY [ 0.446s]
Running: /Users/Bradshaw/Desktop/Droid/BionicRestorer/bin/moto-fastboot32.Darwin flash logo.bin logo.bin
sending 'logo.bin' (854 KB)... OKAY [ 0.050s]
writing 'logo.bin'... OKAY [ 0.304s]
Running: /Users/Bradshaw/Desktop/Droid/BionicRestorer/bin/moto-fastboot32.Darwin flash ebr ebr
sending 'ebr' (16 KB)... ERROR: usb_read failed with status e00002ed
FAILED (status read failed (No such file or directory))
Running: /Users/Bradshaw/Desktop/Droid/BionicRestorer/bin/moto-fastboot32.Darwin flash mbr mbr
< waiting for device >
sending 'mbr' (16 KB)... OKAY [ 0.007s]
writing 'mbr'... OKAY [ 0.400s]
Running: /Users/Bradshaw/Desktop/Droid/BionicRestorer/bin/moto-fastboot32.Darwin flash devtree device_tree.bin
sending 'devtree' (512 KB)... OKAY [ 0.034s]
writing 'devtree'... OKAY [ 0.481s]
Running: /Users/Bradshaw/Desktop/Droid/BionicRestorer/bin/moto-fastboot32.Darwin flash system system.img
sending 'system' (262144 KB)... OKAY [ 13.174s]
writing 'system'... OKAY [ 22.837s]
sending 'system' (229120 KB)... OKAY [ 12.040s]
writing 'system'... OKAY [ 20.041s]
Running: /Users/Bradshaw/Desktop/Droid/BionicRestorer/bin/moto-fastboot32.Darwin flash boot boot.img
sending 'boot' (8192 KB)... OKAY [ 0.431s]
writing 'boot'... OKAY [ 1.146s]
Running: /Users/Bradshaw/Desktop/Droid/BionicRestorer/bin/moto-fastboot32.Darwin flash recovery recovery.img
sending 'recovery' (9216 KB)... OKAY [ 0.486s]
writing 'recovery'... OKAY [ 1.454s]
Running: /Users/Bradshaw/Desktop/Droid/BionicRestorer/bin/moto-fastboot32.Darwin flash cdrom cdrom
sending 'cdrom' (12032 KB)... OKAY [ 0.623s]
writing 'cdrom'... OKAY [ 2.224s]
Running: /Users/Bradshaw/Desktop/Droid/BionicRestorer/bin/moto-fastboot32.Darwin flash preinstall preinstall.img
sending 'preinstall' (262144 KB)... ERROR: usb_read failed with status e00002ed
FAILED (status read failed (No such file or directory))
Running: /Users/Bradshaw/Desktop/Droid/BionicRestorer/bin/moto-fastboot32.Darwin flash webtop grfs.img
sending 'webtop' (262144 KB)... ERROR: usb_write failed with status e00002ed
FAILED (data transfer failure (No such file or directory))
Running: /Users/Bradshaw/Desktop/Droid/BionicRestorer/bin/moto-fastboot32.Darwin flash radio radio.img
< waiting for device >
sending 'radio' (21768 KB)... OKAY [ 1.118s]
writing 'radio'... OKAY [ 2.348s]

---------------------------------------------------------------------------------
Rebooting your phone now, just one last step... 
Your Bionic will boot into Recovery Mode, to finish loading.
Recovery Mode shows the box with an arrow coming out the top
and the little green Android dude standing there. There is a
Progress Meter on the bottom, that show's how far along it is.
You may see the Motorola Logo for a long time before it boots
into Recovery Mode.
Running: /Users/Bradshaw/Desktop/Droid/BionicRestorer/bin/moto-fastboot32.Darwin reboot
rebooting...

And the phone did boot....

I'll keep notes on what I'm doing and post updates.


----------



## CantMesWitDis (Jan 4, 2012)

Okay, so it booted and I saw in the system it went to 893....I tried running the scripts again with option 1 (it said 893), got an INFOPreflash validation failure when writing the cdt.bin. So I restarted and tried running option 2 again....this time everything ran up til the radio entry (after numerous hang ups and restarts). So it never got to do the final restart and load. I'm taking a pause now (while I can) and charging the phone. After a full charge, I'll retry option 2 again and it'll hopefully go all the way through. However, I was thinking since I received a successful radio flash on one go round and everything flashed correctly on this go round, should I just be missing the full reboot??? So should I run option 3? Regardless, I'll keep everyone updated on this. It seems that the hang ups come from the phone not receiving the signal from the computer...or executing it.


----------



## LDubs (Nov 8, 2011)

You can just run The flash radio and reboot commands manually. I had to do that, it hung at flashing webtop.

Tapatalked from my Bionic


----------



## CantMesWitDis (Jan 4, 2012)

Yeah, I'm not sure how to run it manually from inside Terminal....regardless, after a full charge, I've ran through everything and the only thing that hangs up is to reboot the bootloader (which I did manually) so everything completed as it should. I'm now running 893, and rooted. Now I've copied all the files for 901 to my device (option 5)....but the phone hasn't told me 'it found an update' yet.


----------



## LDubs (Nov 8, 2011)

Cool beans. If you want you can boot into stock recovery and flash the 901 update manually.

Tapatalked from my Bionic


----------



## crpeck (Sep 24, 2011)

Whew - that sounded like a lot of work - lol. Glad you got it to where you wanted it. 
If you go to Menu->AboutPhone-System Updates does it find the Update? When I do it I see:

Update Available
A software update is available on your microSD card (version 5.9.901.en.US)

Then given the option to install it or not (I choose not for now cause I need it at that last 'official' release right now).

BTW - to run each command to flash individually, you can cut and paste the output it shows as it runs it, e.g.:

Above you can see it says this when it flashes the boot.img


> Running: /Users/Bradshaw/Desktop/Droid/BionicRestorer/bin/moto-fastboot32.Darwin flash boot boot.img


If you open terminal and paste in just this part, it will flash the boot.img to boot:
/Users/Bradshaw/Desktop/Droid/BionicRestorer/bin/moto-fastboot32.Darwin flash boot boot.img


----------



## CantMesWitDis (Jan 4, 2012)

Thanks Crpeck! When I run the system updates it tells me your device is up to date. Soooo, I tried to use ROM Manager to reboot into recovery to install it manually...but it just restarts the phone. Then I try to manually get into the bootloader (holding down both volume buttons and choosing recovery) and I get to the triangle with an exclamation mark....any ideas? Should I run the bootloader script again from my mac?


----------



## CantMesWitDis (Jan 4, 2012)

Ha, so I forgot to hold down volume keys to enter stock root when the triangle pops up (so many methods get jumbled together)....got the phone to run the update, I'm now on 901 with root! Big thanks Crpeck for your scripts/instructions and LDubs for talking to me during my scramble. Now just waiting for the ICS ROM for the Bionic!!!


----------



## crpeck (Sep 24, 2011)

Glad you're all set. I would love to see ics!

Sent from my DROID BIONIC using Tapatalk


----------



## crpeck (Sep 24, 2011)

I've used BionicRestorer for probably the last time - my Nexus came in and work has taken my Bionic away from me







I'll still be waitching rootzwiki, and, my PM's, so, if anything new pops up for the Bionic, I'll try to update accordingly - I just won't be able to test it to the extent I normally would.
Best of luck you Bionic people - I loved that phone, built like a tank, and, fun to hack. If anyone wants to take over this script, feel free (I just ask for credit, I did spend some time on it). If you have an issue, post it here, I, or someone else will most likely figure out what's up...


----------



## Stelv (Dec 12, 2011)

Hello. I am having errors reverting to 893 from rooted 901, from 2 different iMacs OSX. Terminal says "Errors, Not Stopping" after every step in the script. I have the fastboot folder directory in the BionicRestorer folder. Is that correct. Nothing seems to flash in fastboot. The phone doesn't restart itself when done and stays at fastboot screen. I have to manually reboot. My system is still stuck on 901.


----------



## Stelv (Dec 12, 2011)

...never mind, I just used rsd lite and a pc.


----------



## crpeck (Sep 24, 2011)

I just read a PM from a fellow on xda-developers that he discovered a bug in Bionic Restorer - the option to copy the file Blur_Version.5.9.901.XT875.Verizon.en.US.zip to the Bionic sdcard-ext was actually copying it to /sdcard - that explains why it it wouldn't update automagically. It's been fixed and is bring upload to the the original dropbox location now.


----------



## @dam (Dec 6, 2011)

sorry, mistake...see below...


----------



## @dam (Dec 6, 2011)

Hey Chris, I know you are "retiring" from the Bionic (congrats on the Nexus). but a couple of things:

1. "Blur_Version.5.9.901..." on the scard...i have it on both the sdcards and it still hangs up during (about 35% done) the OTA update to .902 (so 'cause of this...I went to your BR method...)

2. BionicRestorer MD5sums file: the BR program (methods #2 & #3 attempted) is that it looks for that leaked "VRZ_XT875_5.5.893.XT875.Verizon.en.US_CFC_01.xml.zip" version. I have the normal OTA "Blur_Version.5.5.893.XT875.Verizon.en.US.zip" version. Is it possible to make it not be that specific? Something I could change myself to allow the process to continue?

IN RECOVERY: I have even tried wiping/restoring manually and reverting back to the .893 version but during install it aborts.

I wanna be able to make these Mac options work for me, but it looks like I may have to break out the WIN98 on parallels to get it done.

Thanks for the help, 
Adam



crpeck said:


> I just read a PM from a fellow on xda-developers that he discovered a bug in Bionic Restorer - the option to copy the file Blur_Version.5.9.901.XT875.Verizon.en.US.zip to the Bionic sdcard-ext was actually copying it to /sdcard - that explains why it it wouldn't update automagically. It's been fixed and is bring upload to the the original dropbox location now.


----------



## crpeck (Sep 24, 2011)

BionicRestorer is a collection of shell scripts, they should be fairly easy to edit to suit your needs. The main one is named BionicRestorer.sh, it runs ones located in the bin directory based on the menu selection you make. I tried to comment them as much as possible.

Is there any interest in seeing this updated to use the new root exploit for 5.9.902 and the just leaked 5.9.902 fxz files? I can update the scripts accordingly, but, just can't test them.

Personally, if you can't get the Mac version to run (which is highly possible - lol), I'd install Linux in Parallels, or, VirtualBox (which is free). I'm lucky enuf to have both a Mac and a Linux laptop (real old IBM laptop - lol - you know it's old because it says IBM on it and not Lenovo). I did some testing on the Mac, but, the development and initial testing on the Linux system.


----------



## bigmook (Jun 6, 2011)

Yes I would like an Ubuntu version please...

Sent from my DROID BIONIC using Tapatalk


----------

