W walmo Active Member Licensed User Longtime User Jul 24, 2018 #1 Hi I found this code ... Code: Copy TelephonyManager tm = (TelephonyManager)context.getSystemService(Context.TELEPHONY_SERVICE); Class clazz = Class.forName(tm.getClass().getName()); Method m = clazz.getDeclaredMethod("getITelephony"); m.setAccessible(true); ITelephony it = (ITelephony) m.invoke(tm); it.supplyPin("1111"); is there anybody that can help me use this , (May be like this that Erel did - Code: Copy Sub SetMobileDataEnabled(enabled As Boolean) Dim r As Reflector r.Target = r.GetContext r.Target = r.RunMethod2("getSystemService", "connectivity", "java.lang.String") r.RunMethod2("setMobileDataEnabled", enabled, "java.lang.boolean") ) The phone is rooted and kitkat 4.4.2 Please ....... Thx Last edited: Jul 25, 2018
Hi I found this code ... Code: Copy TelephonyManager tm = (TelephonyManager)context.getSystemService(Context.TELEPHONY_SERVICE); Class clazz = Class.forName(tm.getClass().getName()); Method m = clazz.getDeclaredMethod("getITelephony"); m.setAccessible(true); ITelephony it = (ITelephony) m.invoke(tm); it.supplyPin("1111"); is there anybody that can help me use this , (May be like this that Erel did - Code: Copy Sub SetMobileDataEnabled(enabled As Boolean) Dim r As Reflector r.Target = r.GetContext r.Target = r.RunMethod2("getSystemService", "connectivity", "java.lang.String") r.RunMethod2("setMobileDataEnabled", enabled, "java.lang.boolean") ) The phone is rooted and kitkat 4.4.2 Please ....... Thx
Erel B4X founder Staff member Licensed User Longtime User Jul 25, 2018 #2 Please use [code]code here...[/code] tags when posting code. Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Jul 26, 2018 #4 Untested code: Code: Copy Dim ctxt As JavaObject ctxt.InitializeContext Dim r As Reflector r.Target = ctxt.RunMethod("getSystemService", Array("phone")) r.Target = r.RunMethod("getITelephony") r.RunMethod2("supplyPin", "1111", "java.lang.String") It is unlikely to work in new versions of Android. Upvote 0
Untested code: Code: Copy Dim ctxt As JavaObject ctxt.InitializeContext Dim r As Reflector r.Target = ctxt.RunMethod("getSystemService", Array("phone")) r.Target = r.RunMethod("getITelephony") r.RunMethod2("supplyPin", "1111", "java.lang.String") It is unlikely to work in new versions of Android.
W walmo Active Member Licensed User Longtime User Jul 26, 2018 #5 Thank you Erel But now .... The phone is rooted and im using "SuperUser: Acquiring root permissions, the easy way." my Code - Code: Copy Dim Process As SuProcess Process = Su.Acquire("Su") Dim ctxt As JavaObject ctxt.InitializeContext Dim r As Reflector r.Target = ctxt.RunMethod("getSystemService", Array("phone")) r.Target = r.RunMethod("getITelephony") Process.Execute(r.RunMethod2("supplyPin", "2812", "java.lang.String")) also in manifest Code: Copy AddPermission("android.permission.ACCESS_SUPERUSER") AddPermission("android.permission.MODIFY_PHONE_STATE") but i get error java.lang.SecurityException: Neither user 10130 nor current process has android.permission.MODIFY_PHONE_STATE. Am i using superuser correctly or ...? using kitkat 4.4.2 Upvote 0
Thank you Erel But now .... The phone is rooted and im using "SuperUser: Acquiring root permissions, the easy way." my Code - Code: Copy Dim Process As SuProcess Process = Su.Acquire("Su") Dim ctxt As JavaObject ctxt.InitializeContext Dim r As Reflector r.Target = ctxt.RunMethod("getSystemService", Array("phone")) r.Target = r.RunMethod("getITelephony") Process.Execute(r.RunMethod2("supplyPin", "2812", "java.lang.String")) also in manifest Code: Copy AddPermission("android.permission.ACCESS_SUPERUSER") AddPermission("android.permission.MODIFY_PHONE_STATE") but i get error java.lang.SecurityException: Neither user 10130 nor current process has android.permission.MODIFY_PHONE_STATE. Am i using superuser correctly or ...? using kitkat 4.4.2
Erel B4X founder Staff member Licensed User Longtime User Jul 26, 2018 #6 Seems like you are not running as root. I'm not familiar with this library. Upvote 0