I know there are a couple posts around here already that tell you how to root/unroot your phone. I am trying to take that information and put all the methods into one post. If you know of a method that is not included here, please let me know and I will add it.
I also want to say that you do not need to root the phone to be able to install a custom ROM. Since all the custom ROMs have root access enabled already, this would only apply if you want to run the stock ROM and have root access. It is also a good idea to install a custom recovery right before or right after you do this. You can find instructions for that here: http://androidforums.com/triumph-all-things-root/445483-guide-installing-cwm-custom-rom-motorola-triumph.html and http://androidforums.com/triumph-all-things-root/421674-clockworkmod-recovery-motorola-triumph.html. Doing so will allow you to make a nandroid backup of your phone which is handy in case you ever mess anything up.
Now on to the details...
Method 1: GingerBreak
Step 1: Download the GingerBreak apk. You can get it here.
Step 2: Enable USB debugging (in Settings > Applications >Development) if you do not already have it on.
Step 3: Allow "Unknown Sources" (in Settings > Applications).
Step 4: Make sure you have an SD card formatted for your phone.
Step 5: Move the apk to the SD card.
Step 6: With your phone on, open a file explorer and find the GingerBreak.apk. Click on it to install.
Step 7: Once installed, open the app, and press the root button.
Step 8: Wait for it to do it's thing. This may take a few minutes. If it was successful the phone will reboot itself (which may take a while due to cache wipe).
Step 8a: If the phone did not reboot after a few minutes, you will need to do a battery pull and try it again until it does work.
Step 9: Make sure the Superuser app is installed on your phone. You can download it from the Android Market here.
Step 10: Install the BusyBox installer. You can download it from the Android Market here.
Step 11: Uninstall the GingerBreak app, it is not needed anymore. (Unless you want to unroot.)
To unroot a device that was rooted via GingerBreak:
Step 1: Download the GingerBreak apk. You can get it here.
Step 2: Enable USB debugging if you do not already have it on.
Step 3: Make sure you have an SD card formatted for your phone.
Step 4: Move the apk to the SD card.
Step 5: With your phone on, open a file explorer and find the GingerBreak.apk. Click on it to install.
Step 6: Once installed, open the app, and press the unroot button.
Step 7: Uninstall the GingerBreak, Superuser, and BusyBox apps if they are on your phone. You don't HAVE to do this, but they are just taking up space if you are not rooted.
Method 2: Terminal Emulator (taken from b_randon14's post here).
Step 1: Download Android Terminal Emulator from the market here.
Step 2: Open up the Emulator and type in sudo, you should get the # symbol.
Step 3: Type in the following code:
Step 4: Reboot and you should have root access.
NOTE: This will not install busybox, so if you wish to have busybox you will have to install it from the Android Market here. This method just provides you with root access.
To unroot using this method:
Open the emulator and type sudo then type this:
Method 3: Flashing Superuser/SuperSU zip in CWM
Step 1: Download the flashable zip. (superuser or SuperSU)
Step 2: Boot into ClockworkMod Recovery (power and both volume buttons simultaneously).
Step 3: Install the flashable zip (install zip from sd card and select the file).
Step 4: Reboot your phone.
I also want to say that you do not need to root the phone to be able to install a custom ROM. Since all the custom ROMs have root access enabled already, this would only apply if you want to run the stock ROM and have root access. It is also a good idea to install a custom recovery right before or right after you do this. You can find instructions for that here: http://androidforums.com/triumph-all-things-root/445483-guide-installing-cwm-custom-rom-motorola-triumph.html and http://androidforums.com/triumph-all-things-root/421674-clockworkmod-recovery-motorola-triumph.html. Doing so will allow you to make a nandroid backup of your phone which is handy in case you ever mess anything up.
Now on to the details...
Method 1: GingerBreak
Step 1: Download the GingerBreak apk. You can get it here.
Step 2: Enable USB debugging (in Settings > Applications >Development) if you do not already have it on.
Step 3: Allow "Unknown Sources" (in Settings > Applications).
Step 4: Make sure you have an SD card formatted for your phone.
Step 5: Move the apk to the SD card.
Step 6: With your phone on, open a file explorer and find the GingerBreak.apk. Click on it to install.
Step 7: Once installed, open the app, and press the root button.
Step 8: Wait for it to do it's thing. This may take a few minutes. If it was successful the phone will reboot itself (which may take a while due to cache wipe).
Step 8a: If the phone did not reboot after a few minutes, you will need to do a battery pull and try it again until it does work.
Step 9: Make sure the Superuser app is installed on your phone. You can download it from the Android Market here.
Step 10: Install the BusyBox installer. You can download it from the Android Market here.
Step 11: Uninstall the GingerBreak app, it is not needed anymore. (Unless you want to unroot.)
To unroot a device that was rooted via GingerBreak:
Step 1: Download the GingerBreak apk. You can get it here.
Step 2: Enable USB debugging if you do not already have it on.
Step 3: Make sure you have an SD card formatted for your phone.
Step 4: Move the apk to the SD card.
Step 5: With your phone on, open a file explorer and find the GingerBreak.apk. Click on it to install.
Step 6: Once installed, open the app, and press the unroot button.
Step 7: Uninstall the GingerBreak, Superuser, and BusyBox apps if they are on your phone. You don't HAVE to do this, but they are just taking up space if you are not rooted.
Method 2: Terminal Emulator (taken from b_randon14's post here).
Step 1: Download Android Terminal Emulator from the market here.
Step 2: Open up the Emulator and type in sudo, you should get the # symbol.
Step 3: Type in the following code:
Code:
ln -s /system/xbin/sudo /system/bin/su
ln -s /system/xbin/sudo /system/xbin/su
NOTE: This will not install busybox, so if you wish to have busybox you will have to install it from the Android Market here. This method just provides you with root access.
To unroot using this method:
Open the emulator and type sudo then type this:
Code:
rm -rf /system/bin/su
rm -rf /system/xbin/su
Method 3: Flashing Superuser/SuperSU zip in CWM
Step 1: Download the flashable zip. (superuser or SuperSU)
Step 2: Boot into ClockworkMod Recovery (power and both volume buttons simultaneously).
Step 3: Install the flashable zip (install zip from sd card and select the file).
Step 4: Reboot your phone.