Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,728,048 Members 46,477 Now Online
XDA Developers Android and Mobile Development Forum

[Guide]How I tweak, mod and hack my Defy

Tip us?
 
Sorensiim
Old
(Last edited by Sorensiim; 19th February 2011 at 07:58 AM.) Reason: TTS Service no longer being removed :), Linkage to Rob-T added
#1  
Senior Member - OP
Thanks Meter 153
Posts: 233
Join Date: Nov 2010

 
DONATE TO ME
Default [Guide]How I tweak, mod and hack my Defy

This thread is mostly to remind myself what needs to be done after a reflash. I reflash a lot. Tinkering, coding and hacking does *not* mate well with my ADHD (Attention Deficit ahh whatever), so I often find myself having to, pardon my french, un**** my gear. Most of this thread will be links to the great work others have done, I'm just piling together the stuff I use. If you like your android experience to be nice and snappy, you might like these mods too. These steps work for me, your mileage may vary. If you screw something up, it's your own fault for taking advice from strangers over the Internet. But try asking for help here on XDA, somebody will most likely be able to help you.

So, either you've just unpacked your Defy or you have just had to flash an SBF after screwing something up.

Edit: 01/01/2011: Have added a few bits so the stuff below now applies to the 2.34.1 rom as well

0) Install LauncherPro
- Or ADW.Launcher, HELauncher or whatever you prefer. Press the Home button and set the new launcher as default.

1) Root the damn thing! Download Z4Root.apk here. You'll need to allow installation of non-market apps, as well as enabling USB debugging. Go to Settings -> Applications, tick the box for "Unknown sources" and go to Development to enable USB debugging. A file manager should be included in the stock rom, otherwise get one (I prefer ES File Explorer) from the Market. Once you have your file manager, dig up the z4root.apk you just downloaded, install it and run the app, press the appropriate button to root the phone and watch it reboot.

2) Get recovery!
The custom recovery for the Defy is described here. Mad props to Tenfar for his work, please buy him a beer, he's earned it. Here's the APK you'll need. Using the same process as for the Z4Root app, install and run the recovery system app. Press the "Install recovery system" button.

3) Get JIT'tery and deodexed
Superb work by Higgsy and Antibyte! They've not only gotten JIT (jfgi, mate) to run on the Defy, they've zipped it up nicely with the deodexed /system files from Paul at Modaco.com so you can all just install them as a zip file in one go. 2.21 Roms: Download the nicely packaged zip here, if you're running the 2.34.1 rom, get this version instead. Save the file to your SD card and remember where you put it.

4) Backup everything we've done so far
Start the System Recovery App and do a Recovery Boot. When booting into recovery, select Backup/restore and do a backup. I you have installed a bunch of apps, made a lot of changes to your settins, you might want to do a seperate backup of that (but not the rom), using Titanium backup from the Market.

5) Apply the coolness from step 3
After doing a backup, wipe all user settings as well as the Dalvik cache. Then select "Install zip from SD card" and install the zip you downloaded in step 3. Wipe alle settings and the cache again. Reboot when done. Note: The wiping may not be necessary, but not doing it could screw something up and have you back at re-flashing an SBF to your phone...

5.1) Re-root, using Z4Root.
Fire up the app and press "permanent root".

6) Weed out the bloat
This bit assumes that you have ADB or MotoDev studio installed and can connect to your Defy. If not? Search the forums. - Or read the US guide for trimming the Defy, tons of info right there, thanks a lot to Rob-T for elaborating many of the steps!

Assuming you have ADB fired up (or MotoDev Studio, which I prefer):

