[GUIDE][FAQ][Android 4.4 KitKat] Installing & Customizing CM11 or SlimKat

Search This thread

mibas

Member
Mar 21, 2013
6
0
Krakow/Cracow
Thanks a lot. Yesterday I've flashed with latest 0804 but it has drained the battery very quickly, the previous version which I've used was 0721, but it seems that 0724 is the best at this moment. So i'm going to go back to 0724 instead 0804.
 

Proverbs2

Senior Member
Feb 1, 2012
300
326
I'm running cm-11-20140731. My battery wont stand more than 3 hrs when using internet over wifi. Earlier using cm10 battery backup was pretty OK. Plz suggest whether i should try any other build or if any workaround possible in current build.

Do you mean you get only 3 hours when using wifi for light web browsing on your phone, or are you streaming videos, or are you using the phone as a wifi hotspot? 3 hours of very heavy wifi usage (video streaming, etc.), or three hours of hotspot usage, is actually fairly reasonable for an old battery, IMHO. What apps are using the most battery when you look at Settings > Battery? You could try Greenifying any apps that are using up juice in the background.

Proverbs I'd love to dive in ask you if you'd extend your offer to Sadu to others - I'd really like to try to tune my Defy+ - figures below...
I'm thinking my phone is WAY off where it should be in terms of states (very limited Deep Sleep for example).

I'm running 0724, with the min-GAPPS of 0724 also. I have some Tasker profiles running, some apps hibernated, Utter! running (shake to wake, not listening).

I couldn't load the screendump from Aero but the numbers look like...,
Deepsleep 02h:32m:17s 6%
1000 MHz 00h:48m:55s 2%
800 MHz 00h:12m:46s 1%
600 MHz 05h:22m:04s 13%
300 MHz 32h:05m:58s 78%
Uptime 41h:02m:02s 100%

PS 41+ hours uptime is very good for my Defy +

Governor is stock Interactive.

Your CPU isn't spending nearly enough time in the "Deepsleep" state, so you should figure out which app or process is keeping your phone awake. Utter might be the culprit; you could try disabling that. If that doesn't work, try using this app to determine what is causing the wakelock.
 

lagusz

Member
Aug 13, 2014
6
0
Black screen when calling for SlimKat

Thanks for the clear guide on installation.

I tried Slimkat and it seems to have a problem with operating the proximity sensor on MB525. It goes black on the call and if voicemail starts on the other end I was stuck and could only remove the battery. Installed CM11 and it works better. The official Froyo also works fine, it's just the Slimkat.
 

Proverbs2

Senior Member
Feb 1, 2012
300
326
Thanks for the clear guide on installation.

I tried Slimkat and it seems to have a problem with operating the proximity sensor on MB525. It goes black on the call and if voicemail starts on the other end I was stuck and could only remove the battery. Installed CM11 and it works better. The official Froyo also works fine, it's just the Slimkat.

Interesting. I've had no such problems with SlimKat on MB525, and I've been using it as my daily driver for months. Maybe it was just a coincidence that the proximity sensor was having trouble when you installed SlimKat. Do you use a screen cover? If so, try cutting away the part that covers the proximity sensor (near the top left side of the glass). That might help.
 

lagusz

Member
Aug 13, 2014
6
0
Interesting. I've had no such problems with SlimKat on MB525, and I've been using it as my daily driver for months. Maybe it was just a coincidence that the proximity sensor was having trouble when you installed SlimKat. Do you use a screen cover? If so, try cutting away the part that covers the proximity sensor (near the top left side of the glass). That might help.

I'm not using the cover at all. There could be some problem with the sensor because once or twice I had this "blackout" on the CM11 but wiping the finger over the sensor brings the display back up again. But on the Slimkat I could wipe as much as I wanted and nothing happened. Like some setting switched the display off on the call.
 

Quintiliano

Member
Sep 11, 2012
5
1
Marília
Hey, I'd like to thank you for the post, the performance tweaking was quite helpful!

But I'd like some extra recommendations. I just came out of SlimKat (it's probably my favorite ROM so far), I had a bug yesterday that pissed me off so I decided to try something else, went with Paranoid Android and I'm now tweaking it to see if it can be as fast and smooth as SlimKat.

So far it's not completely lovely. The launcher itself is pretty laggy and notification drawer could be a little bit smoother. I'd like to ask you if there are any other settings I could tweak, like the I/O scheduler (I have no idea what it does), "memory management" (Allow Purging of Assets and KSM - I also have no idea what they do) or even some smoother apps, like launchers or something?

Another thing that I'd like to ask is if anyone around here knows how to change the default SMS app "max SMS to MMS" limit, in SlimKat it worked fine with 30 SMS being the largest I could write, but in PA my SMS's get converted to MMS in just 4 SMS's and this sucks balls. Is there a way of tweaking this?

I really want to learn a bit about this. I'm thinking of deleting some of the apps as you mentioned in the OP but I'm still unsure if I should, as I'm a total newbie on this.

Thanks in advance!
 
Last edited:

Proverbs2

Senior Member
Feb 1, 2012
300
326
Hey, I'd like to thank you for the post, the performance tweaking was quite helpful!

But I'd like some extra recommendations. I just came out of SlimKat (it's probably my favorite ROM so far), I had a bug yesterday that pissed me off so I decided to try something else, went with Paranoid Android and I'm now tweaking it to see if it can be as fast and smooth as SlimKat.

So far it's not completely lovely. The launcher itself is pretty laggy and notification drawer could be a little bit smoother. I'd like to ask you if there are any other settings I could tweak, like the I/O scheduler (I have no idea what it does), "memory management" (Allow Purging of Assets and KSM - I also have no idea what they do) or even some smoother apps, like launchers or something?

Another thing that I'd like to ask is if anyone around here knows how to change the default SMS app "max SMS to MMS" limit, in SlimKat it worked fine with 30 SMS being the largest I could write, but in PA my SMS's get converted to MMS in just 4 SMS's and this sucks balls. Is there a way of tweaking this?

I really want to learn a bit about this. I'm thinking of deleting some of the apps as you mentioned in the OP but I'm still unsure if I should, as I'm a total newbie on this.

Thanks in advance!

For I/O scheduler, Deadline is best. KSM and Purging of assets both sound great in theory, but in my experience they seemed to make things worse rather than better. I've never tried them on Paranoid Android, though. You could try them and see if things improve.

I'd also recommend using an app like this to check what apps and services are running in the background (and using up precious ram memory). Then Greenify any that you don't want to run automatically at startup.

In the CM11 thread, some users reported that raising min_free_kbytes in Aero Control > Memory Tuning > VM Settings from 2850 to 10240 (or even 20480) helps to reduce lag. (See this post by @okij, for example.) I personally didn't notice much difference with that change, but it seems to help for some people.

One word of caution: If you're playing around with memory settings in Aero Control, do NOT enable Dynamic FSync -- it leads to a very serious data corruption bug. It should be safe to tinker with most other settings, and you can always revert to the default settings if problems occur.

I use Apex launcher, which seems just a bit lighter and faster than Nova.

By the way, what was the problem you encountered on SlimKat?
 
  • Like
Reactions: okij

Quintiliano

Member
Sep 11, 2012
5
1
Marília
Just checked out all of the settings. I/O was on Deadline as you said were best, then I tested to see how KSM and Purging of Assets worked out on this ROM and so far I noticed that KSM helps a bit, gave me more RAM and made the visuals slightly smoother, while Purging of Assets would give me even more RAM but would make the visuals really laggy on the phone (notification bar and even transition from screens in launcher). So, I recommend KSM on for whoever uses Paranoid Android and keep APA off.

As for the extra memory in Aero Control, I found out that the default settings for min_free_kbytes was '10240', then I changed it to '20480' and so far I haven't noticed any change in the phone's behavior, still has a bunch of memory free and is working as fine as it was before. I'll keep it this way for a while to see if it did change a thing at all.

The problem I had with my SlimKat was a random "google services stopped responding" message (something like this) popping out of nowhere randomly. I don't really know if it might have been an app I installed or if it just decided not to respond, but it came to a point in which it became unbearable (I would press "OK" and it would already show the same error again), I rebooted my phone into recovery and cleared Dalvik cache, then booted it up and saw that my text messages were all erased and that the problem was still happening. This pissed me off and made me decide to try another ROM, since I had been using SlimKat for quite a while (two months or something like this). Someday I might go back to it, when I see an update or something, I like to keep my phone as updated as possible.

I'm pretty satisfied with this PA ROM by the way. Only bug so far is the wallpaper showing entirely blurry but it might be the Launcher I'm using, so I'll try some workaround.

Thanks for all the help, mate, I'll keep on trying to clean stuff up and if I find anything helpful I'll surely report back.
 
  • Like
Reactions: Proverbs2

tomhanman

Member
Sep 6, 2010
8
0
sim broken by rom flash... ah no it appears not.

Hi, first thanks, now the probs.

I just flashed the latest CM11 nightly on my green MB525. I was running CM7 previously and happily but required recent android for an app.

Everything went well, started up and it asked me for my simcode. I never used a code on my CM7, so went to provider's site and it said default code for simcards was 0000. So I entered that, it didn't work. I entered what I would have changed it to if I had changed it, that didn't work. I tried again etc. It just kept asking, so I tried the PUK code, that didn't work either. It never said that I had tried too many times or that the sim was locked or anything. Anyhow, it was impossible to get it to unlock and to get any mobile network action. So I went to bed.

So how did my phone end up network locked when it hasn't been for two years?

I have kernal 2.6.32.9-aerokernel and baseband EPO93_U_00.60.03 I'm on Virgin France (which uses the Orange network).

Did I miss something stupid? Sorry if I did please point it out to me with a big stick!

Thanks in advance to all, and of course thanks to the Devs for keeping our little Defys alive.

Tom.
 
Last edited:

alexey8

New member
Sep 13, 2014
3
0
question on baseband

