Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Battery consumption way too high #87

Closed
SecUpwN opened this issue Jul 4, 2014 · 21 comments
Closed

Battery consumption way too high #87

SecUpwN opened this issue Jul 4, 2014 · 21 comments

Comments

@SecUpwN
Copy link
Member

SecUpwN commented Jul 4, 2014

Hey folks, since I'm running AIMSICD all day long and on the move, I experience that my HTC One is having problems lasting the whole day. The battery drain is devastating since GPS is turned on all the time. And to be honest, I hate GPS - it not only feels weird having it on and knowing that all paths will be logged, but also I do not know if other Apps are secretly using it.

Not sure if there is some other way of tracking Cell Data? Or at least something to add for more battery-friendlyness? Generally, I'm open to all suggestions if they improve battery life.

@He3556
Copy link
Collaborator

He3556 commented Jul 4, 2014

I have the same problem and the same phone. I had an App to check the power consumption. I am running so many things on it so i am not sure what it is. And there should be a App where you can block GPS for each App. Can't remember the name...

@andr3jx
Copy link
Contributor

andr3jx commented Jul 4, 2014

@SecUpwN I see it the same like you. GPS is really inconvenient, we need to rely more on Cell and WiFi-positioning. I did some research and what I really find interesting is that it is possible to use Wifi and Cell positioning completely offline. Apparently Google Maps supports offline maps and it also stores all wifi and cell data for positioning. So we can let the the user download the map of his area and should still get reliable position without sending constantly data to google (we can block internet access for gmaps).

@He3556
Copy link
Collaborator

He3556 commented Jul 4, 2014

yes some services use wi-fi, too. http://openbmap.org/api/openbmap_api.php5
But as long as we check the position with a constant time interval we will need power for that. What if we use longer periods when the position didn't change for a while?

@E3V3A
Copy link
Contributor

E3V3A commented Jul 4, 2014

