Reply
Thread Tools
rooster13's Avatar
Posts: 319 | Thanked: 221 times | Joined on Jan 2010 @ Finland
#811
Originally Posted by kkarioja View Post
I have tested this kind of trick:

Switch background connections on:

Code:
/sbin/initctl restart xsession/icd2
sleep 5
gconftool-2 -t bool -s /system/osso/connectivity/network_type/restricted_mode false
And switch off:

Code:
gconftool-2 -t bool -s /system/osso/connectivity/network_type/restricted_mode true
sleep 5
/sbin/initctl restart xsession/icd2
After a little testing, it seems to work otherwise OK, but problem is that doing this way will terminate ongoing data transfer. I guess it might be possible to make phone wait until data transfer is complete, but I have no idea how. It might also be impossible to do this without opensh...

I added those sleeps, because it seemed to cause connection to freeze sometimes, if two other command were executed without waiting for a while. Not really sure if they are needed.

Please note, that reliability of this trick is far from certain! I've only tested it on my N9 for about a week.
I was trying to set a custom command and run:
Code:
/sbin/initctl restart xsession/icd2
But since you need to be root to run that, Profilematic can't do it.

Any ideas?
__________________
Sail Raid, an old skool shoot'em up for Jolla
KillDroid, Android service killer for Jolla
goViihde, an Elisa Viihde client for Jolla
goViihde, an Elisa Viihde client for N9
Shortcut Stash Home Screen Widget
 
Moderator | Posts: 6,215 | Thanked: 6,400 times | Joined on Nov 2011
#812
Well CODeRUS' sys-ui tweaks have a toggle for toggling background connections...That uses the same gconf command as mentioned by kkarioja so it'll work...Just one note; you need to ensure your browser is closed otherwise you get the prompts to switch on internet connection...Also, wazapp needs to be exited via quit from the app's menu so that it doesn't try to auto-connect and give that irritating pop-up...

I don't think the step for the /sbin/~ command is necessary though...
 
Posts: 30 | Thanked: 25 times | Joined on Jul 2012
#813
Originally Posted by rooster13 View Post
I was trying to set a custom command and run:
Code:
/sbin/initctl restart xsession/icd2
But since you need to be root to run that, Profilematic can't do it.

Any ideas?
At least with opensh it can be done. If someone knows any other way, I'd like to hear about it.

To thedead1440: with my phone just running gconf command will not always work. Sometimes the connection is "frozen" and it won't switch on or off before it is restarted. I really don't know why is this.

Last edited by kkarioja; 2012-10-19 at 11:12.
 

The Following User Says Thank You to kkarioja For This Useful Post:
rooster13's Avatar
Posts: 319 | Thanked: 221 times | Joined on Jan 2010 @ Finland
#814
Originally Posted by kkarioja View Post
At least with opensh it can be done. If someone knows any other way, I'd like to hear about it.
Yeah me too
__________________
Sail Raid, an old skool shoot'em up for Jolla
KillDroid, Android service killer for Jolla
goViihde, an Elisa Viihde client for Jolla
goViihde, an Elisa Viihde client for N9
Shortcut Stash Home Screen Widget
 
Posts: 594 | Thanked: 1,094 times | Joined on Aug 2012 @ Rhine
#815
Do you think, it's possible to catch battery status?

With a condition like this, ProfileMatic could be the ultimate workaround for the "sudden battery drop". You could automatically disable LPS, disconnect chats, close Wazapp and stuff like that when battery goes under 10% or so, wait 10 or 20 minutes and most of the times battery will be ok after that...

Searched this thread, found nothing about that topic.

Thanks for your great work!

Edit: thanks to thedead
automatic restart of bme would be even cooler, but i'm afraid this will not work, because ProfileMatic acts as user, not as root.

But no matter what action you do, you need this battery-condition for that.

Edit2: no idea, if this could work... can you run a shell script which logs in as root and restarts bme?

Last edited by Leinad; 2012-10-19 at 12:45.
 

The Following User Says Thank You to Leinad For This Useful Post:
Moderator | Posts: 6,215 | Thanked: 6,400 times | Joined on Nov 2011
#816
restarting bme works for me when i get the battery drop thing...so if profilematic takes in commands as root then that could do too
 

The Following 2 Users Say Thank You to thedead1440 For This Useful Post:
rooster13's Avatar
Posts: 319 | Thanked: 221 times | Joined on Jan 2010 @ Finland
#817
Originally Posted by thedead1440 View Post
restarting bme works for me when i get the battery drop thing...so if profilematic takes in commands as root then that could do too
How do you restart the bme? Could you please post the command here?
__________________
Sail Raid, an old skool shoot'em up for Jolla
KillDroid, Android service killer for Jolla
goViihde, an Elisa Viihde client for Jolla
goViihde, an Elisa Viihde client for N9
Shortcut Stash Home Screen Widget
 
Moderator | Posts: 6,215 | Thanked: 6,400 times | Joined on Nov 2011
#818
Originally Posted by rooster13 View Post
How do you restart the bme? Could you please post the command here?
as root ofcourse:

Code:
/sbin/stop bme
/sbin/start bme

Edit:

the command by kkarioja should work too; give it a try

Code:
/sbin/initctl restart bme
 

The Following 3 Users Say Thank You to thedead1440 For This Useful Post:
rooster13's Avatar
Posts: 319 | Thanked: 221 times | Joined on Jan 2010 @ Finland
#819
Originally Posted by thedead1440 View Post
as root ofcourse:

Code:
/sbin/stop bme
/sbin/start bme
Cheers!

Have to test this once I get the drop next time.
__________________
Sail Raid, an old skool shoot'em up for Jolla
KillDroid, Android service killer for Jolla
goViihde, an Elisa Viihde client for Jolla
goViihde, an Elisa Viihde client for N9
Shortcut Stash Home Screen Widget
 

The Following User Says Thank You to rooster13 For This Useful Post:
Posts: 335 | Thanked: 285 times | Joined on Sep 2012 @ Trento, Italy
#820
Originally Posted by ajalkane View Post
ProfileMatic runs as user. So if you need some custom action to run as "root", you'll need to figure out how to invoke the command from script using "devel-su". I seem to remember it's possible, but I don't remember the details.
Ok thx I'll try
 
Reply


 
Forum Jump


All times are GMT. The time now is 03:46.