Wednesday, December 17, 2014

Saving Battery on Android

Android is quite liberal when it comes the use of battery power and tolerant towards apps that may want to run in the background. There are many apps claiming to save battery. But a few simple tricks using just the standard settings work as well. What is really important, however, is understanding how your phone or table work.

While Awake

There is not much you can do about conserving the power while you actively use your device. It just has to respond to whatever you are doing - reading books, browsing Facebook, snapping photos, watching videos or playing 3D games. There are a few things you can still do:
  • keep screen brightness lower rather than higher. Just to keep the screen bright can use a half of all the power. If you have an OLED screen, make your backgrounds black. Standard LCD displays use a back-light that indiscriminately lights the whole back of the LCD panel and than the LCD just makes sure what gets through. OLED actively lits every pixel if it needs to be lit.
  • use hardware acceleration to display graphics if your device gives you this option.
  • optimize WiFi power (in the advanced wifi settings).
Still, for active use, the device will drain 5-20% of the battery per hour. Reading books being perhaps the least power hungry and playing 3D games the most.

While Sleeping

This is actually where you win or loose the battle for a greener world. It all depends on how deeply the device will sleep while it is in your pocket on idle on the desk. The longer and the deeper it sleeps, the less it would do for you during that time. Like notifying you on that important update on Facebook, syncing the photos you just took, reminding you of a meeting in your calendar or an important mail from your boss.

Properly sleeping, a device may use less than 0.5% per hour. There are three kinds of things that are preventing sleep:
  • Background processes on you phone. Like that app that is recording how fast you run. Or that app connecting every few minutes to check new mail. Strategy: make sure that the stuff that you don't need is not running.
  • Syncing. A bit like the above except that it is linked to accounts and partly managed by Android system. Strategy: do not sync while sleeping.
  • Antennas catching signals from the outside, via 4G, 3G, wifi, bluetooth, GPS, NFC ... If someone calls you, the phone has to wake up. Should it also wake up if someone just liked your Instagram photo? Strategy: listen with an antenna that does not use much power and to events that matter.
Lets look at each of the three.

Background Processes

If it installed it may run. If it runs it draws power and, more importantly, may keep the device awake. Unlike Apple, Google lets misbehaving apps into the Play Store.
  • Go to settings - apps - running and see if anything is running that you installed, tried and forgot about. Uninstall the bastard.
  • Remove any screen widgets that you do not need.
  • Remove live wallpapers. If it is "live" it draws power.
  • From time to time kill all processes running on your device. There are apps for that (e.g. Cleanmaster) but you can also do it from settings ... apps ... running.
  • Prevent apps you do not want in the background all the time from staring in the first place. There are apps for that too (Cleanmaster does that too).
Syncing

If you go to settings - accounts - (an account like Google) you will find if it syncs or not. And of course you would want your contacts, mail etc. to sync. What you may not want is that the syncing happens in the background. I mean what is the point waking the phone up if you changed a contact's email address on another device. It would suffice if the syncing happens when you use contacts.

Since we do have our devices in order to be in sync with what is going on in the world, I suggest you set things up so that they sync. But get an app that will stop syncing when your battery is low, overnight etc. I like Battery Widget Reborn.

Antennas

The whole point of mobile devices is that they are mobile yet connected. They communicate with antennas but all are not created equal. Remember those old Nokia phones where the battery lasted a week or two? You can make your Android last that long if you turn it from smartphone to dumbphone.

The reason why a dumbphone could last so long on a single charge is that that part of the phone hardware was designed with energy use in mind. The 2D/3G interface in your phone is talking to the cell tower every 120 milliseconds. And only if the towers says "I have something for you" (like a call, SMS or push notification over internet protocol) that component wakes most of the phone, starts the processor etc. etc. to fetch the data and process it. Like play that MP3 for the received SMS.

The way these signaling works, how antennas are linked to the rest of the phone and how the physics of different frequencies is related to the power needed to communicate on that frequency, this is the summary:
  • Listening to 2G is least power hungry.
  • 3G is worse, 4G even worse.
  • WiFi is, by quite a margin, the worst. Half of the hardware has to be lit up to listen if there is a packet sent your way over WiFi.