Gain root access:
Code:
su
Mount the /system partition with write access:
Code:
mount -o rw,remount -t ext3 /dev/block/mmcblk1p21 /system
Switch to the /system/app dir:
Code:
cd /system/app
Now rename the apps you don't want: Thanks to NaeNee for proof-reading this hideous blob of commands!
Code:
mv AdService.apk AdService.rem; mv ArcPhotoworkshop.apk ArcPhotoworkshop.rem; mv ArcVideoEditorLite.apk  ArcVideoEditorLite.rem; mv BlurEmail.apk Bluremail.rem; mv revolver_2_0_0012_embed_Signed_2010-04-13_11-07-08.apk revolver_2_0_0012_embed_Signed_2010-04-13_11-07-08.rem; mv BlurSNMessagingEngine.apk BlurSNMessagingEngine.rem; mv FBAndroid-1.3.2.apk FBAndroid-1.3.2.rem; mv Kindle-1.0.2-OEM-SingleSign.apk Kindle-1.0.2-OEM-SingleSign.rem; mv MySpace.apk MySpace.rem; mv StickyNoteWidget.apk StickyNoteWidget.rem; mv SocialMessaging.apk SocialMessaging.rem; mv Swype.apk Swype.rem; mv BlurUpdater.apk BlurUpdater.rem; mv CarDock.apk CarDock.rem; mv ContactsUnconnected.apk ContactsUnconnected.rem; mv amazonmp3_1.8.19_signed_zipaligned.apk amazonmp3_1.8.19_signed_zipaligned.rem; mv esmusica_2_0_0012_embed_Signed_2010-04-13_11-05-17.apk esmusica_2_0_0012_embed_Signed_2010-04-13_11-05-17.rem; mv Fota.apk Fota.rem; mv FriendFeed.apk FriendFeed.rem; mv HelpCenter.apk HelpCenter.rem; mv hiphopofficial_2_0_0012_embed_Signed_2010-04-13_11-08-31.apk hiphopofficial_2_0_0012_embed_Signed_2010-04-13_11-08-31.rem; mv truecountry_2_0_0012_embed_Signed_2010-04-13_11-06-12.apk truecountry_2_0_0012_embed_Signed_2010-04-13_11-06-12.rem; mv KPT.apk KPT.rem; mv HomeSyncWizard.apk HomeSyncWizard.rem; mv LiveWallpapers.apk LiveWallpapers.rem; mv LiveWallpapersPicker.apk LiveWallpapersPicker.rem; mv MagicSmokeWallpapers.apk MagicSmokeWallpapers.rem; mv MessagesWidget.apk MessagesWidget.rem; mv NewsWidget.apk NewsWidget.rem; mv Protips.apk Protips.rem; mv QuickContactWidget.apk QuickContactWidget.rem; mv Quickoffice_BasicViewer_2.0.42.apk Quickoffice_BasicViewer_2.0.42.rem; mv Quickoffice_BasicViewer_2.0.52.apk Quickoffice_BasicViewer_2.0.52.rem; mv revolver_2_0_0012_embed_Signed_2010-04-13_11-07-08.apk revolver_2_0_0012_embed_Signed_2010-04-13_11-07-08.rem; mv SocialMessaging.apk SocialMessaging.rem; mv StatusWidget.apk StatusWidget.rem; mv Stk.apk Stk.rem; mv ToggleWidgets.apk ToggleWidgets.rem; mv VisualizationWallpapers.apk VisualizationWallpapers.rem; mv UniversalInbox.apk UniversalInbox.rem; mv WeatherWidget.apk WeatherWidget.rem; mv WorkContacts.apk WorkContacts.rem
EDIT: NaeNee experienced a problem with the messaging app just closing (no FC or errors) after this... Update: This is caused by deleting or renaming BlurEmailEngine.apk, so it is no longer removed/renamed in the command above.

