What happens to TCP connections when phone sleeps? - Android Q&A, Help & Troubleshooting

I have a Star A3 running 2.3.4
The question is more of a general question to the android platform, I don't suspect the hardware matters.
I am running Ttorrent Pro on the phone, and the speeds are less than impressive (everyone else says the same thing) I am on a very fast connection, using speed guide I literally max out the speedtest servers in my local area (20Mb up/down which is the max they let you go to, I would get 100/100 if my speedtest server would allow it) and I have a port forwarded correctly.
but anyways, what I have noticed is, when wake the phone, and open the torrent application the speeds are down to around 3Kbps if I leave it open the speeds immediately start ramping up to 200-300Kbps if I keep it awake.
So this makes me think, when the phone is sleeping a lot of the connections are being closed, or when the phone is asleep it won't try and open new connections to new peers (and the current peer list may go stale while its asleep)
this is with all torrents, now the exact same torrent on another PC with a DSL connection (3Mb down 300Kb up) is downloading faster than the phone.
Are there any developers out there than can explain what processes are going to sleep that may be useful to keep awake for downloading, and also what are the tcp limits on the phone, ie. max open connections, max half open etc?

When the phone clocks down its CPU, of course it'll make your apps run slower. Is that so strange? Leaving it connected to the power seems to keep the CPU at high speed on my devices at least, but I guess that may vary from phone to phone.
A torrent client have a quite intelligent algorithm choosing the numbers of peers it connects to depending on several parameter such as effective bandwidth and so, and if your device lower its CPU frequency, the bandwidth will suffer.
There's also another possibility. Running the task in the background, i.e. without its main window visible, and Android may kill the app. More than 15 hidden apps (e.g. background running), and Android begin to kill the oldest. This is quite invisible to you, because Android must restart them as well. The problem with a torrent app, is that setting up the torrent, connecting to pears etc takes a while, and if the app gets killed and restarted once up running, you'll never achieve great speed. If this is the case, leaving the main activity visible prevents Android killing/restarting it.

Related

[Q] phone process priority

Is it possible to raise the process priority for the phone app? I've noticed that when the processor is under heavy load and I try to place a call it can take up to a minute between pressing the call button and the call to actually go through. Since this is a phone, after all, I would like the phone parts to take priority over whatever app happens to be hogging the processor at the moment. Can this be done?
Possible, probably not worth the trouble.
I've only discovered one tool that will change process priority, it is part of the SDK, which leads me to believe the process priority it written into the Java script for the program, the list of applicable code I found here. There is a somewhat easier alternative which I believe will help you with your desired end result, use the free Market app AutoKiller Memory Optimizer. It allows to control at what level of available memory the system will automatically kill a process based on the process class. The developer page has sufficiently detailed information about what each class is and there are varoius default settings as well it is fully customizable.
It seems that Autokiller Memory Optimizer came with my ROM (KaosFroyo). Any suggestions on what the optimal settings are? I see the listings on the developer website, but it seems like most people are just using the defaults (or maybe what the ROM set).
Which ROM are you on? It doesn't lag making calls on XTRSense. It is slightly overclocked and runs good.
Sent from my Eris using XDA App
KaosFroyo. I have had this lag with every ROM I've tried.
Define what you mean by a heavy load and what you are doing to make it work hard. Our phones aren't high end at all and although it does run faster on these ROMs, it still can be choked.
Sent from my Eris using XDA App
Any process that slows the phone down. Installing a new app is a common culprit. I often don't know what it's doing because it's doing it in the background.
I am more than aware of the phone's limitations, but I think that, given that it is a phone, the phone's processor scheduler should ensure that the parts that make it function as a phone get highest priority, even to the point of totally stopping other processes.
One other thing I've noticed is that the lag is often correlated with the data indicator being active. I know that on CDMA the data connection can't be active during a call, so could it be waiting for the data connection to turn off? Is there a way to make this happen faster? For some reason this happens even when the phone is on wifi, but I'm not clear on whether the 3G connection is turned off when the phone is on wifi.
shoofy123 said:
Any process that slows the phone down. Installing a new app is a common culprit. I often don't know what it's doing because it's doing it in the background.
I am more than aware of the phone's limitations, but I think that, given that it is a phone, the phone's processor scheduler should ensure that the parts that make it function as a phone get highest priority, even to the point of totally stopping other processes.
One other thing I've noticed is that the lag is often correlated with the data indicator being active. I know that on CDMA the data connection can't be active during a call, so could it be waiting for the data connection to turn off? Is there a way to make this happen faster? For some reason this happens even when the phone is on wifi, but I'm not clear on whether the 3G connection is turned off when the phone is on wifi.
Click to expand...
Click to collapse
You can use Systempanel to see what processes are running. In my case Youtube, Maps, Google search, Pandora, and Shazam randomly start backup processes. I downloaded Autokiller to see if it keeps them ended. The only concern I have is I want to be reasonably sure it wont end the alarm process.
The thing is I don't particularly care about these processes running. Given the limited resources of the phone I think it is a fruitless task to try to keep it from ever getting slow and still enjoy all of the awesomeness of Android. I just want the actual calling parts to be able to take top priority no matter how slow the rest of the phone is running, just like most desktop OSes give the mouse high priority.