Well, I think there are a couple of misconceptions here.

  1. The App was not meant to be running all day long, while on the move. (Unless you think someone is driving a tracking bus behind you. I know @SecUpwN think so. (; ) But then again we never said it shouldn't run all day long either.
  2. Just because you're using the App, doesn't mean you have to have Google Maps open, and in fact, AFAICT, Google is not being used, unless you have Maps open so there is nothing being uploaded from us, there. Maybe @xLaMbChOpSx can confirm this.
  3. Yes, the GPS is a power hungry beast, but we need very accurate device localization, or we can just forget finding fake BTS's.
  4. @andr3jx I'm not sure "going offline with Gmaps" still works? Have you tried it? In any case it doesn't work in all parts of the world, because maps access for certain locations can be (and is being) withheld. Try to download an offline map of Israel!
  5. If this is a battery issue, we should talk about that, as this thread seem to more become concerned about maps again, which we have already discussed elsewhere.
  6. Power will have to be used in excess, because constantly scanning your local network (neighboring cells), keep both your AP and modem from going into low power and low-use RRC mode.
  7. One possibility to reduce this, is to just look for minimal network changes, and when a change is detected, then go in full alert mode for a bit and so on. Implementing this, is highly speculative at this time.
  8. Another issue to eventually look into, is what's called screen state, when we use RIL and OEM_HOOK methods, there's also something that determine whether or not to keep the screen on. I think I posted some code comments about that in XDA thread.

I think these are normal alpha-version issues. They need to be addressed eventually, but not now. Remember we still need to establish the basic functionality, of actually detecting a fake BTS. Having that, is what would kick this app into Beta phase, and then we can start worrying about battery savings etc.

PS. I removed the "bug" label, as this is not a bug.

@E3V3A E3V3A removed the bug label Jul 4, 2014
@SecUpwN
Copy link
Member Author

SecUpwN commented Jul 4, 2014

Thanks @He3556 for confirming this Issue and thanks to @andr3jx for the research towards a solution. I agree with you, @E3V3A: This indeed is an alpha-state Issue, but I'd like to let it stay open until we've found a way to collect accurate data without killing the phone. So please, don't close it just yet.

One more small note about (not) running AIMSICD all day long: As for me, one larger goal for this App is to enable users to be notified of IMSI-Catchers when they are on the move, not just when they think they might be traced or just turning it on before jumping right into the middle of a riot (hint: leave your phone at home). Basically my goal is to let AIMSICD be running all the time and as battery-friendly as possible.

@He3556
Copy link
Collaborator

He3556 commented Jul 4, 2014

yes i would also use it 24/7. Especially when i am moving around it's important to scan. The possibility to find a fake BTS is much higher. But this is something to think about later in development and i am sure we will find a solution. But it would be interessting how much % power the GPS part really needs, compared to App and the Radio part.

@andr3jx
Copy link
Contributor

andr3jx commented Jul 6, 2014

-- MOVED --

@E3V3A
Copy link
Contributor

E3V3A commented Jul 6, 2014

@He3556 and @andr3jx : Thanks for the research, but can you please move this discussion into another "issue"? The detailed map stuff is totally OT for THIS issue, and will soon become lost as more issues are opened. In fact much of what you've just said, has been discussed elsewhere (For example in #71) . It's not my job to organize and move these things around, so please search and stay on topic. If you can move the last two posts to a new issue or another obvious place, that would be much better, or we'll have to close this issue for now. Sorry, I don't want to sound rude, I just want to keep this place organized, without excessive crosstalk.

@SecUpwN
Copy link
Member Author

SecUpwN commented Sep 17, 2014

@xLaMbChOpSx, please tell me what you think about this Issue. What is "best practice" in terms of protection? Do we have to turn on GPS in order to be protected? Or can we just leave enable Monitoring of Cell Details to stay protected? If the second is the case, would you please enable Monitoring of Cell Details to be the default setting? Hope this solves it and @E3V3A agrees with me on this.

@tobykurien
Copy link
Contributor

The battery usage can easily be managed. Currently, the GPS settings are extremely aggressive - min update distance of 10 meters, min update time of 1 second. I can ease back on this, but I'm not sure what values are acceptable that would still be useful for tracking. Typically, I would use min distance of 1km, min time of 2 or 3 minutes.

@tobykurien
Copy link
Contributor

In addition, there is the "refresh rate" setting in preferences. Setting this to anything less than 1 min will be a battery hog, since it won't give the CPU a chance to sleep.

@E3V3A
Copy link
Contributor

E3V3A commented Sep 25, 2014

Thanks @tobykurien, this bring up a brand new angle. The GPS need to be as accurate as possible to be useful, however, and unless, you're moving around, the GPS could be shut off after first lock-on. Thus we should (OMG even more stuff again) implement this GPS rules:

IF (you are moving around), THEN (enable medium GPS).
IF (standing still & NOT HAVE previous lock-in), THEN (enable max GPS, until lock-in to accuracy)
IF (standing still & HAVE previous lock-in), THEN( USE previous lock-in AND disable GPS)

Reasoning: We only need accurate positioning to determine relative distance to neighborhood BTS's.

@tobykurien
Copy link
Contributor

Good suggestion @E3V3A and not too difficult to implement. We wouldn't completely disable the GPS, since we'd need it to figure out if there is movement, but we'd throttle back on the update rate, until such time as we detect that we're moving. Alternatively, we can disable GPS until such time as we connect to a different cell tower, although that can often happen even if the phone is sitting still.

@SecUpwN
Copy link
Member Author

SecUpwN commented Sep 25, 2014

@tobykurien thanks for picking up on this. Might be that I'm too paranoid about GPS, but ever since knowing that GPS is a military technology, I tend to keep it off whenever possible. Not sure this is even possible, but can't we implement some sort of replacement? I am honest when I say that I hate GPS.

@Diapolo
Copy link

Diapolo commented Sep 25, 2014

IMHO the GPS in your phone is not any privacy risk in general, as it should just collect satellite positions to compute your current position. It get's bad if apps track your location and because of that I use Cyanogenmod and the privacy guard + also (like you) have GPS set to off when not using it (but I might consider turning it on for this app, because I would love to see IMSI protection)!

This project should be the kind of baseband firewall that the Cryptophone 500 has :-D

@SecUpwN
Copy link
Member Author

SecUpwN commented Sep 25, 2014

You are right, @Diapolo. May suggest another cool privacy App for you? I solely use Xprivacy, not the internal CyanogenMod PrivacyGuard. Xprivacy features much better fine-tuning and also comes with crowd-sourced restrictions. As for the Baseband Firewall, I have been a little "sick" of getting asked and opened up the official Issue #124 for it. Please continue discussion of it there, thank you.

@E3V3A
Copy link
Contributor

E3V3A commented Sep 25, 2014

First and last, baseband firewall = doesn't exist. It's marketing propaganda! Second, @SecUpwN your fear of GPS may be founded on not understanding the technology. There is no sending of GPS, only receiving. If anything is sent, it is through baseband, and that we won't know, for a long time, t --> oo.

@tobykurien We can turn off GPS, and use accelerometer to check for movement.

@Diapolo
Copy link

Diapolo commented Sep 25, 2014

It's no marketing propaganda, it's perhaps just a name, but offers things that sound good and seem to work. Well the bad side is, that you can't look into their code and we don't know how they are doing things, but that doesn't mean it's non-existant.

For the GPS thing, I guess my explanation also made that clear. The risk are Apps or Google tracking you via GPS queries, not the technology by itself...

@SecUpwN
Copy link
Member Author

SecUpwN commented Sep 26, 2014

@E3V3A, thank you for clarifying things. @tobykurien, I'm all for your proposal with the accelerometer to check for movement and keep GPS. I will read up on the matter and take care of my worries.

@E3V3A
Copy link
Contributor

E3V3A commented Sep 26, 2014

Let me clarify some of the use of GPS on mobile phones. Ever since the first (feature) mobile phones with GPS technology was introduced, the GPS part/chip of the phone was separated from the processor. With the introduction of more modern (smart) phones, which have their baseband (RF DSP/modem) sepearted from application processor, the GPS part was still separate and communicating with either AP or BP via a serial interface. However, since about 2012, and in particular on Qulacomm Snapdragon based smart phones, they have integrated all three. For example, in the MSM8960 family, the GPS is part of, and directly communicating with/via the modem (BP), and then eventually forwarded to AP. Only that AP/BP are now both located on a PoP chip. And as I have shown, here Qualcomm insists to install all relevant HW for GPS, even if no such functionality is enabled or present in rest of AP FW. Thus Qualcomm modems can never be trusted to not send GPS data to mobile network. It is simply not possible to turn off the GPS on those devices. It's all embedded. In fact in that same post, I made an experiment, where I found that GPS hartbeat data was still being fed to the debug interface, even if my device (a wifi router) did not have any such features. Welcome to Qualcomm hell!

So to summarize. @SecUpwN's concerns are not unfounded, but the idea of turning it off is. You simply can't on those chipsets. You can however, rip open your device and physically add/remove the GPS frequency filters.

@SecUpwN
Copy link
Member Author

SecUpwN commented Sep 26, 2014

Thank you, @E3V3A. Your comment has been added to the FAQ.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants