Select default sim for cellular data

1,954 views
Skip to first unread message

mever...@gmail.com

unread,
Dec 3, 2016, 9:30:58 AM12/3/16
to Automate
Hey I have a dual sim phone that has a setting for default sim for cellular data. Options are sim 1 or sim 2. Looking to automate switching with a desktop toggle or cellular tower as one sim gets no connection at work but has limited data. Can't seem to figure out if this can be done. Phone is a oneplus 3t. Thanks for any help.

Henrik "The Developer" Lindqvist

unread,
Dec 3, 2016, 10:47:44 AM12/3/16
to Automate, mever...@gmail.com
Teh using the following flow to find the affected setting:
http://llamalab.com/automate/community/flows/7409

mever...@gmail.com

unread,
Dec 3, 2016, 11:58:56 AM12/3/16
to Automate
Well that is incredibly handy. So the variables that change are as follows

Global
Config_current_primary_sub
Value 0 or 1
Global
Multi_sim_data_call
Value 1 or 2

Best I can tell I need to use set variable but it won't seem to change. Any ideas?

Henrik "The Developer" Lindqvist

unread,
Dec 3, 2016, 12:30:45 PM12/3/16
to Automate, mever...@gmail.com
Changing Global settings will require a rooted device. After changing a value you need to use the Shell command superuser block to execute:
am broadcast -a android.intent.action.SUB_DEFAULT_CHANGED

You may also try using the Content query block to look at content://telephony/siminfo too see there's anything related to the default subscription in there.

Tommaso Borrelli

unread,
Feb 2, 2017, 4:26:44 PM2/2/17
to Automate
Hi Henrik
were can I get more information about am broadcast, intents etc?
I'm designing a flow that should switch data from a sim to the other and I need to alter the global setting reported by mever
Thank you

Henrik "The Developer" Lindqvist

unread,
Feb 2, 2017, 6:36:26 PM2/2/17
to Automate

daniele....@gmail.com

unread,
Apr 9, 2017, 4:44:11 AM4/9/17
to Automate, mever...@gmail.com


On Saturday, December 3, 2016 at 3:30:58 PM UTC+1, mever...@gmail.com wrote:
Hey I have a dual sim phone that has a setting for default sim for cellular data. Options are sim 1 or sim 2.  Looking to automate switching with a desktop toggle or cellular tower as one sim gets no connection at work but has limited data. Can't seem to figure out if this can be done.  Phone is a oneplus 3t. Thanks for any help.

Any clue?
I've a Oneplus 3 and i'd like to switch automatically at midnight the default sim cart for data from 1 to 2. Any help? Thanks a lot :)
Downloaded autotools but i've no idea how to do it...

Henrik "The Developer" Lindqvist

unread,
Apr 11, 2017, 9:50:52 AM4/11/17
to Automate, mever...@gmail.com, daniele....@gmail.com
Currently not possible, with Autotool or otherwise.

umakanth...@gmail.com

unread,
Jan 10, 2018, 2:45:19 AM1/10/18
to Automate
Hi Tommaso,

Did you find any solution for this. I am also working on the same to switch data from one one sim to other.

Thank you

Tommaso Borrelli

unread,
Jan 23, 2018, 9:37:09 AM1/23/18
to Automate
nope

anas....@gmail.com

unread,
Jul 24, 2019, 6:31:49 AM7/24/19
to Automate
Run a shell with superuser "settings put global user_preferred_data_sub 1" AND "settings put global multi_sim_data_call 1" and it switched the mobile data to different sim which I wanted.
use 1/2 as required for different sim. 
Reply all
Reply to author
Forward
0 new messages