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

Search This thread

Proverbs2

Senior Member
Feb 1, 2012
300
326
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.
 
Last edited:

measel

Senior Member
Jan 13, 2011
988
541
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.
 

yosef_a

Member
Jul 30, 2012
13
2
CM 7 and SBFS

The following is a guide that I wrote for one of my family members, and I decided to post it here so that others may benefit. I know there are numerous similar guides already in the forums, but they have not been updated recently. I intend to keep this guide updated for as long as I own a Defy (and I have no plans to get rid of my beloved phone anytime soon).

This guide explains how to install either CyanogenMod 11 (CM11) or SlimKat roms (aftermarket firmwares of Android 4.4) on your Motorola Defy (MB525) or Defy+ (MB526). Please note that neither the CyanogenMod development team nor the Slim Roms development team officially support the Defy. Thankfully, a number of independent developers are working hard to port those roms to the Defy, and the present versions are mostly (but not completely) bug-free and stable. 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.

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.

Installation instructions for Android 4.4 SlimKat or CM11 on the Motorola Defy or Defy+

Step 1: Make sure you've downloaded 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 and the minimal Google Apps package (4-16_GApps_Minimal_4.4.2_signed.zip) here.

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.

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 the next step. 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 and 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 LED lights up with a blue color for a few seconds during startup, the custom recovery was installed properly, but you still need to upgrade the recovery to TWRP 2.6.3.0. Reboot the phone again and watch for the blue LED 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: Installing CM11 or SlimKat

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 the newly installed 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.) Then 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).

If you installed SlimKat, you can now install the minimal_Slim_AIO_gapps file in the same way, then reboot the phone.

If you installed installed CM11, don't flash the Google Apps package yet, or it will conflict with the Cyanogenmod setup and cause an error. You must first reboot the phone and allow it to fully boot up. Then reboot the phone once more and go into TWRP recovery again. (Note: This time, you won't see the blue LED light; instead you'll see a screen indicating that you can press the menu button to enter the recovery.) Select Wipe > Advanced Wipe > and wipe the Dalvik Cache and the Cache. Then press the back button twice to return to the main menu and select Install, then install the GApps_Minimal_4.4.2 zip file, and reboot the phone.

Note: The first boot will take a while (typically 5-10 minutes), since the phone has to build the Dalvik Cache.

Step 4: Configure the Rom.

Go to System settings > Advanced options > Device > Baseband selection, and make sure that the correct baseband is selected for your region and carrier.

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. (I disable HWA for everything except the camera. The latest version of Google Maps also requires HWA, but I’m using an older version that doesn’t.)

I recommend installing Aero Control from the Google Play store, which will allow you to tweak many settings to improve the performance of your phone. I'll post some suggested settings when I have time later; but 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.

I also recommend installing Greenify, which you can use to “hibernate” any apps that you don’t want to run automatically at startup.

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


Hey
very usefull guide, thank you for it.
Two suggestions
Can you add how to switch back to CM7 from CM11 for those that installed and did not liked it?
and SBFS this Guide is intented for those who already know alot of topics like TWRP
can you insert a referneces to guide explaining how to root?
 
Last edited by a moderator:
  • Like
Reactions: Proverbs2

subhrm

New member
Feb 14, 2014
1
1
Nice Guide

Thanks @Proverbs2 for this great guide.

For the sake of completeness, I would suggest you to add a section in the post on How to safely update from one nightly to a another newer/older nightly.
 
  • Like
Reactions: Proverbs2

Mislav12

Member
Feb 2, 2014
6
0
Aero kernel on SlimKat

Hello, first of all great guide, big thanks.
Did anyone have this problem using Aero Kernel (which is still awesome app :good:) on SK, every time i instal Aero k. and start to using it phone display become so dark that only in total dark place (brightnes is set to auto) is posible to read (relly hard), and after uninstaling AK every is fine:confused:
Did I miss something? tx
 

Proverbs2

Senior Member
Feb 1, 2012
300
326
Hello, first of all great guide, big thanks.
Did anyone have this problem using Aero Kernel (which is still awesome app :good:) on SK, every time i instal Aero k. and start to using it phone display become so dark that only in total dark place (brightnes is set to auto) is posible to read (relly hard), and after uninstaling AK every is fine:confused:
Did I miss something? tx

That's a strange bug. I'm using Aero Control on SlimKat 4.0, and I've never had that problem. Which SlimKat version are you using? Are you using the latest version of Aero Control from the Play store?
 

Mislav12

Member
Feb 2, 2014
6
0
That's a strange bug. I'm using Aero Control on SlimKat 4.0, and I've never had that problem. Which SlimKat version are you using? Are you using the latest version of Aero Control from the Play store?

Firs of all thaks for reply.

