Wednesday, February 1, 2017

Lyft: Absurd battery consumption

Today all of a sudden I realized my phone ran out of battery in less than 5 hours.
I opened the battery consumption and found out that the top consumer was Lyft; this was shocking as I hadn't been using it the whole day. Digging into the issue, the statistics have shown that Lyft app consumed 336 MB of RAM (on avg) in the last 3 hours. This is huge! Especially if compared to the other apps sitting on my phone:

RAM in last
3 hours
Battery
consumption
Lyft
336 MB
19%
Whatsapp
51 MB
3%
Snapchat
16 MB
0%
Google Maps
0 MB
0%
Uber
0 MB
0%


Was it a glitch?
A priori we can’t tell. But it seems quite unlikely. Why? The last update of Lyft app’s latest update was on Jan 25, 2017. That’s exactly one week ago. If there was such a failure introduced by accident, they should have had catch it in QA. Lyft, a billion dollar company with tens of millions of users, is likely to have a really intensive QA procedure. Especially if we consider that they only have one product on the market (their mobile app). Also, they are likely to collect both statistics and usage. But this was not enough during a seven day period of time to catch the bug, which doesn’t really make sense.

Can the user do something about this?
Yes and no. If the app is bad or evil (where bad means not well developed and evil means developed to obtain something from the user) the phone’s owner can’t do much about it. Uninstalling might be a possibility, but considering that, sometimes, Lyft has better fares than Uber, it’s good to keep it handy.

Can we protect our privacy?
Yes! Android and iPhones allow controlling what is shared with the App developer. If you go to:
Android: Settings -> Apps -> tap on ‘Lyft’ -> tap on permissions
iPhone: Settings -> Scroll down and tap on ‘Lyft’ -> tap on permissions
Afterwards you can disable what is shared with the app. I would suggest disabling everything for now. But remember, the next time you need to book a ride you will have to re-enable the permissions.

The app from Uber is pretty humble on this, I always had used it with only permissions for Camera, Location and Phone.

I am not aware of what are the minimum permissions Lyft need to run, you can experiment on disabling some and try to request a ride.
But also, this is a tricky topic: some companies develop their apps in a really poor way, requiring the user to enable all the permissions in order to use their app. This is mainly because of two possibilities reasons:
  • The development team want’s to save time, so they just ask for permissions once, and the whole app relies that they will be granted.
  • The development team is evil, and wants to collect extra data from you while they give you this amazing app for free. This is the case for example of several free video games. They require permission to read your contacts, calendar, or SMS. But why? They don't need them.

Disabling permissions will not save us of the app consuming an insanely amount of battery, but will limit the damage the app can do to us.

Finally, we can limit the background internet usage (google for ‘how to limit background data’ for Android or iPhone). Again, try to disable it and request a ride. Maybe the app will not work properly, so experiment by yourself. Optionally, you can enable background data for Lyft only while you are about to use the app.

Are you telling me that Lyft is a super evil megacorp?
No, not necessarily. Maybe it was just a series of unfortunate events.

How so? Maybe they are experimenting with new features in their app and something went wrong. I guess that they might try to get information about your movement, maybe if you are commuting home via car or public transport, and to try to guess how the traffic is like. Why am I saying this? Well, I noticed the big chunk of battery consumption comes from CPU, but not from RAM. Also the internet background usage was not really high (15 MB). So whatever they had been doing, it was expensive on CPU.