In case you want to undo the above rename:
Code:
mv AdService.rem AdService.apk; mv ArcPhotoworkshop.rem ArcPhotoworkshop.apk; mv ArcVideoEditorLite.rem  ArcVideoEditorLite.apk; mv BlurEmail.rem Bluremail.apk; mv revolver_2_0_0012_embed_Signed_2010-04-13_11-07-08.rem revolver_2_0_0012_embed_Signed_2010-04-13_11-07-08.apk; mv BlurSNMessagingEngine.rem BlurSNMessagingEngine.apk; mv FBAndroid-1.3.2.rem FBAndroid-1.3.2.apk; mv Kindle-1.0.2-OEM-SingleSign.rem Kindle-1.0.2-OEM-SingleSign.apk; mv MySpace.rem MySpace.apk; mv StickyNoteWidget.rem StickyNoteWidget.apk; mv SocialMessaging.rem SocialMessaging.apk; mv Swype.rem Swype.apk; mv BlurUpdater.rem BlurUpdater.apk; mv CarDock.rem CarDock.apk; mv ContactsUnconnected.rem ContactsUnconnected.apk; mv amazonmp3_1.8.19_signed_zipaligned.rem amazonmp3_1.8.19_signed_zipaligned.apk; mv esmusica_2_0_0012_embed_Signed_2010-04-13_11-05-17.rem esmusica_2_0_0012_embed_Signed_2010-04-13_11-05-17.apk; mv Fota.rem Fota.apk; mv FriendFeed.rem FriendFeed.apk; mv HelpCenter.rem HelpCenter.apk; mv hiphopofficial_2_0_0012_embed_Signed_2010-04-13_11-08-31.rem hiphopofficial_2_0_0012_embed_Signed_2010-04-13_11-08-31.apk; mv truecountry_2_0_0012_embed_Signed_2010-04-13_11-06-12.rem truecountry_2_0_0012_embed_Signed_2010-04-13_11-06-12.apk; mv KPT.rem KPT.apk; mv HomeSyncWizard.rem HomeSyncWizard.apk; mv LiveWallpapers.rem LiveWallpapers.apk; mv LiveWallpapersPicker.rem LiveWallpapersPicker.apk; mv MagicSmokeWallpapers.rem MagicSmokeWallpapers.apk; mv MessagesWidget.rem MessagesWidget.apk; mv NewsWidget.rem NewsWidget.apk; mv Protips.rem Protips.apk; mv QuickContactWidget.rem QuickContactWidget.apk; mv Quickoffice_BasicViewer_2.0.42.rem Quickoffice_BasicViewer_2.0.42.apk; mv Quickoffice_BasicViewer_2.0.52.rem Quickoffice_BasicViewer_2.0.52.apk; mv revolver_2_0_0012_embed_Signed_2010-04-13_11-07-08.rem revolver_2_0_0012_embed_Signed_2010-04-13_11-07-08.apk; mv SocialMessaging.rem SocialMessaging.apk; mv StatusWidget.rem StatusWidget.apk; mv Stk.rem Stk.apk; mv ToggleWidgets.rem ToggleWidgets.apk; mv VisualizationWallpapers.rem VisualizationWallpapers.apk; mv UniversalInbox.rem UniversalInbox.apk; mv WeatherWidget.rem WeatherWidget.apk; mv WorkContacts.rem WorkContacts.apkk

I've noticed that some APK's change depending on the rom, these work for the UK 2.21 rom after applying the JIT/Deodex trick. If you get any errors, please check the exact names of the apk's in your rom:
Code:
ls
It simply renames all the app's I don't want to .rem instead of .apk. Want something back? Rename from .rem to .apk, say if you miss the weather widget:
Code:
mv WeatherWidget.rem WeatherWidget.apk
Update: Pretty slick way of listing the apps in your particular rom can be found here, props to Rob-T for that!

When you're done, reboot:
Code:
reboot
7) Overclocking time!
Install Milestone Overclock from the market and fire it up. Load the module and Press the menu button, go to settings and enter "1000000" as Custom rate and "54" as custom vsel. After pressing OK, pull the slider all the way to the right, so the selected frequency shows up as "1000MHz, 52vsel (Custom)". Click Apply and tick the box for "Autoload on boot"

