darvincisec/DetectMagiskHide

Service not bound issue

Closed this issue · 10 comments

Captioned issues is coming for me. using andoird 11 on pixel 3

Can you elaborate more on what exactly is the issue you face ?

Is it happening specifically on Android 11 ? Have you checked with other versions. I dont hold android 11 device and hence i cannot confirm it.

Have the same issue on android 10 (Samsung Galaxy s9). I have no toasts after first and second click, and have "service not bound" toast on the third click and others. Also tried to include isolated service to my own project, but have the same issue.

at android.os.BinderProxy.transactNative(Native Method)
at android.os.BinderProxy.transact(BinderProxy.java:575)
at com.darvin.security.IIsolatedService$Stub$Proxy.isMagiskPresent(IIsolatedService.java:85)
at com.darvin.security.DetectMagisk$1.onClick(DetectMagisk.java:35)
W/System.err: at android.view.View.performClick(View.java:7862)
at android.widget.TextView.performClick(TextView.java:15004)
at android.view.View.performClickInternal(View.java:7831)
at android.view.View.access$3600(View.java:879)
at android.view.View$PerformClick.run(View.java:29359)
at android.os.Handler.handleCallback(Handler.java:883)
at android.os.Handler.dispatchMessage(Handler.java:100)
at android.os.Looper.loop(Looper.java:237)
at android.app.ActivityThread.main(ActivityThread.java:8167)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:496)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1100)
D/DetectMagisk: Service Unbound
D/DetectMagisk: Service bound

have this exception on firts and second click

@Notchik, @mohittyagi11 I noticed a mistake in jni function which can be the reason for service getting unbound. Can you check with the latest commit

@darvincisec Thanks, in prev version i just commented the jni call and all works fine in your project. Hope last change will fix this issue. But I have new problem integrating isolated service to my project. bindService() method returns true, so service is created, but onServiceConnected() never called. Rechected the code, all parts are the same, isolated service mentioned in manifest too, so i don't realy understand the reason of this issue. (also, if to work with isolatedProcess = false, all works fine and onServiceConnected() called every time after bindService() called). I hope maybe u can help

Can you try with the latest version? I dont see a difference in binding with an Isolated and non-isolated service.

Find out the answer. After bindService(), it creates the same second process, which causes the exception because of no-permittion. After checking Process.isIsolated() and calling "return" all works fine. Don't really understand the reason of the difference between isolated and non-isolated service, but it works.

Thanks for the answer. But this doesnt sound like an intended behaviour. Neither i see such issue on my devices. Since the original issue is resolved, I am closing it.