[Motorola Droid RAZR] Quantumstate:
I am putting this together because, after three weeks of study and four days of full-time work I have finally pulled together the information needed to do this. I will also offer a lead on how to make your phone a Development phone. Sorry, no pictures or vids for the kids, just solid useful information.

You will start with an XT910 or XT912 which is locked to a carrier somewhere in the world. To unlock you must buy an unlock code from one of the sellers on eBay. This will cost from 49 cents to 5 dollars, depending on your phone. I assumed that all the sellers could get all the codes, so I bought the cheapest one and sent him my IMEI. He responded that he does not do Motorola and refunded my 49 cents. So I found a seller who does the XT910, and bought his cheapest auction (for an Atria unlock code). He responded that I had bought the wrong auction as I have an XT910. So I ended up having to buy his XT910 unlock auction and got the code. Now the phone will work with any GSM carrier in the world.

Next is the firmware. I knew the phone is running Gingerbread because in Settings|AboutPhone it said the Android version is 2.3.6. I wanted to upgrade to Ice Cream Sandwich (4.0.4) or higher, and to the MIUI ROM which I've used happily for a year. I went through the (scattered) RSD insctructions to flash ICS, but it always failed on the first file. I finally discovered that the RSD method does not work with many phones at v2.3.6, so I went to an alternative method developed by kholk, which I'll describe here. This method will work when others fail.

The first thing to know is that I'm a Linux type, but kholk also offers a Windows method which I have not tested. His Linux script has a few bugs, which I have corrected in the script attached hereto. Also his Linux fastboot binary is an older version which can not handle the larger image sizes we have now, so I have attached hereto a newer one which the source code was recently leaked from Motorola;

The next thing to know is that when posts mention "Fastboot files" they mean the ROM image files which are divided so they can be installed with the fastboot executable. OTA files are not the same, nor are they desirable. I gather that an OTA file is installed -after- the fastboot files, and provide an incremental upgrade.

Stock and ICS fastboot image files for our phone are here:

http://sbf.droid-developers.org/umts_spyder/list.php

I am in Seattle, WA, and I bought my phone on eBay locked to Rogers Canada. So I and my phone are in the North American region. My stock Rogers is 'Rogers Canada' Gingerbread v2.3.6:

Rogers_XT910_SignedLATAM_167-SLC-M33.1_P042_A014_CFC_1FF_fastboot.xml.zip

http://sbf.droid-developers.org/umt...-SLC-M33.1_P042_A014_CFC_1FF_fastboot.xml.zip

My Rogers ICS is 'Unknown Carrier' Ice Cream Sandwich v4.0.4:

6.7.2-180_SLC-35_R02_SIGNLATAM_SPYDERICSROGERS_P012_A012_HWp2b_CFC_fastboot.xml.zip

http://sbf.droid-developers.org/umt...CSROGERS_P012_A012_HWp2b_CFC_fastboot.xml.zip

North American users, use these. If you're in Europe you want the Central Europe image, ninth from the bottom, for ICS.

It's important to understand that the software you have in the phone at the moment, is "signed" for your specific region of the world. So you can not install a European image to a Canadian phone -- it will fail with "Preflash validation failure". The individual files you unzip from the image zip file will be transferred to their specific locations in the phone, -after- signatures are checked, to make sure you have files for the correct region.

So, choose your image file from the above list, unzip the image file, and put the fastboot executable and script in that resulting directory. I have modified the attached script to work for the Rogers images, basically by adding a couple files which were missing in the original script.

Side Bar: In the file list above, you will also find Development images, and if the fastboot executable could be rigged to ignore signatures, you could install the Dev image and voila, have yourself a development phone! The fastboot source code is available, so maybe some talented coder could make that (dangerous) change. This is dangerous because a n00b could flash a Euro image on his Canadian phone and it wouldn't work. (This error is easily reversable by flashing the right image) Comment by Vatazhka: The signature check is implemented in the bootloader. Unauthorized image gives preflash validation error and causes the bootloader to stop booting with an appropriate message. Moreover, the bootloader can't be unlocked as it lacks support for appropriate fastboot commands. The only way to get around these restrictions is to get a Motorola-signed version of a bootloader which doesn't implement checks, which luckily happened to Atrix guys (Clueless Motorola employees put it into a regular SBF, which was subsequently leaked.).

- Make sure your phone is --fully charged-- or else it could run out of battery and leave you with an expensive brick. Comment by Vatazhka: There are $6 cables to repair bricked devices with no juice left on eBay. Been there, done that It's the standard USB data cable with two pins shorted and ideally should also include a resistor to bring voltage from 5 V supplied by USB down to 3.8 V as supplied by the battery.

- Put the phone in fastboot mode by turning off, then holding Vol+- and power on. Select Fastboot and Vol+.

- Connect the -original- USB cable (some USB cables do not have data lines, only power, and you must have data lines for this) and connect to

your computer. On the phone Fastboot screen it should say "Connected" at the bottom.