8) Scaling
Install SetCPU from the market and start it up. Set scaling to "Ondemand" and tick the box for "Autoload on boot" and exit the program. Now it's time to make the vsel correspond to the cpu frequency and save some power, as explained so brilliantly by Higgsy. Buy the man a beer! My setscaling.sh is here, Higgsy's excellent startup script is here. Download both to the root of your SD card. Then connect your phone to your pc and fire up ADB/MotoDev Studio. Once connected to your phone, here's what you need to do:

Code:
su
Code:
mount -o rw,remount -t ext3 /dev/block/mmcblk1p21 /system
Code:
cp /sdcard/setscaling.sh /system/xbin/setscaling.sh
Code:
cp /sdcard/install-recovery.sh /system/etc/install-recovery.sh
Code:
chmod 755 /system/etc/install-recovery.sh
Code:
chmod 755 /system/xbin/setscaling.sh
Code:
mount -o ro,remount -t ext3 /dev/block/mmcblk1p21 /system
Reboot your phone, and it should now be humming along nicely at 300-1000mhz, sipping only the power it needs, without being held down by Motobloat. Again, I didn't come up with any of this, I just wrapped it up

After doing all this, feel free to restore your apps and settings with Titanium backup, but ONLY user apps, don't re-install the old non-optimized system apps. Here's a few screenshots with all my stuff (including locale, pure calendar and other always-running apps) is installed, after running the above tweaks and mods:





The above is at 1ghz. The phone is nice and snappy, while still getting two days use from a single charge. Here's how 1.2ghz looks:


Happy hacking!
The Following 25 Users Say Thank You to Sorensiim For This Useful Post: [ Click to Expand ]
 
tnicko
Old
#2  
Senior Member
Thanks Meter 17
Posts: 251
Join Date: Mar 2010
Nice man Someone should buy you a beer for taking the time to package all this together
 
Kribou
Old
#3  
Member
Thanks Meter 7
Posts: 43
Join Date: Dec 2010
Very nice try !

I started yesterday something similar but in document way (PDF guide or equivalent).
Maybe to avoid reading the long posts your linking to with fixes of issues and so on, you could maybe just detail a little bit more certain parts...

To give an example of my try with table of content and rooting part:

Table of content:

* How to Root the Defy
- Gain admin access
- Different methods for different versions of ROMs
* How to over clock the defy
- increase processor speed
* How to backup/install recovery
- allow installation of custom ROMs
- allow backup/restore of points of your Defy
* How to clean up system/apps
- uninstall not wanted apps or components
* How to add a theme
- make you phone look better
* How to deblur/deodexe your phone
- remove the installed moto blur to improve performance
* How to factory reset
- remove traces of what you have done
-understand the limits of the factory reset

All contributions are more than welcome to allow the completeness and improvement of this guide!

How to Root the Defy
All changes are done at own risk. I'm not responsible for a bricked phone. If you don't know what you do, stop reading here.
Default Root method for the Defy
This method was originally found by jboogie3 here urlOn modmobile 557910-motorola-defy-root-droid2method.html/url

letís get started:

1. Put the phone in Debug Mode: Go to Settings > Applications > Development and check USB debugging box.

