Page 2 of 2

Re: Dual Sim Support

Posted: 14 Jul 2019 14:46
by Bluscre
Any news for this, @martin? I would really love to automatically switch the sim used for networking based on connectivity

Re: Dual Sim Support

Posted: 16 Jul 2019 19:58
by Martin
Unfortunately no news. The required methods seem to be protected by permissions that can not be requested by apps like Automagic.

Regards,
Martin

Re: Dual Sim Support

Posted: 13 Aug 2019 17:59
by Bluscre
Martin wrote:
16 Jul 2019 19:58
Unfortunately no news. The required methods seem to be protected by permissions that can not be requested by apps like Automagic.

Regards,
Martin
What about root?

Re: Dual Sim Support

Posted: 15 Aug 2019 19:05
by Martin
Sure, root would be an option but it's usually a lot of work to get such undocumented/unofficial features working on most devices and maintaining the code is also taking a lot of time so it's not an option at the moment.
Only option for the moment is to use a plugin (if it still works). I think there was at least one plugin that worked on some devices. The other option is to automate the UI which admittedly only works in some cases and is not very reliable.

Regards,
Martin

Re: Dual Sim Support

Posted: 24 Sep 2019 16:41
by Pastis
I use the following instruction to activate/desactivate sim
Action type execute root command
service call phone x x32 y i32 z

Where:
x = index number you fetched previously,
y = your subscription ID (generally, SIM1 = 0, SIM2 = 1)
z = whether on (1) or off (0)

For X

In old android (until 8)
Download jadx
ADB pull the devices framework.jar (adb pull /system/framework/framework.jar)
Open the .jar file with 7-Zip and extract the *.dex files.
Open each .dex file with jadx-gui until you find the one with the following tree: com.android.internal.telephony.ITelephony
Search for the item TRANSACTION_setSimPowerStateForSlot. Note the = x after it; this is the index number.

In new and old android
http://ktnr74.blogspot.com/2014/09/call ... l.html?m=1

In pocophone with android 9 x= 176

Re: Dual Sim Support

Posted: 06 Jan 2020 09:52
by fede91it
Yes it works also for me on LineageOS 16 Android 9

x = 176

Re: Dual Sim Support

Posted: 26 Jan 2020 20:48
by Pastis
In pocophone with Android 10 x=178