Sunday, 8 May 2011

SetVsel: overclock and undervolt your Motorola Defy


You are not getting the maximum power and battery life out of your phone.

Your phone was taught to underachieve

At factory settings your Motorola Defy is underclocked and overvolted, which means that it runs slower than it should and drinks too much battery juice (even so it performs well and has a good battery life compared to other Android phones). Some people believe that the Defy was deliberately crippled for commercial reasons: Motorola didn't want to jeopardise sales of more expensive models by making the Defy too attractive. Nobody knows if this rumor is true or false. Either way, there is a tradeoff between performance and battery life, and Motorola erred on the side of caution. A phone that crashes because it runs too fast at too low a voltage causes a lot of expensive work for customer service. A phone that drains the battery a bit faster while running a bit slower won't send its users back to the stores to demand a fix, as long as it performs within the advertised specifications.

And the specs are too conservative. Your phone can run longer and faster.

To understand why, let's dig into the numbers.

Speed, voltage, and battery trade-offs

Motorola set the three CPU speed/voltage combinations for the Defy at:
1) 300 MHz at VSel1 = 33;
2) 600 MHz at VSel2 = 48;
3) 800 MHz at VSel3 = 58;
at a threshold of 86%.

The threshold determines when the processor steps up to a higher speed. By default, it switches to high speed if it runs at 86% capacity, and slows to a lower gear when the usage drops.

Higher speed (more MHz) requires a higher voltage, which is why the VSel (Voltage Select) goes up. VSel is related to voltage according to:
V = 0.0125*VSel + 0.6.

So at the lowest default VSel (33), your phone runs at 1.0125 V. At the highest default VSel (58) it runs at 1.325 V.

The power consumed by the processor increases in a linear fashion with the clock speed (twice the speed is twice the power), but quadratically with the voltage: twice the volts means four times more power.

The display and the radios eat up most of your battery. Turning down the brightness and switching off GPS, Wi-Fi and mobile data when not in use improves battery life more than undervolting your processor.

However, you can squeeze a few more hours out of a battery charge if you undervolt your CPU, and overclocking may make some apps run a little smoother. Just don't expect miracles, and be prepared for errors and crashes when you push the wrong buttons.

Room for improvement

The main battery saver is a low VSel1 (the lowest voltage at the lowest speed), because your phone runs at this speed most of the time. Underclocking VSel1 is not a good idea, because below the default 300 MHz it takes noticably longer before your phone responds to an incoming call in standby mode. Reducing VSel1 too much makes your phone hang or reboot when it's idle, but you can reduce VSel1 within reason to increase standby time. If you cut VSel1 from 33 to 20 the processor uses 40% less power most of the time, which can make the difference between your phone lasting a full day or blacking out before you get a chance to plug it in. (There are more ways to stretch your battery without dumbing down your smartphone.)

Lowering the intermediate voltage at medium speed (600 MHz by default) saves a bit of juice when you're playing with your phone a lot, because VSel2 is the typical setting when you're using your phone. If you use your phone as an mp3 player on a long trip you may notice the difference.

Your phone rarely runs at top speed. It spikes at VSel3 occassionally, but even with QueueTube streaming, Wi-Fi Ruler scanning, GPS Status looking for satellites, and Dolphin HD loading pages in the background my processor spent most of the time at 600 MHz instead of the default maximum (800 MHz) or my custom 1 GHz.

Overclocking may make a difference if you're playing resource-hungry games or watch badly encoded videos. Just don't overdo it, because the voltage required to run at more than 1 GHz makes your phone produce more heat, reduces battery life, and may even shorten the life of your hardware. Try to keep the maximum VSel below or at the default maximum, and don't let the temperature increase beyond 35°C for too long unless you live in a very hot place. High temperatures won't kill your phone at once, but they will kill your processor and battery slowly. Batteries may be cheap, but a dead processor will turn out very expensive. Especially when the manufacturer finds out you've messed with the settings and voids your warranty.

So what settings should you use?

Workout schedule for your phone

There is no one-size-fits-all answer. Processor performance varies, even if they're from the same batch. Your optimum settings depend on your phone, whether it runs Eclair or Froyo, how you use it, where you use it. A phone in a hot jeans pocket doesn't dissipate heat as fast as a phone in a cool handbag, and shooting video is more demanding than listening to podcasts. You'll have to find the best settings for your phone by trial and error.

Start by lowering VSel1 in small steps and check if your phone runs stable for a while under real world conditions. The stability test that's built in SetVsel is a rough indication, but also test stability by running a couple of streaming video apps over 3G together with other power-hungry apps, because seemless switching between speeds is not the same as an artificial stress test at constant voltage. If your phone starts rebooting by itself, increase the VSel by a safe margin.

There's no point trying to push the numbers to the max, because the power used by your CPU is just a small part of the big picture. Tweak the next VSel after you have the first one tuned. Don't change all at once, because then you don't know which one is wrong if your phone becomes unstable. Tweak your VSels one at a time.

Remember: undervolting won't damage your phone. Pushing the voltage too high may fry your CPU and kill your battery. I wouldn't push my Defy beyond 1000 MHz unless I can make it run at a very low voltage.

Judging from reported values at which Motorola Defy (most of them on Eclair, some on Froyo) phones ran without issues (see below for details), the safe ranges seem to be:

- 300 MHz, VSel1 24-33
(some people report stable systems as low as VSel1 14);
- 600 MHz, VSel2 31-48;
(some people report stable systems as low as VSel2 27);
- 800 MHz, VSel3 41-58.
(some people report stable systems as low as VSel3 39);
- 1000 MHz, VSel3 45-74.
(above VSel3 58 your phone may get really warm).

I started with 300/24, 600/34, 1000/52. When that ran OK for a couple of days I knocked the voltage down in bits and pieces. I now keep my phone running at 300/16, 600/28, 1000/52, with the threshold at the original 86%. My phone runs smoothly, passes the stability test (check the bottom of the SetVsel screen) with flying colors, and the battery lasts noticably longer than with the default settings.

Of course that doesn't necessarily mean these settings will work for you, because every CPU is different. The only way to find out is by trial and error. Push your VSels down in small steps, one at a time, until your phone fails the stability test or starts rebooting by itself. Then go back to the last "safe" setting and continue with the next VSel.

If you like to take risks and don't mind your phone getting hot:

- 1100 MHz, VSel3 55-66;
- 1200 MHz, VSel3 60-75.

More options

SetVsel has two options to let your phone go on a diet when your battery runs low. The first option is to limit your phone to VSel2 when the battery level drops below a set percentage (e.g.30%), the other method is setting the threshold to 99% when the battery runs low. New versions of SetVsel may come with new tricks to squeeze some extra time out of dry batteries.

SetVsel can show your processor status in the notification bar if you check the speed icon box. Don't panic if the reported speed is different from what you entered into the program. SetVsel polls the processor speed more often than the notification refreshes, so the numbers indicate average speeds.

The "apply at boot" option is best left alone. If your phone runs well you won't reboot it very often anyway, and if it crashes a lot you'll probably need to try different voltages and reduce the maximum speed.

Go get it

• SetVsel (Android Market)
• SetVsel (xda forum)

SetVsel was designed for the Motorola Defy, but it also works on the Droid X and the Milestone. It may work on other phones, but your best bet is to search the market for "overclock" or "undervolt" and pick an app tailored for your device. Read the comments in the market to check if it works on your phone model. Checking out forums like xda before you start messing with the voltage is a good idea too.

Other apps to overclock and undervolt:

• Milestone Overclock (Android Market) (not only for the Milestone)
• Milestone Overclock (xda forum)
• Milestone Overclock (Google Code)
• SetCPU (xda forum, free version)

Note: all overclock/undervolt apps require that your phone is rooted.


The safe ranges were estimated by searching Google for "Motorola Defy undervolt" and taking the speed-VSel combinations reported as being stable or unstable. The full list of values used:

reported as stable:
300/15 ? ?, 300/15 500/34 600/38, 300/14 550/26 800/38, 300/16 550/27 800/39, 300/16 600/28 800/39, 300/18 600/33 800/43, 300/20 600/32 800/50, 300/26 600/32 800/44, 300/26 600/33 800/39, 300/24 600/34 900/44, 300/28 600/38 900/46, 300/28 600/38 900/48, 300/18 600/30 1000/52, 300/18 600/38 1000/52 86%, 300/20 600/28 1000/54, 300/20 600/30 1000/48, 300/20 600/30 1000/52 80%, 300/20 600/34 1000/52, 300/22 600/32 1000/52, 300/22 600/32 1000/52, 300/24 600/34 1000/52, 300/24 600/36 1000/56 80%, 300/26 600/32 1000/56, 300/26 600/34 1000/54, 300/30 600/48 1000/58, 300/30 600/48 1000/58, 300/33 600/48 1000/52 92%, 300/33 600/48 1000/58, 300/16 600/27 1100/58, 300/19 600/29 1100/54, 300/26 600/34 1100/58 60%, 300/28 600/44 1100/58, 300/28 600/44 1100/62, 300/30 600/40 1100/58, 300/30 600/44 1100/60, 300/15 600/25 1200/60, 300/20 600/32 1200/63, 300/24 600/34 1200/62 80%, 300/30 666/46 1000/58, 300/17 700/35 1100/57, 300/28 700/52 1100/62, 300/30 700/46 1100/58, 300/16 700/33 1200/60 90%, 300/16 700/34 1200/63, 300/30 700/48 1200/68 86%, 300/30 700/48 1200/68 92%, 300/28 800/46 1200/60, 300/28 800/46 1200/60 76%, 300/25 900/56 1100/66, ? 900/40 ?, ? ? 900/46, ? ? 1000/45, ? ? 1000/50, ? ? 1000/56, ? ? 1000/56, ? ? 1000/56, ? ? 1000/58, ? ? 1000/60, ? ? 1000/74, ? ? 1100/55, ? ? 1100/56, ? ? 1100/58 70%, ? ? 1100/58, ? ? 1100/59, ? ? 1100/64, ? ? 1200/64, ? ? 1200/65, ? ? 1200/66, ? ? 1200/68, 300/33 600/48 800/58 1200/68

reported as unstable:
300/13 ? ?, 300/20 ? ?, 300/20 600/30 800/40, ? ? 900/46, ? ? 1000/56, ? ? 1000/60, ? ? 1100/53, ? ? 1100/54, 300/26 600/40 1100/58, ? ? 1200/60, ? ? 1200/66, ? ? 1350/76



tweet this reddit digg this StumbleUpon digg this digg this

Saturday, 7 May 2011

Google Earth for Android Eclair blasted from the planet, but there is a way to get back to Earth


edit: Google Earth for Eclair is back in the market (13 July 2011)

Google Earth is a great app. Unfortunately the update to version 2.01 broke Google Earth on many phones, resulting in many complaints in the Android Market.

Google found an easy way to fix the issue: the world according to Google is no longer available on the market if you run Android 2.1 (Eclair). You'll need at least 2.2 (Froyo) to wander the earth.

If you still run Eclair and Earth is still working for you, then do NOT try to update the app. If you already updated and you can't get back to earth, try to restore the app from a backup (you made a backup, didn't you?), or download an old copy from one of the many sites and forums with unofficial apps. Google promised to fix the Eclair version, but they didn't deliver yet.

• Google Earth (official) on the Android Market
• Google Earth (v1.2.2) on Google


edit: Google Earth for Eclair is back in the market (13 July 2011)


tweet this reddit digg this StumbleUpon digg this digg this

Thursday, 28 April 2011

Permissions Denied: tame apps that ask for too much


The Android Market is full of useful apps, but many of them ask for more permissions than you want to give them. Apps that work OK offline want internet access to download ads from banner farms that want to know your location. Some apps ask for permission to make phone calls or send out SMSs for no apparent reason. And do you really want apps that can read your contacts list to go online to nobody knows where?

Yajin Zhou and colleagues at North Carolina State University are making a permissions manager that will let you grant or deny permission to read your contacts, get your location, or track your phone by its unique device identifier, but...

...they've been beaten to it by Stericsson, the maker of Busybox. His app, Permissions Denied, lets you block each and every permission of each non-system app installed on your phone. Block their internet access, stop them from snooping in your contacts list, hide your location, prevent them from autostarting at boot, and much more.

Permissions Denied is free, but there's a donation version available if you want to buy the developer a beer.

Some apps may break when you take away their permissions, but that's no problem. Permissions Denied lets you restore permissions with a few taps.

Some minor things that I'd like to see fixed in the next version:

Permissions Denied lets you switch internet access on or off for an app, but only in an all-or-nothing way. It would be better if we could fine tune this, for example by allowing internet access over WiFi but not over a mobile data connection. But it's not a big deal, because Permissions Denied can play together with apps like DroidWall and AdAway.

The program doesn't always work. Whether it works for you depends on your phone and firmware version. The only way to find out if it does the job for you is by trial and error.

Permissions can only be denied, not spoofed. Some apps break when they don't get the permissions they expect, so an option to spoof permissions (like giving an app a bogus location or contacts list) would be welcome.

And Permissions Denied won't let you edit permissions of system apps. This may stop you from making your system unbootable, but it also stops you from removing permissions for bloatware like MySpace, Facebook, and other non-essential stuff that may be preinstalled on your phone. Too bad, because I'd like to revoke the startup permissions of the totally useless weather widget service that Motorola slammed onto my phone.

Permission Denied, DroidWall, and AdFree all require root access, but if you want to be in control of your phone you'll have rooted it anyway, right?

• Permissions Denied in the Android Market
• Permissions Denied on code.google.com
tweet this reddit digg this StumbleUpon digg this digg this

Wednesday, 13 April 2011

Privacy Settings Manager: maybe we'll be able to control Android app permissions?


There's an Android Market full of apps that ask for way more permissions than they should. Apps that work OK offline want internet access to download ads from banner farms that want to know your location. Some apps ask for permission to make phone calls or send out SMSs for no apparent reason. And do you really want apps that can read your contacts list to go online to nobody knows where?

Unfortunately there's little you can do to control apps with too much of an apetite for permissions. You can keep 'em offline with DroidWall, you can block excessively nosy advertisers with AdFree, or you can simply choose not to install the app at all.

But it looks like we'll get more control. Yajin Zhou at North Carolina State University is making a permissions manager that will let you grant or deny permission to read your contacts, get your location, or track your phone by its unique device identifier. They named their baby "Taming Information-Stealing Smartphone Applications."

It doesn't look like their Privacy Settings Manager will get a built-in firewall, but we already have DroidWall for that.

The app is not available yet, and the authors didn't say when they would release the app and whether it will be free or commercial.

The Privacy Settings Manager is outlined in this paper: http://www.csc.ncsu.edu/faculty/jiang/pubs/TRUST11.pdf (pdf file, so you'll need Adobe Reader or another program that can read pdfs).

If you rooted your phone you can protect your privacy (and possibly your internet bill) with DroidWall and AdAway:

• DroidWall
• AdAway

UPDATE: Yajin Zhou has been beaten by Permissions Denied from Stericsson. However, Permissions Denied only denies. It doesn't spoof. So please keep going, Yajin!

• Permissions Denied
tweet this reddit digg this StumbleUpon digg this digg this