2. Extract the files from the zip below, connect the phone via USB, and copy them to the phone via ADB like this:
Code:
Code:
adb push Superuser.apk /sdcard/Superuser.apk
adb push su /sdcard/su
adb push busybox /sdcard/busybox
adb push exploit.bin /data/local/tmp/exploit.bin
3. Now we enter the phone's internal shell, also using ADB:
Code:
Code:
adb shell
4. Then we take advantage of the "fake" root exploit:
Code:
Code:
cd /data/local/tmp
chmod 0755 exploit.bin
./exploit.bin
5. Now after that last command you should be back to your normal console, not the phone one, so we need to connect to it again, and doing so we should now see that we have root permissions since the "#" symbol is displayed instead of "$".
Code:
Code:
adb shell
6. Now we mount the /system partition as writable and copy the necessary files there, and set them with the right permissions:
Code:
Code:
mount -o rw,remount -t ext3 /dev/block/mmcblk1p21 /system
cp /sdcard/Superuser.apk /system/app/Superuser.apk
cp /sdcard/su /system/bin/su
cp /sdcard/busybox /system/bin/busybox
chmod 4755 /system/bin/su
chmod 4755 /system/bin/busybox
mount -o ro,remount -t ext3 /dev/block/mmcblk1p21 /system
exit
7. Restart the phone and check if you have ROOT in a terminal by typing the "su" command, or by installing any other app that requires ROOT, and seeing it the SuperUser app pops up.

Rooting.zip > urlexternal url/url
Contains the fake root exploit, SuperUser version 2.3.6.1 and busybox

Alternative easy Root method
1. Download the z4root application on the market or elsewhere, install it
Apply the root / permanent root, thatís all !
Note: not working for all versions of phone, but dramatically easy to do.

Specific UK 2.51 ROM as of 29th of Dec 2010
1. Download attatched files
defy_2.21_boot_only.sbf
2.21boot.zip
defy_2.51_boot_only.sbf
2.51boot.zip

2. Flash the defy_2.21_boot_only.sbf via rsd lite then reboot in to system
Note: Power off DEFY. Then press 'Volume Up' and 'Power' together to boot to loader before you flash the SBF to your DEFY. Debug: If you RSD Lite did not recognize your DEFY, download the USB driver here:
urlmotorola docstools USB_Drivers/url

3. Open you phone's usb debug mode(settings>application>development>usb debug mode), then follow the standard process the root the Defy. When finished, your phone is rooted with superuser

4. Flash back the defy_2.51_boot_only.sbf via rsd lite.

Without links since iam newbee here.

Cheers,
Kribou
The Following User Says Thank You to Kribou For This Useful Post: [ Click to Expand ]
 
Higgsy
Old
#4  
Higgsy's Avatar
Senior Member
Thanks Meter 618
Posts: 1,513
Join Date: Oct 2009
Location: Smethvegas
Good guide

Nexus 5 - Cataclysm - Faux Kernel
The Following User Says Thank You to Higgsy For This Useful Post: [ Click to Expand ]
 
Sorensiim
Old
#5  
Senior Member - OP
Thanks Meter 153
Posts: 233
Join Date: Nov 2010

 
DONATE TO ME
Quote:
Originally Posted by Kribou View Post
To give an example of my try...

...Without links since iam newbee here.

Cheers,
Kribou
That's one hell of a long example
 
Kribou
Old
#6  
Member
Thanks Meter 7
Posts: 43
Join Date: Dec 2010
yes sorry !

In fact you did a very nice work (that you tested a lot) and I wanted to do a bit the same with different options possible to save newbees from reading hours and hours of forums...

Cheers,
Kribou
 
naenee
Old
(Last edited by naenee; 30th December 2010 at 03:01 PM.)
#7  
naenee's Avatar
Senior Member
Thanks Meter 52
Posts: 410
Join Date: Apr 2008
Do you use a custom text-messaging application? After renaming some of the apks you suggest, the default text-messaging app closes after opening. Not a force-close, just a open and close without any error.

I'm putting everything back as it was until I've narrowed down the problem.

One more note:

You are suggesting users who want to follow your instructions, buy SetCPU from the market?
 
Sorensiim
Old
(Last edited by Sorensiim; 30th December 2010 at 03:01 PM.)
#8  
Senior Member - OP
Thanks Meter 153
Posts: 233
Join Date: Nov 2010

 
DONATE TO ME
Quote:
Originally Posted by naenee View Post
Do you use a custom text-messaging application? After renaming some of the apks you suggest, the default text-messaging app closes after opening. Not a force-close, just a open and close without any error.