[Q] Bunch of questions

Hello
I'm sorry to ask all those questions in a single post, but I would otherwise have had to post in several forums. I'll be grateful if you can answer even some of those questions.
I'm very happy with my Samsung Google Nexus, but there are things I need:
1. Ad blocker: For web browsing, I generally use Dolphin, and use Chrome when I need to start an incognito tab. Are there ad blockers for those browsers to avoid those heavy web pages?
2. Since 3G uses more battery, is there a way to tell Android to switch back to 2G automatically after Xmn of no web browsing (2G seems good enough for the few times I use GPS)?
3. I'd like to have the following shortcuts on the screen:
- Switch to 3G or 2G
- Enable/disable Airplane mode
- Enable/disable wifi
I currently use the "2G-3G OnOff" application, but as the name implies, it only handles the first item.
4. Is it possible to change my MAC address as a work-around to those pesty public access points that limit users to 20mn? There are several utilies for Windows that do this, but is there one for Android?
5. Is there a way to tell Android to go through a proxy when browsing in 3G? The Proxy Settings application only works for wifi
6. Is there a way for the phone to vibrate when receiving text messages?
7. Can the ring volume rise or go down depending on the surrounding noise? When on the street, I often miss calls because I can't hear the phone even with its volume pumped up to the maximum... which I must remember to lower back to a reasonable level when going back inside.
8. When using my phone as a GPS receiver while biking around on week-ends, I'd like to switch off data mode to save battery: Does GPS require a data connection, or can it work offline?
9. I generally find Android's default calendar nice to use, but there are a couple of things that bother me:
- it can't be squeezed vertically, wasting a lot of screen real estate, and making it possible to see appointments below a certain hour: Is there a way to squeeze/inflate the calendar through multi-touching? Here's a screenshot.
- it always displays a "Attending?" question, even though I don't use a shared calendar (I do attend my own appointments): Can this section be removed? Here's a screenshot.
Thanks for any help.

Fast Dormancy - A Quick Explanation and My Findings

There has been quite a bit of discussion about Fast Dormancy, so I thought I would try to investigate it, and to explain things a little.
I don't claim to be an expert on this. Far from it. I'm merely putting across what I have found out about the subject, and what my observations have been on the it.
Firstly a little explanation on what FD actually is.
When your phone is connected via 3G data (not 2G or wifi) your phone needs to enter certain states in order to maintain this connection and allow data transfer. If your Operator does not have FD support or you have it disabled, then basically your states are just connected or not connected. What this means is that every time your phone connects to data, it will have to go through all of its various stages and internal functions in order to make the connection and then perform the actual data transfer. This is slow and obviously the more processing that is required, the slower your experience will be, and the greater the affect will be on your battery.
FD tries to tackle this problem by having several different states so that the full connection/disconnection cycle is not required every time. Each state has a different level of data throughput and power consumption.
DCH - High volume data (highest power consumption)
FACH - Lower volume
PCH - No data but keeps connection
IDLE_CCCH - Not entirely sure about this one but I think its an interim, lower level stage between PCH and:
IDLE - Connection dropped (lowest power consumption)
When in DCH state, your phone is doing the highest volume of data transfer, and obviously consuming most power out of your battery.
The way FD works is when transfer rates drop, the state drops to FACH for less power consumption and then back up immediately to DCH as and when required, or if this transfer state is over for the time being, (eg. you have stopped browsing) instead of going back to IDLE which would mean going through all the connection procedures next time data is required, the state drops down to PCH. This is a very low powered state, and when data is subsequently required, it can then immediately go back up to FACH or DCH with minimal effort. The less stages that is required to get the connection back up and running the better, both in terms of battery and speed.
To turn FD on/off enter *#9900# in the dialler to get into the SysDump screen then select the Fast Dormancy option
Alternatively, gokhanmoral has an app called FastDormancy Toggle for i9300 which can also do the job. I've not tried this app personally, but I've been told it works fine on the i9100.
Whether you keep FD on or not depends primarily on if your network operator supports it.
If your network operator supports it, then enabling it is not necessarily the best answer, as it can depend on the combination of the following things:
1. How you use your phone - Are you a heavy or light data user?
If you are a heavy data user then enabling FD is almost certainly the way to go. The less the phone needs to do in order to fire the connection back up, the better. However, if you rarely use the phone for a data connection, then it may prove beneficial to you to switch it off so that the IDLE state is entered sooner. Bear in mind before you decide on if you should turn it on or off, consider what your data sync options for contacts/calendar/email etc. are. If you dont browse too often, you may still be using data in the background quite often even though you are not physically doing so through various background syncs.
2. How "intelligent" your Operator's FD actually is.
I believe the operator defines the parameters for the timings of these different FD states, so results can vary drastically between different networks. To see how your carrier handles FD can be done via a simple test on a Samung ROM. With wifi off and FD enabled, at the dialler, type *#0011#. This takes you into the ServiceMode menu. The important piece of information here is the RRC State line. Press the home button and open a browser session and go into a web site, then immediately long press the home to get the list of tasks and select the ServiceMode app. The RRC State line should be DCH (or at least FACH) and you should see some activity in your signal indicator arrows on the status bar. Eventually you should see it drop down from DCH -> FACH -> PCH -> IDLE (sometimes you may see IDLE_CCCH). Ideally, the state should stay at PCH for a while, then eventually drop to idle.
My findings so far on JB is that FD seems to be handled differently to the way it was on ICS. In fact, I'm not entirely sure its working on JB at all! For me, it seems to go from DCH -> FACH, and shortly after that (perhaps up to 5 seconds) drops to IDLE. This is not great if your going to be using more data shortly, but ok if you are no longer browsing.
After further testing, it seems on JB it make no difference if FD is enabled or disabled in the ServiceMenu.
The transitional RCC states it enters seem identical regardless of the FD option you have set.
My testing when on ICS suggested that when going from DCH eventually down to IDLE, the handset seemed to go to FACH for a short period, then sit on PCH for sometimes up to 10 minutes. This has a big advantage if you are about to do more browsing shortly, is it will take much less power to resume the connection and enable the data transfer to begin more quickly, but has the drawback of if you have indeed ended your browsing for the time being, it would be using more power compared to if it was in IDLE. So swings and roundabouts.
Perhaps my observations on ICS (ie, remaining on PCH for up to 10 minutes) is how FD should behave.
Remember FD only applies to a data connection. It does not kick in whatsoever when you are connected to wifi or on 2G.
The quality of your data connection (ie. H+, H, 3G) may also have a bearing on how FD will perform. Better connectivity should give you a more efficient FD performance.
Tip 1.
If your wifi sleep policy is set to "keep wifi on during sleep only when plugged in" then this will mean your data will take a hit whenever your screen is off (unless plugged in of course) If you think FD is not for you because "I'm almost always connected to wifi" (ie. at home/work) then you will still need to consider what the best FD policy is for you when on this sleep policy, as obviously, your screen is off most of the day.
Tip 2.
If you are not connected to wifi overnight (either your not at within your router's range, or you have set your wifi sleep policy not to be connected) bear in mind what your phone does overnight in terms of background data activity (ie. your data sync options and widgets such as news/weather etc). If you have minimal data activity overnight (you set your widgets to sleep for example), then it would be better to switch FD off, as less battery would be consumed to go straight back to IDLE than hang around for possibly 10 minutes or more each time in FACH.
Note
You may well have a higher l2_hsic wakelock when FD is disabled, but when FD is enabled you may find this drops slightly, only to find another one called secril_fd-interface kick in instead, so again, swings and roundabouts.
I did extensive testing on this on ICS, and came to the conclusion that was better FOR ME to turn FD off, but the differences were not drastic. It can however make huge differences for others, depending on your Operator and your usage habits.
On JB, I've found it better to keep wifi on constantly, and keep FD enabled.
It would be interesting to compare how your firmware/carrier handles FD.
Bottom line is, try it and see what works best for you.
Note:
I don't think the *# service codes work on CM/AOKP based ROMs but you can certainly give them a try!
If the codes do not work on your Samsung ROM then you will need to install FactoryTest.apk.
Thanks for sharing! :thumbup:
I hear many members asking 'why' when asked to disable it..
"To err is human, to forgive is divine"
Sent from my SGS II
Great work I have been reading up on this lately. Nice to know that in JB it seems almost irrelevant... That's what all my unofficial tweaking/testing was indicating. I thought I must be doing something wrong.
Quick question though, do you know of any ways to turn off Fast Dormancy in 4.2.2 ROMs? I haven't found a way. Using gokhanmoral's app still results in a secril_fd_interface wakelock in BBS.

[Q] Multiple Android devices, synchronized alarms, remote(?) snooze/dismiss

I have a somewhat complex question, and I am hoping that someone knows a good approach or apps that I can use.
I have Android devices in multiple rooms around my house, primarily set up as clocks, all on the home wi-fi network, of course. I have a primary phone, a couple of retired phones with wi-fi only, a couple of tablets with wi-fi only. (My eventual goal is to have them all connected together for several purposes, including an intercom system; this current project is a stepping stone.)
I have reminder alarms that go off all day long. Due to physical problems, the ability to control an alarm remotely is very handy.
I used to have the reminder alarms on my chumby, and I could ssh into that and control the alarm. I could change the alarm time, snooze, turn alarms on or off, etc. I used to just ssh into the chumby, then leave that konsole open on a virtual desktop on the linux machine, and switch to it when I needed to access the chumby. I also had an android remote control for it, very spiffy.
Sometimes, though, I was in another room and I didn't hear it. Problematic.
Yes, my obvious solution is to put all the alarms on my phone and carry it with me all the time. Except if I were the sort of person who has a mind like a steel trap, I wouldn't _need_ the reminder alarms in the first place It doesn't help much if the phone alarm is going off and it's three rooms away. Either I won't hear it, or I'll have to get up to shut it off, and I might not be able to.
So here's what I'd like to do:
* For each alarm, ALL the android devices sound off.
* Snoozing or dismissing the alarm from one device snoozes or dismisses the entire alarm (they all stop making noise, and they all start again when the snooze is up).
* Snooze or dismiss the alarms from my linux box with the same effects as from the android devices.
* Have some way to direct the alarms to just my phone until further notice--when I am going to be out of the house, I'll still need those reminder alarms, and the poor dogs don't need to deal with alarms sounding for hours until I get home.
1) It seems like the easiest way to manage this would be to set up something like a streaming media server on the linux box, and have it play on each of the android devices at times set up in a crontab. I *think* it was possible to stream media through multiple chumbies at the same time, so surely it's possible to do it through multiple android devices? Yes?
But I don't know how to use one to snooze a program set off by a crontab. I also don't know how to divert all the alarms to my phone [for use when leaving the house] if the alarms are primarily controlled by a linux server at home. I don't think my wi-fi reaches that far.
2) It seems like the next-most easy way to do this would be some kind of script that remotely controls the various android devices, but I have no idea where to start. I do know that you can access the terminal on an android phone, you can write shell scripts, and that you can ssh into phones if you have the right apps. What I don't know is how to control the android alarms from the command line or how to synchronize media on multiple devices.
Again, I'd want to snooze/dismiss alarms from any of the android devices on the wi-fi network, or from my linux computer.
I'd want to be able to turn off all alarms except the primary phone occasionally. It'd be awesome if the other devices could automatically detect if the phone were on the network, and only sound if it were present.
3) Other options? Are there apps or programs or scripts or methods that I don't know about, that would make this easy-peasy? Am I fretting when there is already a solution?
Thank you.
Bump? Please? Anyone? Anything?
Well, I'm just throwing my thoughts out there. This definitely sounds like a difficult task.
I assume that you are not able to write your own android apps, neither am I. So we just can't build our own solution.
I don't have an idea that solves all your questions, but I have some ideas for some of them.
Regarding your need to change the behavior if you leave your perimeter:
There are apps that can trigger predetermined tasks based on your location (wifi, GPS, etc), so you could use that.
You definitely need some kind of Webserver, connecting your phone to the other devices when you're on UMTS.
There are apps like "Android lost" that enable you to remotely control your devices, for example triggering alarms, etc. Maybe you could put that into some use.
Regarding your idea with the streaming server:
Could you set up all the devices so they start playing as soon as the server starts streaming? Maybe let vlc constantly run listening to your server on all the devices. Or a Internet radio is probably better because it can run in the background playing "silence" the whole time.
Create a shortcut on all devices to send a command to the server to stop the streaming, those servers should be manageable through ssh.
Install a normal alarm on your phone. Combine this with the location based triggering, so it is only turned on while your outside your house. Have a shortcut on your phone to manage the server and the house alarms as well.
I think this might work and should be actually be possible to realize.
I know this is not well written at all and not really in a straight line, I just made it up on the fly.
I'll try to turn it into a Tl;dr
1. Set up Internet radio server on your home network.
2. Tune all house devices in to said server.
3. Play alarms over Internet radio
4. Use command shortcuts to turn off alarm
5. Use app to automatically toggle the alarm on your phone based on your location.
6.???
7.profit
Let me know what you think, especially if it was any help at all. I like projects like that!
Sent from my GT-I9300 using xda app-developers app
Okay, great, that is really helpful and gives me a place to start Thank you!
I do have Tasker, and I'm willing to buy other apps if they look like they'd help, but I think Tasker is probably going to be my biggest help with the location detection.
I do not have any idea how to tell Tasker "turn off alarms on [primary phone] phone if [home network] is detected, turn on X, Z, and Q alarms if [home network] is not detected." I've played around a bit with it and realized that getting Tasker to execute specific actions with other programs--in this case, Alarm Clock Xtreme--is really kind of obscure, if it's even possible. It must be possible, yeah?
--Wait, is there an alarm clock for the Alarm Control Freak that will *also* detect [home network]? I loooove the way I can use Alarm Clock Extreme: unlimited numbers of preprogrammed alarms, just toggle the ones I need; all kind of options with respect to what happens when the alarm goes off, choice of snooze duration, etc etc. If there's one like that that _also_ has the option to detect location, that would be awesomeness.
Or...hmmm...I suppose I could have it freeze Alarm Clock Xtreme if it's on [home network] but activate it if it's off. I really do have to get around to rooting the phone, I suppose.
...
Do you have any suggestions for what to use for streaming from the house server, and what apps to use for receiving the streaming? Oh, I see you mentioned VLC (for some reason my brain parsed that as VPN); I'll look into that.
I think if there's a decent app for listening to streaming (suggestion welcome!), and the server can stream to all the devices at once, I can probably figure out how to use just one device to ...mute the server? (With the app itself, or a shortcut, or a short ssh script maybe.) Since they all need to be listening 24/7, muting is the thing to do, right? If I turn off the server, that could make them disconnect or stop listening, right?
I still need a snooze mechanism, though. Among other things, sometimes I need to postpone whatever the reminder alarm is going off for; sometimes I need it to help me keep track of the passing of time after the alarm goes off. It's complicated. I need to be able to snooze.
...
Question: In this setup, how do we prevent the alarms from going off on all the devices when the primary phone has left the house? I can see how we get the alarms on the primary phone TO go off, but not how we turn off the streaming alarms. I mean, I don't know how to tell the server to stop serving if it can't detect [primary phone]; is that possible?
It's not that I object to music playing when I'm not home. It's that if the dogs wake up while I'm gone, they'll need to pee. I'd really, really like not to have to clean that up every time I leave
Hm. A kind of bulky and inefficient way to do it could be turning off the streaming on the devices. Perhaps have them turn off the streaming app when the phone leaves the network, and then start it up again when they detect it again.
This is slightly problematic, because my house has very, very, VERY bad reception inside. We have to have a repeater (effectively a second network) for The Spouse's computer, which is FIFTEEN FEET from the wi-fi router. With no walls between. Really, really terrible reception. My phone drops off the wifi network, and immediately reconnects, dozens of times in a day. So does my laptop.
Soooooo I probably need a better metric than "is [primary phone] visible on wifi? No? TURN IT ALL OFF!" Maybe this is better: "Has [primary phone] been off the network for 15 minutes? Okay! TURN IT ALL OFF!" But reconnecting would still be a bit of a pain, unless the other devices only check for re-connections when the streaming app is already off. Hmmmm. I suppose they could check, say, 20 minutes before an alarm is due to go off, then 5 minutes before, and otherwise not check at all.
Except that, drat, it's the server that knows the alarm times, not the devices. They're _mostly_ on the hour, but not always. And what if I forget and it's partway through a "snooze" when I'm heading out the door? They should definitely shut off rather than continue once the snooze duration is up.
...
Nuts, it looks like this is not going to be the jumping-off point for a whole-house intercom system the way I hoped it would be. Not if everything is strung though the server, which is only working with streaming media. I could really, really use that intercom system. I just want to be able to touch a shortcut on one device and have all the rest of them repeat whatever that device hears. Then tap it again [to stop broadcasting] and let someone else respond, if they want to, from another device, the same way.
This will eventually need to reach to an outbuilding, with either a cat6 line run to it or a wireless repeater, so bluetooth won't do. I'm wondering if Skype set up to call all the other devices in the house would do it, but I want push to talk, not push to dial. (Not to mention the pain in the neck of giving each wi-fi only device a whole voip setup.)
(The various intercom apps I've tried don't work very well. The first time one of the devices leaves the home network, they never seem to reconnect and accept transmissions again. Even the apps that are _supposed_ to work if they have ANY kind of reception, including mobile data or other wifi networks.)
...
You've given me a lot to think about, thank you. But I know I am not there yet. I am wide open to further suggestions, for mechanisms, for apps, for anything!
Just a quick reply to signal you that I'm still there
I, hopefully, will come back later with a more detailed answer.
Regarding your WiFi connection problems, are you living in an area with a lot of different wireless networks present? Because this sounds to me like the channel your WiFi router is set to is already overcrowded. At such a close distance, as you described, there should be excellent reception. Unless other signals interfere, causing your mentioned frequent disconnects.
Solution: Download the free app "WiFi Analyzer" from the market and run it to see if other networks are causing interferences.
Regards, Ichwillquark
ichwillquark said:
Regarding your WiFi connection problems, are you living in an area with a lot of different wireless networks present?
Click to expand...
Click to collapse
Ah, no, actually. Quite the opposite. We're way out and surrounded by non-technically-minded people. We're the only wireless network anywhere near here, according to, for example, OpenSignalMaps and The Spouse's various wardriving type apps. Hm, pretty sure he uses Wifi Analyzer too, actually.
It's the freaking HOUSE. We can't get _any_ reception inside; not wifi, not cell, not radio, not TV. Go three steps outside the house and we have crystal-clear cell and radio reception. We've _tried_ to change "channels" on the wifi router, change routers, change DSL modem, all kinds of things; nothing works. It's the freaking house.
Being so remote is part of the problem. I have reminder alarms that go off all day; if I leave, I am gone ALL day. The poor dogs!
...
Thanks for bouncing the signal and letting me know you still exist I do too. Would love to hear anything else you have to suggest. [Hey! I think I finally hit the minimum post limit necessary for being able to click "thanks!" Spiffy!]
I don't know how helpful to you this could be, but Timely, a recently created alarm clock app has alarm syncing. I don't know to which extent (snooze sync?) but it might be worth inquiring to the creator(s).
There's a trial function too from what I can remember, but after that you will need to purchase whichever functions you'd like to keep.
https://play.google.com/store/apps/details?id=ch.bitspin.timely
If this suits you, I imagine it would be more convenient than a convoluted Tasker task.
polobunny said:
Timely, a recently created alarm clock app has alarm syncing.
Click to expand...
Click to collapse
"Manage, dismiss and snooze alarms on all your devices at once"
Oooooooh, that sounds WONderful!
That does sound a lot easier than running a media stream from a server, and working out scripts to snooze or dismiss.
I don't _see_ any mention of anything except a ringtone for the alarm sound, either on Play or on their website. I'll try it out and see.
...
The Tasker [or some other location detection] looks like it's still going to be necessary, though, and I still don't know how to do it. I need to disable the alarms on ALL the other devices when I--and the primary phone--leave the house. But the alarms on the primary phone still need to go off.
So I do still need some way for [something] to detect the phone, and to disable the alarms on [everything else] when it leaves the house.
...
Oh, POOP. Timely is not *compatible* with some of the devices.
Those are rooted Sensations with ancient versions of Android. If I put updated ROMs on them, will they be able to handle more recent apps? I mean, they can't even get Google Play, currently, they're still using Market. We didn't want to mess with them, because re-setting up a phone is annoying enough once, and we _thought_ they had all the apps they were going to need.
elfchick said:
Oh, POOP. Timely is not *compatible* with some of the devices.
Click to expand...
Click to collapse
I might be wrong, but this might be just because the resolution of some of your devices is not supported. Which doesn't necessarily mean that the app won't work just fine, it's just the market trying to safe you from an inconvenient user experience. A possible workaround would be to download the app on a supported device, extract the apk, and then install them on the unsupported ones.
Other workaround would be to get an app that spoofs the information that is send to the market about your device's resolution. I just read about this possibility today. The xposed framework has an applet that does that.
Interesting about the possibilities of getting an app installed without the Market's "approval"; I'll try that if Timely responds to the questions I sent them. And hey, if it's just that I have a really old ROM on there...well, it might be worth updating the version of Android on those phones anyway.
...
I just read about NFC tags, and I wonder if I could use them for this. Apparently you can buy NFC tags and program your phone to recognize them. So you can, for example, save battery by tapping the phone to a pre-programmed NFC tag on your door as you are leaving, and the phone will turn off wi-fi.
Perhaaaaaaaps I could use this in some way to turn off alarms in the house as I am leaving. Tap the NFC tag, a script disables the alarms on everything but [primary phone]. Tap it again when I get home, re-enable the alarms. That way nothing has to be constantly checking for the presence of [primary phone]. I can be scatterbrained, but if I put it by my keys I *should* manage to see it and remember to tap it, and tap it again when I get home and put my keys away.
Very intriguing. This seems like it _might_ be something I can script. As soon as I figure out just what I need to do to disable and re-enable alarms automatically.
Don't forget it's necessary for your phone to be NFC enabled. So definitely the Sensation cannot use the NFC directly, don't know which phone is your primary so that's to consider.
polobunny said:
Don't forget it's necessary for your phone to be NFC enabled. So definitely the Sensation cannot use the NFC directly.
Click to expand...
Click to collapse
Yeah, thanks The Sensations were retired this year when we replaced them with HTC Ones, so not a problem. I thought it'd be more clear, though, throughout the thread, if I use phrasing with descriptors like [primary phone] instead of expecting people to rmemeber which of my devices is which. (I found this thread hilarious; I could almost have been the one who wrote it: http://forum.xda-developers.com/showthread.php?t=2486180 ...very helpful.)
I'm thinking touch the NFC tag on the way out and the way in, and [...profit?] the HTC One somehow sends signals to the other devices to disable/re-enable their alarms. Don't know how to do this yet, but it seems like a MUCH better idea than having all the other devices constantly scanning the network to make sure they can find [primary phone]. Especially since they might be trying to find it while it's temporarily disconnected.
Hey elfchick, just following up as you mentioned that syncing multiple devices for an Alarm clock app was just a first step and I was wondering if you had taken this concept any further?
I've got several unusual ideas about setting up tablets as Home Automation devices and wondered if you had taken this idea any further.
Thanks, Earl

