[Android Software/Hacking General [Developers Only]] rootdefyxt320:
NOTE: This exploit only exists in Qualcomm chipsets due to eFuse in the TI OMAP chipsets. Sorry, for disappointing users with TI OMAP chipsets.

Exploit has been patched. Thanks to mattlgroff. This exploit only exists in Motorola Qualcomm phones with Gingerbread

Requirements/Prerequisites:

-Motorola Android 2.x.x Phone

-Motorola Drivers installed

-USB Cable

-Device must have fastboot protocol support in the bootloader otherwise this method won't work.

Tools Required:

-Motorola Android firmware Depacker by Skrilax_CZ

-UPDATE-SuperSU-v1.41.zip by Chainfire

-ADB and Fastboot

-Stock SBF/fastboot files.

Method 1: Firmware is in SBF format and packed in CG2.smg format. Examples of phones that has firmware packed in CG2.smg format are Motorola Defy Mini, Motorola Fire XT, Motorola Motoluxe. This method is for Windows. It will also work for Linux if you have the Linux version of Motorola Android Firmware Depacker.

I have tested this method on my Motorola Defy Mini XT320 which is a Gingerbread phone. It also works on Motorola Fire XT311,XT316,XT530,XT531 and Motorola Motoluxe XT615 (not Canadian XT615).

1. Make sure all drivers are installed.

2. Download the SBF file for your phone.

3. Download Motorola Android Depacker. MotoAndroidDepacker-1.2alpha3.zip

4. Download UPDATE-SuperSU-v1.41.zip Please don't extract the zip file for this one.

5. Make sure you have ADB and Fastboot setup if don't have it setup you can download adb&fastboot.zip and extract the zip file making sure everything is in the same location

6. Open Motorola Android Depacker and select the button 'Open From file' and select the SBF file for your phone and open it.

7. Click on the button 'Split to folder' to split SBF file.

8. Now select the button 'Open from File' and change the selection of file type to 'MOTOBLUR mbn image (*CG2.smg)' go to the folder called nameofsbf-extracted which contains CG2.smg and open it.

NOTE: nameofsbf-extracted this means the name of the SBF file with the word extracted at the end. Here's an example: TNBST_4_0A.1F.0ERPS_flex_WE_Orange_Spain-extracted

9. Minimize Motorola Android Firmware Depacker and go to the folder named 'CG2-extracted' and navigate to a file named 'recoverysec.mbn' OR 'emmc_recovery.mbn' and rename it to 'recovery.img'

10. Go to builder.clockworkmod.com and upload your recovery.img and select build.

11. Once it finishes building CWM Recovery, there will be a few files that are ready to be downloaded, download the file named 'recovery.img' NOT 'inputrecovery.img'

12. Place recovery.img in the same location where ADB and fastboot are.

13. Place UPDATE-SuperSU-v1.41.zip in the root of your sdcard.

14. Enable USB Debugging on your phone.

15. Reboot the device into fastboot mode by typing this command in cmd:

adb reboot-bootloader

16. Boot into temporary CWM Recovery by typing this command in cmd:

fastboot boot recovery.img

17. Now using Volume keys to navigate and power button to select option. Select 'install zip from sdcard' then select UPDATE-SuperSU-v1.41.zip and it will ask you to confirm install and select yes.

18. Select 'reboot system now' and if it asks you to fix any permissions select yes.

19. Your device should be rooted.

NOTE: METHOD 1 WILL ONLY WORK IF THE SBF FILE IS PACKED IN CG2.SMG FORMAT!

Method 2: TESTED the first 7 steps and it worked. I need some testers please to test the rest of the steps. This is when your firmware is packed in fastboot.xml.zip or .xml.zip format such as Motorola RAZR XT910 firmware. I don't own a phone that has a firmware of fastboot.xml.zip, so I just downloaded XT910 firmware so I could test the first 7 steps. This method should work both in Windows and Linux.

1. Make sure all drivers are installed.

2. Download the fastboot files for your phone.

3.Download UPDATE-SuperSU-v1.41.zip Please don't extract the zip file for this one.

4. Make sure you have ADB and Fastboot setup otherwise you can download adb&fastboot.zip and extract the zip file making sure everything is in the same location.

5. Using a file manager, extract the file named 'recovery_signed' and rename it to recovery.img

6. Go to builder.clockworkmod.com and upload your recovery.img and select build.

7. Once it finishes building CWM Recovery, there will be a few files that are ready to be downloaded, download the file named 'recovery.img' NOT 'inputrecovery.img'

8. Place recovery.img in the same location where ADB and fastboot are.

9. Now place UPDATE-SuperSU-v1.41.zip in the root of your sdcard.

10. Enable USB Debugging on your phone.

11. Reboot the device into fastboot mode by typing this command in cmd:

adb reboot-bootloader

12. Boot into temporary CWM Recovery by typing this command in cmd:

fastboot boot recovery.img

13. Now using Volume keys to navigate and power button to select option. Select 'install zip from sdcard' then select UPDATE-SuperSU-v1.41.zip and it will ask you to confirm install and select yes.

14. Select 'reboot system now' and if it asks you to fix any permissions select yes.

15. Your device should be rooted.