I'm putting everything back as it was until I've narrowed down the problem.
I've had that error before, but not after applying the steps listed in the guide - running the UK 2.21 rom. No custom stuff here, so you've got me worried.

Here's the command to undo the renames:
Code:
mv AdService.rem AdService.apk; mv ArcPhotoworkshop.rem ArcPhotoworkshop.apk; mv ArcVideoEditorLite.rem  ArcVideoEditorLite.apk; mv Bluremail.rem Bluremail.apk; mv revolver_2_0_0012_embed_Signed_2010-04-13_11-07-08.rem revolver_2_0_0012_embed_Signed_2010-04-13_11-07-08.apk; mv BlurSNMessagingEngine.rem BlurSNMessagingEngine.apk; mv StickyNoteWidget.rem StickyNoteWidget.apk; mv SocialMessaging.rem SocialMessaging.apk; mv Swype.rem Swype.apk mv BlurUpdater.rem BlurUpdater.apk; mv CarDock.rem CarDock.apk; mv ContactsUnconnected.rem ContactsUnconnected.apk; mv amazonmp3_1.8.19_signed_zipaligned.rem amazonmp3_1.8.19_signed_zipaligned.apk; mv esmusica_2_0_0012_embed_Signed_2010-04-13_11-05-17.rem esmusica_2_0_0012_embed_Signed_2010-04-13_11-05-17.apk; mv Fota.rem Fota.apk; mv FriendFeed.rem FriendFeed.apk; mv HelpCenter.rem HelpCenter.apk; mv hiphopofficial_2_0_0012_embed_Signed_2010-04-13_11-08-31.rem hiphopofficial_2_0_0012_embed_Signed_2010-04-13_11-08-31.apk; mv truecountry_2_0_0012_embed_Signed_2010-04-13_11-06-12.rem truecountry_2_0_0012_embed_Signed_2010-04-13_11-06-12.apk; mv KPT.rem KPT.apk; mv HomeSyncWizard.rem HomeSyncWizard.apk; mv LiveWallpapers.rem LiveWallpapers.apk; mv LiveWallpapersPicker.rem LiveWallpapersPicker.apk; mv MagicSmokeWallpapers.rem MagicSmokeWallpapers.apk; mv MessagesWidget.rem MessagesWidget.apk; mv NewsWidget.rem NewsWidget.apk; mv Protips.rem Protips.apk; mv QuickContactWidget.rem QuickContactWidget.apk; mv Quickoffice_BasicViewer_2.0.42.rem Quickoffice_BasicViewer_2.0.42.apk; mv revolver_2_0_0012_embed_Signed_2010-04-13_11-07-08.remmv SocialMessaging.rem SocialMessaging.apk; mv StatusWidget.rem StatusWidget.apk; mv Stk.rem Stk.apk; mv ToggleWidgets.rem ToggleWidgets.apk; mv TtsService.rem TtsService.apk; mv VisualizationWallpapers.rem VisualizationWallpapers.apk; mv UniversalInbox.rem UniversalInbox.apk; mv WeatherWidget.rem WeatherWidget.apk; mv WorkContacts.rem WorkContacts.apk
Edit: Just added the undo-rename command to the original guide.
 
naenee
Old
#9  
naenee's Avatar
Senior Member
Thanks Meter 52
Posts: 410
Join Date: Apr 2008
I've put back the package you linked to and messaging no longer closes. I'll stick to renaming only those APKs I know exactly of what their purpose is and only when I'm sure I do not need them - mainly Amazon MP3/DLNA and a few others.

Thank you for the prompt reply
 
elblackmo
Old
#10  
Junior Member
Thanks Meter 0
Posts: 2
Join Date: Dec 2010
Location: Sydney
Soren, good guide mate.. Thumbs up.. Just a small point: delete one of your noughts from para 7

Sent from my MB525 using XDA App

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes