Hi,
Backstory:
I have an Asus TF700 (running Cromi-X) and recently got the Asus Connect Dock, which has on-board ethernet. When connected, a previously hidden 'Ethernet' On/Off setting is exposed. When switched to 'on' it allows use of the Ethernet port. Downside -- when undocked, it continues to consume battery as it polls for the interface, but the setting goes away again, so it can't be disabled until the unit is re-docked and the setting turned off. Very inconvenient.
I did a lot of looking around and found that it is a setting in the com.android.providers.settings/databases/settings.db. I even managed to update it via SQLite3 via terminal, and it worked -- sort of -- only after a reboot did the setting take. Very inconvenient.
Punchline:
I'm looking to automate shutting the setting off via a tasker context, but I'm blocked on how to apply the setting without rebooting the tablet. So, in desperation, asking this community if there is a way (or app) to apply the setting so I don't have to restart the device.
Help?
acraigl said:
Hi,
Backstory:
I have an Asus TF700 (running Cromi-X) and recently got the Asus Connect Dock, which has on-board ethernet. When connected, a previously hidden 'Ethernet' On/Off setting is exposed. When switched to 'on' it allows use of the Ethernet port. Downside -- when undocked, it continues to consume battery as it polls for the interface, but the setting goes away again, so it can't be disabled until the unit is re-docked and the setting turned off. Very inconvenient.
I did a lot of looking around and found that it is a setting in the com.android.providers.settings/databases/settings.db. I even managed to update it via SQLite3 via terminal, and it worked -- sort of -- only after a reboot did the setting take. Very inconvenient.
Punchline:
I'm looking to automate shutting the setting off via a tasker context, but I'm blocked on how to apply the setting without rebooting the tablet. So, in desperation, asking this community if there is a way (or app) to apply the setting so I don't have to restart the device.
Help?
Click to expand...
Click to collapse
The problem you describe here is that the service probably doesn't poll the database for changes and instead is probably triggered by UI change within its preferences. Without calling the context of the preference, you can't force it. That's bad service handling imo.
You may be able to kill the service manually however. Since we are linux devices you may be able to get the pid from the service via pidof <packagename> and then just send a kill signal to it.
Another theory maybe that the service doesn't poll the database until there is a DOCK event broadcasted. If you have root, you could probably edit that setting that you have found and then have your app send a broadcast DOCK event. Not sure if that will work.
zalez said:
Another theory maybe that the service doesn't poll the database until there is a DOCK event broadcasted. If you have root, you could probably edit that setting that you have found and then have your app send a broadcast DOCK event. Not sure if that will work.
Click to expand...
Click to collapse
Better yet, send the DOCK broadcast yourself. You might be able to do this with some nifty reflection if it's exposed.
Take some dex2jar to it and find out.
Workout an XPOSED mod it will let u do this
Sent from my GT-S5302 using Tapatalk 2
Related
Hi,
are there any application to control different phone profile.
i would like to have at least three profile
a) in my home phone should ring, wireless connection should be via desired wifi connection (blue tooth and data connection via tmobile should be disable)
b) when i am in the car I need blue tooth enable, wifi disable
c) when i am at work, bluetooth disable, wifi disable, and data connectin via tmobile disable.
etc...
please advice me whether there is a application to do this.
thanks
ooo7
Toggle Settings from the market seems to do most of this, although not sure about turning off the data connection. You can set it to 2G though.
I think Locale would do some too - it can be set to behave in a certain way when at a certain location - I've NEVER used it though, just read about other users using it for this kind of function so check it out
hi,
thanks for your quick responses.
yes local will do some of it, but i mainly needed to change profile as an when i needed, i.e. not based on geographical location.
if you come across any other application please let me know. i am sure this sort of application will be really useful for lot of other people.
regards
ooo7
You can also try "Ear" it does almost everything except the data connection part
the 5 widgets you can get (hold finger on empty space -> htc widget -> settings) will do this... sure, you don't get the benefit of pre-sets (there _will_ be an app that will do this, somewhere) but it's totally flexible
you can certainly do the "wifi on / bluetooth & data off" and vice versa for leaving the house via locale... might be able to get by with manual toggles after that (or also have a location for work)
location works great!
try it!
I use Better Battery Stats and noticed that wlan_rx_wake is causing my N7 to wake up all the time. In 19 hours, it cause awake of 9.5 hours and the battery goes down by more than 45%.
Based on Google searches, it seems to be caused by the way the N7 Wifi card interact with the wifi router. Some suggested "fix" is to use static IP in the N7, but that's hardly a solution since I cannot do that when connecting to a Wifi router that I do NOT manage. I.e. office, school, Starbucks, etc.
So does anyone have any fix, or this is not fixable?
Do you have Wi-Fi set to turn off when the screen is off?
Sent from XDA app
gc84245 said:
Do you have Wi-Fi set to turn off when the screen is off?
Sent from XDA app
Click to expand...
Click to collapse
I have not, because:
1). I have GV app and if WiFi is PFF, then I won't be able to receive calls
2). My Galaxy Note have Wi-Fi ON even when screen is off and did not have this problem.
I also have it set to always keep wi-fi on during sleep in order to continue receiving notifications. I only lose 3 or 4% overnight, so I'm sure that is not the source of the problem. I don't use static ip. Have you tried using 'Wakelock Detect' to see which app is causing your wi-fi to keep activating? I think it is an app not your settings. Maybe trying to keep updating location services?
Groid said:
I also have it set to always keep wi-fi on during sleep in order to continue receiving notifications. I only lose 3 or 4% overnight, so I'm sure that is not the source of the problem. I don't use static ip. Have you tried using 'Wakelock Detect' to see which app is causing your wi-fi to keep activating? I think it is an app not your settings. Maybe trying to keep updating location services?
Click to expand...
Click to collapse
I do, but it's not accurate, showing only that Android Systems and Maps are using, say 10 minutes time but the "Awake" was for 3 hours. So I use BetterBatteryStats instead and that's where I saw the wlan_rx_wake taking 3 hours of the awake time.
I don't use static IP, I do use static DHCP, so it changes whenever I connect to a new Wifi AP.
Do you have the following running (these are CONSTANT background data sync)
- 4 GMail accounts (push)
- 2 Google Calendar sync
Just wondering if having too many Google accounts is actually the root cause of it.
lanwarrior said:
Just wondering if having too many Google accounts is actually the root cause of it.
Click to expand...
Click to collapse
I suppose that is possible. I just manually sync my Gmail, but have google voice set up for notifications. Try turning off auto-sync one night and see if it makes a difference. If you're sleeping, you don't really need it.
Groid said:
I suppose that is possible. I just manually sync my Gmail, but have google voice set up for notifications. Try turning off auto-sync one night and see if it makes a difference. If you're sleeping, you don't really need it.
Click to expand...
Click to collapse
Where do I change this? I use the Gmail app and don't see this in Gmail --> Settings. If I go to Settings --> Accounts, all I see is to enable or disable sync completely.
So i've had the same problem where my galaxy s3's battery has just gone to 0 in ~10 hours and i finally found the fix for it, this is what's causing it for me and might be what's causing it for you to, anyhow i'm gonna go step by step with what i did to find the culprit.
I downloaded an app called Network Log and let it log some of my traffic, i quickly found that packets where beeing sent by 192.168.1.74 wich is not any android device but my main computer and there i found the source of the problem, i was then searching around and stumbled across this post, http://forum.xda-developers.com/showpost.php?p=25876666&postcount=3
I found this line in the post,
Q: Wakelocks "wlan_rx_wake" wake up my device constantly what I can do about it?
A: The problem is neither Android nor the kernel, but the router and the (Windows7) network. In the network properties, uncheck "IPv6", disable the service "IP Helper", "Shell Hardware Detection" and "Windows Media Player Network Sharing Service", which provide ongoing Traffic. Then they scored again 98% of deep sleep.
Click to expand...
Click to collapse
and i decided to look in to it, i started the "run" command in windows and wrote "services.msc" wich then boots up you services that's started by windows, after that it's pretty simple.
Find the line called Ip Helper and stop it after that right click it and chose properties and decided the start method as inactive, after that look up the "Windows Media Player Network Sharing Service" and do the exact same thing there, this actually fixed it, my computer for some reason got stuck on sending useless packets over the network and was sending it to my galaxy s3 along with my mothers galaxy note 10.1 (no other android devices where seeing this thou for some reason) and after setting those 2 to disable i now have had my phone at 99% battery for over an hour with wifi active.
I do hope this helps and i'm gonna post this in the other wifi_rx_wake posts i can find.
Thanks for the info, really appreciated it! I will try that for my home computer, though I have a Mac (and a PC)
However, I think this won't fix the issue where I have my N7 connected to Wifi outside of my home. I.e. at work, I can't change other people's workstation settings.
I am curious what is it in N7 (or even Android OS) that makes it "respond" to certain network traffic generated by the router and/or workstation, causing it to keep waking up.
lanwarrior said:
Some suggested "fix" is to use static IP in the N7, but that's hardly a solution since I cannot do that when connecting to a Wifi router that I do NOT manage. I.e. office, school, Starbucks, etc.
Click to expand...
Click to collapse
I know this is an old post, but I thought I'd just mention that you can change your N7 from dynamic IP to static IP manually for each Wifi network, without any need to change anything from your office/school/starbucks' router side.
Just go to Wifi settings, long press the name of the network, select advanced, and setup your static IP. It will remember it for that Wifi network in the future.
prodigyX said:
I know this is an old post, but I thought I'd just mention that you can change your N7 from dynamic IP to static IP manually for each Wifi network, without any need to change anything from your office/school/starbucks' router side.
Just go to Wifi settings, long press the name of the network, select advanced, and setup your static IP. It will remember it for that Wifi network in the future.
Click to expand...
Click to collapse
I wish I could. The way the Wi-Fi setup at my workplace is that I authenticate first and then it assign an IP address based on my user account and Mac address AT THAT TIME. If I change it, it no longer works. Some sort of security feature.
But having to assign static IP for EACH location is not only a hassle, it beats the purpose of DHCP.
Unfortunately, Google had been ignoring this problem, even though there are countless post on Google's own product forum.
prodigyX said:
Just go to Wifi settings, long press the name of the network, select advanced, and setup your static IP. It will remember it for that Wifi network in the future.
Click to expand...
Click to collapse
Thank you, that works on the Nexus 5, too! Was looking for that.
Kusie
I just recently got my Note 10.1 (2014) WiFi a few days ago, but have been doing quite a bit of research. One thing I really wanted was my tablet to be... well, mobile. I could always use it at home through WiFi, but off the WiFi connection it serves very little purpose if any at all besides playing offline games, and playing offline content.
So, I did some research and found that its actually pretty easy to have Bluetooth Tether automatically enable itself and connect when you have your phone and tablet near each other.
Items needed: Android Phone, and Android Tablet
1. Download Bluetooth Auto Connect on your tablet.
2. Download Bluetooth Auto Tethering on your phone.
3. Download Tasker on your phone / Llama on the tablet. I used Tasker on my phone and found it slightly difficult to get this to work on the tablets end, so I used both Tasker and Llama to get this to work, your preference however.
4. In Tasker (which I have enabled on my phone):
Add New Task > Add Action from Plugin > Click Bluetooth Auto > If Bluetooth ~ On > Click pencil icon next to configuration > Make sure Enable Blueooth Tether is active > Save.
Once you complete this click the upper left corner "back" button twice and you should see your new "Tether" task listed on your phone.
5. In Llama (On the tablet):
Events > Click plus sign on bottom right of screen > Add Condition > Wifi Network Disconnected (any wifi network) > Add Action > Locale Plugin > Bluetooth Auto Connect > Make sure you set it to your device, in my case its the Moto X > Save.
Once you complete this, click back on your tablet and you should see the new event listed.
6. Profit
-------------------------------------------------------------
To test, disable and enable bluetooth on your phone, go into settings and check to see if tethering was activated automatically. On the tablet, enable WiFi (given you can connect to a network). Once connected to the network, disable WiFi on the tablet. It takes about 5-10 seconds to kick in, but you should connect to your phones bluetooth internet connection automatically. I ensured my phone was connected to data and not the wifi when I tested, but any connection (wifi or data) will work through tether.
Now, it might be just as easy to do this all in Llama, but its working for me using both apps. I will try to get pictures and format this better later on, but I figured I would share. Let me know if you have issues!
Thank you, this was very useful!
Will deffo give this a go - Thanks
I think there is something I am doing wrong. I followed the steps and couldn't get this to work.
What's happening?
Sent from my XT1055 using xda app-developers app
Tablet Talk
If I understand well...
The easiest way: install on both device the Tablet Talk app and voilá! 1 minute and it works!
EasyTether is my app of choice
Gets installed on your phone, pc and tablet. Supports usb connected or bluetooth. Very handy.
Does this still require you to have a bluetooth tethering plan on your phone?
Kit Kat (4.4.2)
It was mentioned that this was used on the Galaxy Tablet 10.1 (2014). I am wondering since the new update to KitKat 4.4.2 has gone through does this still work? I ask because I was running this method with a mix of FoxFI and PDANET - Tablet, and it worked fine until the update, now its not working. So wanted to see if this method was.
Thank You,
TommyZro 182
"Stay Hungry, Stay Foolish" - Steve Jobs
I just set my tablet's TTL to 65 and use wifi tethering.
Anyone know if tethering still work with these? I just bought 2 wifi models for $299 (refurbs) on ebay. We want to possibly deploy them for the business. Everyone has Droid Maxx's with unlimited data and it would be nice to tether them together. The tablets are shipped with Android 4.3 and Im afraid to upgrade to 4.4 kitkiat (I know it automatically will). Are there any kitkat tablet tethers for non rooted phones?
If not, is it possible to root the Note 10.1 and permanently stop the OTA update?
thanks ill try it soon on kitkat
Uncheck the auto check feature.
Sent via my Note 8
I followed all the steps but I cant complete the tasker part. Whenever I go in to it and try to add a new task, it prompts me to tell it what task I want to add. I dont get the option to add plug in. Am I doing something wrong?
how can i get these apps? Bluetooth Auto Tethering? Cant acess it from austria - unavailable in your country
Is there an apk available or so?
Needed solution for my Phone to tether bluetooth with inet. The solution I have is with Automate (like Tasker but free) See picture.
Back story: I've always rooted in the past, but purely for entertainment / backup purposes. Now however, I actually NEED root for my phone to function as I believe it should due to a "glitch" in the system. Please reference the thread that I started in the google help forums here (sorry can't post outside links):
I'm a new Project Fi customer with a Nexus 6P. The phone is fantastic, but I'm having a problem making calls while at home. The Project Fi CSR that I chatted with was not very helpful and was only able to tell me what I already knew.
The problem is that one of my neighbors has a Sprint "home cell tower" device (I believe it's an Airave but no way to know for sure) that my phone connects to when I attempt to place a call. When I hit send, I hear 3 beeps followed by an automated message "We are unable to complete your call at this time, please try again later; Message 12: Switch 2195"
Currently, my only option if I want to make a call is to turn on "airplane mode" and then turn wi-fi back on so that it reconnects to my home wi-fi and then place the call. Obviously this is not ideal as it's not really practical to turn airplane mode off and on when I come and go from my house.
Is there another option that I am missing. It seems almost too obvious that there should be a "prefer wi-fi calling when available" toggle somewhere, but I don't believe there is.
Any ideas / suggestions?
Click to expand...
Click to collapse
and which I proceeded to find a solution for as detailed here (sorry can't post outside links):
I've found a better solution (or at least a more convenient one) to this problem. This solution is also workable for people who feel that wi-fi calling would be more reliable in specific places than their cellular connection for making phone calls. The only caveat: you need to root your phone for Tasker and System Settings to function as required for these tasks. I have used the apps Tasker and Secure Settings to set up a rule for my phone that will automatically turn off the cellular radios and leave wi-fi on when I'm at home. When my phone connects to my home wi-fi as identified by the SSID of my home wireless router, Tasker initiates the Task to turn the cell radios off thus forcing all incoming and outgoing calls be routed over wi-fi. When my wi-fi connection is lost (when I leave home), Tasker initiates another task to turn the cellular radios back on. This has been working flawlessly for about 3 weeks on my phone, and requires absolutely no user input after the initial setup. I highly recommend this solution as it is far more convenient than having to use separate dialer apps when at home and away.
Click to expand...
Click to collapse
Long story short, I need to use Tasker and Secure Settings to manipulate airplane mode based on my location as determined by the wifi SSID to which my phone is connected. I ALSO would like to be able to use Android Pay. Unfortunately, Android Pay doesn't work unless I remove SU from the /su/xbin_bind folder, and if I do that, then Secure Settings doesn't work.
I attempted to use tasker to automate the renaming of the SU file when the Android Pay app is started and then rename the file back to SU after Android Pay closes, but the results only work sometimes... it's flaky at best and I don't know why. Sometimes Android Pay works, sometimes not, other times Secure Settings Works, and sometimes not.
Does anyone have any suggestions for me? Is there going to be an update to Secure Settings so it will work with systemless root without having the create the symlinks? Is there a way to use Tasker to turn off the cell radios only without the need for the Secure Settings app? (I'm a relative novice with Tasker)
Thanks,
Adam
Oops! Posted in wrong section. Mods, please move.
mntnbkr said:
Does anyone have any suggestions for me? Is there going to be an update to Secure Settings so it will work with systemless root without having the create the symlinks? Is there a way to use Tasker to turn off the cell radios only without the need for the Secure Settings app? (I'm a relative novice with Tasker)
Thanks,
Adam
Click to expand...
Click to collapse
Don't bet on a Secure Settings update. It seems a dead project.
You can do it without secure settings, as you're rooted (as per this post)
In tasker, instead, set your task to perform Code -> Run shell -> Command: "settings put global airplane_mode_on 1; ; am broadcast -a android.intent.action.AIRPLANE_MODE --ez state true" -> Check Use Root checkbox, for going into airplane, change 1 to 0 and true to false to disable and return to normal operation.
rgawenda said:
Don't bet on a Secure Settings update. It seems a dead project.
You can do it without secure settings, as you're rooted (as per this post)
In tasker, instead, set your task to perform Code -> Run shell -> Command: "settings put global airplane_mode_on 1; ; am broadcast -a android.intent.action.AIRPLANE_MODE --ez state true" -> Check Use Root checkbox, for going into airplane, change 1 to 0 and true to false to disable and return to normal operation.
Click to expand...
Click to collapse
Thanks for the reply and info! I'm not terribly proficient with Tasker, but I'm going to give your suggestion a shot. If it works, that would be great!:good:
Hi all,
I have tried to search for a similar problem in forums but have not found it or an answer.
My problem is that when I leave a known network (my home network) it remains off when I return. I wonder if this is because I have a setting incorrectly. I can't find anything even remotely that corresponds to not automatically finding my network again when I return home. It's annoying because it eats away at my cellular data (which despite being LTE) is blazingly slow.
I wonder if it is:
A) a setting that I am missing - what does triggering 'enable wi-fi verbose logging' in developer options do for instance - will that assist me?
or B) Something to do with me being in China behind the great fire wall. When I enter my home network, I get a 'Wi-Fi has no internet access - touch for options' notification that allows me to select 'Stay connected? Dont ask again yada yada' situation. The wifi works which is great, but it remains with an exclamation mark next to the wifi symbol in my status bar. I strongly feel that this is why the phone is not automatically able to relog into my network. Afterall, it does fine with automatic Bluetooth reconnection in my car.
Am I making sense? I know that a good fix would be to simply use my VPN through my router. Unfortunately though this option is closed to me, as I recently spent on upgrading my router and ... didn't realize the importance of a VPN capable router. My TL-WDR6500 is apparently not VPN able, so therefore it also means I cannot easily flash new roms as the phone hangs in unskippable limbo during the boot up process waiting for google service marriage or something. I can get around that at any rate, because I have found vpn ready networks close by. However, the fact remains that I think it is for this reason, my home network needs to be manually engaged each time I leave and come home. So, I am also wondering if there is some sort of noob-ish friendly network manager that can help me.
I guess it's not the end of the world for me, but it would make my phone experience top shelf if I could easily sort it out. Any assistance or thoughts would be appreciated. Surely, I can't be the only one living in mainland China using a nexus with these difficulties, right?
Cheers.
Ok. Seems that no one knows or is able to assist.
I have therefore thought about it and downloaded macrodroid and set up a couple of macros to connect WiFi networks (one for work and one for home) when they appear. Not sure what this will do to battery life and whether it will even fix the actual problem, but I guess I'll find out when I go walk the dog in a little while (literally, not figuratively).
Maybe this post might be of help to someone else stuck behind the great fire wall of China...
s327374 said:
Ok. Seems that no one knows or is able to assist.
I have therefore thought about it and downloaded macrodroid and set up a couple of macros to connect WiFi networks (one for work and one for home) when they appear. Not sure what this will do to battery life and whether it will even fix the actual problem, but I guess I'll find out when I go walk the dog in a little while (literally, not figuratively).
Maybe this post might be of help to someone else stuck behind the great fire wall of China...
Click to expand...
Click to collapse
balls... Macrodroid solve didn't work... Anyone? Please?
Solution 1 (does not require root):
1. Reboot phone and wait until Wifi is connected
2. Go to Settings and create a new user
3. Continue with user setup until you see "checking connection"
4. As soon as you see "checking connection", switch off your phone
5. Switch on your phone again
6. Toggle Wifi, and the exclamation mark should disappear quickly
7. You may optionally remove the new user you just created
This requires root, but if your problem is only about WiFi, then this will definitely work.
Just go to Terminal Emulator then type commands:
su
settings put global captive_portal_server g.cn
This will set the captive portal server to one we can use behind the Great Firewall, thus correcting the connection detection. After you toggle WiFi off and on you will no longer see the exclamation mark and WiFi will not prevent itself from connecting due to "no internet connection".
Oh, and greetings from Beijing
Sent from Google Nexus 6P @ CM13
[WARNING: XDA One have not implemented "mark forum as read" - do not use]
AndyYan said:
This requires root, but if your problem is only about WiFi, then this will definitely work.
Just go to Terminal Emulator then type commands:
su
settings put global captive_portal_server g.cn
This will set the captive portal server to one we can use behind the Great Firewall, thus correcting the connection detection. After you toggle WiFi off and on you will no longer see the exclamation mark and WiFi will not prevent itself from connecting due to "no internet connection".
Oh, and greetings from Beijing
Sent from Google Nexus 6P @ CM13
[WARNING: XDA One have not implemented "mark forum as read" - do not use]
Click to expand...
Click to collapse
I am a real noob. Ty for your time and thank you for your post - I was starting to feel like I was delving into a shakespearean monologue of self reflection and self help/doubt.
The first nonroot method worked, but I have also implemented your command work around. I have removed macro too. I wonder if now I can flash roms without suffering the no connection problem - or do I need to reset the command prompt thing each time I flash?
Thanks
s327374 said:
I am a real noob. Ty for your time and thank you for your post - I was starting to feel like I was delving into a shakespearean monologue of self reflection and self help/doubt.
The first nonroot method worked, but I have also implemented your command work around. I have removed macro too. I wonder if now I can flash roms without suffering the no connection problem - or do I need to reset the command prompt thing each time I flash?
Thanks
Click to expand...
Click to collapse
Each ROM you flash you need to type the command.
Just a matter of installing an app and typing a bit, and the terminal app can be kept for later use (handy when troubleshooting), not so bothersome isn't it?
Sent from Google Nexus 6P @ CM13
[WARNING: XDA One have not implemented "mark forum as read" - do not use]