package sk.henrichg.phoneprofilesplus;

import android.net.IConnectivityManager;
import android.os.ServiceManager;

@SuppressWarnings("WeakerAccess")
public class CmdMobileData {

    public static void main(String[] args) {
        if (!(run())) {
            System.exit(1);
        }
    }

    private static boolean run() {
        try {
            IConnectivityManager adapter = IConnectivityManager.Stub.asInterface(ServiceManager.getService("connectivity"));
            //adapter.;
            return true;
        } catch (Throwable e) {
            return false;
        }
    }

}

@@ -52,25 +52,18 @@
 oid.
-net.IConnectivity
+os.Service
 Mana
@@ -67,31 +67,36 @@
 anager;%0A
+%0A
 import 
+com.
 android.
 os.Servi
@@ -87,33 +87,45 @@
 android.
-os.ServiceManager
+internal.telephony.ITelephony
 ;%0A%0A@Supp
@@ -241,17 +241,132 @@
    i
-f (!(run(
+nt subId= Integer.parseInt(args%5B0%5D);%0A        boolean enable = Boolean.parseBoolean(args%5B1%5D);%0A        if (!(run(subId, enable
 ))) 
@@ -443,16 +443,41 @@
 ean run(
+int subId, boolean enable
 ) %7B%0A    
@@ -503,58 +503,38 @@
    I
-ConnectivityManager adapter = IConnectivityManager
+Telephony adapter = ITelephony
 .Stu
@@ -578,20 +578,13 @@
 ce(%22
-connectivity
+phone
 %22));
@@ -606,17 +606,147 @@
 adapter.
-;
+getDataEnabled(subId); // hm podpora pre dual sim%0A            adapter.setUserDataEnabled(subId, enable); // hm podpora pre dual sim
 %0A       

Set mobile data without reflections for Android 9. (1)