So here is perhaps the most important advice in this article:
  • turn off WiFi while sleeping. This may increase the data bill a bit. But generally not much data transfer happens in the background anyway.
  • turn off "search for WiFi". You do not want your phone discovering WiFi networks while you drive through town. When you sit down and turn your phone on, it will connect to known hotspots and you will manually search for unknown ones.
  • use 2G not 3G. It draws less power and creates a weaker electromagnetic field in your pocket. It is good enough for talking and SMS, you will get all your email notifications. If you would like to surf the net you should temporarily switch to 3G. There is an app for that.
  • turn off location services. This is a bit drastic but at this time I do not know enough. Location services may wake up all kinds of stuff, including WiFi hardware and Google services like Google Now.
  • Goes without saying to turn off bluetooth by default as well.
And finally, know what is going on

There are tools that will let you know how your battery is draining. I like Battery HD and Better Battery stats. It would help you discover that misbehaving app that is keeping your phone warm.

Sunday, January 15, 2012

iTunes saga 5.0.1

I went through a painful iTunes experience. Had to. I try to avoid iTunes as much as possible, but since I wanted to update iOS version on my iPad, it was not possible to avoid it. The bottom line is that it sucks as a device management tool. Here's why:

iTunes is not a device management tool

It is a media management tool. It was made to put music and videos to iPod which started as an MP3 player. Some say it sucks there as well. I don't care. I copy photos as files, I transfer music with MediaMonkey and use mail and Dropbox to manage documents.

iTunes is patched to be a device management tool with key functions obscured by the media-optimized interface.

Sync doesn't

One of the most scary checkboxes in the Apple universe is the "Sync Apps". User is warned that if selected, all apps installed by the user on device will be removed. And they are. The trick is that before one does that, it makes sense to "transfer purchases". So that after "sync apps" removes them all, you can put them back. They get rearranged on the springboard pages but after a few minutes' work things are back to normal. It seems. It is still scary!

What sync should do to justify its name is to really sync - compare content on the device with content in iTunes and allow for both to be the same after the process. Actually I see no point in syncing stuff - apps are installed via WiFi anyway and purchases remembered by the AppStore in case one deletes them by mistake. But I decided to sync, because:

Backup doesn't

Before upgrading to iOS 5.0.1 I backed up the iPad. Upgraded. But when I restored it, there were no apps installed, just some 5 GB of memory was occupied with "other". Some backup! I would expect a backup to backup the device. Perhaps Apple would care to offer a selection of what to back up. Like system settings, apps, apps' settings, apps' data, music, videos ... But no. It seems only the things are backed up that are synced!

So I installed the iPad from scratch. Which is not a bad idea every now and then. Get rid of all the junk and dead wood and start clean.

Tuesday, August 23, 2011

Managing the Eurozone


Reading about Sarkzoy, Merkel to invite Van Rompuy to head Eurozone I must say I liked the idea 18 months ago. From a paper published in European View Volume 9, Number 1, 79-92, DOI: 10.1007/s12290-010-0117-3.
Enhance economic coordination. This is a logical requirement to maintain monetary integration. The crisis has shown its mechanisms should be taken much more seriously. In the enforcement of the Stability and Growth Pact the Commission should take advantage of the new provisions in the Lisbon treaty. The pact should be extended with supervision of private debt and the balance of payments. Because economic coordination calls for measures in the member states, the European Council should take the lead in shaping coordinated economic policy and the Commission in overseeing it. The coordination in the Monetary Union should be particularly strong and take place at a prime ministerial level (underlined today).

At the time (and now as well) the Monetary Union was handled by an almost informal meeting of the finance ministers of the Eurozone the evening before the meeting of ECFIN.
 
Today I would just add that economic policy coordination and budget supervision will solve little on the long run. It is an accounting measure. People will have to flow from regions doing bad to regions doing well, and money - in the form of investments rather than loans - will need to flow from countries with surpluses to countries with deficits. To do so the PIGS (and a few others) will have to set up an attractive business environment, because there are places outside of the EU where one can invest.

