[Defy Q&A, Help & Troubleshooting] dannyjk:
Tutorial for installing cm9 on defy,starting from stock firmware

Hi,just saw your post.I have a defy.I am writing this based on my experiences with defy.There are a few changes to be made for defy plus,which i have mentioned at the appropriate parts.This guide should be useful for both defy and defy+ owners.I personally use quarx build.Don't know about the epsylon build,but i see people complaining about some bugs..Just my opinion.Anyway if you are going to go with quarx(assuming you have defy),i recommend u stay away from build of 8th march with the hardware acceleration.Frankly itz too buggy for everyday use.Too many force closes and restarts.Stick with the 5th march build.Which is great(nearly as good as a stable rom for both defy and defy +)

Find out which SBF your Motorola originally came with.Sbfs are the files with.sbf extension which is basically your stock(original) firmware.SBF files are only for original firmwares.No cm9 or cm7 files come with .sbf extension.Defy in different regions have different sbfs.You should find your appropriate SBF in Xda forums.If you need that and can't find it reply back.I will help you.Personally your Original Sbf is your starting point.In case you have a warranty claim and you are running in CM9,then flash your defy with the above mentioned sbf with RSD lite.I will go into flashing with rsd lite later.Voila!!Phone is good as new.No hint of ever running Cm9 or warranty voiding stuff.Personally i would ask you to keep this someplace safe.You can sleep peacefully!

Installing CM9 involves

1.Rooting your phone

2.Taking A titanium Backup(optional)

3.Installing 2ndinit

4.Rebooting into Clockwork Recovery

5.Taking a nandroid backup(optional but highly recommended)

6.Flashing CM9 files

7.Restart!

Root your Phone.