My experience with event based power management tools and governor tuning

Hi guys,
I asked a few days ago about governor settings but then set out to explore it myself. The aim of what I was doing was to make my truesmart last a full day of normal use. I am trying to make my truesmart my primary device, so a full days use is important (especially as Omate have not yet shipped my second cradle!)
Over my first couple of days with the Truesmart it was lasting about 9 hours of moderate use (Moderate use to me is having it on my wrist all day, showing people who ask, talking to my girlfriend on hangouts, checking facebook and updating a few apps). This meant that it was usually running out of juice on the walk home from work. And that really was not good enough. Yesterday, with all my modifications I was able to go out until midnight, and come home to 40% battery. So these are the tools that after trying a few I think are worthwhile.
1. Bluetooth on call https://play.google.com/store/apps/details?id=com.futonredemption.jasper.btoncall
Does what it says, when someone calls BT turns on, pairs with my headset and lets me pick up. In reverse I dail a number, count to 3 and select the bluetooth speaker, usually before they have picked up. The result is that BT goes from being about 17% of a days charge to not registering on my battery meter.
2. Lean data - https://play.google.com/store/apps/details?id=com.teqtic.leandata
Wifi is on when screen is on or on charge, when screen is off it can be set to pulse on and off for set time periods (i set 1 on and 10 off). The result is that Wifi goes from being 20% of a days charge to being about 4%
So once I was done with the two most obvious methods I had two main culprits of power usage.Cell Standby (41%) and Phone Idle (37%). Short of some baseband tuning 2g off (I live in Korea, there is no 2g) there is nothing that can be done with cell standby. So I looked to governor settings to reduce Cell standby and maybe even improved on screen battery performance. I tried a few apps, but this was by far the best
3. CPU tuner - https://play.google.com/store/apps/details?id=ch.amana.android.cputuner
Usual warnings here, this app is playing with some fairly low level stuff, it may stuff up your device and it does have a few bugs.
This app actually makes the first two redundant,, I've left the links for people that don't want to mess with governors, they are now off my watch. But the best thing this one does is that it allows you to set modes for different CPU governor tweaks on the fly. YOu will want to read this next: http://forum.xda-developers.com/showthread.php?t=1736168
On the truesmart we have 5 Governors available:
Performance - all on
Powersave - all (yes all) to lowest power
On demand - all scale frequency to power demand
Userspace - something odd that lets compatible apps set it ignore it
Hotplug - like on demand but can turn off one CPU completely
And from what I can tell we have 3 frequencies available on a 1Ghz chip (598, 806 and 1001).
You will almost always want to use hot plug unless you are benchmarking or manually switched one of the cores off as the others lack the ability to halt the second core automatically, so power is usually better, even than powersave. You also get to set the percentage of load that the frequency is upped and a powersave vs performance bias which I believe impacts how long the governor should be at that load before stepping up to the next level and how eager it is to step back.
I use uniform profile and set the following modes:
On screen or lock screen - hotplug - a small powersave bias and threshhold up at 50
Screen off on call or charging - powersave - max cpu 598, 2nd core disabled
People might find my charging profile odd, but I figure the device isn't overly usable in the cradle so why not have it charge as fast as possible, I tried performance but it got hot. With all this set, my phone idle battery usage now tracks up at about 2/3 the rate of my cell standby and there really is no loss in end user performance. The governor tweaking probably gets me and extra hour or 2 usage over the day.
After everything was done I have gone from 9 hours of charge with my usage profile to being able to last a full 18 hour day and still having room to spare. 36 hours off charge is not off the cards, so that is a four fold improvement. Have a play and let me know if it helps.
Here ya go. Remove the txt extension. This is the core of the edits that was getting a TS 10-12 days of 2G standby with no syncs and over 4 days 3G/HSPA+ standby with G+/Hangouts/Email and other apps syncing as they like.
Pay close attention to the loki99 edits. The governor changes alone save a bit of battery. It forces lowest clock rate and one core unless the device really needs both cores and higher clocks.
Lokifish Marz said:
Here ya go. Remove the txt extension. This is the core of the edits that was getting a TS 10-12 days of 2G standby with no syncs and over 4 days 3G/HSPA+ standby with G+/Hangouts/Email and other apps syncing as they like.
Pay close attention to the loki99 edits. The governor changes alone save a bit of battery. It forces lowest clock rate and one core unless the device really needs both cores and higher clocks.
Click to expand...
Click to collapse
Ah you are still around. I have a 1/8/2100 (hence why I hadn't applied your ROM to benefit from those tweaks) is there anything I need to change other than the maximum frequency of 1001000 for that model?
There are no 2g networks in Korea or I'd have 3g disabled. So 3 to 4 days it is I think right now mine is tracking down at about 1% an hour, cell standby being the biggest consumer, is there anything that can be done to reduce that further?
Thank you I'll have a play. I take it I just put the script into the init.d folder and copy the parts of the buildprop to the system directory. Is there anything else to it?
Not really. I quit deving but somebody messaged me about this and pointed to this thread. 3G only kind of bites as the 2G radios are still on and looking for networks and using battery. Try DS Battery Saver and set it to "Agressive" or "Slumberer".
Aggressive will disable WiFi, data and syncs when the screen is off and every 2 hours it will turn on data/sync for about a minute and let your apps sync.
Slumberer will completely disable WiFi, data and syncs when the screen is off and only allow data/sync when the TS is awake.
Having wifi on at all unless there is a network it can connect to is useless.
My primarily use is for sports though, the GPS eats battery (as expected). But I want max power when starting.
Less crappy firmware with Bluetooth 4 and/or another dataplan may change my use though.
For more granular control, DS Battery Saver and Kernel Tuner have Locale plugin interfaces, so they can be used in Llama/Tasker. Tasker has some governor/CPU freq support too. Additionally Locale Execute plugin can be used to activate scripts similar to what Loki posted.
CPU Tuner works reasonably well out of the box, but I want to combine profiles with location, for instance wifi only at home. In addition, I have a data plan that require activation, so data/sync is only occasionally on. (Ad based, data, SMS, talk is free, but you have to watch ads every 2nd hour for data.) So for data to be on, the condition should be to ping some internet server. At home I use wifi when screen is on.
I have some Llama events setup now for multiple locations, may have to switch to Tasker to get what I want.

Categories

Resources