Saturday, February 5, 2011

The World is Going to Hell and We Call it Magic

Yesterday, I decided to upgrade my iPhone form iOS 4.1 to iOS 4.2.1. The process nearly bricked it. It would not even restore (Figure 1). It took me some three hours to make it work again. Something to do with the etc/hosts file. The good thing was, I had phone silence for a few hours.

Figure 1: And BTW, it is not an unknown error. It is error 1013!

I do not get intimidated by gadgets

Today, I decided to upgrade my iPad from iOS 3.something to 4.2.1. There are quite a few new apps that want iOS 4.2 and there is a long weekend in Slovenia, Tuesday being the Culture Day. Time to do a complicated and lengthy surgery.

Remembering what happened yesterday, I decided to do a backup of the iPad first. I would really hate to reinstall and reconfigure all the apps or lose documents, slides, magazines, books, movies ... The backup started, but did not look like it was doing anything. The progress bar was not moving at all (Figure 2).

Figure 2.

On a side note: these guys at Apple are supposed to be some kind of GUI fanatics ... would Steve Jobs really kill anyone if the thingy would include some kind of a counter that would say: "Your backup would be finished in three weeks, seven hours, forty five minutes and five seconds". Well, not Steve Jobs.

Seriously, if it wasn't for the animated icon (Figure 3), the iTunes could just as well be frozen. I plead guilty, it is the first time since I bought the iPad in April last year, to do the backup, but what the heck: 11 gigs take 10-15 minutes to push over the USB on my notebook, so how long could this take?

Figure 3.
The answer: 27 hours! Theoretically.
 
I fired up some system tools that showed that the data transfer rate between iTunes and iPad is at some 1 megabit per second. I assumed 8+1 checksum bit per byte and did the math. 99000 seconds to back my 16GB 3/4 full iPad! The beauty of this is that the battery lasts some 10 hours and that the iPad is not charging via MacBook's USB port. Isn't this just great?

But Google is your friend they say.

Lets find some tips how to make the iTunes backup faster. I would not be writing this if it wasn't for those tips. And the wise words from my friends on Twitter. The best advice to speed up backup is to delete the stuff you would like to back up. A whole PhD is written on how to identify which app is the one taking up a lot of space, because there is no iPad/iTunes tool to find out.

Am I the only one to see the idiocy of this advice? I mean, if I would not care about the stuff I want to back up, why back up in the first place? Yes, delete the movies, the books, the magazines, the photos, whatever data you might have ... and then, when your iPad is empty, the backup will be fast. Revolutionary?

It will not be fast, you morons, it would be the same 1 megabit/second, it would just be less of the bits and therefore fewer seconds! It is like an advice for safe sex that would say, don't have sex!

It is amazing what our IT industry gets away with these days. Devices sync at a rate which is slower than the rate at which they empty the battery. They get away with advice that in order to do backup faster, you should first destroy what you want to back up! Enough is enough.

An hour later.
They have the nerve to call this device - the iPad - magical. Indeed, it takes a fool to believe in magic. The IT industry believes we are all fools, and they are making a lot of money on this assumption! The real magic is that we are so enchanted with these gadgets, that after the troubles are over, we again think the iPad is the best thing since the screw off beer bottle top.

PS. While I was doing this, my daughter announced she needs a new external hard disk. I had an old 300M and a new 1T to spare, so I asked, what size she needed, what size are the ones she had. She had no idea except that it is full. She is in the 2nd year of grammar school, they have computing courses, and obviously they are raising good customers for this industry.

Sunday, January 16, 2011

Assange on Žižek?

That Slavoj Žižek writes with sympathy about the digital Che Guevara is not a surprise. What is surprising, though, is that Assange had a lucid opinion on philosophers even before he read Žižek:
It has often been said that mathematics is the cheapest university department to run, for all one needs is pencil, a desk and a waste paper basket. This is not so. Philosophy is cheaper still, since in philosophy we do not even need the basket.
- Julian Assange