
I've verified that it does indeed switch the SIM off (calls go straight to voicemail right after this command is executed) but I'm unsure of any further effects this switch has. Faithful to the IFTTT style, thanks to this APK, you will be able to program different actions based on particular contexts. Of course, now that you can execute it in Tasker you can now switch either SIM off at specific times. Tasker is an application that takes advantage of Android's fully customizable operating system to automate different tasks on your smartphone or tablet. Y = your subscription ID (generally, SIM1 = 0, SIM2 = 1) You will need to "su" in shell, or set Tasker to "Use Root". Now you have the index number you can test the following command in adb shell (or Tasker, with the "run shell" function).

The app can automate basically anything, and in the right hands, it's a stupendously powerful tool.
Android taskr android#
Note the = x after it this is the index number. Tasker is the Swiss Army knife of Android power users.

The app follows the basic principles of the other openHAB UIs, like Basic UI, and presents your predefined openHAB sitemap (s). So, to get the required index out of your device, you'll need to run the following commands from command prompt: The openHAB Android application is a native client for openHAB, compatible with phones and tablets. S16: Write the UTF-16 string STR into the send parcel.Īrmed with this I found that the indexes were listed in .ITelephony in the devices' framework.jar. I32: Write the integer INT into the send parcel. None of these worked for the Mi6, but linked to this page which explained the service call command: # service These are what were being fetched by the Java code. Googling produced this page from Haotian Deng that showed these indexes for the service call function were listed inside the ITelephony.aidl file. Using this, I've found a way to actually switch the SIM off.
Android taskr code#
It requires root.Īfter studying the SO solution linked above in my question I noticed that the code was retrieving the index number of a particular telephony function, which it would then use to run a command to switch off mobile data.

I've only tested it with my Mi6 running MIUI v9, Android build 8.0.0. I've solved the issue, although it may not work for all versions of Android.