I'm got one device on SK 3.85 (20140323) and other on 4.0 (didn't try to use aero kernel because of problems with first one-stupid me), eveythig working great, (first time I instal it, SK take my breath, really can't searching for more with that old and hardware limited device like Defy is). Used Aero Kernel from Play store, these days was the latest (about month ago), take a chance 3-4 times during 10 days but allways with same result - start to using AK, about 5-10 hours having no issue and then darknes:confused:
Another thing that I notice (forgive me if i'm on wrong thread, can't make post on dev section), when my devices was on stock ROM after installing 2nd booth app (nothing else) the phones start to have screen wake up delay, just like now, 2-3 sec. Is it possible to exist some connection or is just coincidence!?
 

Proverbs2

Senior Member
Feb 1, 2012
300
326
start to using AK, about 5-10 hours having no issue and then darknes:confused:

In Aero Control settings, try going to GPU Control > Display Color, and make sure "Energy Saver" is not selected.

after installing 2nd booth app (nothing else) the phones start to have screen wake up delay, just like now, 2-3 sec. Is it possible to exist some connection or is just coincidence!?

Do you mean 2nd Boot (not Booth)? What exactly are you installing, and where did you get it?

Have you tried changing your governor settings for better wake-up performance? The default governor (Interactive) is set to limit the CPU frequency to 600 MHz when the screen is off, which can cause slow wakeup. In Aero Control, try changing the governor to OnDemand (or set suspend_enabled to 0 for Interactive governor). That might help.
 
  • Like
Reactions: frozenwaverider

Mislav12

Member
Feb 2, 2014
6
0
In Aero Control settings, try going to GPU Control > Display Color, and make sure "Energy Saver" is not selected.



Do you mean 2nd Boot (not Booth)? What exactly are you installing, and where did you get it?

You're wright, there is no left or right boot for Defy :silly:, i was thinking about 2ndInitDefy app, just didn't read well before posted. Defy on stock ROM with this app (only rooted, and 2ndInit installed!) became lagy when call is reciving.

Have you tried changing your governor settings for better wake-up performance? The default governor (Interactive) is set to limit the CPU frequency to 600 MHz when the screen is off, which can cause slow wakeup. In Aero Control, try changing the governor to OnDemand (or set suspend_enabled to 0 for Interactive governor). That might help.

Will try tomorrow and report.

Thanks a lott.
 

Snugglehog

Member
Apr 30, 2012
7
0
Thanks for compiling this guide. I've been using OmniRom for some weeks on both my Defys and it's worked with very few problems. I wanted to give Quarx latest build a try though, so followed your guide, as previously when I've flashed Quarx CM11, I've had problems with the 4 lower buttons not working. However after attempting to install Safewipe from TWRP, my phone froze on the Moto logo and I had to flash the stock rom and start again. I'm running CM7.2 on my spare phone. Strange that Safewipe caused the very problem that it's meant to avoid on my phone.
 

Proverbs2

Senior Member
Feb 1, 2012
300
326
Thanks for compiling this guide. I've been using OmniRom for some weeks on both my Defys and it's worked with very few problems. I wanted to give Quarx latest build a try though, so followed your guide, as previously when I've flashed Quarx CM11, I've had problems with the 4 lower buttons not working. However after attempting to install Safewipe from TWRP, my phone froze on the Moto logo and I had to flash the stock rom and start again. I'm running CM7.2 on my spare phone. Strange that Safewipe caused the very problem that it's meant to avoid on my phone.

That's unusual. Did you remember to flash defy_twrp_recovery_2.6.3.0, reboot into TWRP version 2.6.3.0, and wait 30 seconds before flashing safewipe?
 

Snugglehog

Member
Apr 30, 2012
7
0
That's unusual. Did you remember to flash defy_twrp_recovery_2.6.3.0, reboot into TWRP version 2.6.3.0, and wait 30 seconds before flashing safewipe?
The TWRP version was integral to OmniRom, so I think it was v2.7.0.0. However after booting into TWRP I doubt I waited 30 seconds before flashing Safewipe. Why the need to wait?
 

Proverbs2

Senior Member
Feb 1, 2012
300
326
The TWRP version was integral to OmniRom, so I think it was v2.7.0.0. However after booting into TWRP I doubt I waited 30 seconds before flashing Safewipe. Why the need to wait?

TWRP is unstable, and sometimes causes random reboots within the first 20 seconds. I'm guessing your phone rebooted while flashing safewipe.
 
Last edited:
  • Like
Reactions: frozenwaverider

ktwist

Member
Oct 9, 2012
15
4
Home buuton stopped working

After a couple of months of using slimkat v.3.85 today home button stopped working. There is also problem with notification, and telephony (not able to reach the phone, but making calls from device is possible). I found that someone has similar symptoms in Quarks kk4.4 thread:

Sounds like the device got 'unprovisioned', this sometimes happens and leads to at least some of the effects you listed: status bar problems, home button, settings. If you haven't nuked the thing yet you might try to manually set the provisioning bits:
Code:

#!/system/bin/sh

db=/data/data/com.android.providers.settings/databases/settings.db

prv_dev="INSERT INTO secure (name,value) VALUES ('device_provisioned','1'); INSERT INTO global (name,value) VALUES ('device_provisioned','1'); INSERT INTO secure (name,value) VALUES ('user_setup_complete','1');"

/system/xbin/sqlite3 "$db" "$prv_dev"

I'v tried tu run that script but with no luck, i am getting errors. It is probably becaouse this script is for Quarq KK not SLimkat.

Any Help? (Sorry for posting this question here, but i am unable to post in dev section.)
 

Proverbs2

Senior Member
Feb 1, 2012
300
326
After a couple of months of using slimkat v.3.85 today home button stopped working. There is also problem with notification, and telephony (not able to reach the phone, but making calls from device is possible). I found that someone has similar symptoms in Quarks kk4.4 thread:

I'v tried tu run that script but with no luck, i am getting errors. It is probably becaouse this script is for Quarq KK not SLimkat.

Any Help? (Sorry for posting this question here, but i am unable to post in dev section.)

I've never run into that problem, and I don't know if there's any easy way to fix it, but you could try just wiping data then restoring your apps and settings with Titanium Backup. Make a nandroid backup (so if wiping data doesn't help you can restore all your data easily), then wipe data, cache, and dalvik. If that doesn't work, you may have to do a clean install.
 
  • Like
Reactions: ktwist

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!