Now before proceeding let me remind you this will void your warranty.Of course you can flash your original sbf to revert back.But there is always a small risk(Personally i don't think there is,but i believe everyone should be aware of their options).

Root with superone click root.This is a windows app.Not sure about linux or mac.Search XDA for the latest.i think v2.2 is the latest.

The actual process of rooting.(whatever u do,have at least 70% battery)

Enable USB debugging in your phone.It should be in Settings->Applications->Development and enable “USB Debugging“.Then connect your phone via usb cable to your pc.Select Charging Only option(not the memory card access) in the usb connection mode notification that comes in your phone up when you plug in the usb.Make sure it is not mounted in mass storage mode(memory card access).For that check in My computer if your sd card is visible.And check your connected usb devices in the safely remove button at the right side of windows taskbar.That should cover it.Do not root with sd card mounted(memory card access).

Open the superoneclick.exe file in your pc(You should have downloaded this by now from http://shortfuse.org/ or from here http://xdaforums.com/showthread.php?t=803682).if you are not using vista or 7 go to http://xdaforums.com/showthread.php?t=803682.You will find information you need if you use mac,xp or linux.I rooted this on a windows 7 pc which was fine.Anyway after opeining the application click on root under the Universal tab.

For any confusion go to http://www.makeuseof.com/tag/root-android-phone-superoneclick-2/.they have screenshots.:D After rooting which will take like a min or less,(you might be asked to install busybox and to run a test.click yes for both)An app called superuser will be installed.This basically confirms you have superuser access.And the app basically monitors other apps that you have given superuser privileges.There is no way you can go wrong with superoneclick because itz that easy!!

Why Root?

Because Motorola doesn't want us to tinker with the original firmware files.Basically they do not want the additional burden of software troubleshooting in case of a warranty claim if the user messes up his phone.

But as a user it is sad.Basically think like this.You bought a new PC.You are free to install XP,7,vista ,Linux or anything(as long as you pay for it!)right??Well in case of phones you can't.For informed buyers,this is nuts.For me,if i use a device i want to stretch its capability.I don't want to be the idiot that uses a phone just for calling or for some apps.Cyanogen Mod is my place to go for my requirments.

Basically Rooting unlocks the superuser capabilities of the phones firmware.Superuser access means ability to tinker with your rom(Original SBF) which you were previously denied.In this case your original SBF will be modified to give you admin privileges.In CM7(gingerbread version ) and CM9(ICS version) you already have that capability in the firmware.

Anyway you have access to your rom now.With this (if you want!)you can use an app called SetVsel to overclock or undervolting your phone cpu.Be careful when you do that.Read about VSel values before you tinker.that is if you are interested in overclocking or undervolting on stock firmware.Otherwise we move on to titanium backup.

Next,if you want to have all your apps when you jump into CM9,take a Titanium Backup.Titanium Backup is an app in the Market(Play store).It requires root privileges.It keeps a backup of all apps you installed.You can do a lot of stuff with it other than just backup.But backup and restore is the core functionality of the app.Superuser might ask you to give it superuser access.Click yes.Anyway if you have money Go for Titanium Backup Pro.Best App money can buy.Totally worth every cent.Buy it.Run the batch restore option(This option is a little inside the menu options.You will find it.If not,tell me)Backup all user apps.leave out the system data.I haven't done otherwise,but somehow i am guesing motorola system settings and cm9 settings wont play nice.If you don't want to pay for titanium backup,use the free version (which does not have the batch backup option).Alternatively if you don't want anything to do with backup and just want a list of apps you have installed currently,then there is an option in titanium backup to export the list of installed apps as a text file.Which you can install manually later.Your call.Backup is done on your sd card.You will need free space.Somewhere around 300 mb or more.Actually keep at least 1 gb free.You will need it later on.

Now our next step is to install 2ndinit(i will explain what it is).But before that,you have to download a couple of things.

1.CM9 build(Quarx or epsylon,Your preference here)

2.Kernel file

3.Google Apps

Now if you have a defy,you will need the kernel file.If you have defy plus,skip over this part.You can find kernel files in the beginning of this post.http://xdaforums.com/showpost.php?p=20097916&postcount=3 This is probably a very useful post..thanks to nogoodusername.Any doubts on what to download this should clear it up.If you still have any doubts tell me.

Now download your required cm9 build from here.http://xdaforums.com/showthread.php?t=1432100

if you have a defy,download the cm7 kernel,if you have a defy running on a defy+ build(gingerbread)[Note:i am not talking about defy+ phone owners] download cm9 kernel.Both are available here http://xdaforums.com/showpost.php?p=20097916&postcount=3

Finally to Google Apps.Google had a run in with cyanogen community.Android as google sends out as opensource does not have gmail,gtalk and all google apps you usually find in a new phone.It means these apps are not opensource and you can't package it in any firmware without google's permission.So what the devs here in xda did is to provide cyanogenmod firmware files and google apps as seperate files.the google apps are what u find as gapps.zip or gapps-ics-20120304-signed.zip in forums.Download the file from here http://goo-inside.me/gapps/gapps-ics-20120317-signed.zip Nearly 50 mb.

Now place all three files inside your sd card as such.Yes they are in zip files.Dont bother.Leave them as they are in zip formats.

Defy plus owners.Don't bother about kernel file.

Defy owners with defy and defy+ builds,place ur respective kernels in the sd card.

Now disconnect the usb if you haven't done so.

Now we move onto 2ndinit.

2ndinit is an app that requires superuser access privileges.This is one of the reasons why we root.Why it requires is this.Your defy Bootloader is locked.You can't touch it:(.But this isn't a bad thing.This is the reason why it is mightily difficult to brick your defy(bricking basically means screwing up your phone so much it wont start and essentially becomes nothing more than a paperweight,hence is as good as a brick:D)

What 2ndinit does is that it loads up right after the bootloader loads.And presents with you a new menu system(actually The Clockwork Recovery) which basically is your way to boot and install new roms such as cm7 and cm9.So if you screw up,since your bootloader is intact,if you have the original sbf(Original motorola firmware)you can simply use rsd lite to flash back to original condition.

How to install 2ndinit

The app was in the market.Not anymore.GO here http://xdaforums.com/showthread.php?t=1032212. Download it.and place the apk file in your phone.For installing,make sure you have a file manager installed(such as es file manager or astro).Make sure you have enabled the installation of non market apps by Going to Settings > Applications 2) Check the box next to Unknown sources.Now with the file manager installed,browse to where you placed that 2ndinit apk file and install.Now open the app.It will ask you to install 2ndinit recovery.Chose the stable version stable with Cyanogen Builds(0.6.1).I have had no problems with that.Now it will start to download.Keep your wifi on or your data connection on.After that it will download.After download,Superuser will ask for access twice.Choose Yes for both.After installation,if everything goes well,u will have led light will be green.It will stay green till u reboot.This is fine and shows that upto now you are on right track.Before rebooting,disable usb debugging in Settings->Applications->Development and disable “USB Debugging“.Shut Down ur phone

Now start your phone.You should boot directly into Android Bootmenu.Here To move up and down the options,use volume up and volume down buttons.TO make a selection,press the power button(Don't press the power like u do it for shutdown.A small press will do).

Go to Backup and restore.Choose Backup.A Nandroid Backup will be created.Go back to root menu.The nandroid backup will be in a folder in your sd card.

Go to recovery.In recovery choose custom recovery.

If you are wondering what just happened,I will explain.As usual motorola bootloader loaded up as always,but this time,due to 2ndinit,we have a boot menu which kicks in right after the bootloader.Custom recovery is clockwork mod recovery which is the place where u do all ur installation of new roms and stuff.Boot option means you have option to boot into stock or cm9 firmware.You can tinker with this later.

On the other hand Nandroid Backup is something of a backup of your entire Rom and everything else.Just remember it is something you should fall back to in case you screw up.On the other hand Flashing original sbf is like the last option.If you flash Original Sbf,Then you have to go through the rooting thing and 2ndinit from scratch.A Nandroid Backup will save u from all that.It will restore ur rom just before u took backup.As good as new.Also Note Nandroid Backup is a lot different from titanium backup.titanium Backup is just user apps(and system settings if u choose it).Nandroid backup is a backup of your rom and therfore much more comprehensive.

Now back to the practical stuff.

When u choose custom recovery ,u enter Clockwork mod recovery.Choose to factory rest/wipe data option.Select Yes.After this.Select Wipe Cache Partition.Select Yes.

Now choose Install Zip from Sd card.

First choose your CM9 file.CONFIRM IT.

Next choose your Kernel file(if applicable).Confirm it.

Finally choose your google apps file.Confirm it.

All installations above are through the option "install zip from sd card".

Go to tools and delete dalvik cache.Dalvik Cache is a cache mechanism for your programs u previously installed.No need to go into the explanation here.

Thats it!!!!!!!!!!

Reboot.First time boot should take time.Time as in 2-3 min.Max 5min.

If you have screwed up,Your phone will not boot into ics and will stay at Motorola red logo.One way of screwing up is if you have flashed a defy+ build with a defy kernel.There are number of ways you could mess this up.Just follow this guide carefully.

Now if you screw up,you can boot into custom recovery and restore nandroid backup.For booting into custom recovery, shut down first.Then keeping the ‘Volume down’ key held, pressing the ‘Power’ key and then releasing the ‘Volume down’ key once you see the bootmenu screen,you will reach recovery.From there on,it is as i explained earlier.

Personally to tell u the truth,i have never restored a nandroid backup.:D.Other forum members might help you if u have serious doubts.

Now if you are really really screwed,Flash your original sbf.

To do this first install motorola drivers

If you are using 32 bit version of windows

http://www.addictivetips.com/?attachment_id=44719

If you are using 64 bit

http://www.addictivetips.com/?attachment_id=44740

Next,Download RSD lite from here.This is a windows app.

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

Install and open in xp sp2 compatible mode.As your defy is bricked,the only thing u can do is to press volume up and press power button.This should bring it to bootloader mode.This is a black screen which says "bootloader mode" in the top and "ok to program" in the middle.

Connect your phone via usb.It should install some usb drivers.Browse to the sbf file you downloaded(the one i told in the beginning of this post.If the sbf file is in a zip,extract it.).And click Start.It will take about 5 min.After that your phone should reboot(that too will take time,fortunately look into the live logsheet in rsd lite.It should show a percentage completion).

Finally Your phone should be back as you bought it from the store.:)

A few words to everyone.What i wrote here is a bit of a layman's usage.I hope everyone who reads this guide gets an idea of what rooting and recovery and flashing is.I haven't gone into fixed sbfs,adb and the lot because the idea of this tutorial is to help others install cm9 and a backup plan if all hell breaks loose.Nothing more.if there are incorrect information in this i would be glad to hear and rectify.:D