Hi everyone,
Responded to a Q&A thread on this topic but didn't get any response, so thought I'd post here. I'm on a quest right now to automate the task of switching between network types (2G Only, 3G Preferred, etc) in Miui, similar to how Toggle 2G and built-in Tasker network switching works on CyanogenMod ROMs. What I'm checking it now is finding out everything that happens when you switch network types via Network Settings in Miui and then automating this with a Tasker task. So far here's what I have:
1) Radio (both data and voice) turns off. You can see that all connectivity is turned off for a moment while the switching takes place.
2) This environment variable changes:
/data/misc/rild_ril.prefer.network.select-type
Value is 1 for 2g only; value is 0 for 3g preferred. Simple enough to do with Tasker and the Locale Plugin:
@! echo -n 0 > /data/misc/rild_ril.prefer.network-type
or
@! echo -n 1 > /data/misc/rild_ril.prefer.network-type
However there are definitely other things happening behind the magic curtain. Although the UI eventually does show the network preference value that you set in the above file, it takes a while to show, and even after it DOES show and you switch the network back, unfortunately the value you have set doesn't stick!
So, I call on you great Miui friends and fans, to make some suggestions on how this can be pursued further! I'm sure it can be done...
Thanks,
Carl
Responded to a Q&A thread on this topic but didn't get any response, so thought I'd post here. I'm on a quest right now to automate the task of switching between network types (2G Only, 3G Preferred, etc) in Miui, similar to how Toggle 2G and built-in Tasker network switching works on CyanogenMod ROMs. What I'm checking it now is finding out everything that happens when you switch network types via Network Settings in Miui and then automating this with a Tasker task. So far here's what I have:
1) Radio (both data and voice) turns off. You can see that all connectivity is turned off for a moment while the switching takes place.
2) This environment variable changes:
/data/misc/rild_ril.prefer.network.select-type
Value is 1 for 2g only; value is 0 for 3g preferred. Simple enough to do with Tasker and the Locale Plugin:
@! echo -n 0 > /data/misc/rild_ril.prefer.network-type
or
@! echo -n 1 > /data/misc/rild_ril.prefer.network-type
However there are definitely other things happening behind the magic curtain. Although the UI eventually does show the network preference value that you set in the above file, it takes a while to show, and even after it DOES show and you switch the network back, unfortunately the value you have set doesn't stick!
So, I call on you great Miui friends and fans, to make some suggestions on how this can be pursued further! I'm sure it can be done...
Thanks,
Carl