can i install cm11 without configuring baseband and when i try to install nightly cm11, instalation aborted message comes up?????
what should i do? i am not intednding to use slimkat, but if its better then and trustable then ill use it..........
please reply i need help on this matter......:confused::(
 

Proverbs2

Senior Member
Feb 1, 2012
300
326
can i install cm11 without configuring baseband and when i try to install nightly cm11, instalation aborted message comes up?????
what should i do? i am not intednding to use slimkat, but if its better then and trustable then ill use it..........
please reply i need help on this matter......:confused::(

SlimKat is very stable and reasonably fast, at least compared to other KitKat roms on the Defy. I've been using it as my daily driver for months without any major issue. On the other hand, it hasn't been updated for quite a long time, so it doesn't have the benefit of all the latest tweaks, and of course it doesn't have exactly the same features as CM11. (Personally, I like SlimKat's features better than CM11's, but that's just my opinion.)

I never had a problem with any "installation aborted" message. Maybe there was a problem with the nightly build that you downloaded, or maybe you forgot to update the custom recovery to TWRP version 2.6.3.0. If you're using the correct recovery, I'd recommend trying a different CM11 nightly, or using SlimKat instead.
 

lotfystyle

New member
Jan 4, 2011
4
0
This guide explains how to install and update CyanogenMod 11 (CM11) and SlimKat roms (aftermarket firmwares of Android 4.4) on your Motorola Defy (MB525) or Defy+ (MB526). Neither the CyanogenMod development team nor the Slim Roms development team officially support the Defy. Thankfully, a number of independent developers (listed below) are working hard to port those roms to the Defy, and the present versions are mostly (but not completely) bug-free and stable.

Please note: The latest CM11 and SlimKat roms for the Defy still have a few bugs, most of which are explained in a bug list that is frequently updated by okij. Although okij's bug list concerns the CM11 roms built by Quarx, most of these bugs also apply to TJKV's SlimKat roms, which are based partly on Quarx's sources.

If you just want a perfectly stable, bug-free phone, and don't care about having the latest and coolest features of Android, CM11 and SlimKat are not for you. I recommend installing CyanogenMod 7 (CM7) instead: it's very fast and perfectly stable. However, CM11 and SlimKat are continually becoming more stable, and are already usable as daily drivers if you can live with the few remaining bugs.

How to install Android 4.4 SlimKat or CM11 on the Motorola Defy or Defy+

Step 1: Download the correct files for installation.
  • If installing SlimKat, download the rom (Slim-mb526-4.4.2.build.4-UNOFFICIAL-20140407-2344.zip) and Google Apps package (minimal_Slim_AIO_gapps.4.4.2.build.4.zip) here.
  • If installing CM11, download the rom here (or here) and the minimal Google Apps package here (or here or here). (You want the file called "GApps_Minimal_4.4.4_signed.zip". Do NOT try to install the "Standard" Google Apps package, as there is not enough room on the Defy's system partition.)

Customize the rom file if desired. (See "Tips for customizing & improving performance," below.) Then put both files on your phone's SD card. Also download defy_twrp_recovery_2.6.3.0.zip and safewipe.zip, and put those files on the SD card too.

Note: SlimKat build 4 is very stable, but it does have a bug that causes the phone to reboot into recovery mode automatically if the phone encounters a telephony error, instead of rebooting normally. To fix this issue, download DefyParts.apk here and replace the old DefyParts.apk by following the instructions in this post.​

Step 2: Install Team Win Recovery (TWRP) version 2.6.3.0 (or newer).
  • If you have already installed a custom recovery on your phone (e.g. ClockWorkMod or an earlier version of TWRP) and you know how to use it, just flash defy_twrp_recovery_2.6.3.0.zip and proceed to step 3. If you've never used a custom recovery, keep reading.
  • If you're using a stock rom from Motorola, you first need to root the phone (I recommend using either Framaroot or SuperOneClick), then install 2ndInit. Run the 2ndInit app and use it to install the custom recovery (ClockworkMod Recovery). Then reboot the phone, and watch the small LED light at the top of your phone. If the recovery was installed properly, the LED will light up with a blue color for a few seconds during startup. Allow the phone to fully boot up, then reboot the phone again and watch for the blue light. As soon as you see the blue light, press the volume down button to enter the bootmenu. Use the volume buttons to navigate the menu and the power button to select an option. Select Recovery > Custom Recovery > Backup and restore > Backup (all), and wait for the backup process to complete. This will create a backup of your system on your SD card, so you can revert to the stock rom later if needed. Next, select Go Back > install zip from sdcard > choose zip from sdcard, and install defy_twrp_recovery_2.6.3.0.zip.
Step 3: Install CM11 or SlimKat, and the corresponding Google Apps package.
  • After installing TWRP 2.6.3.0, reboot the phone and enter the bootmenu again by pressing the volume down button when you see the blue LED. (Note: If you're updating from a recent version of SlimKat or CM11, you won't see any blue light. Instead you'll see a screen that tells you to either press the menu button to enter recovery or the search button to continue with normal bootup.)
  • Enter TeamWin Recovery, which you can navigate with the touchscreen rather than the volume buttons. Wait 30 seconds before proceeding, to make sure the recovery is behaving in a stable way. (If the phone spontaneously reboots, just try again.)
  • Select Install, choose safewipe.zip, then swipe to confirm the flash.
  • In the same way, flash the rom of your choice (either SlimKat or CM11), followed by the Google Apps package.
  • Reboot the phone. The first boot will take a while (typically 5-10 minutes), since the phone has to build the Dalvik Cache.
Step 4: Set the correct baseband, and adjust performance settings.
Go to System settings > Advanced options > Device > Baseband selection, and make sure that the correct baseband is selected for your region and carrier. (Note: This step is not necessary if you already changed the default baseband in the zip file. See "Tips for customizing & improving performance," below.)

I also strongly recommend configuring the rom for better performance, by following the tips listed below. (See especially the tips about using Aero Kernel Control. This will help with many problems, for example the infamous call wakeup delay issue.)

Step 5: Thank our awesome developers, and donate to them if you can.

You can find donation links under any post by the developers. (Just look for the button that says "donate to me.") Here's the donation link for Quarx.

How to update SlimKat or CM11 to newer versions (or downgrade to older versions)

Step 1: Backup your current rom, apps, and settings.
  • I recommend using Online Nandroid Backup to create TWRP-compatible backups, for the reasons mentioned here (see bug #36). In the Online Nandroid Backup app, select Custom Backup > Backup Type > TWRP. Then select Backup Mode > Selective, and select the "system" and "data" partitions to backup. Make sure the Save Location is set to /sdcard, and also check the box to "Exclude Dalvik Cache." Then press the blue arrow (looks like a "play" button) at the top right corner of the screen to begin the backup.
  • Also back up your apps and settings with Titanium Backup.
Step 2: Download the updated rom.

Customize the rom file if desired. (See "Tips for customizing & improving performance," below.) Then place it on your phone's SD card along with the appropriate Google Apps package. [Note: if using CM updater, you don't have to download the rom ahead of time.]

Step 3: Install the updated rom using one of the following three methods:
Note: If switching from SlimKat to CM11 or vice versa, you must use the clean install method.
  • "Clean" install (recommended)
    - Boot into TWRP by pressing the menu button when you see the bootstrap image (the screen that tells you to either press the menu button to enter recovery or the search button to continue with normal bootup), which should appear just after the Motorola logo disappears and before the boot animation begins.
    - Select "Install" and flash safewipe.zip, then flash the updated rom, followed by Google Apps.
    - After rebooting the phone, you'll have to restore your apps and settings using Titanium Backup. Don't restore settings for system apps unless necessary, as that may lead to problems.
  • "Dirty" flash (easier, but may cause problems)
    - Boot into TWRP and select Wipe > Advanced Wipe, and select Dalvik Cache, Cache, and System (not Data), then swipe to wipe. (WARNING: Wiping the system partition also deletes the custom recovery, so you must either flash a rom or restore a backup before rebooting the phone. If the phone is rebooted before a new system is installed, it will be "soft bricked" and you'll have to flash a stock sbf with RSD Lite to recover it.) Then press the back button to return to the main menu and select Install. Flash the updated rom, followed by Google Apps. Now it is safe to reboot the phone.
    - Since this method does not affect the /data partition, you won't have to restore all of your apps and settings, but you may still need to switch the baseband. If you encounter any bugs or problems after updating the firmware by this method, do not report them. First try a "clean" install, and check whether that solves the issue.
  • CM updater method (easiest, but may cause problems)
    - If you're using CM11, you can update via the built-in CM updater located under Settings > About Phone > CyanogenMod Updates. (Obviously this won't work on SlimKat.)
    - If you encounter any bugs or problems after updating the firmware by this method, do not report them. First try a "clean" install, and check whether that solves the issue.

Tips for customizing & improving performance

How to customize the rom before installation:
Install 7-zip on your PC.

Right-click on the CM11 or SlimKat zip file and select 7-zip > Open archive. (Don't extract it; just open it.) Now you can:
  • Remove unnecessary files to save space on the system partition. For example, you can navigate to system > media > audio, and delete any ringtones you don't use. You can also delete unused apps from system > app. See @x53's post here for a list of system apps that are safe to remove; see also here and here for more info. Here's a list of system apps that I removed before installing SlimKat: BasicDreams (live wallpaper), Browser (I use Next Browser instead), Calendar, Dashclock, Deskclock, Email (I just use Gmail app), Exchange2, Gallery2, Livewallpaperspicker, PhaseBeam (live wallpaper), PhotoTable, PicoTTS, Slimcenter, SlimFileManager, SlimIRC, SoundRecorder, VisualizationWallpapers.
  • Replace the default bootanimation in system > media. (Just drag and drop your custom bootanimation to replace the original.)
  • Replace the default bootstrap image in system > bootstrap > images.
  • Change the default baseband. To do this, navigate to system > etc > motorola > basebands, and find the zip file that corresponds to your region and carrier. Drag that file out to a folder on your PC, and extract (unzip) it. Then drag and drop those extracted baseband files into system > etc > motorola > bp_nvm_default, replacing the default baseband files in the rom.
  • Edit build properties. To do this, find the build.prop file in the system directory, and drag it out to a folder on your PC. Open the file in Notepad++, and edit the build properties as desired. (For example, you can change the LCD screen density by editing the line that says "ro.sf.lcd_density=". The default density in CM11 is 240, and the default in SlimKat is 213. Larger numbers make icons appear larger on your screen.) After making any desired changes, save the file and drag it back into the rom zip file where you found it, replacing the original.
After installation, configure the rom for better performance:
  • Install Aero Kernel Control from the Google Play store, which will allow you to tweak many settings to improve the performance of your phone. For starters, I recommend the following: In the Aero Control app, go to CPU Performance > Governor Settings, and select “ondemand”. The default is Interactive governor, which may be able to deliver slightly better performance if you know how to tweak its settings, but its default settings aren’t very good, so I recommend using On Demand at least initially.
    If you want to try using Interactive governor, I recommend the following settings: open Aero Kernel Control, go to CPU Performance, select Interactive governor, then tap the little phone icon at the top right corner of the screen to open the settings for the Interactive governor. Set suspend_enabled to 0. That should help to reduce the call wakeup delay. Changing hispeed_freq and input_boost_freq to your maximum value (e.g. 1200000 if you've overclocked to 1200 MHz) will also boost performance, though you may see a slight drop in battery life. Note: Interactive governor is not recommended for CM11 builds prior to the 06-10 nightly, because the suspend/resume handler was missing. (See okij's note on bug #26 for more info.)​
  • Open the HWA Settings app (which is already installed as part of the rom) and disable HWA for all apps except ones that really need it. (Explanation: HWA requires more RAM, and the Defy is already short on RAM, so enabling HWA usually does more harm than good. That's why it's best to disable it whenever it's not really needed for an app to function properly.)
    The following apps require HWA: Camera, Dialer (on CM11 only), Google Maps (version 7+), Chrome browser. Other apps may also require HWA. If an app doesn't display properly, try enabling HWA again to see if that solves the problem.​
  • Install Greenify, which you can use to “hibernate” any apps that you don’t want to run automatically at startup.

Other tips & suggestions:
  • You may wish to install Google Camera instead of the stock camera, for the reasons mentioned here.
  • For offline voice recognition, see here.
  • For better GPS performance, you may want to try flashing this zip and/or using this app. (Thanks to @Male_zvire and @okij for recommending these solutions.)

FAQ & what to do if something goes wrong

A freshly installed rom takes some time to "settle" while various services run in the background, so the phone may be a bit unstable at first. If you're still encountering errors or other problems after a few hours, first check the bug list and use the XDA forum search feature to see if the issue you are having has already been reported.

If you think you've found a new bug, don't just complain about it; try to help solve it by taking logs. @measel has provided a very helpful guide for taking logs.

What if the phone doesn't boot up properly?
If you can still access the custom recovery, just flash safewipe again and re-install the rom, or restore a backup. (To enter TeamWin recovery after installing SlimKat or CM11, press the menu button when you see the screen that tells you to either press the menu button to enter recovery or the search button to continue with normal bootup. That screen should appear just after the Motorola logo disappears, and before the boot animation begins.)

If you can't access the recovery, you may need to flash an sbf file using RSD Lite. Be careful! Flashing an sbf file improperly is one of the few things that can actually hard-brick the Defy, and if you flash the wrong sbf file for your phone, it may be impossible to restore your phone back to its original firmware. Read the All-in-One Defy Beginner's guide for more information about sbfs and RSD Lite. You can also check out the Motorola Defy wiki page for other tips and tutorials.


A special thanks to @Quarx, who has been faithfully updating our phone to newer and better firmwares since the beginning of Defy history, and has undoubtedly put more work into this project than anyone else. Thanks also to our many other developers, past and present: @TJKV (who uses Quarx's kernel sources to port SlimKat to the Defy), @Blechd0se (who has made significant contributions to the kernel development for the Defy and also developed the Aero Control app that we use to fine-tune the performance of our phones), @SlugZero, @YetAnotherForumUser, @struq, @htto, @Epsylon3, @maniac103, @walter79, @czechop, @kabaldan, and @Kayant. Many thanks to all of them, and to anyone I may have forgotten. Thanks also to @okij and other Defy users who have helped with testing new builds and identifying bugs for the developers to solve.

Hey
very usefull guide, thank you for it.
 

tomhanman

Member
Sep 6, 2010
8
0
network lock

Hello, Its me again.

I've just changed to the latest nightly in hope of better stability, but what I've got is my phone network locked again!

I run through the wipe and flash instructions so very well presented in this thread, and the first thing that comes up after the reboot is a request for 'SIM network unlock PIN' This appears to be a request to unlock the phone to any network. Which is something I did several years ago.

Is it normal that the 'safewipe' should result in this unlocking being undone?

Why does nobody else have this experience?

And why the hell does the offocial unlock code from Orange which unlocked the phone to all networks a month ago not work this time around?

I just get 'Network unlock request unsuccessful' message.

I can't believe that nobody else has encountered this.

Tom.
 

ThomasAH

Member
Mar 5, 2011
23
27
Is it normal that the 'safewipe' should result in this unlocking being undone?
Did you have to give the IMEI to get your unlock code? If yes, check *#06# to see if it is still the same.
(maybe it is empty or 000000... now)

Besides this, safewipe (at least the versions I found) is no longer safe:
It tries to preserve /system/bootmenu, but somewhere in March the important parts moved to /system/bootstrap.
And with the very new builds from October (with the changed partition) it is different again.
 

bellin

New member
Dec 12, 2014
1
0
Defy hard bricked after downgrade from CM11

If you can't access the recovery, you may need to flash an sbf file using RSD Lite. Be careful! Flashing an sbf file improperly is one of the few things that can actually hard-brick the Defy, and if you flash the wrong sbf file for your phone, it may be impossible to restore your phone back to its original firmware. Read the All-in-One Defy Beginner's guide for more information about sbfs and RSD Lite. You can also check out the Motorola Defy wiki page for other tips and tutorials.
[/HIDE]

It 'just what happened to my Defy!

I've working CM11 installed on my Defy, but due to continuosly lag and reboot i decided to downgrade to original Froyo ROM without reading all of this!

Now i understand that the situation is very complicated to resolve.

the only way that i've is RSD_Lite, but the screen is still black and no recovery mode shown.

I try adb too, but the device is not found

There is someone that can help me (and my doughter).
 

omeyers

New member
Dec 24, 2014
1
0
Grreetings,

thanks for the guide, its really helpful. I have only one doubt regarding wich cm11 should I flash. The guide indicates a download link from quarx, but I've noticed the latest version available there is from october. Can I flash the latest cm11 from the link quarx gives in this post instead? http://xdaforums.com/showthread.php?t=2515036

I'm on 2.2.2, stock.

Thanks.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 58
    This guide explains how to install and update CyanogenMod 11 (CM11) and SlimKat roms (aftermarket firmwares of Android 4.4) on your Motorola Defy (MB525) or Defy+ (MB526). Neither the CyanogenMod development team nor the Slim Roms development team officially support the Defy. Thankfully, a number of independent developers (listed below) are working hard to port those roms to the Defy, and the present versions are mostly (but not completely) bug-free and stable.

    Please note: The latest CM11 and SlimKat roms for the Defy still have a few bugs, most of which are explained in a bug list that is frequently updated by okij. Although okij's bug list concerns the CM11 roms built by Quarx, most of these bugs also apply to TJKV's SlimKat roms, which are based partly on Quarx's sources.

    If you just want a perfectly stable, bug-free phone, and don't care about having the latest and coolest features of Android, CM11 and SlimKat are not for you. I recommend installing CyanogenMod 7 (CM7) instead: it's very fast and perfectly stable. However, CM11 and SlimKat are continually becoming more stable, and are already usable as daily drivers if you can live with the few remaining bugs.

    How to install Android 4.4 SlimKat or CM11 on the Motorola Defy or Defy+

    Step 1: Download the correct files for installation.
    • If installing SlimKat, download the rom (Slim-mb526-4.4.2.build.4-UNOFFICIAL-20140407-2344.zip) and Google Apps package (minimal_Slim_AIO_gapps.4.4.2.build.4.zip) here.
    • If installing CM11, download the rom here (or here) and the minimal Google Apps package here (or here or here). (You want the file called "GApps_Minimal_4.4.4_signed.zip". Do NOT try to install the "Standard" Google Apps package, as there is not enough room on the Defy's system partition.)

    Customize the rom file if desired. (See "Tips for customizing & improving performance," below.) Then put both files on your phone's SD card. Also download defy_twrp_recovery_2.6.3.0.zip and safewipe.zip, and put those files on the SD card too.

    Note: SlimKat build 4 is very stable, but it does have a bug that causes the phone to reboot into recovery mode automatically if the phone encounters a telephony error, instead of rebooting normally. To fix this issue, download DefyParts.apk here and replace the old DefyParts.apk by following the instructions in this post.​

    Step 2: Install Team Win Recovery (TWRP) version 2.6.3.0 (or newer).
    • If you have already installed a custom recovery on your phone (e.g. ClockWorkMod or an earlier version of TWRP) and you know how to use it, just flash defy_twrp_recovery_2.6.3.0.zip and proceed to step 3. If you've never used a custom recovery, keep reading.
    • If you're using a stock rom from Motorola, you first need to root the phone (I recommend using either Framaroot or SuperOneClick), then install 2ndInit. Run the 2ndInit app and use it to install the custom recovery (ClockworkMod Recovery). Then reboot the phone, and watch the small LED light at the top of your phone. If the recovery was installed properly, the LED will light up with a blue color for a few seconds during startup. Allow the phone to fully boot up, then reboot the phone again and watch for the blue light. As soon as you see the blue light, press the volume down button to enter the bootmenu. Use the volume buttons to navigate the menu and the power button to select an option. Select Recovery > Custom Recovery > Backup and restore > Backup (all), and wait for the backup process to complete. This will create a backup of your system on your SD card, so you can revert to the stock rom later if needed. Next, select Go Back > install zip from sdcard > choose zip from sdcard, and install defy_twrp_recovery_2.6.3.0.zip.
    Step 3: Install CM11 or SlimKat, and the corresponding Google Apps package.
    • After installing TWRP 2.6.3.0, reboot the phone and enter the bootmenu again by pressing the volume down button when you see the blue LED. (Note: If you're updating from a recent version of SlimKat or CM11, you won't see any blue light. Instead you'll see a screen that tells you to either press the menu button to enter recovery or the search button to continue with normal bootup.)
    • Enter TeamWin Recovery, which you can navigate with the touchscreen rather than the volume buttons. Wait 30 seconds before proceeding, to make sure the recovery is behaving in a stable way. (If the phone spontaneously reboots, just try again.)
    • Select Install, choose safewipe.zip, then swipe to confirm the flash.
    • In the same way, flash the rom of your choice (either SlimKat or CM11), followed by the Google Apps package.
    • Reboot the phone. The first boot will take a while (typically 5-10 minutes), since the phone has to build the Dalvik Cache.
    Step 4: Set the correct baseband, and adjust performance settings.
    Go to System settings > Advanced options > Device > Baseband selection, and make sure that the correct baseband is selected for your region and carrier. (Note: This step is not necessary if you already changed the default baseband in the zip file. See "Tips for customizing & improving performance," below.)

    I also strongly recommend configuring the rom for better performance, by following the tips listed below. (See especially the tips about using Aero Kernel Control. This will help with many problems, for example the infamous call wakeup delay issue.)

    Step 5: Thank our awesome developers, and donate to them if you can.

    You can find donation links under any post by the developers. (Just look for the button that says "donate to me.") Here's the donation link for Quarx.

    How to update SlimKat or CM11 to newer versions (or downgrade to older versions)

    Step 1: Backup your current rom, apps, and settings.
    • I recommend using Online Nandroid Backup to create TWRP-compatible backups, for the reasons mentioned here (see bug #36). In the Online Nandroid Backup app, select Custom Backup > Backup Type > TWRP. Then select Backup Mode > Selective, and select the "system" and "data" partitions to backup. Make sure the Save Location is set to /sdcard, and also check the box to "Exclude Dalvik Cache." Then press the blue arrow (looks like a "play" button) at the top right corner of the screen to begin the backup.
    • Also back up your apps and settings with Titanium Backup.
    Step 2: Download the updated rom.

    Customize the rom file if desired. (See "Tips for customizing & improving performance," below.) Then place it on your phone's SD card along with the appropriate Google Apps package. [Note: if using CM updater, you don't have to download the rom ahead of time.]

    Step 3: Install the updated rom using one of the following three methods:
    Note: If switching from SlimKat to CM11 or vice versa, you must use the clean install method.
    • "Clean" install (recommended)
      - Boot into TWRP by pressing the menu button when you see the bootstrap image (the screen that tells you to either press the menu button to enter recovery or the search button to continue with normal bootup), which should appear just after the Motorola logo disappears and before the boot animation begins.
      - Select "Install" and flash safewipe.zip, then flash the updated rom, followed by Google Apps.
      - After rebooting the phone, you'll have to restore your apps and settings using Titanium Backup. Don't restore settings for system apps unless necessary, as that may lead to problems.
    • "Dirty" flash (easier, but may cause problems)
      - Boot into TWRP and select Wipe > Advanced Wipe, and select Dalvik Cache, Cache, and System (not Data), then swipe to wipe. (WARNING: Wiping the system partition also deletes the custom recovery, so you must either flash a rom or restore a backup before rebooting the phone. If the phone is rebooted before a new system is installed, it will be "soft bricked" and you'll have to flash a stock sbf with RSD Lite to recover it.) Then press the back button to return to the main menu and select Install. Flash the updated rom, followed by Google Apps. Now it is safe to reboot the phone.
      - Since this method does not affect the /data partition, you won't have to restore all of your apps and settings, but you may still need to switch the baseband. If you encounter any bugs or problems after updating the firmware by this method, do not report them. First try a "clean" install, and check whether that solves the issue.
    • CM updater method (easiest, but may cause problems)
      - If you're using CM11, you can update via the built-in CM updater located under Settings > About Phone > CyanogenMod Updates. (Obviously this won't work on SlimKat.)
      - If you encounter any bugs or problems after updating the firmware by this method, do not report them. First try a "clean" install, and check whether that solves the issue.

    Tips for customizing & improving performance

    How to customize the rom before installation:
    Install 7-zip on your PC.

    Right-click on the CM11 or SlimKat zip file and select 7-zip > Open archive. (Don't extract it; just open it.) Now you can:
    • Remove unnecessary files to save space on the system partition. For example, you can navigate to system > media > audio, and delete any ringtones you don't use. You can also delete unused apps from system > app. See @x53's post here for a list of system apps that are safe to remove; see also here and here for more info. Here's a list of system apps that I removed before installing SlimKat: BasicDreams (live wallpaper), Browser (I use Next Browser instead), Calendar, Dashclock, Deskclock, Email (I just use Gmail app), Exchange2, Gallery2, Livewallpaperspicker, PhaseBeam (live wallpaper), PhotoTable, PicoTTS, Slimcenter, SlimFileManager, SlimIRC, SoundRecorder, VisualizationWallpapers.
    • Replace the default bootanimation in system > media. (Just drag and drop your custom bootanimation to replace the original.)
    • Replace the default bootstrap image in system > bootstrap > images.
    • Change the default baseband. To do this, navigate to system > etc > motorola > basebands, and find the zip file that corresponds to your region and carrier. Drag that file out to a folder on your PC, and extract (unzip) it. Then drag and drop those extracted baseband files into system > etc > motorola > bp_nvm_default, replacing the default baseband files in the rom.
    • Edit build properties. To do this, find the build.prop file in the system directory, and drag it out to a folder on your PC. Open the file in Notepad++, and edit the build properties as desired. (For example, you can change the LCD screen density by editing the line that says "ro.sf.lcd_density=". The default density in CM11 is 240, and the default in SlimKat is 213. Larger numbers make icons appear larger on your screen.) After making any desired changes, save the file and drag it back into the rom zip file where you found it, replacing the original.
    After installation, configure the rom for better performance:
    • Install Aero Kernel Control from the Google Play store, which will allow you to tweak many settings to improve the performance of your phone. For starters, I recommend the following: In the Aero Control app, go to CPU Performance > Governor Settings, and select “ondemand”. The default is Interactive governor, which may be able to deliver slightly better performance if you know how to tweak its settings, but its default settings aren’t very good, so I recommend using On Demand at least initially.
      If you want to try using Interactive governor, I recommend the following settings: open Aero Kernel Control, go to CPU Performance, select Interactive governor, then tap the little phone icon at the top right corner of the screen to open the settings for the Interactive governor. Set suspend_enabled to 0. That should help to reduce the call wakeup delay. Changing hispeed_freq and input_boost_freq to your maximum value (e.g. 1200000 if you've overclocked to 1200 MHz) will also boost performance, though you may see a slight drop in battery life. Note: Interactive governor is not recommended for CM11 builds prior to the 06-10 nightly, because the suspend/resume handler was missing. (See okij's note on bug #26 for more info.)​
    • Open the HWA Settings app (which is already installed as part of the rom) and disable HWA for all apps except ones that really need it. (Explanation: HWA requires more RAM, and the Defy is already short on RAM, so enabling HWA usually does more harm than good. That's why it's best to disable it whenever it's not really needed for an app to function properly.)
      The following apps require HWA: Camera, Dialer (on CM11 only), Google Maps (version 7+), Chrome browser. Other apps may also require HWA. If an app doesn't display properly, try enabling HWA again to see if that solves the problem.​
    • Install Greenify, which you can use to “hibernate” any apps that you don’t want to run automatically at startup.

    Other tips & suggestions:
    • You may wish to install Google Camera instead of the stock camera, for the reasons mentioned here.
    • For offline voice recognition, see here.
    • For better GPS performance, you may want to try flashing this zip and/or using this app. (Thanks to @Male_zvire and @okij for recommending these solutions.)

    FAQ & what to do if something goes wrong

    A freshly installed rom takes some time to "settle" while various services run in the background, so the phone may be a bit unstable at first. If you're still encountering errors or other problems after a few hours, first check the bug list and use the XDA forum search feature to see if the issue you are having has already been reported.

    If you think you've found a new bug, don't just complain about it; try to help solve it by taking logs. @measel has provided a very helpful guide for taking logs.

    What if the phone doesn't boot up properly?
    If you can still access the custom recovery, just flash safewipe again and re-install the rom, or restore a backup. (To enter TeamWin recovery after installing SlimKat or CM11, press the menu button when you see the screen that tells you to either press the menu button to enter recovery or the search button to continue with normal bootup. That screen should appear just after the Motorola logo disappears, and before the boot animation begins.)

    If you can't access the recovery, you may need to flash an sbf file using RSD Lite. Be careful! Flashing an sbf file improperly is one of the few things that can actually hard-brick the Defy, and if you flash the wrong sbf file for your phone, it may be impossible to restore your phone back to its original firmware. Read the All-in-One Defy Beginner's guide for more information about sbfs and RSD Lite. You can also check out the Motorola Defy wiki page for other tips and tutorials.


    A special thanks to @Quarx, who has been faithfully updating our phone to newer and better firmwares since the beginning of Defy history, and has undoubtedly put more work into this project than anyone else. Thanks also to our many other developers, past and present: @TJKV (who uses Quarx's kernel sources to port SlimKat to the Defy), @Blechd0se (who has made significant contributions to the kernel development for the Defy and also developed the Aero Control app that we use to fine-tune the performance of our phones), @SlugZero, @YetAnotherForumUser, @struq, @htto, @Epsylon3, @maniac103, @walter79, @czechop, @kabaldan, and @Kayant. Many thanks to all of them, and to anyone I may have forgotten. Thanks also to @okij and other Defy users who have helped with testing new builds and identifying bugs for the developers to solve.
    3
    suggestion for improvement

    Thanks for the guide. I'm pretty sure it is very useful for beginners! ;)

    I would suggest to try to get rid of as much text as possible and make it more step-by-step-y, you know what I mean? People (at least I recognized that on me) tend to give up quickly when it comes to reading. Right now it looks really difficult!

    Just a suggestions. People will still appreciate your work as is. Thanks.
    3
    more recommendations

    I've updated and reorganized the OP, adding a section on customizing & improving performance.

    While I'm at it, here's another recommendation:

    I recommend using the new Google Camera app instead of the stock camera, because it shows the whole field of view of the camera. The SlimKat camera allows you to see the whole field of view when taking pictures (if the "True View" option is enabled), but you still won't see the whole field of view when recording videos in SD resolution. Even with "True View" enabled, the stock camera preview shows a widescreen aspect ratio when recording videos in 480p, which means that you won't see the whole field of view that you are recording. The Google Camera app solves that problem for both CM11 and SlimKat.
    3
    I've updated the guide and added a section that explains how to customize the rom before installation: how to remove unnecessary files to save space in the system partition, replace the default bootanimation and boostrap image, change the default baseband and LCD screen dpi, etc. Does anyone have any suggestions for other possible customizations I should mention?
    2
    Hey :) First of all, thanks for the Guide!
    [...]
    Im desperate and I dont know what to do, almost wanted to throw that damn thing out of the window ;D soooo... does someone have an idea how to solve my problem ? :/ Or did I destroy the damn thing ? I just installed 2ndlnit , that cant be the problem right ?

    No, you probably haven't. just follow the defy unbrick guide - http://xdaforums.com/showthread.php?t=1828639

    I have sucessfully rooted and installed CM11 on my old Defy yesterday, following the guide on the first page.
    Had a couple of problems (bloated phone w/ android 2.2, perhaps I should have done a wipe before rooting it), SuperSU kept stopping after boot and after any app asking for root, so I had to give permissions to them manually in SuperSU, I had to install 2ndinit v. 1.4.2, and my blue LED never lit up, phone entered recovery after every boot.

    After flashing TWRP the phone just showed the M logo and then black screen, no blue LED... but I have still managed to enter boot menu after pressing repeteadly the vloume down key when the M logo was on screen.
    Had to try some 10 times before getting it right, but it appeared that to flash a SBF I would have to install windows first :laugh: - as I've found out now, it should be easier than in windows :cool: http://xdaforums.com/showthread.php?p=13730405

    The recommended version of TWRP ( 2.6.3.0) can flash up to 10 zip files at once, I've put all the 3 files in the queue and I wiped dalvik cache before rebooting.
    Basically I think you did everything almost right, except that when already in the boot menu you should have flashed TWRP, reboot, "safewipe.zip", the CM11 zip and the gapps zip.\

    Good luck with unbricking!

    And many thanks to Proverbs2 for putting together this very complete guide!