- On the Linux computer in a Terminal window, cd to the image directory and # ./FlashLNX.sh It should flash away with no errors. The phone will

reboot and you'll get the Android with rotating polyhedral heart; it will reboot a couple more times and you have ICS!

- Root the phone.

- If you have an XT910, for Recovery you want BootMenu Manager, and if an XT912 you want SafeStrap. Install from the Market. You MUST NOT jump the gun and try to install BMM or SS to Gingerbread. It will brick you. Get up to ICS, then lay down your recovery. Comment by Vatazhka: Not true. SS2 and SS3 can be installed to both XT910 and XT912 (just be sure to install the correct SS2 variant). Developer of BMM actually owns an XT909, which is similar to XT912, and uses BMM on it. Simply choose the one which works with a given firmware (Hopefully this will be solved soon, so you could install whichever suits you, not the firmware.). One caveat: If you intend to try or install MIUI, it WILL NOT WORK with SafeStrap. You need BMM (which includes CWM) for MIUI.

- Now flash whatever image you want.

http://xdaforums.com/showthread.php?t=1792955

I like MIUI:

http://xdaforums.com/showthread.php?t=1756659

- If you ever want to go back to stock, just use the above process and flash GB 2.3.6.

Comment by Vatazhka: This is usually not possible. Most ICS updates bump some of the partition version counters which are stored in the "partition table", which doesn't allow you to go back. You can forget about resetting it - there is a digital signature (eFuse as well?) on guard again. You can only flash partition images with version number which is not lower than embedded in the "partition table".

I'm also not sure about this fastboot update stuff, but I may have used different fastboot variants which haven't had implemented this.

- If you install MIUI directly to the first slot by rebooting to Custom Recovery and installing zip, you will lose Custom Recovery when done so it needs to be reinstalled. The newer MIUIs do not come with GApps (this Play) so you have to get them here:

http://www.miuiandroid.com/community/forums/miui-weekly-rom-releases.103/

... and get BMM here:

http://xdaforums.com/showthread.php?t=1720351

Since I don't have phone service yet I downloaded these to my PeeCee, put them on a microSD card and popped them into the phone. Install BMM with File Manager, and use it to reboot to Custom Recovery to install GApps. Then I used Titanium Backup to remove all G**gle apps except for Play, Framework, and one or two others. (I don't trust the Greatest Data Mining Operation In The History Of The World) Speaking of which, I always install DroidWall and only allow the minimum apps to access The Internets.

Then I used BMM to install CM10 JB to the second slot, just for fun. So now I have dual-boot! MIUI and CM10. Either one can be set to default. Caution though, for the zip you will install to the second slot you must convert it, as per the link above. The resulting file will begin with BM, and -that- is the one you will install. At the same time you can add GApps to be installed right after the ROM. You can -name- your two bootable OS' like this: BMM|BootMenuSettings then tap the very name and a cursor will come up. Delete and rename; Mine are MIUI 2.10.19 ICS and CM10 16.56.44 JB.

MIUI is already rooted, always.

One pleasant surprise in all this is that the new ICS MIUI Backup app does recognize old GB MIUI Backup savesets. I had to install Android Terminal and cp -r them over by hand, but it did restore all my old logs, SMS, apps, etc, thankfully.. I notice that the new MIUI Backup offers Encryption! Well, this really means that you are enabling backups to their "Cloud". In Red China. Where they can pore over your contacts, texts, logs, calls, and friends at their leisure. Encryption? Pshaw. ('shared key') Velly ingenirous.

Recommended apps: DroidWall, AdFree, Snowstorm, RadarNOW!

Some additional tips:

To reboot the phone and put it in FASTBOOT mode.

# adb reboot bootloader

To reboot the phone and put it in RECOVERY mode. Still need to push Vol up + Vol down to use the stock recovery.

# adb reboot recovery

For normal reboot

# adb reboot

For OTA updates (normally not needed), try

# fastboot update ota_update.zip

If low battery and not flashed:

1. Connect your phone using ORIGINAL USB cable to to ORIGINAL wall charger

2. Press and hold both Vol+ and Vol- buttons at the same time and then press and hold Power button until bootloader menu appears with Normal boot already highlighted

3. Use Vol- to highlight BP Tools and press Vol+ to select it

4. Screen with red M will appear followed by a screen with the battery and number undeneath showing how much charge your battery has now which means phone is now in the battery charge only mode

5. Wait for a battery to charge which should take over 3 hours

CAUTION: This method will FAIL if you have not completely flashed the system image. When your battery gets down to about 1/3, fastboot will refuse to flash images and you'll be screwed. There is no way to charge it unless it's booted. If you get in this predicament like I was, put your phone on a hot item, like a laptop power brick, and pray it recovers the battery enough to flash at least system and boot images. Flash them manually (copying lines in the script) if you have to.

Much gratitude to kholk, eval-, and to Jack'O who got me through this.